Commit Graph

100 Commits

Author SHA1 Message Date
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
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
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
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
ac32c7c3f2 render: pass currententity down to R_RenderPoly
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:25:43 +10:30
Kevin Shanahan
ab23ab9ad8 render: pass currententity down to R_RenderBmodelFace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:18:47 +10:30
Kevin Shanahan
4fe87926ef render: pass currententity down to R_RenderFace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 11:14:17 +10:30
Kevin Shanahan
3f159b8285 render: pass currententity down to D_CacheSurface
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 10:57:06 +10:30
Kevin Shanahan
f22338ea60 render: pass currententity down to R_AliasDrawModel
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 10:33:22 +10:30
Kevin Shanahan
bda5e3718e render: pass currententity down to R_AliasCheckBBox
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-22 10:06:50 +10:30
Kevin Shanahan
045e234d72 surf: Pass currententity down into R_TextureAnimation
Remove dependence on global "currententity"

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-21 20:19:16 +10:30
Kevin Shanahan
23d81d22d7 Move r_shared.h to common include dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 17:20:56 +10:30
Kevin Shanahan
e3a0d0cac9 vid: Bump MAXWIDTH and MAXHEIGHT
Actually, MAXWIDTH is never used at all...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 17:05:29 +10:30
Kevin Shanahan
fdd7c65242 trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-20 10:12:03 +10:30
Kevin Shanahan
b758409f2e video: Add experimental SDL renderer for Win32
This is a rather large patch which adds an experimental SDL rendering
target for Win32 (software renderer only). Changes to support SDL input
spilled over into a number of other areas - most notably the big churn in
keys.h to match the key symbols to those of SDL.

Credit to the Quakeforge project, whose sources were very helpful for me
in working out how this all fits together.

Compile with USE_SDL=Y to select the experimental target (tyr-quake.exe
and tyr-qwcl.exe only). Expect that not everything works - e.g. A single
800x600 video mode is hard coded right now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-10-07 17:39:29 +10:30
Kevin Shanahan
158129ae37 vid: Make modestate static in the windows vid drivers
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-28 22:03:47 +09:30
Kevin Shanahan
6995a945d8 vid: Remove empty function VID_HandlePause
Removes a couple of #ifdef WIN32 instances. Was supposed to be to release
the mouse pointer, but hasn't been doing that for a while now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-28 17:25:09 +09:30
Kevin Shanahan
913cefac02 Move extern declaration from sv_ccmds.c to cmd.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-04-21 16:44:38 +09:30
Tyrann
a2c3dbc47d trivial: remove unused variable 2011-12-30 10:20:16 +10:00
Tyrann
5b84b0a343 Move render.h to the common include directory 2011-12-30 09:44:42 +10:00
Tyrann
1bb07a24a0 Remove unneeded alpha parameter to GL_Upload8_EXT 2011-12-28 10:48:15 +10:00
Tyrann
a342b0708d [PATCH] Remove old (and broken) support for stereoscopic shutter glasses 2009-09-13 13:37:16 +09:30
Tyrann
264484c6ef [PATCH] Extra mouse button support under linux
As requested by Jonas Nicolaisen <J.Nicolaisen@gmx.net>. Actually, I can't
really verify that this works, since I don't have that many buttons myself.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-12-30 22:43:02 +10:30
Tyrann
157543cc1b [PATCH] Cleanup winquake.h unneeded includes and defines
Move commctrl.h include to gl_vidnt.c, as that seems to be the only file that
needs it. Also remove a bunch of declarations for non-existent variables.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-12-30 22:43:01 +10:30
Tyrann
0f81c580a8 [PATCH] snd_win.c static cleanups
Make a few more global variables in snd_win.c static. There was an interesting comment next to some of the variables, which I don't understand the reason for:

/*
* Global variables. Must be visible to window-procedure function
*  so it can unlock and free the data block after it has been played.
*/

...but it all "seems to work" as statics, so I'll go ahead and do it.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-12-30 22:43:01 +10:30
Tyrann
33b5b4fcbe [PATCH] Abstract DMA sound buffer locking
Add SNDDMA_LockBuffer() and SNDDMA_UnlockBuffer() functions to the generic
sound interface, to allow drivers to implement appropriate locking on their
DMA buffers if required. Move the #ifdef'd Windows specific code to do this
from the shared snd_mix.c and snd_dma.c files to the windows sound driver.

Thanks to O.Sezer <sezero@users.sourceforge.net> for the idea and for
providing the orginal patch which was the basis for this one.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-12-30 22:43:00 +10:30
Tyrann
3eb3f54b55 [PATCH] Fix static/extern confusion in sys_win.c
The HANDLEs hinput and houtput were made static in QW, but not in NQ - this
made QW conflict with the winquake header. Make NQ's static as well and remove
extern definition from the header.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:39 +09:30
Tyrann
be6880b044 [PATCH] Add gcc "format" attribute to our printf style functions
Annotate our varargs "printf" style functions with the gcc "format" attribute.
This shows up a whole bunch of incorrect usage in our code, so we'll start to
clean that up in subsequent patches. We've also constified the format string
arguments here.

Based on a patch from O.Sezer <sezero@users.sourceforge.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:38 +09:30
Tyrann
b9ef6b0793 [PATCH] Add gcc "noreturn" attribute to a few functions
Annotate a few functions (BOPS_Error, Sys_Error, Sys_Quit and SV_Error) with
the gcc attribute "noreturn" and clean up a few lines of dead code which were
only there previously to quiet the corresponding compiler warnings.

Based on a patch from O.Sezer <sezero@users.sourceforge.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-10-01 22:39:38 +09:30
Tyrann
0378f5da1f [PATCH] Remove two unused function defs from zone.h
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:49 +09:30
Tyrann
932b739aba [PATCH] Introduce Z_Realloc function
Introduce the Z_Realloc function, allowing zone allocations to be resized.

Based on the implementation in uHexenII.
Thanks to O.Sezer <sezero@users.sourceforge.net>.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:48 +09:30
Tyrann
25f8800333 [PATCH] Rename min/max macros to qmin/qmax and move to common dir
min/max clashes with another macro in the mingw headers, so just rename ours
to qmin/qmax. Move the definitions to mathlib.h so they can be shared between
QW and NQ.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-16 15:29:48 +09:30
Tyrann
b806fda9f8 [PATCH] Fix mouse wheel handling when direct input active
Mouse wheel events weren't being processed at all when direct input was
active. For direct input, these are given as Z axis mouse movement.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-15 21:09:15 +09:30
Tyrann
84d52679a5 [PATCH] Fix pr_strings_size calculation
Well, it turns out that progs->numstrings is actually the number of bytes
dedicated to storage of the progs strings, not the number of strings.
Consequently, our attempt to calculate the strings size was completely bogus.
To avoid futher confusion, we'll rename the numstrings member in the progs
header.

Thanks to O.Sezer <sezero@users.sourceforge.net> for pointing this out :)

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-09 09:49:30 +09:30
Ozkan Sezer
4d8725f426 [PATCH] Remove unneeded fields from sound dma structure
removed the splitbuffer, gamealive and soundalive members of the dma_t
structure, they aren't used in any way.

Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-01 20:24:18 +09:30
Ozkan Sezer
78654bfc24 [PATCH] Remove unneeded fields from model struct
removed the clipbox, clipmins and clipmaxs members of the model structure:
the header says it to be 'solid volume for clipping (sent from server)',
but the server doesn't do that and cl_ents does a bogus check for clipbox
in CL_SetSolidEntities which is removed now.

Signed-off-by: O.Sezer <sezero@users.sourceforge.net>
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-09-01 20:24:17 +09:30
Tyrann
7d6c9bb30b [PATCH] Fix for 5fee2653 (remove winsock runtime linkage)
Oops, looks like I applied the wrong version of the patch.
This cleans up the rest.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-30 19:42:08 +09:30
Tyrann
9c7aba96bc [PATCH] gl_mesh.c statics
Make a whole lot of globals from gl_mesh.c static.

Pass in the aliashdr_t to GL_MakeAliasModelDisplayLists so that
pheader global in gl_model.c can be made static also.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-12 16:29:08 +09:30
Tyrann
58310474ef [PATCH] Make bsps with more than one sky texture work properly in glquake
Some assumptions about the sky texture in a BSP being unique prevented bsps
with more than one sky texture working properly. Indeed, this could also cause
bad memory corruption when a face with the non-primary sky texture, having
extents greater than the maximum was dynamically lit. The blocklights array is
only sized appropriately for areas <= 256 texels.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-12 14:36:09 +09:30
Tyrann
5dfb0723ad [PATCH] Remove unneeded glu.h include
Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-08-12 11:12:27 +09:30
Tyrann
689baf5129 [PATCH] Add a null sound driver
Add a null sound driver to aid porting to new platforms.
Fix a missing include in sound.h.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-02-18 20:33:00 +10:30
Tyrann
fc086a80d2 [PATCH] Update null CD driver
Update the null CD driver to the newer API.
Fix a missing include in cdaudio_driver.h.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2007-02-18 20:32:59 +10:30
Tyrann
c50f5630fc [PATCH] Use fixed size integer types for on disk progs structures
The only one that really makes a difference here for systems I'm ever likely
to use is the sizeof(void *) removal, but it's probably a good idea to start
moving towards use of fixed size integer types for all the on-disk structures
throughout the source.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-10-24 18:30:06 +09:30
Ozkan Sezer
8944c2ee07 [PATCH] Restore game/desktop gamma on focus changes (windows)
Expose the game's gamma ramps so that the video driver can restore the gamma
when it gets focus in/out events from the windowing system. Add calls to
save/restore gamma to the gl_vidnt driver.

Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-10-07 21:34:09 +09:30
Tyrann
88e38e107f [PATCH] Share common MAX_PRINTMSG definition
Move MAXPRINTMSG to sys.h so it can be shared between the various
users. Rename to MAX_PRINTMSG for consistency with other MAX_ defines.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-10-07 19:05:34 +09:30
Tyrann
6827bded4b [PATCH] Add BSD CD audio support
Detect FreeBSD, NetBSD and OpenBSD in the makefile. Add cdaudio support via
cd_bsd.c. I also had to add the track argument to the IsPlaying driver
function, as BSD uses it in the ioctl. Thanks to Alejandro Pulver for the
doing the original FreeBSD port.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-16 07:10:04 +09:30
Tyrann
9d1f4d845a [PATCH] Move Windows CD message handler
Rename the Windows CDAudio_MessageHandler to CDDrv_MessageHandler, as it's
part of the driver, not the generic CD layer. Move the declaration to the
winquake header.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-16 07:10:02 +09:30
Tyrann
0abb411b94 [PATCH] Pass track number to driver resume function
The windows driver needs to know which track is being resumed, so pass it down
through the driver API. Other drivers can ignore it if it's not needed.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-16 07:10:01 +09:30