The special token __INFINITY__, like __FILE__ and friends, will expand to
a floating-point expression containing a value the C compiler considers
infinite. Obviously, this assumes that the system has relatively modern
float hardware -- but if it doesn't, having Ruamoko be able to represent
float infinity is the least of your problems. :)
It turns out that due to the way we do fullbrights, nothing special needs
to be done to get the fullbright texture blended with the model even when
fog is enabled.
After discussing things with Spike of FTE, it seems that not many clients
handle zero length mvd packets particularly well. While it the skip code
might be useful for qtv, getting the packets into one but not the other
seems to be not worth the effort at this stage.
There are some problems with menus and the console messing up the key_dest
state (they assume console/menu or game, nothing else), but otherwise
things seem to work.
in_bind_imt is now gone. I guess mercury was right in that it was a poor
design. However, it was (and still is necessary) to support "bind" and
"unbind". Now, instead, they work only with the IMT_MOD table. IMT_MOD sits
below IMT_0 in the imt hierarchy. If the key is not bound in IMT_0+, then
IMT_MOD will be checked. This way, "bind" and "unbind" can never mess with
a user's more sophisticated binding setup.
The backquote is not always usable for toggling the console, and the new
bind system doesn't automatically bind a key to both game and console imts
(by design). Thus create a cvar that allows the "always works" console
toggle to be specified in eg $fs_globalcfg. While I'm at it, do one for the
menus, too.
If the default sound device does not support mmap access, retry with
plughw. However, assume the user knows best and do not retry if snd_device
has been set to anything, including "default".
QF alsa support now works out of the box with pulseaudio.
Due to quake's original sound engine using a push model, the actual place
to which the sound data should be written is not necessarily where the
"hardware" dma cursor is, but rather where the last write finished off.
Thus, the correct output location is indicated by snd_paintedtime rather
than snd_shm->framepos.
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.
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
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 :).