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
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
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
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
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
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
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
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
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
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
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
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
- Modlist_Init: cleanup: instead strstr(), compare the file extension pak.
no need extra checking for "." and ".." in the inner while loop. break out
of the inner while loop as soon as a pak file or progs.dat is found.
- ExtraMaps_Init, Modlist_Init, windows: instead of using dirent emulation,
use windows' native FindFirstFile/FindNextFile/FindClose directly. adapted
from fitzquake-0.85.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@946 af15c1b1-3010-417e-b628-4374ebc0bcbd
Modlist_Init: no need for -basedir check, just use com_basedir
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@941 af15c1b1-3010-417e-b628-4374ebc0bcbd
or as MAXPATHLEN, _MAX_PATH, or MAX_PATH if either of them is
available, or as 1024 if none are available. this would make us
safer in deep installation directory paths. darkplaces engine
seems to do the same.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@928 af15c1b1-3010-417e-b628-4374ebc0bcbd
to load id1/quakespasm.pak for content customizations.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@904 af15c1b1-3010-417e-b628-4374ebc0bcbd
to unpredictable results. Use a new procedure COM_AddExtension()
which appends the given extension to the path if the one it has,
if any, doesn't match. In Host_Game_f(), reject "." as the path.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@902 af15c1b1-3010-417e-b628-4374ebc0bcbd
error: "pathname already exists (not necessarily as a directory).
This includes the case where pathname is a symbolic link, dangling
or not." So, add a check to see if the existing pathname is really
a directory.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@901 af15c1b1-3010-417e-b628-4374ebc0bcbd
By doing this we still adapt to widescreen resolutions automatically,
but we now keep the horizontal FOV a constant for any given resolution.
E.g. if the aspect of the viewport changes (for instance when the user
changes the statusbar from transparent to solid) we adapt the vertical
FOV instead of the horizontal FOV (like original GLQuake does). For any
4:3 screen resolution quakespasm now behaves the same with or without
fov_adapt set, regardless of viewport size/aspect. This fixes the issue
reported by mh at http://forums.inside3d.com/viewtopic.php?f=1&t=5166.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@872 af15c1b1-3010-417e-b628-4374ebc0bcbd
by locale-insensitive versions, new header q_ctype.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@868 af15c1b1-3010-417e-b628-4374ebc0bcbd
tidy-ups in FS* stdio replacement functions. add new FS_filelength.
snd codec layer updates: changed codec_open() to operate only on a
stream pointer and moved all file open/close stuff to snd_codec.c.
codec_open now only returns true or false upon success or failure
instead of a stream pointer. added new snd_codec.c toplevel helper
S_CodecForwardStream(), which allows one codec to hand over its
stream from its codec_open() to another codec. Support for tracker
(mod) music, including support for Unreal umx containers. (might
be useful if we ever make a Nehahra version of the engine some day.
edit the makefiles to enable when compiling.)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@867 af15c1b1-3010-417e-b628-4374ebc0bcbd
they seem to be in native-endian format. thanks to Levent Yavas
for testing on a big endian platform (ppc/OSX 10.4).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@864 af15c1b1-3010-417e-b628-4374ebc0bcbd
as it may be a short but still a valid file.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@860 af15c1b1-3010-417e-b628-4374ebc0bcbd
and add a new blocksize field to it which the flac decoder can
use. updated decoder sources for the snd_info_t changes, where
I made minor tidy-ups too, tightening several format checks and
fixing a few gotchas in snd_wave.c and snd_mem.c.
* snd_flac.c: adjusted for snd_info_t changes. no longed storing
metadata->data.stream_info in our private data, but just storing
a pointer to the stream->info structure. No longer checking the
metadata total_samples field (the FLAC__StreamMetadata_StreamInfo
doesn't seem to have any alignment or pack attributes and I don't
safe with its offset across different compilers), but added check
to make sure that we hit and parsed a STREAMINFO metadata instead,
and our new state seems just fine for validating the file.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@859 af15c1b1-3010-417e-b628-4374ebc0bcbd
it is not enabled by default, edit the Makefile for USE_CODEC_FLAC,
or add USE_CODEC_FLAC=1 to your make command line arguments. Xcode
project file still needs updating for this.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@857 af15c1b1-3010-417e-b628-4374ebc0bcbd
check. (the functionality doesn't change. from tyrquake git repo.)
minor tidy-up.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@843 af15c1b1-3010-417e-b628-4374ebc0bcbd
init'ing avelocities, thanks to a -Waggressive-loop-optimizations
warning from gcc-4.8.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@842 af15c1b1-3010-417e-b628-4374ebc0bcbd
fails even with an existing map, issue a Host_Error().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@827 af15c1b1-3010-417e-b628-4374ebc0bcbd
file handles which would end up in a Sys_Error () due to consuming all
free handles if many maps reside not in pak files.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@825 af15c1b1-3010-417e-b628-4374ebc0bcbd
performance boost on some systems. add GL_BGRA as an option, thanks
to Kristian Duske. the format is hardcoded as GL_RGBA for now,
need a way to make it configurable later.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@813 af15c1b1-3010-417e-b628-4374ebc0bcbd
AFAICS this is not needed for SDL, and it in fact
breaks weird widescreen resolutions such as 1280x600.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@798 af15c1b1-3010-417e-b628-4374ebc0bcbd
A bit of a hack, this should really be controlled by a
separate "cl_alwaysrun" cvar, but lets stick to this for
backward compatibility for now.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@797 af15c1b1-3010-417e-b628-4374ebc0bcbd
support for C-style /*..*/ comments in COM_Parse(). some whitespace
tidy-up.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@795 af15c1b1-3010-417e-b628-4374ebc0bcbd