Commit Graph

1592 Commits

Author SHA1 Message Date
twinaphex
6d03208775 Implement missing functions - still segfaulting at end 2014-06-25 23:34:53 +02:00
twinaphex
5f7b0c14cc Add initial libretro patches 2014-06-25 23:01:52 +02:00
Kevin Shanahan
23119f4eb2 server: bump MAX_MODELS static limit
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2014-02-21 11:55:31 +10:30
Kevin Shanahan
adc7356a53 server: bump MAX_EDICTS static limit
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2014-02-21 11:54:37 +10:30
Kevin Shanahan
f703319ac7 server: improve error message when too many brush models
Check if we are going to overflow our MAX_MODELS allocation and print
a more meaningful error if we will.  This also softens the error to a
Host_Error() instead of crashing in Mod_ForName().

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2014-02-21 11:52:35 +10:30
Kevin Shanahan
b46aa1d57a model: use MAX_OSPATH for gl mesh cache path
Path includes com_gamedir, which could be an absolute path to the
user's home directory - easily can exceed 64 characters.  MAX_QPATH is
really only for paths relative to basedir.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-10-09 08:55:33 +10:30
Kevin Shanahan
59d54b598a input: fix compile on in_win.c
Add missing ')'.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-10-03 08:08:21 +09:30
Kevin Shanahan
899ef775bb Merge branch 'master' of git://disenchant.net/tyrquake 2013-10-03 08:03:22 +09:30
Kevin Shanahan
f44e7bb120 changelog: amend entry for bsp2 support to show both bsp2 and 2psb supported
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-29 08:56:11 +09:30
Kevin Shanahan
eb1f83d4f8 model: factor out common code from leaf loading functions
GL and/or QW specific hacks to do with setting surface flags for water
warping.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-28 19:46:34 +09:30
Kevin Shanahan
c3a360096a model: use a common function to load bsp lumps which are simple byte streams
Takes care of lighting, visibility and entities using common code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-28 19:45:12 +09:30
Kevin Shanahan
ffbc721202 model: don't load an extra edge in Mod_LoadEdges_*
Probably this was added previously due to confusion with edge index
being +1 (no edge 0) but lump->size / sizeof(edge_t) is the correct
number to load.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-28 13:57:14 +09:30
Kevin Shanahan
f5b93ea06d model: support two types of BSP2 models
Turns out there are two types of "BSP2" format - one that I think was
created by MH and implemented in the RMQ project (this is the one I
implemented previously) and one by LordHavoc which exteneded the
coordinate limits beyond 32k, implemented in Darkplaces.  The
Darkplaces version of BSP2 will get the name BSP2 and the RMQ version,
which is more limited, will get the name BSP2rmq.

Fairly naive implementation which duplicates a bunch of code.  Can be
refactored and tidied up more later.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-09-28 11:17:45 +09:30
Kevin Shanahan
c927c6e9a6 build: use single call to wildcard for depfiles
Provides a modest speedup on Windows, where this operation is ridiculously
slow.  Reduces time for simple "make" with no rebuilds necessary from ~23s
to ~18s on my test system.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-08-06 16:26:48 +09:30
Kevin Shanahan
4d46bf3797 cdaudio: document the cd audio console commands
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-07-03 11:37:01 +09:30
Kevin Shanahan
6ea7f4bb29 input: document mlook and m_freelook
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-07-01 10:05:08 +09:30
svdijk
60a70671f0 input: new cvar m_freelook for mouse looking
When set to 1 mouse look key stops mouse looking

Signed-off-by: svdijk <svdijk@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-07-01 09:37:42 +09:30
svdijk
4bf4b4fc6d input: handle cl_run in CL_AdjustAngles() as well
Signed-off-by: svdijk <svdijk@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-06-27 08:56:10 +09:30
svdijk
95c56f9a01 input: new cvar cl_run for auto-running
When set to 1 speedkey acts as slowkey

Signed-off-by: svdijk <svdijk@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-06-26 13:00:33 +09:30
Kevin Shanahan
5d841e3670 common: add -quoth command line support
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-21 20:28:52 +09:30
Kevin Shanahan
84f68eece3 common: remove MAX_FILES_IN_PACK limit
...and save a bunch of stack space in the process.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-19 19:00:41 +09:30
Kevin Shanahan
1dce95b477 gl: use a glmode pointer to keep texture mode state
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-19 15:32:46 +09:30
Kevin Shanahan
3fe645aab6 draw: free cachepics after loading gl texture
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-19 10:44:26 +09:30
Kevin Shanahan
da3b609e95 draw: constify the gl dot texture data
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-19 10:35:45 +09:30
Kevin Shanahan
ea13f9928c draw: size the translate pic buffer correctly
The multiplayer translate pic needs to be a particular size, so test for
that and just allocate the appropriate sized buffer.  There are better
ways to handle this, but this is still better than crashing on a bad pic.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-19 10:33:26 +09:30
Kevin Shanahan
84494d3592 trivial: comment & variable name changes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-19 10:19:41 +09:30
Kevin Shanahan
3263ef3c2f trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-18 11:03:57 +09:30
Kevin Shanahan
89d2a57762 vid: don't set alpha in the gl palette
Handle this during the texture conversions explicitly - it is actually
valid to make use of this colour in normal textures.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-18 10:49:56 +09:30
Kevin Shanahan
a38d0d4c68 vid: get rid of the win32 window_rect in vid_sdl
Was for compatibility with vid_sdl + in_win, but not worth supporting that
configuration I think.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-18 10:48:28 +09:30
Kevin Shanahan
fdfb4fbd9c qpic: fix alpha colors again after doing mipmap reduction
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-18 09:16:54 +09:30
Kevin Shanahan
65a03192ae qpic: remove alpha member from qpic8_t
After realising that we have different alpha channels on different qpics,
it didn't really make sense to have a simple boolean for alpha and then it
didn't really fit into qpic8_t any more.

Specify the alpha channel (if any) at upload/conversion time instead.

Fixes sky alpha and removes the charset hack converting all zero indicies
to 255 in the glquake case (maybe someone wants to use the 255 pink in
their charset?)

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-18 09:13:10 +09:30
Kevin Shanahan
c57e45e261 draw: use stdint types
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-18 09:11:35 +09:30
Kevin Shanahan
2c17b77b27 sky: use stdint types and trivial comment tidy up
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-17 20:10:46 +09:30
Kevin Shanahan
8fa770b1f2 gl: move gl texture functions from gl_draw.c to new file
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-17 19:43:56 +09:30
Kevin Shanahan
2873f2b68a draw: rename gl charset and crosshair texture variables
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-15 14:29:42 +09:30
Kevin Shanahan
2df29af642 vid: recalc refdef after mode change on sdl
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-15 08:02:46 +09:30
Kevin Shanahan
edff70049c draw: constify Draw_CachePic and Draw_PicFromWad returns
Fix missing include of draw.h in gl_draw.c and various const
correctness issues.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-14 15:39:51 +09:30
Kevin Shanahan
c8f7f3e261 qpic: constify qpic8_t pixels pointer
Generally we don't want to be modifying the texture data, so this
seems like a sensible precaution to help prevent unintended
modifications.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-14 15:29:22 +09:30
Kevin Shanahan
eedc9aacf4 draw: don't redraw the version into conback every frame
Didn't realise this was happening, but in the software renderer, we
were re-drawing the version number into the console every time we
rendered the console.  Split up the caching function so that we cache
this work.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-14 15:27:58 +09:30
Kevin Shanahan
f7b897af99 qpic: make GL_LoadTexture take a qpic8
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-14 14:37:41 +09:30
Kevin Shanahan
4b95f0de20 qpic: pass in a qpic8_t to QPic_8to32
GL_Upload8 also takes the pic8_t directly now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-14 14:19:31 +09:30
Kevin Shanahan
cee4b1e31c qpic: introduce the qpic8_t type to replace qpic_t
We allow for a "stride" parameter so that sub-pics can be used and a
simple boolean to indicate if alpha is enabled or not for palette
index 255.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-14 13:47:29 +09:30
Kevin Shanahan
c6bc10afd4 qpic: complete the renaming by moving the file names
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-13 20:46:32 +09:30
Kevin Shanahan
fef9480aa3 textures: rename qtexture32_t to qpic32_t
Fickle man that I am, I decided now that qtexture32 is a poor naming
choice and I'd rather stick with calling these 'pics'. Will have to
rename the files now as well I guess.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-13 20:43:51 +09:30
Kevin Shanahan
d9400af1ae wad: trivial rename dpic_t dpic8_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-13 20:21:56 +09:30
Kevin Shanahan
2cea53a9e4 textures: add missing stdint include to textures.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-12 13:09:38 +09:30
Kevin Shanahan
f539a0b412 textures: fix incorrect NPoT extension string
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-12 13:08:44 +09:30
Kevin Shanahan
b11b840f54 zone: add Cache_CheckLinks for debugging cache memory trashing
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-12 08:49:16 +09:30
Kevin Shanahan
84697dd12e zone: re-work error message for Hunk_Alloc failure
Now that we take consistent command line parameters across platforms,
remove the _WIN32 ifdef.  Try to give a sensible suggestion for increasing
the memory size instead of just saying 'try 16MB' - since the default is
128MB anyway!

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-12 08:42:04 +09:30
Kevin Shanahan
693b7530b1 server: fix incorrect pr_strings usage on weaponmodel
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-05-11 11:18:05 +09:30