<!doctype linuxdoc system>
<article>
<title>QuakeSpasm
<toc>

<em>Page last edited: July 2024.</em>

<sect>About<p>
QuakeSpasm is a modern cross-platform Quake engine based on FitzQuake.
</p><p>
It includes support for 64 bit CPUs and custom music playback, a new
sound driver, some graphical niceities, and numerous bug-fixes and other improvements.
</p><p>
Quakespasm utilizes SDL-1.2 or SDL2 frameworks, choose one which works best for you.
SDL2 has nicer features, smoother mouse input and better support for newer operating systems,
but no CD-ROM support.

<sect>Downloads<p>
<itemize>
<item><url url="http://quakespasm.sourceforge.net/download.htm" name="Project Downloads">
<item><url url="https://sourceforge.net/p/quakespasm/quakespasm/ci/master/tree/" name="Latest code repository">
<item><url url="https://github.com/sezero/quakespasm" name="Github mirror.">
</itemize>

<sect>Hints<p>
<em>Visit the <url url="https://celephais.net/fitzquake/" name="FitzQuake homepage"> for a full run-down of the engine's commands and variables.</em>
<itemize>
<item>To disable some changes, use "<bf>quakespasm -fitz</bf>"
<item>Quakespasm's custom data is stored in "quakespasm.pak". Install this file alongside your id1 directory to enable the custom console background and other minor features.
<item>For different sound backend drivers use :<newline>
"<bf>SDL_AUDIODRIVER=</bf><em>DRIVER</em><bf> ./quakespasm</bf>"<newline>
where DRIVER may be alsa, dsp, pulse, esd ...
<item><bf>Shift+Escape</bf> draws the Console.
<item>From the console, use <bf>UP</bf> to browse the command line history and
<bf>TAB</bf> to autocomplete command and map names.
<item>There is currently no CD Music volume support and SDL2 doesn't support CD audio. cd_sdl.c needs replacing with cd_linux.c, cd_bsd.c etc..
<item>In windows, alternative CD drives are accessible by<newline>
"<bf>quakespasm -cddev F</bf>" (for example)
<item>Quakespasm allows loading new games (mods) on the fly with<newline>
"<bf>game</bf> <em>GAMENAME {-quoth/hipnotic/rogue}</em>"
<item>Use "<bf>quakespasm -condebug</bf>" to save console log to "qconsole.log". SDL2 builds no longer generate stdout.txt/stderr.txt.
</itemize>
</p>

<sect1>Music Playback<p>
Quakespasm can play various external music formats, including MP3, OGG and FLAC.
<itemize>
<item>Tracks should be named like "track02.ogg", "track03.ogg" ... (there is no track01) and placed into "Quake/id1/music".
<item>Unix users may need some extra libraries installed: "libmad" or "libmpg123" for MP3, and "libogg" and "libvorbis" for OGG.
<item>Use the "-noextmusic" option to disable this feature.
<item>As of 0.90.0, music is played back at 44100 Hz by default with no need to adjust "-sndspeed".
<item>See <url url="Quakespasm-Music.txt"> for more details.
</itemize>

<sect1>Controller Support<p>
The SDL2 variant of Quakespasm supports Xbox 360 style game controllers.
<p>
The default configuration uses the left analog stick for movement and the right for looking.
<p>
If your controller doesn't work you can try placing <url url="https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt" name="this file"> in your Quake directory, it is a community-maintained database that adds support for more controllers to SDL2.

<sect2>Cvars<p>
<itemize>
<item>joy_deadzone_look - Fraction of look stick travel to be deadzone, between 0 and 1. Default is 0.175.
<item>joy_deadzone_move - Same as above, but for the move stick. Default is 0.175.
<item>joy_deadzone_trigger - Fraction of trigger range required to register a button press on the analog triggers, between 0 and 1. Default 0.2.
<item>joy_outer_threshold_look - Outer deadzone for the look stick, between 0 and 1. Default 0.02.
<item>joy_outer_threshold_move - Outer deadzone for the move stick, between 0 and 1. Default 0.02.
<item>joy_sensitivity_yaw/pitch - Max angular speed in degrees/second when looking. Defaults are 240 for yaw (turning left/right) and 130 for pitch (up/down).
<item>joy_exponent - For the look stick, the stick displacement (between 0 and 1) is raised to this power. Default is 2. A value of 1 would give a linear relationship between stick displacement and fraction of the maximum angular speed.
<item>joy_exponent_move - Same as joy_exponent but for the move stick. Default is 2.
<item>joy_invert - Set to 1 to invert the vertical axis of the look stick.
<item>joy_swapmovelook - Set to 1 to swap the left and right analog stick functions. Default is 0, move on the left stick, look on the right stick.
<item>joy_enable - Set to 0 to disable controller support. Default is 1.
</itemize>

<sect2>Buttons<p>
Some of the controller buttons are hardcoded to allow navigating the menu:

<itemize>
<item>Back - alias for TAB
<item>Start - alias for ESC
<item>DPad, analog sticks - mapped to arrow keys
<item>A Button - alias for ENTER in menus
<item>B Button - alias for ESC in menus
</itemize>

These buttons can be bound normally:

<itemize>
<item>LTRIGGER - Left trigger
<item>RTRIGGER - Right trigger
<item>LSHOULDER - Left shoulder button
<item>RSHOULDER - Right shoulder button
<item>LTHUMB - Clicking the left thumbstick
<item>RTHUMB - Clicking the right thumbstick
<item>ABUTTON
<item>BBUTTON
<item>XBUTTON
<item>YBUTTON
</itemize>

quakespasm.pak contains a default.cfg which has been updated to give some default bindings. L/R shoulder buttons are bound to weapon switching, and L/R triggers are jump and attack.
<p>
The controller support started as Jeremiah Sypult's implementation in Quakespasm-Rift, and also uses ideas/code from LordHavoc's DarkPlaces.


<sect>Compiling and Installation<p>
<p>See the Downloads section to get the sourcecode, then below for platform specific instructions.
Quakespasm can also be built with the cross-platform Codeblocks.
<newline>
Quakespasm's (optional) custom data is now stored in the file <bf>quakespasm.pak</bf>. This file should be placed alongside your quakespasm binary and <bf>id1</bf> directory.</p>

<sect1>Linux/Unix<p>
After extracting the source tarball, "cd Quake" and edit the Makefile for music options. 
</p><p><em>Streaming music playback requires "libmad" or "libmpg123" for MP3, and "libogg" and "libvorbis" for OGG files.</em>
</p><p>Then type "make" to compile the program, and copy the "quakespasm" binary (and "quakespasm.pak") to your Quake game directory.
<newline>
Compile time options include
<itemize>
<item><bf>make DO_USERDIRS=1</bf> to include user directories support
<item><bf>make DEBUG=1</bf> for debugging
<item><bf>make SDL_CONFIG=</bf><em>/PATH/TO/sdl-config</em> for unusual SDL installations
<item><bf>make USE_SDL2=1</bf> to compile against SDL2 instead of SDL-1.2
</itemize>
<sect1>Windows<p>
QuakeSpasm developers cross-compile windows binaries using <url url="http://mingw-w64.sf.net" name="MinGW-w64"> and <url url="https://mingw.osdn.io" name="MinGW">.
The project can also be built using Microsoft Visual Studio 2005 and newer versions.</p>
<sect1>Mac OS X<p>
A Quakespasm App (including program launcher and update framework) can be made using the <bf>Xcode</bf> template found in the MacOSX directory.
Alternatively, have a look at <bf>Makefile.darwin</bf> for more instructions on building from a console.
</p>

<sect1>Quake '2021 re-release'<p>
QuakeSpasm 0.94 has support for playing the 2021 re-release content: Copy the quakespasm binary to your rerelease installation and run as you normally do.</p>


<sect>Changes<p>

<sect1>Changes in 0.96.3<p>
<itemize>
<item> Fix potential infinite loop when playing sounds with loop start >= end (e.g. misc/forcefield.wav from Madfox's kaptlog.zip)
<item> Fix possible overflow when resampling very big sounds (e.g. gram1.wav from the 'A day like no other' mod.)
<item> Change Sky_ClipPoly to allocate on the heap in if MAX_CLIP_VERTS limit is reached (e.g. with lim_daviddg from Liminal Spaces Jam)
<item> Minor code cleanups. Updates to third party code.
<item> Thanks to Andrei Drexler, Vincent Sonnier, Alexey Lysiuk, and Jaycie Ewald for patches.
</itemize>
</p>

<sect1>Changes in 0.96.2<p>
<itemize>
<item> Fix stack buffer overrun Mod_PolyForUnlitSurface: fixes crash when loading lim_daviddg.bsp from Liminal Spaces Jam.
<item> Fix potential buffer overflow in progs global string functions.
<item> Fix potential buffer overflow in Mod_LoadAliasFrame()
<item> Optimize BoxOnPlaneSide()
<item> Reserve enough space in PF_makestatic() for worst case scenarios.
<item> Improve handling of huge entities in SV_FindTouchedLeafs()
<item> Warn about bad maps with only 1 or 2 edges per face (e.g.: mj4m?, alk_dancing, ej3_bizz, rotj_entsoy...)
<item> Apply FOV gun scaling for r_showtris
<item> Sliders with visible values in options menu.
<item> game command now refuses setting a non-existing game directory
<item> Fix build in C23 mode.
<item> Minor code cleanups. Updated third party code, e.g. SDL, music codecs, etc.
<item> Thanks to Andrei Drexler, Alexey Lysiuk, Diordany van Hemert, and Jaime Moreira for patches.
</itemize>
</p>

<sect1>Changes in 0.96.1<p>
<itemize>
<item> Fix demo recording as client-only after connection to server (was broken by signon changes in 0.96.0. Thanks to Jozsef Szalontai for issue report.)
<item> Fix potential buffer overflow in COM_Parse(), e.g. with maps with oversized 'wad' fields. (Thanks to Andrei Drexler.)
<item> Minor code cleanups.
</itemize>
</p>

<sect1>Changes in 0.96.0<p>
<itemize>
<item> <url url="https://github.com/sezero/quakespasm/pull/51" name="Adjustments"> to joystick defaults and behaviour. See the "Controller support / Cvars" section above.
<item> Fix for a mouse grabbing issue on macOS.
<item> Add missing support for <em>-ip</em> command line option on unix / macOS.
<item> Backport angled sprites code from FTEQW (spriteframetype: 2, must have 8 frames per group.)
<item> Bump the progs execution runaway loop limit to 16M.
<item> Add signon buffer fragmentation to fix SZ_GetSpace errors on certain maps when using protocol 999.
<item> Increased MAX_DATAGRAM to 64000 to overcome packet overflows.
<item> Bump the MAXALIASFRAMES limit to 1024.
<item> Fix arrays to have proper sizes in gl mesh code, reflecting MAXALIASTRIS and MAXALIASVERTS correctly. (fixes SIGSEGV in mj4m4/mj4m5.)
<item> Increased default value of gl_farclip to 65536.
<item> Increase chase cam target trace distance to allow for chasecam to function in large open maps (useful e.g. for the func_vehicle mod.)
<item> Raised default maximum number of particles to 16384 (can be set up to 32768 with -particles on the command line.)
<item> Fix on-screen keyboard showing up suddenly on Steam Deck when starting a map.
<item> Fix viewmodel interpolation with >10Hz animations.
<item> Fix a memory leak when exiting game in SDL2 builds.
<item> Fix a possible crash when handling clipboard data on macOS.
<item> Fix a potential crash after loading of saved game.
<item> Fix possible out-of-bound reads when handling progs type sizes.
<item> Fix Dutch angle VP_PARALLEL_UPRIGHT sprites.
<item> Fix an issue with lights blending by using 10 bit color depth for lightmaps. (For GLSL mode only.) Disable with "-nopackedpixels", if necessary.
<item> No relative motions when the window is not focused.
<item> Status bar and intermission screen tweaks.
<item> Properly display monster counts > 3 digits.
<item> Fix console animation with scr_conspeed <= 0.
<item> Fix mouselook not working upon game quickload during a demo play.
<item> Haiku operating system support.
<item> Fix console when server is run noninteractively with stdin redirected from /dev/null.
<item> Updated Visual Studio project files.
<item> Minor code cleanups. Updated third party code, e.g. SDL, music codecs, etc.
<item> Thanks to Andrei Drexler, Alexey Lysiuk, Andrey Budko, Boris I. Bendovsky, Chris Cowan, Maciej Olędzki, Simon McVittie, OscarL, Eric Wasylishen, Jaycie Ewald and Spike for patches.
</itemize>
</p>

<sect1>Changes in 0.95.1<p>
<itemize>
<item> Allow mixing lit and unlit textures in the same map.
<item> Water texture mipmapping support - fixes glistening effect on distant water.
<item> Fix screen flashes in some maps with AMD's new drivers.
<item> Defend against zero-sized textures, e.g. __TB_empty in qbj_grue.bsp
<item> Fix possible file pointer leak in game load code.
<item> Minor code cleanups. Updated third party code, e.g. SDL, music codecs, etc.
<item> Thanks to 'temx' for his patches.
</itemize>
</p>

<sect1>Changes in 0.95.0<p>
<itemize>
<item> Add support for lit water (patch contributed by Josiah Jack, with fixes from Eric Wasylishen.)
<item> Add model scale support -- requires protocol 999. (Original patch contributed by Josiah Jack with fixes from temx and Andrei Drexler. Thanks to Eric Wasylishen, MH and Spike for useful discussions.)
<item> Add sv_cheats cvar for 2021 rerelease (patch from Andrei Drexler).
<item> Clear the startdemo list on game change (patch by Andrei Drexler).
<item> Try light trace from entity origin first (patch by Andrei Drexler).
<item> Backport a few fixes to the bundled SDL2-2.0.22 version.
</itemize>
</p>

<sect1>Changes in 0.94.7<p>
<itemize>
<item> Fix console history buffer wrapping.
<item> Fix wrong external texture use after vid_restart.
<item> Update lodepng from mainstream git.
<item> Miscellaneous source code cleanups.
</itemize>
</p>

<sect1>Changes in 0.94.6<p>
<itemize>
<item> Server protocol size check fixes for sounds and particles.
<item> An invalid memory access fix in the jpg screenshot writer.
<item> Basic dependency tracking in Makefiles.
<item> Backported a few fixes to the bundled SDL2-2.0.22 version.
<item> Minor build fix for C++ compilers.
<item> Other small improvements elsewhere in the code.
</itemize>
</p>

<sect1>Changes in 0.94.5<p>
<itemize>
<item> Compatibility with new SDL2 versioning scheme.
<item> Revised min/max/clamp macros' usage.
<item> Fixed a potential undefined behavior in R_DrawAliasModel.
<item> Fixed parsing of the time argument of svc_fog server message. (it has been broken for more than 20 years and has never seem to have been used.)
<item> Other small improvements elsewhere in the code.
<item> Backported a few fixes to the bundled SDL2-2.0.22 version.
</itemize>
</p>

<sect1>Changes in 0.94.4<p>
<itemize>
<item> Fixed getting stuck with loading plaque upon attempting to load a bad save from the menu
<item> Fixed SZ_GetSpace server crashes, e.g. in ad_magna or ad_mountain
<item> Fixed intermission camera angles during demo playback
<item> Don't reset onground flag on every new server message
<item> Re-enabled title demos by default (turn off with cl_startdemos 0)
<item> Don't autoplay next demo after a timedemo
<item> Fixed bad parsing of cdtrack in hipdemo1 from Scourge of Armagon
<item> Fixed serverinfo off-by-one nummodels/numsounds for protocol 15
<item> Support for Quake 2021 update 3
<item> Implemented quad/pentagram dlights for Quake 2021 rerelease
<item> Implemented 2021 rerelease localsound builtin & svc_localsound (56)
<item> Several other improvements to Quake 2021 rerelease support
<item> Several other small fixes and improvements all over the code
<item> Updated third party code (SDL, lodepng, miniz, some of the codecs, etc.)
<item> Thanks to Andrei Drexler, 'atsb' and 'temx' for their several patches.
</itemize>
</p>

<sect1>Changes in 0.94.3<p>
<itemize>
<item> Handle sky textures with non-standard sizes and warn about them (e.g. ad_tears)
<item> Allow loading textures not aligned to 16 pixels and warn about them (eg. the horde2 map of Dimension of the Machine from 2021 rerelease update/2.)
<item> Updated included SDL2 to latest version 2.0.18.
</itemize>
</p>

<sect1>Changes in 0.94.2<p>
<itemize>
<item> 2021 rerelease: Support for playing the latest update.
<item> 2021 rerelease: Fix pitch black models in lit areas in DOTM.
<item> 2021 rerelease: Fix black candles in the DOTM start map.
<item> 2021 rerelease: Look for QuakeEX.kpf under userdir, too.
</itemize>
</p>

<sect1>Changes in 0.94.1<p>
<itemize>
<item> Fix lightmap issues after vkQuake surface mark/cull optimizations merge (sf.net bug/50)
</itemize>
</p>

<sect1>Changes in 0.94.0<p>
<itemize>
<item> Initial support for playing the 'Quake 2021 re-release' content (thanks to Andrei Drexler for bulk of the work, Guillaume Plourde for Q64 bsp format support.)
<item> Fix rendering bug when cl_bobcycle was set to zero (sf.net bug/41)
<item> Fixed buffer overflow with large char skybox names (sf.net bug/38)
<item> Fixed a missing MAXALIASFRAMES bounds check (sf.net bug/37)
<item> OpenGL: workaround Intel UHD 600 driver bug (sf.net bug/39)
<item> OpenGL: merged surface mark & cull optimizations from vkQuake.
<item> Compensate viewmodel distortion at fov > 90 (based on code from Qrack, thanks to Andrei Drexler for the patch.)
<item> Raised MAX_GLTEXTURES limit from 2048 to 4096 for now.
<item> Changed 'model has a skin taller than 480' error into a warning
<item> Reject lit files if they're the wrong size (eg hipnotic/start.bsp vs id1/start.lit or just a bsp that no longer has any coloured lits, etc)
<item> External ent files are now versioned using 4 digit crc of the original map's ents, like e1m1@c49d.ent, which is much safer. The old method (e.g. e1m1.ent) still works but isn't recommended.
<item> Support for external vis files.
<item> Save: remove CR/LFs from level name to avoids broken saves, e.g. with autumn_sp map.
<item> Music: improvements to mp3 tag detection / skipping.
<item> Music: umx loader fix for malformed / crafted files.
<item> New console command music_jump: Jump to given order in music, like Unreal's music change - only for module (tracker) music.
<item> Updated third-party libraries (music codecs, SDL, etc.) Other minor fixes, tidy-ups and protability tweaks.
<item> Source repository moved to git.
</itemize>
</p>

<sect1>Changes in 0.93.2<p>
<itemize>
<item> Lightmaps are now dynamically allocated (from QSS), and BLOCK_WIDTH/HEIGHT raised from 128 to 256.
<item> Fixed several uncheked limits that would crash the Slayer's Testaments mod (sf.net bug #33).
<item> Raised MAXALIASTRIS from 2048 to 4096, so that the Slayer's Testaments mod works.
<item> Fixed 'pants' and 'shirt' types so that those textures load correctly on platforms where char type is unsigned by default (sf.net bug #28).
<item> Windows audio: WASAPI-enabled SDL2 dlls function properly now.
<item> Update the third-party libraries. Other fixes/cleanups.
</itemize>
</p>

<sect1>Changes in 0.93.1<p>
<itemize>
<item> Fixed a fog regression which was introduced in 0.93.0.
<item> Fixed a crash (buffer overflow) with invalid vis data.
<item> Fixed buttons crushing players in 64-bit builds.
<item> Change controller movement to use cubic easing by default; added "joy_exponent_move" cvar.
<item> config.cfg is no longer written in case of a Sys_Error.
<item> Fixed Opus encoded cd tracks not being recognized as ripped tracks.
<item> Update the third-party libraries. Other fixes/cleanups.
</itemize>
</p>

<sect1>Changes in 0.93.0<p>
<itemize>
<item> Raise default "joy_deadzone_trigger" cvar to 0.2.
<item> Raise console buffer size to 1MB.
<item> Raise MAX_STATIC_ENTITIES from 512 to 4096.
<item> Raise MAX_STACK_DEPTH from 32 to 64.
<item> Raise command buffer size from 8K to 256K to support large configs.
<item> Remove MAX_EFRAGS and MAX_MAP_LEAFS limits.
<item> Remove "Loadgame buffer overflow" limit, which could happen when loading DP or QSS saves.
<item> Adjust "exceeds standard limit of" debug warnings to include the actual QS limit.
<item> Change "game" command to now exec quake.rc.
<item> Change "games" / "mods" commands to list all subdirectories.
<item> Restore vid_refreshrate from fitzquake-0.85 for SDL2 builds.
<item> Alpha-masked model support. (MF_HOLEY: 0x4000).
<item> Invalid skin index now draws skin 0 (WinQuake behaviour) instead of blue checkerboard.
<item> Change default screenshot format to png. The 'screenshot' command now supports optional format (tga, png or jpg) and quality (1-100) arguments.
<item> Revert "always run" changes from 0.85.9 and move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar: Set to 1 in order to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and to make "speedkey" act as "slowkey".
<item> Change the "always run" menu option to offer three choices:
<verb>
off        (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200)
vanilla    (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400)
quakespasm (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200)
</verb>
<item> New "r_scale" cvar. Set to 2, 3, or 4 to render the view at 1/2, 1/3, or 1/4 resolution.
<item> New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position (from MarkV).
<item> New "find" / "apropos" command, searches for commands/cvar names for the given substring (from Spike).
<item> New "randmap" command for loading a random map.
<item> New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage", "gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for tuning the strength of specic view blends.
<item> GL2 renderer: use a GLSL shader for world faces. Fixes reports of integrated+discrete GPU laptops having inconsistent fog rendering.
<item> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).
<item> Fix memory corruption in PF_lightstyle with out of bounds lightstyles.
<item> Fix crash in BoundPoly with polygons extending beyond +/-9999.
<item> Fix QS window to stay on the current monitor when changing video modes (SDL2 only).
<item> Fix possible freeze in SV_TouchLinks regardless of what QC does in the touch function.
<item> Fix for maps with empty strings for vector keys (e.g. "origin"); don't read uninitialized memory.
<item> Support for Open Watcom compiler.
<item> Update the third-party libraries.
</itemize>
</p>

<sect1>Changes in 0.92.1<p>
<itemize>
<item> Fixed large menu scale factors (was broken in 0.92.0).
<item> Fixed PAUSE key (was broken in 0.92.0).
<item> Updated some of the third-party libraries.
</itemize>
</p>

<sect1>Changes in 0.92.0<p>
<itemize>
<item> SDL2 Game Controller support.
<item> Contrast support with new "contrast" cvar, behaving the same as MarkV. It may be a useful alternative to the existing gamma control for laptops in a bright environment, etc. Raising contrast gives less of a gray/washed out look than raising gamma, but at a disadvantage: colors near white get clipped to white.
<item> RMQ protocol (999) support, adapted from RMQEngine.
<item> New "-protocol x" command line option. Accepted values for 'x' are 15 (NetQuake), 666 (FitzQuake, default), and 999 (RMQ).
<item> New "setpos" console command.
<item> New "vid_borderless" cvar for getting a borderless window.
<item> Increased MAX_MAP_LEAFS from 65535 to 70000 and MAX_LIGHTMAPS from 256 to 512 in order to handle the oms3 map pack.
<item> Server edicts are now allocated using malloc instead of allocating on the hunk.
<item> gl_clear now defaults to 1.
<item> Fix items falling out of the world on oms3.bsp on SSE builds.
<item> Worked around an OSX 10.6 driver bug when using FSAA, which was leading to an unplayable HOM effect on the rest of the screen.
<item> Fix wrong trace endpoint from the tracepos console command.
<item> Updated some of the third-party libraries. Other fixes/clean-ups.
</itemize>
</p>

<sect1>Changes in 0.91.0<p>
<sect2>Bugfixes
<itemize>
<item> Fix unwanted fog mode change upon video restart.
<item> Work around Intel 855 bug in status bar drawing with "r_oldwater 0" and "scr_sbaralpha 0".
<item> Fix an obscure GLSL bug where changing gamma would result in the screen turning to noise.
<item> Fix GLSL gamma causing the tiled screen border to turn white when "sizedown" is used.
<item> Fix an alias model VBO renderer bug where a model not precached during map start wouldn't be drawn.
<item> Fix the order of OpenGL context creation and window creation in SDL2 video.
<item> Fix a calling convention issue in windows DPI awareness function pointers.
<item> Fix a random texture recoloring after video mode change.
<item> Fix a liquid turning to garbage after several video mode changes and "r_oldwater 0".
<item> Fix a wrong alpha-sorting bug introduced in 0.90.1.
<item> Fix "flush" command not reloading mdl's from disk (bug introduced in 0.90.1).
<item> Prevent a possible buffer overflow in Cbuf_Execute (old Q1/Q2 bug).
<item> Prevent a possible vulnerability in MSG_ReadString (old Q1/Q2 bug).
</itemize>
<sect2>Visual improvements
<itemize>
<item> New cvars r_lavaalpha, r_slimealpha, r_telealpha for fine-tuning specific liquid opacities (from DirectQ/RMQEngine, non-archived, default to 0), and new worldspawn keys _wateralpha, _lavaalpha, _slimealpha, _telealpha, _skyfog (unique to Quakespasm, similar to the behaviour of the "fog" worldspawn key).
<item> GLSL gamma is now supported on older hardware without NPOT extension.
</itemize>
<sect2>Interface improvements
<itemize>
<item> New r_pos command to show player position.
<item> NaN detection in traceline with "developer 1" set now warns instead of errors.
</itemize>
<sect2>Code cleanup / Other
<itemize>
<item> Update third-party libraries.
</itemize>
<sect2>Raised limits
<itemize>
<item> Default max_edicts 8192 (was 2048) and no longer saved to config.cfg.
<item> Default heapsize 256 MB (was 64 MB).
<item> Default zone 4 MB (was 384 KB).
<item> Raised MAX_SFX to 1024 (was 512).
</itemize>
</p>

<sect1>Changes in 0.90.1<p>
<sect2>Bugfixes
<itemize>
<item> Fix dynamic light artifact where changing lightmap are rendered one frame late (bug introduced in 0.90.0).
<item> Fix texture memory leak when changing video modes with SDL2.
<item> Fix a rare incorrect mdl lighting on 64-bit builds. <url url="https://forums.insideqc.com/viewtopic.php?f=3&amp;t=5620" name="(details here.)">
<item> Fix fullbrights turning black after "kill" command (bug introduced in 0.90.0).
<item> Clear all fog values on map change to prevent colored fog carrying over to jam3_tronyn.bsp.
<item> Allow loading saves with } character in quoted strings, fixes issue with retrojam1_skacky.bsp.
<item> Fix viewmodel not lerping on extended-limit maps.
<item> Fix crash on out-of-bounds skin number.
</itemize>
<sect2>Performance
<itemize>
<item> Use multithreaded OpenGL on OS X for better performance.
<item> New, faster mdl renderer using GLSL. Disable with "-noglslalias".
</itemize>
<sect2>Visual improvements
<itemize>
<item> New gamma correction implementation using GLSL. Fixes all known gamma issues (affecting the full display, persisting after quitting, or darkening the screen on OS X). Disable with "-noglslgamma".
<item> Use high-quality water by default (r_oldwater 0).
<item> Shadows use stencil buffer to avoid overlapping artifacts (from MarkV.)
<item> r_noshadow_list cvar added (from MarkV.)
</itemize>
<sect2>Interface improvements
<itemize>
<item> Support pausing demo playback with the "pause" command.
<item> Autocompletion for "game", "record", "playdemo".
<item> Experimental windowed fullscreen mode available with vid_desktopfullscreen 1 (only in SDL2 builds, takes effect upon entering fullscreen mode the next time.)
<item> Silence "exceeded standard limit" messages unless developer cvar is >= 1.
<item> Some spam moved from developer 1 to 2: "can't find tga/lit/ent", "trying to load ent", "bad chunk length", "meshing", "PR_AlocStringSlots: realloc'ing"
</itemize>
<sect2>Code cleanup
<itemize>
<item> Clean up IDE project files to build on fresh systems.
<item> Update 3rd-party libraries.
</itemize>
</p>

<sect1>Changes in 0.90.0<p>
<itemize>
<item> Fix issues on Windows systems with DPI scaling.</item>
<item> Unix/Mac user directories support. Disabled by default,<newline>
'make DO_USERDIRS=1' to enable it.
<item> SDL2 support. Disabled by default, 'make USE_SDL2=1' to enable it.
<item> Revised keyboard input code.
<item> Revised/improved the 'game' command, i.e. on-the-fly mod changing. It now accepts an optional second argument for mission packs or quoth support i.e. -hipnotic, -rogue, or -quoth. For example, for WarpSpasm: "game warp -quoth"
<item> Command line: "-game {quoth/hipnotic/rogue}" is now treated the same as -quoth, -hipnotic, or -rogue.
<item> Console speed now resolution-independent.
<item> Disabled gl_zfix, which caused glitches and is undesirable for new maps. Replacement .ent files to fix z-fighting for several id1 maps added to quakespasm.pak.
<item> PF_VarString buffer bumped to 1024, avoids truncated centerprints from the 'In The Shadows' mod.
<item> Support for opengl non-power-of-two-textures extension (disable with command line: "-notexturenpot".)
<item> Support for OpenGL vertex buffer objects (VBO, OpenGL 1.5 or newer) for world and brush models (disable with command line: "-novbo".)
<item> Antialiasing (FSAA) support (command line: -fsaa x, where x can be 0, 2, 4, 8).
<item> Fence textures support.
<item> Dynamic light speedup. Speedup loading of tga and pcx external images.
<item> Brush model drawing speedup.
<item> Support for BSP2 and 2PSB map formats.
<item> Support for Opus, FLAC, and tracker music (S3M, IT, UMX, etc.), as compile-time options.
<item> Music and sfx now mixed at 44100 Hz to avoid downsampling music. Low-pass filter applied to the sfx if -sndspeed is 11025 (the default), to preserve the same sound quality as 0.85.9.  New -mixspeed option sets the rate for mixing sfx and music, and output to the OS (default 44100), setting it to 11025 reverts to 0.85.9 behaviour. New snd_filterquality cvar, value can be between 1 (emulate OS X resampler) and 5 (emulate Windows resampler), controls the sound of the low-pass filter.
<item> Better Hor+ field of view (FOV) scaling behavior.
<item> Better cross-map demo playback support.
<item> Fix screenshots when screen width isn't a multiple of 4.
<item> Fix a lighting glitch due to floating point precision.
<item> Fix a looping sounds glitch.
<item> Fix a vulnerability in file extension handling. Tighten path handling safety.
<item> Initialize opengl with 24-bit depth buffer at 32 bpp.
<item> Reset all models upon gamedir changes. (Fixes failures with mods using custom content.)
<item> Fix broken behavior upon gamedir changes if -basedir is specified on the command line.
<item> NET_MAXMESSAGE and MAX_MSGLEN limits bumped to 64000.
<item> MAX_EFRAGS bumped to 4096, and MAX_CHANNELS to 1024.
<item> MAX_ENT_LEAFS bumped from 16 to 32 to work around disappearing or flickering brush models in some situations. Also, if an entity is visible from MAX_ENT_LEAFS or more leafs, we now always send it to the client.
<item> Fix cvar cycle command not working sometimes.
<item> Host_Error upon missing models. (Prevents segmentation faults.)
<item> Change sv_aim default value to 1 (i.e. turn off autoaim)
<item> Add 'prev' and 'next' keywords to the 'cd' command.
<item> Work around a linux cdrom issue (playback might not start for a while after a stop).
<item> Quakespasm content customization moved from engine-embedded into a new optional quakespasm.pak file.
<item> Version bumped to 0.90.0 (because Quakespasm has a decent life of it's own)
<item> Other fixes and clean-ups.
</itemize>
</p>

<sect1>Changes in 0.85.9<p>
<itemize>
<item> Fixes for several undefined behaviors in C code (gcc-4.8 support.)
<item> Implemented Hor+ style field of view (FOV) scaling, useful for widescreen resolutions. Configured by new cvar fov_adapt: set it to 1 and your fov will be scaled automatically according to the resolution. Enabled by default.
<item> Adjusted string buffers for PR_ValueString and friends to fix crashes with excessively long global strings seen in some rude mods.
<item> Toned down warning messages from PF_VarString() a bit.
<item> Fixed Fitzquake's map existence check in changelevel (used to leak file handles which would end up in a Sys_Error() due to consuming all free handles if many maps reside not in pak files.)
<item> Fixes/cleanups in chat mode handling. Client no longer gets stuck in chat mode upon disconnect.
<item> Mouse grab/key_dest fixes and key cleanups.
<item> The "speedkey" now acts as "slowkey" when "always run" is on.
<item> Support for demo recording after connection to server. (thanks to Baker for a patch)
<item> Corner case fixes in COM_Parse() for quoted strings and support for C-style /*..*/ comments.
<item> Changed lightmaps to GL_RGBA instead of GL_RGB.
<item> Better parse for opengl extensions list (from quakeforge.)
<item> Vsync saving/loading fixes.
<item> Fixed pointfile loading.
<item> Multiple cleanups in gl_vidsdl.c.
<item> Opus music decoding support (as an optional patch only.)
<item> Several other minor fixes/cleanups.
</itemize>
</p>

<sect1>Changes in 0.85.8<p>
<itemize>
<item> Made Quake shareware 1.00 and 1.01 versions to be recognized properly.
<item> Fixed control-character handling in unicode mode. Keyboard input tweaks.
<item> Made the keypad keys to send separate key events in game mode.
<item> Text pasting support from OS clipboard to console. (windows and macosx.)
<item> Support for the Apple (Command) key on macosx.
<item> Fixed increased (more than 32) dynamic lights.
<item> Music playback: Made sure that the file's channels count is supported.
<item> Support for Solaris.
<item> Switched to using libmad instead of libmpg123 for MP3 playback on Mac OS X.
<item> Better support for building the Mac OS X version using a makefile, support for cross-compiling on Linux.
<item> Fixed a minor intermissions glitch.
<item> Increased string buffer size from 256 to 384 for PF_VarString to work around broken mods such as UQC.
<item> Restored original behavior for Quake registered version detection.
<item> Minor demo recording/playback tweaks.
<item> Minor tweaks to the scale menu option.
<item> unbindall before loading stored bindings (configurable by new cvar cfg_unbindall, enabled by default.)
<item> New icon.
<item> Miscellaneous source code cleanups.
</itemize>
</p>

<sect1>Changes in 0.85.7<p>
<itemize>
<item> Added support for cross-level demo playback
<item> gl_texturemode is reimplemented as a cvar with a callback and the setting is automatically saved to the config
<item> Fixed execution of external files without a newline at the end
<item> Reduced memory usage during reloading of textures
<item> Fixed compilation on GNU/kFreeBSD (Debian bug #657793)
<item> Fixed backspace key on Mac OS X
<item> Disable mouse acceleration in Mac OS X
<item> Worked around recursive calling of the anisotropic filter callback
<item> Console word wrap and long input line fixes
<item> Verified correct compilation by clang (using v3.0)
<item> Several other small changes mostly invisible to the end-user
</itemize>
</p>

<sect1>Changes in 0.85.6<p>
<itemize>
<item> More work for string buffer safety
<item> Reverted v0.85.5 change of not allowing deathmatch and coop cvars to be set at the same time (was reported for possibility of causing compatibility issues with mods)
<item> Several cleanups/changes in the cvar layer
<item> Minor SDL video fixes.
</itemize>
</p>

<sect1>Changes in 0.85.5<p>
<itemize>
<item> SDL input driver updated adding native keymap and dead key support to the console
<item> Fixed a crash in net play in maps with extended limits
<item> Verified successful compilation using gcc-4.6.x
<item> Added workaround against GL texture flicker (z fighting), controlled by new cvar 'gl_zfix'
<item> Read video variables early so that a vid_restart isn't necessary after init
<item> mlook and lookspring fixes
<item> Added support for loading external entity files, controlled by new cvar 'external_ents'
<item> Made mp3 playback to allocate system memory instead of zone
<item> Some updates to the progs interpreter code
<item> Fixed r_nolerp_list parsing code of fitzquake
<item> Made sure that deathmatch and coop are not set at the same time
<item> Several code updates from uHexen2 project, several code cleanups.
</itemize>
</p>

<sect1>Changes in 0.85.4<p>
<itemize>
<item> Implement music (OGG, MP3, WAV) playback
<item> A better fix for the infamous SV_TouchLinks problem, no more hard lockups with maps such as "whiteroom"
<item> Add support for mouse buttons 4 and 5
<item> Fix the "unalias" console command
<item> Restore the "screen size" menu item
<item> Fixed an erroneous protocol check in the server code
<item> Raised the default zone memory size to 384 kb
<item> Raised the default max_edicts from 1024 to 2048
<item> Revised lit file loading, the lit file must be from the same game directory as the map itself or from a searchpath with a higher priority
<item> Fixed rest of the compiler warnings
<item> Other minor sound and cdaudio updates
</itemize>
</p>

<sect1>Changes in 0.85.3<p>
<itemize>
<item> Fix the "-dedicated" option (thanks Oz) and add platform specific networking code (default) rather than SDL_net
<item> Much needed OSX framework stuff from Kristian
<item> Add a persistent history feature (thanks Baker)
<item> Add a slider for scr_sbaralpha, which now defaults to 0.95 (slightly transparent, allowing for a nicer status bar)
<item> Allow player messages longer than 32 characters
<item> Sockaddr fix for FreeBSD/OSX/etc networking
<item> Connect status bar size to the scale slider
<item> Include an ISNAN (is not-a-number) fix to catch the occassional quake C bug giving traceline problems
<item> Enumerate options menus
<item> Add a "prev weapon" menu item (from Sander)
<item> Small fix to Sound Block/Unblock on win32
<item> Lots of code fixes (some from uhexen2)
<item> Sys_Error calls Host_Shutdown
<item> Added MS Visual Studio support
<item> Add a "-cd" option to let the CD Player work in dedicated mode, and some other CD tweaks.
</itemize>

<sect1>Changes in 0.85.2<p>
<itemize>
<item> Replace the old "Screen size" slider with a "Scale" slider
<item> Don't constantly open and close condebug log
<item> Heap of C clean-ups
<item> Fix mapname sorting
<item> Alias the "mods" command to "games"
<item> Block/Unblock sound upon focus loss/gain
<item> NAT (networking protocol) fix
<item> SDLNet_ResolveHost bug-fix allowing connection to ports other than 26000
<item> Bumped array size of sv_main.c::localmodels from 5 to 6 fixing an old fitzquake-0.85 bug which used to cause segfaults depending on the compiler.
<item> Accept commandline options like "+connect ip:port"
</itemize>

<sect1>Changes in 0.85.1<p>
<itemize>
<item>64 bit CPU support
<item>Restructured SDL sound driver
<item>Custom conback
<item>Tweaked the command line completion and added a map/changelevel autocompletion function
<item>Alt+Enter toggles fullscreen
<item>Disable Draw_BeginDisc which causes core dumps when called excessively
<item>Show helpful info on start-up
<item>Include real map name (sv.name) and skill in the status bar
<item>Remove confirm quit dialog
<item>Don't spam the console with PackFile seek requests
<item>Default to window mode
<item>Withdraw console when playing demos
<item>Don't play demos on program init
<item>Default heapsize is 64 MB.
<item>Changes to default console alpha, speed
<item>Changes to cvar persistence gl_flashblend (default 0), r_shadow, r_wateralpha, r_dynamic, r_novis.
</itemize>

<sect>Copyright<p>
<itemize>
<item>Quake and Quakespasm are released under the <url url="http://www.gnu.org/licenses/gpl-2.0.html" name="GNU GENERAL PUBLIC LICENSE Version 2">
<item>Quakespasm console background image by <bf>AAS</bf>, released under the
<url url="http://creativecommons.org/licenses/by/3.0/legalcode" name="CREATIVE COMMONS PUBLIC LICENSE">
</itemize>

<sect>Contact<p>
<itemize>
<item><url url="https://sourceforge.net/projects/quakespasm/" name="QuakeSpasm Project page">
<item><url url="https://sourceforge.net/p/quakespasm/bugs/" name="Bug reports">
</itemize>

<sect>Links<p>
<itemize>
<item><url url="http://quakespasm.sourceforge.net" name="QuakeSpasm Homepage">
<item><url url="http://quakespasm.sourceforge.net/download.htm" name="Downloads">
<item><url url="https://celephais.net/fitzquake/" name="FitzQuake Homepage">
<item><url url="https://celephais.net/board/view_thread.php?id=60452" name="Func Quakespasm forum">
<item><url url="https://forums.insideqc.com" name="Inside3D forums">
</itemize>

</article>
