Commit Graph

1083 Commits

Author SHA1 Message Date
Ozkan Sezer 1c4c5ba254 add the com_base_searchpaths thing of qw and use it in Host_Game_f(), kill the no longer needed com_nummissionpacks, KillGameDir() and NumGames().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@998 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 18:20:47 +00:00
Ozkan Sezer 9d2193f1d4 tighten Host_Game_f() a bit more
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@997 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 16:02:58 +00:00
Ozkan Sezer 985a16ee15 Host_Game_f(): simplify
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@996 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 14:29:12 +00:00
Ozkan Sezer ee9f2c99de fix the homedir patch (the 2nd pass sholud use host_parms->userdir, not host_parms->basedir)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@995 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 12:33:22 +00:00
Ozkan Sezer fde94b8294 add Sander's FS search order patch as an optional patch
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@994 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 09:30:51 +00:00
Ozkan Sezer 0fc8cce747 revert r988
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@993 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 09:10:27 +00:00
Eric Wasylishen db43cf1836 gl_screen.c: make the console speed independent of the current resolution. Before, switching to a really high (e.g. 2880x1800) resolution would make the colsole take several seconds to open/close
Not totally sure about this but i think it's a decent idea. I'm using 800x600 as a reference screen size (arbitrary choice but it's the default QS resolution). So if your resolution is 600 pixels tall this will make no difference. On higher resolutions this will make the console a bit faster than before.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@992 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 06:25:59 +00:00
Eric Wasylishen d8a33d73cc R_CullSurfaces: small optimization. Avoid doing (s->visframe == r_visframecount) test on all world surfaces, instead, use the surfaces in the world texture chains, which already passed that test in R_MarkSurfaces.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@991 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-08 04:31:26 +00:00
Sander van Dijk 093ecad80b gl_rmain.c: make gl_zfix default to 0, no longer save it to config.cfg
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@990 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-07 19:35:52 +00:00
Sander van Dijk 17c51df017 quakespasm.pak: add several .ent files to prevent z-fighting
fixed so far:
e1m1: quad secret elevator (when down)
e1m2: exit doors (when open)
e2m3: rockets secret doors (when open)
e2m7: bars in front of the exit doors (when raised)



git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@989 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-07 19:33:38 +00:00
Sander van Dijk 39237a64d6 common.c: make plain files overrule files inside a PAK file
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@988 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-07 12:32:27 +00:00
Eric Wasylishen 24f4a2dab4 SDL2 support, if USE_SDL2 defined.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@987 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-05 19:34:43 +00:00
Ozkan Sezer 5b9140cb06 restore compilability with g++. some whitespace tidy-ups.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@986 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-02 05:40:41 +00:00
Eric Wasylishen 7c1e078b2a PF_VarString: raise buffer size to 1024. I checked all buffers that the resulting string could end up in, and they're all at least 1024 bytes (even with an unmodified quake client).
PF_VarString is only called on the server, in:
- PF_error, PF_objerror, PF_dprint to print error / debugging messages
- PF_bprint, which calls SV_BroadcastPrintf which copies the string into a 1024-byte buffer, then sends that to clients in a svc_print message
- PF_sprint, which sends the string in a svc_print message using MSG_WriteString (without copying into an intermediate buffer)
- PF_centerprint, which sends the return value of PF_VarString in a svc_centerprint message (without copying into an intermediate buffer)

On the client:
- svc_print reads the payload string with MSG_ReadString (2048-byte buffer), then Con_Printf is called (4096-byte buffer)
- svc_centerprint uses MSG_ReadString then calls SCR_CenterPrint (1024-byte buffer)

I also checked the original quake source and the client-side buffers for MSG_ReadString, Con_Printf, and SCR_CenterPrint are all the same sizes as in QS.

Admittedly I want to support sock's ITS mod, but as far as I can see, it's a totally safe to increase this to 1024.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@985 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-01 07:30:23 +00:00
Ozkan Sezer b8fc8caa0f dropped support for GL_SGIS_multitexture
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@984 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-30 08:00:34 +00:00
Eric Wasylishen b9d280f10b Revert r981 "Simple use of vertex arrays in R_DrawTextureChains_Multitexture."
It caused a dramatic slowdown on my machine on windows (50% slower)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@983 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-30 06:30:49 +00:00
Eric Wasylishen bdca64b93b Silence warning about vid_fsaa requiring restart when parsing config.cfg at startup. Add missing newline to warning message.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@982 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-30 03:22:36 +00:00
Eric Wasylishen 745fa7ecce Simple use of vertex arrays in R_DrawTextureChains_Multitexture.
The glBegin(GL_POLYGON), for() loop with GL_MTexCoord2fFunc()/glVertex3fv() calls, and glEnd () per polygon is replaced by a memcpy() and a glDrawArrays() call per poly.

My guess is this only saves function call overhead, but it gives a decent ~20% speedup (36 -> 42fps) on my machine on orl’s map.

Note: glDrawArrays() is in OpenGL 1.1, but the glClientActiveTextureARB function is part of the GL_ARB_multitexture extension but not GL_SGIS_multitexture. Instead of splitting into two code paths, I just dropped support for GL_SGIS_multitexture.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@981 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-30 03:22:26 +00:00
Ozkan Sezer 52ee1b6c51 update README files to reflect further 0.85.10 changes so far.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@980 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-29 08:55:19 +00:00
Eric Wasylishen 9c6f93eb8a Remove R_DrawSequentialPoly and use texture chains for drawing brush models.
To make this work with the drawing order we use in gl_rmain (world excluding water, opaque ents, world water, transparent ents), I made each texture_t have two texture chains, one for world and one for bmodels. This way they can be cleared during entity drawing without having to regenerate the world ones.

Other than this the changes are mostly minor adjustments to the R_DrawTextureChains_* functions so they can work for things other than the world.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@979 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-29 08:27:22 +00:00
Eric Wasylishen 890fe165e8 Revert r968, optimization in R_DrawSequentialPoly. Going to try a deeper change that uses the world drawing code for bmodels.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@978 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-29 08:27:16 +00:00
Ozkan Sezer f11ef51b2f update README files to reflect further 0.85.10 changes so far.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@977 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-27 09:15:58 +00:00
Eric Wasylishen a7bf2f59a4 Apply Baker's fix for cross-map demo playback (http://forums.inside3d.com/viewtopic.php?f=3&t=2397).
With that alone, the console would come down and slide up when the map changes in a demo.
I added a SCR_BeginLoadingPlaque() call in CL_ParseServerInfo, only done during demo playback, which shows the loading plaque and prevents the console from appearing and sliding up.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@976 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-25 02:55:25 +00:00
Eric Wasylishen 526f90d69b Revert Pa3PyX support for cross-map demos
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@975 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-25 02:55:16 +00:00
Eric Wasylishen 9bd02ae55b cl_parse.c: hack so demos playback at the correct speed even if they contain a lot of svc_stufftext messages (e.g. one every frame).
for a test case, play a demo from: http://www.quaketastic.com/upload/files/demos/otp_honey100.zip
for the honey map pack: http://www.quaketastic.com/upload/files/single_player/maps/honey.zip
on a slow pc that gets signifigantly less than 72fps, or with host_maxfps lowered (e.g. set to 33).

with QS 0.85.9, the demo will play in slow-motion; with QS 0.85.6 (without the cross-map demo support) it plays normally.

admittedly this is a fringe scenario, but it's imo a legitimate bug in the Pa3PyX cross-map demo playback code.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@974 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-24 18:37:28 +00:00
Steven 2269c31459 Add links to Erics automatic win builds. (I'll also update the webpage).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@973 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-22 21:52:34 +00:00
Eric Wasylishen f292a594b3 Fence textures: also support on world polys. From Fitzquake Mark V
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@972 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-22 01:10:58 +00:00
Ozkan Sezer 342c135a12 set executable property on mkpak.sh
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@971 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-20 09:20:03 +00:00
Eric Wasylishen d10512a72b Fence texture support on brush models, e.g. for rmqdemo2 e1m6rq.bsp. Based on Baker's implementation in Fitz Mark V. Consistent with Fitz Mark V, RMQEngine, FTEQW rendering.
Not implemented for world polys (afaik it's useless for world polys) but could be added if needed.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@970 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-19 02:20:12 +00:00
Eric Wasylishen 28134aca63 Change Cvar_Cycle_f to use Q_atof to be consistent with other cvar code. Q_atof("0.3"), a float, does not == atof("0.3"), a double.
Fixes "cycle r_wateralpha 0.3 0.6 1" not working reported by AAS.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@969 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-18 17:12:39 +00:00
Eric Wasylishen 0824c53967 r_brush.c: small optimization in R_DrawSequentialPoly; move the drawing of fullbrights to a separate function, and draw them in a separate pass through the polys of the brush mode. This reduces the amount of texture binding. The extreme case would be, e.g. 1000 polys with one texture (with fullbrights), before would require 2000 binds, after would require 2 binds. This gets part way to the performance of https://sourceforge.net/p/quakespasm/patches/14/ with much less code change
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@968 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-17 21:12:54 +00:00
Eric Wasylishen 9894c0b00d Raise MAX_ENT_LEAFS from 16 to 32, fixes disappearing/flickering bmodels in some situations. In particular fixes an elevator in fort_driant-fullvis.bsp, and a grate (func_door) in jam1_ionous.bsp.
From what I understand, if an entity touches more than MAX_ENT_LEAFS, it will only be visible
if the player happens to be standing in one of the first 'MAX_ENT_LEAFS' (so essentially random).

See discussion of MAX_ENT_LEAFS here:
http://celephais.net/board/view_thread.php?id=60310

For more detail (mh has an alternate fix, used in DirectQ/RMQEngine, haven't looked in to what he did):
http://forums.inside3d.com/viewtopic.php?t=2376&postdays=0&postorder=asc&start=23

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@967 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-13 06:40:07 +00:00
Eric Wasylishen fb31319099 new fsaa support patch. commandline flag is -fsaa, cvar is vid_fsaa. cvar is only read in VID_Init, changing it prints a message that the new value will only be used upon restart
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@966 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-12 19:39:20 +00:00
Eric Wasylishen 7cca17afaa revert r962 and r963 (first attempt at multisampling)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@965 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-12 19:25:14 +00:00
Sander van Dijk 1cdf1f400d Add a Bourne Shell PAK file writer (remove qpakman dependency).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@964 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-11 19:59:52 +00:00
Eric Wasylishen 5f7e61ecd4 cleanup fsaa patch, from szo. removes sdl version checks because qs requires sdl >= 1.2.10
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@963 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-11 08:08:15 +00:00
Eric Wasylishen 503db92edb fsaa support, borrowing from uhexen2. cvar is vid_multisample, cmdline arg is -fsaa (inconsistent..)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@962 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-11 06:58:42 +00:00
Ozkan Sezer 2ad7960074 fix broken libFLAC builds from previous commit.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@961 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-10 11:00:26 +00:00
Ozkan Sezer 2e4285a268 recompile libflac and libmodplug (again.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@960 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-10 07:47:33 +00:00
Eric Wasylishen 1fd8a1f344 bump MAX_EFRAGS to 4096 (from 2048) and MAX_CHANNELS to 1024 (from 512). For ijed's map - has over 500 ambient sounds, causing it to hit the channel limit, and a lot of static entities, which I guess cause it to exceed the old efrags limit. For future reference, according to mh, the efrags array can be removed entirely in glquake (http://forums.inside3d.com/viewtopic.php?t=1930) and each efrag allocated in the hunk memory.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@959 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-10 03:33:59 +00:00
Eric Wasylishen bccf3de5df sv_aim: change default to 1 (autoaim off) and CVAR_NONE
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@958 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-07 18:47:37 +00:00
Eric Wasylishen a0f475ebcd Image_LoadImage: read pixel data in 1K chunks instead of calling getc in a loop
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@957 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 20:41:47 +00:00
Eric Wasylishen d9f78442fe AllocBlock: cache index of last used lightmap, start search there
Can speed up map loading by multiple seconds on levels with a lot of lightmaps, at a cost of using slightly more lightmaps (about 5% more).

https://sourceforge.net/p/quakespasm/patches/20/


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@956 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 18:22:58 +00:00
Ozkan Sezer e4f3990efd cd_sdl: add back the informative message (was accidentally reverted in r953.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@955 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 18:20:29 +00:00
Ozkan Sezer b5ffff36a3 ... apply a CD device stops workaround only for linux for now.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@954 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 17:45:22 +00:00
Ozkan Sezer 5058d882e9 revert the all-platforms form of CD device stops workaround from r948/r949 ...
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@953 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 17:43:45 +00:00
Eric Wasylishen 931d4e9396 sfx lowpass filter patch
cvar changes:

The "sndspeed" cvar / "-sndspeed" command-line option now control whether the low-pass filter is applied. If it's set to 11025 you get the low-pass filter, otherwise it's not used.

New "snd_mixspeed" cvar (and the "-mixspeed" command-line option); these default to 44100 and just control the sample rate we request from SDL. Not archived.

New “snd_filterquality” cvar, value can be 1-5. Not archived. The “5” setting closely matches the Windows resampler, and the “1” setting closely matches the OS X resampler. The default depends on the OS, “5” is used on windows builds, otherwise “1”, because I wanted the sfx to sound the same as they do with 0.85.9 on each platform. TODO is checking if a setting other than 1 sounds closer to the system resampler on linux (though it probably depends on the distro).

The lowpass filter is only used for sndspeed=11025 and snd_mixspeed=44100, though these are the defaults.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@952 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-05 05:40:34 +00:00
Ozkan Sezer d6e0a8c020 cd_sdl: prev and next commands must handle data tracks properly.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@951 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-04 21:20:09 +00:00
Steven 75cc453f1a 'cd next', 'cd prev' commands. 'cd play' plays track 1.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@950 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-04 00:08:22 +00:00
Ozkan Sezer d9eb021f1f minor cd_sdl cleanup after r948
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@949 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-02 11:00:09 +00:00