COM_FindFile now just calls COM_FOpenFile, so rename it and get rid of
the former. Remove use of Sys_FileOpen integer handles and use FILE *
instead. Fix the comment above the funcion in both nq and qw.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Instead of interger handles from sys_*, use standard C FILE * operations,
same as we do for qw already.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
No problem with circular dependency anymore. Also folded in some whitespace
changes to reduce the QW/NQ diff.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Remove the definition from QW/common/common.c and add it to common.h and
include the header. Remove the definitions from quakedef.h files.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Since I can't work out the right combination of compiler options
(other than turning on GCC mode) to make these go away, just fix the
string formatting.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Restructure the selection of cd and sound targets a bit so that we can
pick defaults based on the OS target. More work to do here for others,
e.g. video targets.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Clang emits a warning instead of an error if a compiler flag is unknown.
Use -Werror when testing for compiler flags to work around this.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Previous implementation of COM_ScanDirPak completely ignored any path
component in the pak filename. Switch to snprintf in COM_ScanDir as well
while we're at it.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Factor out the texture resampling routines for the player skins. QW
needs the extra "stride" parameter because it only uses a
sub-rectangle of the full skin texture.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Reduces the indentation of the rest of the function by one tab stop
and makes it easier to see the real differences between the qw and nq
implementations.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Finally we can see that currententity is only ever written and not
read so it is safe to remove.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Blending the mirror texture over the scene - mirror surfaces are on
the world only, so the world entity is the correct one to pass down.
Maybe an obscure bug fix as I'm fairly sure that currententity would
otherwise have been off somewhere down the end of cl_visedicts from a
previous loop through the entity list.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>