This was the last remaining GNU assembler code that was in its own
independent source file, as opposed to being embedded in C code with
GNU `__asm__ volatile` or MSVC `__asm` (which tends to be much easier
to deal with in a modern build system).
When the Quake 3 engine was originally written, this might have been
an "expensive" function when written in portable C, but after 25 years
of CPU development it's less likely to matter (and modern compilers
might produce faster results from the C code anyway).
Resolves: https://github.com/ioquake/ioq3/issues/778
Signed-off-by: Simon McVittie <smcv@debian.org>
Before commit a7d33b1c "(bug #3639) BoxOnPlaneSide rewrite" there
was more code here, but since then the only thing left is the
Invert24To16 function, to which I couldn't find any references since
the beginning of ioquake3's git history.
Resolves: https://github.com/ioquake/ioq3/issues/774
Signed-off-by: Simon McVittie <smcv@debian.org>
Sys_BinaryPathRelative takes a parameter which is path concatenated with
Sys_BinaryPath, and resolved to a canonical path. The intended use case
is to facilitate the situation where you want the game data directory to
exist outside the same directory in which the binary lives, but relative
to it. More specifically, if you want to distriute multiple binaries for
different architectures, in the same tree, this allows for a means of
having said binaries in architecture subdirectories, with a shared data
directory, e.g.:
ioq3/x86/ioquake3.exe etc.
ioq3/x86_64/ioquake3.exe etc.
ioq3/baseq3/pak0.pk3 etc.
Here, when building you would define DEFAULT_RELATIVE_BASEDIR=".." by
appending it to the build system CFLAGS, and then the executables will
by default look in their parent directory for the data.
This is `#if 0` anyway, and has been since the initial Quake 3 Arena GPL
release, so clearly it hasn't been used for some time.
Signed-off-by: Simon McVittie <smcv@debian.org>
In packaging systems like Debian's, typically the build will not have
a .git/ directory available; or if it does, the commit ID will be a
downstream packaging commit that means nothing to upstream developers.
However, the packaging can inject a more meaningful version number if
given a way to do so.
Signed-off-by: Simon McVittie <smcv@debian.org>
This is part of the CMake update project #748
The README.md needs to be updated for CMake. This is my first step at it. Not all changes are done, but this may be a good start.
The standalone instructions are slightly updated, but may not be accurate and will need to be updated later on.
All of the makefile "options" still need to be sorted.