551 Commits

Author SHA1 Message Date
Kevin Shanahan
845f993b2b sys: remove now unused Sys_File* functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 07:34:14 +10:30
Kevin Shanahan
2f5771dfd8 common: remove handle member from pack_t struct
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 07:20:14 +10:30
Kevin Shanahan
457d823b4b trivial: rename a file handle variable
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 07:05:02 +10:30
Kevin Shanahan
dcd2dd68f0 common: convert COM_FindFile to COM_FOpenFile
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>
2012-10-28 06:59:05 +10:30
Kevin Shanahan
d8dc87dadb common: make COM_FileExtension argument const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-28 06:58:25 +10:30
Kevin Shanahan
c544ac402c common: convert COM_CopyFile to FILE * APIs 2012-10-26 13:53:23 +10:30
Kevin Shanahan
57fc9dab14 common: Replace COM_Open/CloseFile with standard FILE * operations
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>
2012-10-26 13:40:26 +10:30
Kevin Shanahan
5a8ddb7577 common: re-order some includes / declarations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-26 08:08:10 +10:30
Kevin Shanahan
21b78472c9 common: add -dibonly to qw safe argvs
It's the same video drivers anyway...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-26 08:06:48 +10:30
Kevin Shanahan
caf91335fb trivial: properly encode non-ascii characters in string
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 18:37:13 +10:30
Kevin Shanahan
e833a57537 trivial: another couple of missed trigraphs
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 18:25:55 +10:30
Kevin Shanahan
6904db836d common: STRUCT_FROM_LINK is just container_of()
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-25 14:18:52 +10:30
Kevin Shanahan
0d9124f631 common: Fix circular include dependency and remove forward declaration
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>
2012-10-25 14:10:34 +10:30
Kevin Shanahan
c025057452 common: move MAX_NUM_ARGVS define to common.h
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>
2012-10-25 13:51:18 +10:30
Kevin Shanahan
703cf2b1d3 trivial: fix trigraph warnings pointed out by clang
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>
2012-10-24 20:53:56 +10:30
Kevin Shanahan
9cefeece58 build: select correct cd/sound targets based on OS target
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>
2012-10-24 20:53:56 +10:30
Kevin Shanahan
22fb1144c5 sound: fix missing symbols in the null sound driver
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 20:53:56 +10:30
Kevin Shanahan
9ac39cae20 build: make use of xf86dga optional for x11
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 20:53:56 +10:30
Kevin Shanahan
bdd516da32 build: update X11BASE_GUESS to work on my Macs
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 20:53:56 +10:30
Kevin Shanahan
6ce9ed706d build: Fix cc option checking in case compiler is clang
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>
2012-10-24 20:53:55 +10:30
Kevin Shanahan
ee2b3d01d3 build: Detect Darwin as a unix variant
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 20:53:55 +10:30
Kevin Shanahan
ad6ee08925 fix warnings about printf style format strings
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 20:50:37 +10:30
Kevin Shanahan
899bd1ba83 console: add cvar completion support for QW skins
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 18:50:39 +10:30
Kevin Shanahan
23331b9456 console: Add argument completion support for cvars
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 18:50:38 +10:30
Kevin Shanahan
48a0621852 common: Check paths correctly when scanning pak files
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>
2012-10-24 18:50:38 +10:30
Kevin Shanahan
5a77d3e836 update build instructions in readme.txt
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 15:13:27 +10:30
Kevin Shanahan
0697ae6dc3 gl: move gl_rmisc.c to the common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 09:06:17 +10:30
Kevin Shanahan
b079d4c699 gl: Eliminate remaining differences between the gl_rmisc.c implementations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 09:03:06 +10:30
Kevin Shanahan
57aebdcd64 gl: Rename some variables to improve readability
Improve readability and consistency with the NQ function:
  inwidth -> instride
  tinwidth -> inwidth
  tinheight -> inheight

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-24 08:44:07 +10:30
Kevin Shanahan
d56610dc51 gl: factor out gl texture resampling for skins
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>
2012-10-24 08:38:44 +10:30
Kevin Shanahan
d2c2c6059c Implement a type-checking clamp macro
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 14:27:57 +10:30
Kevin Shanahan
25b7b14943 Use qmin macro to clamp size of player skin
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 13:04:46 +10:30
Kevin Shanahan
017cdf3369 Remove unused code from R_TranslatePlayerSkin
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-23 13:03:57 +10:30
Kevin Shanahan
4351d34924 qw: Simplify early-return test in R_TranslatePlayerSkin
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>
2012-10-23 12:21:28 +10:30
Kevin Shanahan
a3892ec40d render: Remove global currententity
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>
2012-10-22 13:40:58 +10:30
Kevin Shanahan
cae62d3f53 render: Pass the world entity down from R_Mirror
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>
2012-10-22 13:14:46 +10:30
Kevin Shanahan
9523247fd2 render: shadow currententity with a local in R_TranslatePlayerSkin
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 12:28:12 +10:30
Kevin Shanahan
ca73186348 render: pass currententity down to R_DrawSprite
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 12:24:43 +10:30
Kevin Shanahan
6946736977 render: pass currententity down to R_GetSpriteFrame
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 12:21:17 +10:30
Kevin Shanahan
cbdaf1cdc8 render: pass local instead of curententity in R_DrawWorld
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 12:18:14 +10:30
Kevin Shanahan
ae1f90e019 render: pass currententity down to DrawTextureChains
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 12:03:00 +10:30
Kevin Shanahan
c7c7061c26 render: pass currententity down to R_RenderBrushPoly
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 12:00:57 +10:30
Kevin Shanahan
8e306d3c15 render: shadow currententity with a local in R_RenderWorld
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:55:22 +10:30
Kevin Shanahan
42369d38c8 render: pass currententity down to R_RecursiveWorldNode
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:53:54 +10:30
Kevin Shanahan
a3417f1295 render: pass currententity down to R_DrawSubmodelPolygons
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:47:24 +10:30
Kevin Shanahan
e828ea33e1 render: pass currententity down to R_DrawSolidClippedSubmodelPolygons
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:44:21 +10:30
Kevin Shanahan
b3ff3f8098 render: pass currententity down to R_RecursiveClipBPoly
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:40:19 +10:30
Kevin Shanahan
103c394fb6 render: pass currententity down to R_RotateBmodel
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:36:29 +10:30
Kevin Shanahan
dd796af5e4 render: pass currententity down to R_ZDrawSubmodelPolys
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:31:58 +10:30
Kevin Shanahan
8af4338acf render: shadow currententity with a local in R_DrawCulledPolys
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:27:59 +10:30