Commit graph

1480 commits

Author SHA1 Message Date
Bill Currie
4cef9792f4 [util] Make hash-tables semi-thread-safe
They take a pointer to a free-list used for hashlinks so the hashlink
pools can be per-thread. However, hash tables that are not updated are
always thread-safe, so this affects only updates. progs_t has been set
up such that it is easy for multiple progs within one thread can share
hashlinks.
2020-03-25 15:43:16 +09:00
Bill Currie
28f50d2719 Add function key defs up to F48
This allows for the four combinations of shift and control. Not
bothering with alt because alt-f4 closes my xterm (bbkeys from the looks
of it: it grabs a bunch of Mod1-* keys).
2020-03-22 13:46:27 +09:00
Bill Currie
67ec9bfb47 [vid] Initialize x event before sending
Quietens valgrind nicely (though it gave a weird source of the memory).
2020-03-08 21:30:08 +09:00
Bill Currie
de64be1d67 Show more info when dumping x11 video modes
Found in an old stash. Probably the start of xrandr support.
2020-02-12 11:04:28 +09:00
Bill Currie
302a462c32 Make SetMouse timeout after 2 seconds
This makes sure that some unchecked event doesn't cause a lockup.
However, blocking input is really not the way to go: need to implement a
state machine and use non-blocking event reads.
2019-07-10 22:28:33 +09:00
Bill Currie
980cf58ac5 Wait for the window to be visible before mouse warping
This fixes the hang during fullscreen startup on my system (the motion
events weren't being generated because there was no window to see the
motion).
2019-07-10 22:28:33 +09:00
Bill Currie
a4f963f67b Add a cvar to block use of x11 vidmode
Or really, allow it if the user specifically requests it: the default is
blocked. Modern systems (particularly displays) do not really like
changing resolution, so doing so by default seems rather wrong.
2019-07-10 22:28:33 +09:00
Bill Currie
f58c2fef5a Switch QF's quaterions from wxyz to xyzw.
After messing with SIMD stuff for a little, I think I now understand why
the industry went with xyzw instead of the mathematical wxyz. Anyway, this
will make for less pain in the future (assuming I got everything).
2018-10-12 14:33:55 +09:00
Bill Currie
34bcf7faab Do a pure/const/noreturn/format attribute pass.
I always wanted these, but as gcc now provides warnings for functions that
could do with such attributes, finding all the functions is much easier.
2018-10-09 12:42:21 +09:00
Bill Currie
db3df6f8a7 Fix a bunch of dead increments. 2018-09-09 11:12:04 +09:00
Bill Currie
3f638d95ba Remove a possibly spurious break.
I'm not certain despair actually meant for the break to be there. It
certainly would have sped up the game a bit but at the expense of proper
blood trails in the software renderers.
2018-09-09 10:54:38 +09:00
Bill Currie
62793b2dc2 Fix some potentially garbage assignments.
These are the ones where I could easily make scan-build happy. They do seem
to be potential holes where invalid data in one place could result in use
of uninitialized values.
2018-09-09 09:54:16 +09:00
Bill Currie
59e85b7d5e Fix a pile of dead assignments.
Some were actual bugs!
2018-09-08 22:23:57 +09:00
Bill Currie
1eb1622420 Fix some strncat issues. 2018-09-07 21:27:34 +09:00
Bill Currie
8fd5be0ee0 Fix a pile of sizeof goofs.
While scan-build wasn't what I was looking for, it has proven useful
anyway: many of the sizeof errors were just noise, but a few were actual
bugs (allocating too much or too little memory).
2018-09-07 20:00:57 +09:00
Bill Currie
4f58429137 Fix an unhealthy pile of gcc 8 warnings.
While some of the warnings were merely annoying, some where actual bugs or
unearthed bugs in related code.
2018-08-20 00:05:00 +09:00
Bill Currie
2329fb1885 Fix some warnings and bitrot. 2016-10-25 00:10:30 +09:00
Bill Currie
f163e35f21 Add a builtin to get keydown. 2016-01-10 13:33:05 +09:00
Bill Currie
9cb23ba67e Clean up some error messages.
The contractions took the emphasis off where it needed to be.
2016-01-04 16:12:36 +09:00
Bill Currie
aecea5c350 Document most of they key binding system. 2016-01-04 16:11:15 +09:00
Bill Currie
59f60d1ba7 Enable the Key_StringToKeynum builtin.
I don't know why I didn't do it earlier other than lack of need.
2016-01-04 16:10:22 +09:00
Bill Currie
7c16acf4aa Make Key_GetBinding take an imt instead of a name. 2016-01-04 16:06:48 +09:00
Bill Currie
331b054d4a Fix an inappropriate reuse of a variable.
Using "ax"is for the joystick "var"iable is a bit confusing.
2015-06-18 21:22:31 +09:00
Bill Currie
d1f1375df5 Increase number of supported joystick buttons.
Also fix a bug where despite supporting 32 buttons, only 18 were actually
supported, and a similar issue for the number of axes.

My saitek x52 has 34 buttons and 10 axes. Whee.
2014-08-17 11:35:40 +09:00
Johnny
d1a8c1b277 Color swizzle & software lighting fix 2014-02-03 16:20:54 +09:00
Bill Currie
d80342e0a8 Fix some compile errors from Johnny's patch.
Turns out he has to compile without -Werror.
2014-02-02 16:42:08 +09:00
Johnny
850382eed4 Fixes crashes when sw32_r_pixbytes is set to 2 or 4 2014-02-02 16:22:53 +09:00
Bill Currie
9d71d9bb7a Remove maxwarpwidth and maxwarpheight.
Only the sw32 renderer even tried to use them, and they didn't get set
properly. This fixes JohnnyonFlame's waterwarp issue.
2014-02-02 14:41:58 +09:00
Bill Currie
99678a571b Remove *.slc on make clean. 2014-01-28 16:26:24 +09:00
Bill Currie
3efb0c538f Separate file search from loading.
QFS_LoadFile (and its wrappers) now  take a file handle rather than a
path. This will make vpath usage a little cleaner to implement.
2014-01-28 16:22:05 +09:00
Bill Currie
4d59282641 Find the remaining vertex attribute order issues.
I hope. I do need to figure out why I made sprite blend an attribute
rather than a uniform.
2014-01-28 16:22:04 +09:00
Bill Currie
a5db0b1a65 Remove the now unnecessary GLSL_CompileShaderS().
Now that the transition to using shader effects is comlete, there's no
need for the wrapper.
2014-01-28 16:22:04 +09:00
Bill Currie
57d2198140 Use the new shader system for iqm models. 2014-01-28 16:22:04 +09:00
Bill Currie
385175ca65 Use the new shader system for 2d drawing. 2014-01-28 16:22:04 +09:00
Bill Currie
c89e612cd4 Remove redundant fog and palette shader code. 2014-01-28 16:22:04 +09:00
Bill Currie
50bb40be29 Use the new shader system for sprites. 2014-01-28 16:22:04 +09:00
Bill Currie
68bd7e643d Remove the long dead text vertex shader. 2014-01-28 16:22:04 +09:00
Bill Currie
1d67f8f0c3 Use the new shader system for textured particles. 2014-01-28 16:22:04 +09:00
Bill Currie
1a7b532927 Use the new shader system for point particles. 2014-01-28 16:22:04 +09:00
Bill Currie
3af6a640fe Missed the old turb frag shader. 2014-01-28 16:22:04 +09:00
Bill Currie
a419fb2c92 Ensure the vertex coord attribute is attribute 0.
It seems mesa still has the bug where non-array attributes don't work
when set as attribute 0, and that the allocation order changed sometime
since I last tested with mesa. This fixes the black world and flickering
alias models on my eeepc.
2014-01-28 16:22:04 +09:00
Bill Currie
042d6e5728 Remove a couple of stale files.
Missed these in the bsp related commit.
2014-01-28 16:22:04 +09:00
Bill Currie
26fc0b74e6 Fix bsp water surfaces.
Everything seems to be working for the bsp renderer.
2014-01-28 16:22:04 +09:00
Bill Currie
f43592589d Use the new shader system in the bsp renderer.
It mostly works. Skybox is untested, and water surfaces are broken.
2014-01-28 16:22:04 +09:00
Bill Currie
b269338947 Start using the new shader system.
So far, alias model rendering is the only victim, but things are working,
even if only color map lookup and fog blending are broken out at this
stage.

I expect the effect naming scheme will go through some changes until I'm
happy with it.
2014-01-28 16:22:04 +09:00
Bill Currie
323fbe1927 Fix an allocation oopsie.
I must have been tired when I wrote that line.
2014-01-28 16:22:04 +09:00
Bill Currie
550f1ae788 Fix some bitrot.
Just updating for the changes to the ALLOC/FREE macros.
2014-01-28 16:22:03 +09:00
Bill Currie
96c40cb9a1 Add basic support for shader "effects".
Again, based on The OpenGL Shader Wrangler. The wrangling part is not used
yet, but the shader compiler has been modified to take the built up shader.
Just to keep things compiling, a wrapper has been temporarily created.
2014-01-28 16:22:03 +09:00
Bill Currie
f5501fbf24 Fix a pile of automake deprecation warnings.
s/INCLUDES/AM_CPPFLAGS/g

I <3 sed :)
2013-11-24 13:11:50 +09:00
Bill Currie
6288684fa2 Fix more gcc 4.8 errors.
More actual bugs found, too.
2013-09-27 23:09:37 +09:00