]> de.git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Merge branch 'patch-1' into 'master'
authorRudolf Polzer <divverent@gmail.com>
Wed, 17 Oct 2018 16:14:19 +0000 (16:14 +0000)
committerRudolf Polzer <divverent@gmail.com>
Wed, 17 Oct 2018 16:14:19 +0000 (16:14 +0000)
Update .desktop files to Freedesktop standards Issue #159

See merge request xonotic/xonotic!17

131 files changed:
.gitignore
CMakeLists.txt
COPYING
Docs/compile-settings.txt [deleted file]
Docs/eventlog.txt
Docs/faq.html [deleted file]
Docs/faq.md [new file with mode: 0644]
Docs/guide.md [new file with mode: 0644]
Docs/htmlfiles/faq.aft [deleted file]
Docs/mapdownload.txt
Docs/mapping.txt
Docs/scorelog.txt
README.md [new file with mode: 0644]
all
data/font-xolonium.pk3dir/fonts/README
data/font-xolonium.pk3dir/fonts/xolonium-bold.otf
data/font-xolonium.pk3dir/fonts/xolonium-regular.otf
default.nix [new file with mode: 0644]
derivation.nix [new file with mode: 0644]
misc/builddeps/win32/sdl/bin/sdl2-config
misc/builddeps/win32/sdl/include/SDL2/SDL.h
misc/builddeps/win32/sdl/include/SDL2/SDL_audio.h
misc/builddeps/win32/sdl/include/SDL2/SDL_config.h
misc/builddeps/win32/sdl/include/SDL2/SDL_events.h
misc/builddeps/win32/sdl/include/SDL2/SDL_gamecontroller.h
misc/builddeps/win32/sdl/include/SDL2/SDL_haptic.h
misc/builddeps/win32/sdl/include/SDL2/SDL_hints.h
misc/builddeps/win32/sdl/include/SDL2/SDL_joystick.h
misc/builddeps/win32/sdl/include/SDL2/SDL_keyboard.h
misc/builddeps/win32/sdl/include/SDL2/SDL_main.h
misc/builddeps/win32/sdl/include/SDL2/SDL_mouse.h
misc/builddeps/win32/sdl/include/SDL2/SDL_opengles.h
misc/builddeps/win32/sdl/include/SDL2/SDL_opengles2.h
misc/builddeps/win32/sdl/include/SDL2/SDL_pixels.h
misc/builddeps/win32/sdl/include/SDL2/SDL_platform.h
misc/builddeps/win32/sdl/include/SDL2/SDL_render.h
misc/builddeps/win32/sdl/include/SDL2/SDL_revision.h
misc/builddeps/win32/sdl/include/SDL2/SDL_rwops.h
misc/builddeps/win32/sdl/include/SDL2/SDL_stdinc.h
misc/builddeps/win32/sdl/include/SDL2/SDL_surface.h
misc/builddeps/win32/sdl/include/SDL2/SDL_syswm.h
misc/builddeps/win32/sdl/include/SDL2/SDL_version.h
misc/builddeps/win32/sdl/include/SDL2/SDL_video.h
misc/builddeps/win32/sdl/lib/cmake/SDL2/sdl2-config.cmake
misc/builddeps/win32/sdl/lib/libSDL2.a
misc/builddeps/win32/sdl/lib/libSDL2.la
misc/builddeps/win32/sdl/lib/libSDL2_test.a
misc/builddeps/win32/sdl/lib/libSDL2main.a
misc/builddeps/win32/sdl/lib/pkgconfig/sdl2.pc
misc/builddeps/win32/sdl/share/aclocal/sdl2.m4
misc/builddeps/win64/sdl/bin/sdl2-config
misc/builddeps/win64/sdl/include/SDL2/SDL.h
misc/builddeps/win64/sdl/include/SDL2/SDL_audio.h
misc/builddeps/win64/sdl/include/SDL2/SDL_config.h
misc/builddeps/win64/sdl/include/SDL2/SDL_events.h
misc/builddeps/win64/sdl/include/SDL2/SDL_gamecontroller.h
misc/builddeps/win64/sdl/include/SDL2/SDL_haptic.h
misc/builddeps/win64/sdl/include/SDL2/SDL_hints.h
misc/builddeps/win64/sdl/include/SDL2/SDL_joystick.h
misc/builddeps/win64/sdl/include/SDL2/SDL_keyboard.h
misc/builddeps/win64/sdl/include/SDL2/SDL_main.h
misc/builddeps/win64/sdl/include/SDL2/SDL_mouse.h
misc/builddeps/win64/sdl/include/SDL2/SDL_opengles.h
misc/builddeps/win64/sdl/include/SDL2/SDL_opengles2.h
misc/builddeps/win64/sdl/include/SDL2/SDL_pixels.h
misc/builddeps/win64/sdl/include/SDL2/SDL_platform.h
misc/builddeps/win64/sdl/include/SDL2/SDL_render.h
misc/builddeps/win64/sdl/include/SDL2/SDL_revision.h
misc/builddeps/win64/sdl/include/SDL2/SDL_rwops.h
misc/builddeps/win64/sdl/include/SDL2/SDL_stdinc.h
misc/builddeps/win64/sdl/include/SDL2/SDL_surface.h
misc/builddeps/win64/sdl/include/SDL2/SDL_syswm.h
misc/builddeps/win64/sdl/include/SDL2/SDL_version.h
misc/builddeps/win64/sdl/include/SDL2/SDL_video.h
misc/builddeps/win64/sdl/lib/cmake/SDL2/sdl2-config.cmake
misc/builddeps/win64/sdl/lib/libSDL2.a
misc/builddeps/win64/sdl/lib/libSDL2.la
misc/builddeps/win64/sdl/lib/libSDL2_test.a
misc/builddeps/win64/sdl/lib/libSDL2main.a
misc/builddeps/win64/sdl/lib/pkgconfig/sdl2.pc
misc/builddeps/win64/sdl/share/aclocal/sdl2.m4
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_events.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_haptic.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keyboard.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengles.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengles2.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_pixels.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_platform.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rwops.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_surface.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_syswm.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 [changed mode: 0755->0644]
misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources
misc/buildsrc/sdl.sh [new file with mode: 0755]
misc/infrastructure/checkupdate.txt
misc/infrastructure/transifex.cron [new file with mode: 0755]
misc/tools/all/config.subr
misc/tools/all/git.subr
misc/tools/all/release.subr
misc/tools/all/xonotic.subr
misc/tools/all/zsh_autocompletion/all/_all [new file with mode: 0644]
misc/tools/demopacker.sh
misc/tools/demotc-race-record-extractor.sh
misc/tools/encode-demos.sh [new file with mode: 0755]
misc/tools/midichannels.pl
misc/tools/rsync-updater/update-to-autobuild.sh
misc/tools/rsync-updater/update-to-release.sh
misc/tools/the-big-benchmark/the-big-benchmark.bat
misc/tools/xonotic-map-compiler
misc/tools/xonotic-map-compiler-autobuild
misc/tools/xonotic-map-screenshot
nix-build.sh [new file with mode: 0755]
release.cmake
release.nix [new file with mode: 0644]
server/help.cfg [deleted file]
server/server.cfg
server/server_linux.sh
xonotic-linux-glx.sh

index 0a76101ea4fb0d17e80502bddbcc4d7441ecc659..ab43afbbdc6d7046ab40283c8bf70dd584cfea1e 100644 (file)
@@ -15,3 +15,4 @@
 /wiki
 
 .idea/
+/result*
index e5f53a214087c9adbbb9764a6c445b09358fea2f..23080598b53504e61e954830ad56295dc97b3c7f 100644 (file)
@@ -1,21 +1,24 @@
-cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
 project(xonotic)
 
 option(DOWNLOAD_MAPS "Download new maps from the build server" ON)
 option(BUILD_RELEASE "Package a release" OFF)
 
-macro(subproject name)
+function(subproject id name)
+    if ($ENV{XON_NO_${id}})
+        return()
+    endif ()
     if (EXISTS "${PROJECT_SOURCE_DIR}/${name}/CMakeLists.txt")
         add_subdirectory(${name} ${ARGN})
     endif ()
-endmacro()
+endfunction()
 
-subproject(daemon)
-subproject(d0_blind_id)
-subproject(darkplaces)
-subproject(data/xonotic-data.pk3dir)
-subproject(gmqcc)
-subproject(netradiant)
+subproject(PKI d0_blind_id)
+subproject(DAEMON daemon)
+subproject(DP darkplaces)
+subproject(QCC gmqcc)
+subproject(RADIANT netradiant)
+subproject(DATA data/xonotic-data.pk3dir)
 
 if (DOWNLOAD_MAPS)
     add_custom_target(update-maps ALL
diff --git a/COPYING b/COPYING
index d4b8d0dc81b2b5152393bb15fc44c807b7081b76..9e734d94517370a6168147c8b4226629776f3aa1 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -30,11 +30,12 @@ Licensing Grant
 ---------------
 
 All source files (as defined by the respective license) in scope of this
-document are under the GPL version 2 or any later version, at your choice.
+document are under the GPL version 3 or any later version, at your choice.
 
-Linux and Windows binaries however link to a library that is under the LGPL
-version 3 with the "or any later version" clause. Thus, they can only be
-distributed under the GPL version 3 or any later version, at your choice.
+The source code of the game engine, DarkPlaces, is licensed under the GPL
+version 2 or any later version, at your choice. Furthermore, some source code
+inside the qcsrc/ directory may also be usable under other licenses as
+indicated by COPYING files therein.
 
 The two relevant licenses are provided in the files GPL-2 and GPL-3 in this
 package.
@@ -52,12 +53,11 @@ Contributions
 -------------
 
 By committing data/files, you agree to license all the changes/additions
-contained in your commits to Team Xonotic under the terms of the General Public
-License version 2, with the "any later version" clause active. In particular,
-you guarantee that you have acquired all the necessary rights from possible
-other copyright holders to be able to license your work under this license. Any
-submission which does not fulfill this condition may lead to legal action
-against the submitter.
+contained in your commits to Team Xonotic under the terms of the applicable
+license as described above. In particular, you guarantee that you have
+acquired all the necessary rights from possible other copyright holders to be
+able to license your work under this license. Any submission which does not
+fulfill this condition may lead to legal action against the submitter.
 
 Exceptions however may be made on request, but in any case, Team Xonotic must
 be allowed to distribute the changes as part of the git repository, and others
diff --git a/Docs/compile-settings.txt b/Docs/compile-settings.txt
deleted file mode 100644 (file)
index b7fe456..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-This file contains the q3map2 compile settings used to compile the maps that are part of Xonotic.\r
-There are also compile-scripts for some maps (mapname.sh). \r
-They can be found in your Xonotic/data/maps folder\r
-\r
-------------\r
-Standard\r
-------------\r
-\r
-"...q3map2.exe" -meta "...xonoticmap.map"\r
-"...q3map2.exe" -vis "...xonoticmap.bsp"\r
-"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...xonoticmap.bsp"\r
-\r
-------------\r
-Only update the entities.\r
-------------\r
-\r
-"...q3map2.exe" -onlyents "...xonoticmap.map"\r
-\r
-------------\r
-bloodprison.map\r
-------------\r
-\r
-"...q3map2.exe" -meta -samplesize 8 -mv 1000000 -mi 6000000 "...bloodprisonctf.map"\r
-"...q3map2.exe" -scale 1.2 "...bloodprisonctf.bsp"\r
-"...q3map2.exe" -vis "...bloodprisonctf.bsp"\r
-"...q3map2.exe" -light -deluxe -fast -filter -deluxe -patchshadows -samples 3 "...bloodprisonctf.bsp"\r
-\r
-------------\r
-final_rage.map\r
-------------\r
-\r
-"...q3map2.exe" -meta -v -samplesize 8 -skyfix -np 50 "...final_rage.map"\r
-"...q3map2.exe" -vis -v "...final_rage.map"\r
-"...q3map2.exe" -light -deluxe -compensate 1.4 -fast -gamma 1.5 -patchshadows -areascale 1.5 -pointscale 2 -v -bounce 3 -bouncegrid "...final_rage.map"\r
-\r
-------------\r
-reslimed.map\r
-------------\r
-\r
-"...q3map2.exe" -meta -patchmeta -v "...reslimed.map"\r
-"...q3map2.exe" -vis "...reslimed.bsp"\r
-"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...reslimed.bsp"\r
-\r
-------------\r
-strength.map\r
-------------\r
-\r
-"...q3map2.exe" -meta "...strength.map"\r
-"...q3map2.exe" -vis "...strength.bsp"\r
-"...q3map2.exe" -light -bounce 3 -deluxe -fast -filter -patchshadows -samples 2 "...strength.bsp"\r
index 57a2cdd2ccce564ac1404fc6634f3057b8dc8784..6a9ca84fe7d12fc7d2f5f269dde152b5185474dc 100644 (file)
@@ -1,15 +1,15 @@
-cvars:\r
+cvars (see xonotic.org/tools/cacs for more up-to-date information):\r
 ______________\r
 \r
-   sv_eventlog                    master switch (default: 0)\r
-   sv_eventlog_files              print frags, scores and captures for separate files each match (default: 0)\r
-   sv_eventlog_console            print frags, scores and captures to serverconsole during the match (default: 1)\r
-   sv_logscores_bots              choose whether bot are included in stats or not (default: 0)\r
+   sv_eventlog                    master switch\r
+   sv_eventlog_files              print frags, scores and captures for separate files each match\r
+   sv_eventlog_console            print frags, scores and captures to serverconsole during the match\r
+   sv_logscores_bots              choose whether bot are included in stats or not\r
                                 \r
    sv_eventlog_files_counter      number of matches logged until now\r
-   sv_eventlog_files_nameprefix   file name prefix to be used (default: xonotic)\r
-   sv_eventlog_files_namesuffix   file name extension to be used (default: .log)\r
-   sv_eventlog_files_timestamps   prefix log lines in the files with :time events (default: 1)\r
+   sv_eventlog_files_nameprefix   file name prefix to be used \r
+   sv_eventlog_files_namesuffix   file name extension to be used\r
+   sv_eventlog_files_timestamps   prefix log lines in the files with :time events\r
 \r
 log format:\r
 ______________\r
@@ -111,15 +111,15 @@ itemstring:
    and weapon IDs are:\r
          1 = Laser\r
                 2 = Shotgun\r
-                3 = Uzi\r
+                3 = Machine Gun\r
          4 = Mortar\r
          5 = Electro\r
          6 = Crylink\r
-         7 = Nex\r
+         7 = Vortex\r
          8 = Hagar\r
          9 = Rocket Launcher\r
         10 = Port-O-Launch\r
-        11 = MinstaNex\r
+        11 = Vaporizer\r
         12 = Grappling Hook\r
         13 = Heavy Laser Assault Cannon\r
         14 = T.A.G. Seeker\r
diff --git a/Docs/faq.html b/Docs/faq.html
deleted file mode 100644 (file)
index 555b137..0000000
+++ /dev/null
@@ -1,302 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<title>Xonotic</title>
-<link rel="stylesheet" href="htmlfiles/style.css" type="text/css"></link>
-</head>
-<body>
-<div id="container">
-       <div id="left">
-               <!-- Sidebar -->
-         <div id="sidebar">
-                 </div>
-               <!-- end sidebar -->    </div><!-- end left -->
-       <div id="right">
-               <div id="header">
-               </div>
-               <div id="menu">
-                       <ul>
-
-                       <!--    <li class="first"><a href="../readme.html" title="Xonotic - Latest News">About </a></li>
-                               <li><a href="basics.html" title="Xonotic - Media (Screenshots, videos and graphics)">Xonotic Basics</a></li>
-                               <li><a href="say-esc.html" title="Xonotic Information  (General, System Requirements)">Say Escapes</a></li>
-                               <li><a href="irc.html" title="Xonotic - Downloads (Game, Maps)">IRC</a></li>
-                               <li><a href="faq.html" title="Official Xonotic FAQ">FAQ</a></li>
-                       -->
-                               <li class="first"></li>
-                               <li class="first"></li>
-                 </ul>         </div>
-               <p id="tagline">Xonotic is a <b>free</b> open-source first person shooter that runs on <b>Windows</b>, <b>Linux</b> and <b>OSX</b>.</p>
-         <div id="content">
-<div class="body">
-
-<br><center><h1><a name="AFT-top">Xonotic 0.7 FAQ</a></h1></center>
-<center><a class="link" href="http://xonotic.com">http://xonotic.com</a></center>
-<hr>
-<!--  AFT Table of Contents (auto generated) -->
-<ul>
-<li> <a class="link" href="#Troubleshooting">Troubleshooting</a></li>
-<ul>
-<li> <a class="link" href="#How do I install Xonotic?">How do I install Xonotic?</a></li>
-<li> <a class="link" href="#When I start Xonotic all I see is a black screen or a black screen with some checkered squares">When I start Xonotic all I see is a black screen or a black screen with some checkered squares</a></li>
-<li> <a class="link" href="#Using Linux I only see the map but no players and items">Using Linux I only see the map but no players and items</a></li>
-<li> <a class="link" href="#When I start Xonotic my screen is flickering">When I start Xonotic my screen is flickering</a></li>
-<li> <a class="link" href="#How can I speed up my frame rate?">How can I speed up my frame rate?</a></li>
-<li> <a class="link" href="#The sound is broken, it crackles and stutters">The sound is broken, it crackles and stutters</a></li>
-<li> <a class="link" href="#Mouse is too slow and sensitivity is at top (on Mac / Linux)">Mouse is too slow and sensitivity is at top (on Mac / Linux)</a></li>
-<li> <a class="link" href="#I can't switch to 32 bit color depth (on Windows)">I can't switch to 32 bit color depth (on Windows)</a></li>
-<li> <a class="link" href="#When I join a server or after a map change I see nothing but a black screen, but I can still move and shoot">When I join a server or after a map change I see nothing but a black screen, but I can still move and shoot</a></li>
-<li> <a class="link" href="#How to report crashes">How to report crashes</a></li>
-<li> <a class="link" href="#Where can I get more help?">Where can I get more help?</a></li>
-</ul>
-<li> <a class="link" href="#General questions">General questions</a></li>
-<ul>
-<li> <a class="link" href="#How do I install new maps?">How do I install new maps?</a></li>
-<li> <a class="link" href="#How can I place a shortcut to Xonotic on my Linux desktop?">How can I place a shortcut to Xonotic on my Linux desktop?</a></li>
-<li> <a class="link" href="#How do I open the console?">How do I open the console?</a></li>
-<li> <a class="link" href="#What console commands/variables are there?">What console commands/variables are there?</a></li>
-<li> <a class="link" href="#How can I use colors in my nickname and messages?">How can I use colors in my nickname and messages?</a></li>
-<li> <a class="link" href="#How do I watch/record demos?">How do I watch/record demos?</a></li>
-</ul>
-<li> <a class="link" href="#Server setup">Server setup</a></li>
-<ul>
-<li> <a class="link" href="#How do I start a server?">How do I start a server?</a></li>
-<li> <a class="link" href="#Which ports do I have to open in firewall/forward from my router to run a server?">Which ports do I have to open in firewall/forward from my router to run a server?</a></li>
-<li> <a class="link" href="#Is there some kind of rcon?">Is there some kind of rcon?</a></li>
-<li> <a class="link" href="#How can I kick people who are using special characters in their names?">How can I kick people who are using special characters in their names?</a></li>
-</ul>
-<li> <a class="link" href="#Development">Development</a></li>
-<ul>
-<li> <a class="link" href="#How can I create or edit Xonotic maps?">How can I create or edit Xonotic maps?</a></li>
-<li> <a class="link" href="#Where can I get latest development versions of the source code?">Where can I get latest development versions of the source code?</a>
-
-</li>
-</ul>
-</ul>
-<hr>
-<!-- Start SectLevel1 -->
-<h2><a name="Troubleshooting">Troubleshooting</a></h2>
-<!-- Start SectLevel2 -->
-<h3><a name="How do I install Xonotic?">How do I install Xonotic?</a></h3>
-<p class="Body">
-Just unzip the <tt>xonotic-&lt;version&gt;.zip</tt> file.  You can do this with any archive program (like <a class="link" href="http://7zip.org">7zip</a>).  It's very important to keep the directory structure while unpacking (in WinZip this option is called &quot;Use folder names&quot;).  The directory structure should look like this afterwards:
-<div class="block"><pre>
-Xonotic/
-|-- Docs/
-|-- data/
-|   |-- common-spog.pk3
-|   `-- data*.pk3
-|-- Xonotic.app/
-|-- Xonotic-SDL.app/
-|-- server/
-|   `-- *
-|-- sources/
-|-- *.exe
-|-- *.dll
-`-- xonotic-linux-*
-</pre></div>
-</p>
-<!--End Section 2-->
-<h3><a name="When I start Xonotic all I see is a black screen or a black screen with some checkered squares">When I start Xonotic all I see is a black screen or a black screen with some checkered squares</a></h3>
-<p class="Body">
-This happens when the engine can't load the data*.pk3 file or has trouble to initialize OpenGL.  The reasons could be:
-<ol>
-<li> you unpacked the zip file without folder names (see <a class="link" href="#How do I install Xonotic?">How do I install Xonotic?</a>)</li>
-<li> on Linux: the current directory is not your Xonotic/ folder.  See <a class="link" href="#How can I place a shortcut to Xonotic on my Linux desktop?">How can I place a shortcut to Xonotic on my Linux desktop?</a> on how to fix this</li>
-<li> on Mac: you tried to extract and move the files from a Xonotic update and it deleted the old files.  When using the mac GUI please be sure to move only the files not the folders as that will delete the old files or use the mv console command which will not delete the old files</li>
-<li> the engine could not initialize OpenGL.  Please install the latest drivers for your graphic card.  You will probably find one for your card there: <a class="link" href="http://intel.com">intel</a> <a class="link" href="http://ati.com">ati</a> <a class="link" href="http://nvidia.com">nvidia</a></li>
-<li> your download might be corrupted, please download Xonotic again</li>
-</ol>
-</p>
-<!--End Section 2-->
-<h3><a name="Using Linux I only see the map but no players and items">Using Linux I only see the map but no players and items</a></h3>
-<p class="Body">
-This happens when the engine has trouble to initialize OpenGL.  The reasons could be:
-<ol>
-<li> the engine could not initialize OpenGL.  Please install the latest drivers for your graphic card.  You will probably find one for your card there: <a class="link" href="http://intel.com">intel</a> <a class="link" href="http://ati.com">ati</a> <a class="link" href="http://nvidia.com">nvidia</a></li>
-<li> You do not have permissions needed for 3d acceleration.  Usually you need to add yourself to the group <tt>video</tt>, you can do that via console as root like this: <tt>usermod -a -G video YOURUSERNAME</tt>.  You need to logoff/in afterwards.</li>
-</ol>
-</p>
-<!--End Section 2-->
-<h3><a name="When I start Xonotic my screen is flickering">When I start Xonotic my screen is flickering</a></h3>
-<p class="Body">
-This is known to happen on Windows with Intel graphic chips and is a bug in the graphics drivers.  A workaround is to set <tt>Flip-Policiy</tt> to <tt>blit</tt>.  Open the control panel, there should be an icon called <tt>Intel(R) GMA driver</tt> (or something like that), double click it. Click on <tt>3D Settings</tt> to find the screen with those settings.
-</p>
-<!--End Section 2-->
-<h3><a name="How can I speed up my frame rate?">How can I speed up my frame rate?</a></h3>
-<p class="Body">
-You can choose predefined performance settings in the <tt>Settings / Video</tt> menu.  <tt>Normal</tt> is the default, <tt>Medium</tt> and <tt>Low</tt> run faster while <tt>High</tt>, <tt>Ultra</tt> and <tt>Ultimate</tt> enable more features you might want to test if you have a high end graphic card.  Or you can enable/disable single features.  The greatest performance boost can be achieved by turning off dynamic lights and shadows in the <tt>Settings / Effects</tt> menu.  Bloom is also quite resource intensive.  Other fps boots include disabling <tt>Deluxemapping</tt> and <tt>Coronas</tt>.  On older graphics cards or on-board/notebook chips with little video ram you can try to lower the texture quality in the <tt>Settings / Video</tt> menu.
-Some graphic cards (mostly ATI or quite old cards) run A LOT faster if you disable the <tt>Vertex Buffer Objects</tt> in the <tt>Settings / Video</tt> menu.  An other thing that can greatly help on such cards is to disable the <tt>OpenGL 2.0 Shaders</tt>.  Having that option enabled is faster on most cards however that is why both are active by default.
-</p>
-<!--End Section 2-->
-<h3><a name="The sound is broken, it crackles and stutters">The sound is broken, it crackles and stutters</a></h3>
-<p class="Body">
-Try run <tt>xonotic-sdl.exe</tt> instead of <tt>xonotic.exe</tt> (on Windows).  Adding the command line options <tt>-sndspeed 48000</tt> and/or <tt>-sndstereo</tt> can also help on some systems (on Linux, Mac, Windows).
-</p>
-<!--End Section 2-->
-<h3><a name="Mouse is too slow and sensitivity is at top (on Mac / Linux)">Mouse is too slow and sensitivity is at top (on Mac / Linux)</a></h3>
-<p class="Body">
-Mac: The default mouse acceleration on Mac is very high and strange.  The Xonotic defaults work fine with it but some mouse drivers seem to 'correct' the mouse acceleration and conflict with the Xonotic defaults.  Try to disable the option <tt>Turn off OS mouse acceleration</tt> in the <tt>Settings / Input</tt> menu.  Or the same via console: <tt>apple_mouse_noaccel 0; vid_restart</tt> (<a class="link" href="#How do I open the console?">How do I open the console?</a>)
-Linux: A similar problem can arise on Linux.  Its also <tt>Turn off OS mouse acceleration</tt> in the <tt>Settings / Input</tt> menu but the console command is different: <tt>vid_dga 0; vid_restart</tt> (<a class="link" href="#How do I open the console?">How do I open the console?</a>)
-</p>
-<!--End Section 2-->
-<h3><a name="I can't switch to 32 bit color depth (on Windows)">I can't switch to 32 bit color depth (on Windows)</a></h3>
-<p class="Body">
-Check if your desktop color depth is set to 32 bits per pixel.  If it's just set to 16, Xonotic can't switch to 32 bit mode.
-</p>
-<!--End Section 2-->
-<h3><a name="When I join a server or after a map change I see nothing but a black screen, but I can still move and shoot">When I join a server or after a map change I see nothing but a black screen, but I can still move and shoot</a></h3>
-<p class="Body">
-This is probably because you don't have the map that's running on the server.  As Xonotic supports map/content download the server might not be be setup (correctly) to support this and you will have to get the map the old fashioned way.  Those servers should have a download URL in their name or welcome message.  There is also a <a class="link" href="http://dev.xonotic.org/projects/xonotic/wiki/Maps">wiki page</a> dedicated to new maps.
-For Linux users: you need to have libcurl installed, otherwise you won't be able to download any maps.  libcurl should be available in any Linux distribution, just search for &quot;libcurl&quot; and install it in your distribution's package manager.
-</p>
-<!--End Section 2-->
-<h3><a name="How to report crashes">How to report crashes</a></h3>
-<p class="Body">
-Register at <a class="link" href="http://dev.xonotic.org">http://dev.xonotic.org</a> and submit a bug report.
-</p>
-<p class="Body">
-On Mac: IS THERE AN EASY WAY?
-</p>
-<p class="Body">
-On Linux: In a xterm, <tt>cd</tt> into your Xonotic installation directory, start <tt>catchsegv ./xonotic-linux-686-sdl -condebug -developer &gt; crash.txt 2&gt;&amp;1</tt> and give the file crash.txt to the developers.  Note that you can also use <tt>./xonotic-linux-686-glx</tt> or if you have a 64bit system <tt>./xonotic-linux-x86_64-sdl</tt> and <tt>./xonotic-linux-x86_64-glx</tt>
-</p>
-<p class="Body">
-On Windows: Click Start-&gt;Run, and enter drwtsn32, click Ok in the next window, run Xonotic and wait for the crash.  Then go to <tt>C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson</tt> there should be a file called &quot;drwtsn32.log&quot;, give that file along with the engine's build date to the developers.  You'll see that date when you open the ingame console (<a class="link" href="#How do I open the console?">How do I open the console?</a>).  Note that some folders of that path may be hidden or have a translated name if you're using a non-english windows.
-</p>
-<!--End Section 2-->
-<h3><a name="Where can I get more help?">Where can I get more help?</a></h3>
-<p class="Body">
-Visit <a class="link" href="http://xonotic.org/forum">the official Xonotic forum</a> there is a <a class="link" href="http://dev.xonotic.org">support and bug report area</a>.  Or get on <a class="link" href="http://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC</a> to chat with other or ask for help.  There is the normal users channel (irc://irc.quakenet.org/xonotic) and the developers channel (irc://irc.freenode.net/xonotic)
-</p>
-<!--End Section 2-->
-<!-- End SectLevel2 -->
-<!--End Section 1-->
-<h2><a name="General questions">General questions</a></h2>
-<!-- Start SectLevel2 -->
-<h3><a name="How do I install new maps?">How do I install new maps?</a></h3>
-<p class="Body">
-Maps usually ship as *.pk3 file.  All you have to do is to copy this file to the <tt>Xonotic/data/</tt> (on Linux, Mac, Windows) OR <tt>~/.xonotic/data/</tt> (on Linux, Mac) directory.
-Map packages that were downloaded from a server during playing end up in <tt>Xonotic/data/dlcache/</tt> or <tt>~/.xonotic/data/dlcache/</tt> and are only used till you exit Xonotic. If you want to play them locally or use them to setup a server of your own you can &quot;accept&quot; the packages by moving it one level up - right next to your config.cfg.
-</p>
-<!--End Section 2-->
-<h3><a name="How can I place a shortcut to Xonotic on my Linux desktop?">How can I place a shortcut to Xonotic on my Linux desktop?</a></h3>
-<p class="Body">
-Use the script <tt>xonotic-linux-sdl.sh</tt> or <tt>xonotic-linux-glx.sh</tt> instead of the binaries.  The scripts will use the correct <tt>working directory</tt>,choose the right version (32 or 64 bit) and also allow you to start a extra X server.
-</p>
-<!--End Section 2-->
-<h3><a name="How do I open the console?">How do I open the console?</a></h3>
-<p class="Body">
-Press <tt>[shift]+[escape]</tt>.  To close it press <tt>[escape]</tt>.  While playing ` or ^ will also open the console.
-</p>
-<!--End Section 2-->
-<h3><a name="What console commands/variables are there?">What console commands/variables are there?</a></h3>
-<p class="Body">
-You can get a list of variables by entering <tt>cvarlist</tt> on the console (<a class="link" href="#How do I open the console?">How do I open the console?</a>).  <tt>cmdlist</tt> will give you a list of available commands.  
-</p>
-<p class="Body">
-#An annotated version of that output can be found at the <a class="link" href="http://xx.org/wiki/pmwiki.php?n=Main.ConsoleCommands">Xonotic wiki</a>.
-</p>
-<!--End Section 2-->
-<h3><a name="How can I use colors in my nickname and messages?">How can I use colors in my nickname and messages?</a></h3>
-<p class="Body">
-Colors can be used in nicknames and chat messages via two ways: Either the simple way by typing ^ followed by a number between 0 and 9 or by typing ^x followed by three hexadecimal numbers (0-F) representing red, green and blue components of the color before the text. The second way allows for much more colors. For example if you type ^xF00message the text &quot;message&quot; will be displayed in red color. Simple examples:
-</p>
-<!-- 3 columns --><center><table cellspacing="0">
-<caption>&nbsp;&nbsp;</caption>
-<tr><th> code   </th><th> rgb code   </th><th> color&nbsp;&nbsp;&nbsp;&nbsp;  </th></tr>
-<tr><td> ^0     </td><td> ^x000      </td><td> black&nbsp;&nbsp;&nbsp;&nbsp;  </td></tr>
-<tr><td> ^1     </td><td> ^xF00      </td><td> red&nbsp;&nbsp;&nbsp;&nbsp;    </td></tr>
-<tr><td> ^2     </td><td> ^x0F0      </td><td> green&nbsp;&nbsp;&nbsp;&nbsp;  </td></tr>
-<tr><td> ^3     </td><td> ^xFF0      </td><td> yellow&nbsp;&nbsp;&nbsp;&nbsp; </td></tr>
-<tr><td> ^4     </td><td> ^x00F      </td><td> blue&nbsp;&nbsp;&nbsp;&nbsp;   </td></tr>
-<tr><td> ^5     </td><td> ^x0FF      </td><td> cyan&nbsp;&nbsp;&nbsp;&nbsp;   </td></tr>
-<tr><td> ^6     </td><td> ^xF0F      </td><td> magenta&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
-<tr><td> ^7     </td><td> ^xFFF      </td><td> white&nbsp;&nbsp;&nbsp;&nbsp;  </td></tr>
-<tr><td> ^8     </td><td>&nbsp;&nbsp;    </td><td> half-transparent black </td></tr>
-<tr><td> ^9     </td><td> ^x888      </td><td> grey&nbsp;&nbsp;&nbsp;&nbsp;   </td></tr>
-<tr><td>&nbsp;&nbsp;</td><td> ^x800      </td><td> dark red&nbsp;&nbsp;</td></tr>
-<tr><td>&nbsp;&nbsp;</td><td> ^x080      </td><td> dark green&nbsp;&nbsp;     </td></tr>
-<tr><td>&nbsp;&nbsp;</td><td> ^x880      </td><td> dark yellow&nbsp;&nbsp;    </td></tr>
-<tr><td>&nbsp;&nbsp;</td><td> ^x008      </td><td> dark blue&nbsp;&nbsp;      </td></tr>
-<tr><td>&nbsp;&nbsp;</td><td> ^x088      </td><td> dark cyan&nbsp;&nbsp;      </td></tr>
-<tr><td>&nbsp;&nbsp;</td><td> ^x808      </td><td> dark magenta&nbsp;&nbsp;   </td></tr>
-</table></center>
-<!--End Section 2-->
-<h3><a name="How do I watch/record demos?">How do I watch/record demos?</a></h3>
-<p class="Body">
-Demos are recordings of matches that you have played. To automatically record a demo each time you play enable the option <tt>Record demos while playing</tt> in the <tt>Multiplayer / Demos</tt> menu. Or if you just want to record some matches open the console and type <tt>rec &lt;demos/name&gt;</tt> before playing. That is before starting a game or connecting to a server. The demo file will then be stored in <tt>Xonotic/data/demos/&lt;name&gt;.dem</tt> (on Windows) or <tt>~/.xonotic/data/demos/&lt;name&gt;.dem</tt> (on Linux, Mac).
-If you downloaded a demo, copy it to <tt>Xonotic/data/demos/&lt;name&gt;.dem</tt> (on Linux, Mac, Windows) or <tt>~/.xonotic/data/demos/&lt;name&gt;.dem</tt> (on Linux, Mac).  You might have to create this directory if you have never recorded a demo before.
-To watch demos you can choose a demo file in the <tt>Multiplayer / Demos</tt> and click the play button. Also you can watch demos typing <tt>ply &lt;demos/name&gt;</tt> in the console (<a class="link" href="#How do I open the console?">How do I open the console?</a>). You can list all your demo files by typing <tt>dem</tt> on the console.  
-</p>
-<!--End Section 2-->
-<!-- End SectLevel2 -->
-<!--End Section 1-->
-<h2><a name="Server setup">Server setup</a></h2>
-<!-- Start SectLevel2 -->
-<h3><a name="How do I start a server?">How do I start a server?</a></h3>
-<p class="Body">
-Use the <tt>Multiplayer / Create</tt> menu to start a <tt>listen server</tt>.  You will always have to play yourself in a <tt>listen server</tt>.
-If you want to create a server without being forced to play yourself please take a look at the file <tt>readme.txt</tt> in the <tt>Xonotic/server/</tt> directory where the <tt>dedicated server</tt> is explained.
-</p>
-<!--End Section 2-->
-<h3><a name="Which ports do I have to open in firewall/forward from my router to run a server?">Which ports do I have to open in firewall/forward from my router to run a server?</a></h3>
-<p class="Body">
-The default port is 26000 UDP.  You can change that in the <tt>Multiplayer / Create</tt> menu or by starting Xonotic with the parameter <tt>-port &lt;port&gt;</tt> or having a line <tt>port &lt;port&gt;</tt> in the server config file.
-If you follow the tutorial mentioned above you do not need this command line argument as it will be done in the config file created for the server.  To add the command line argument on Windows, create a new shortcut to <tt>xonotic.exe</tt> or <tt>xonotic-dedicated.exe</tt> and right click on it.  Select properties and <tt>-port &lt;port&gt;</tt> in the &quot;Target:&quot; line.  Be sure that the &quot;Start in:&quot; line contains the full path to your Xonotic folder and click &quot;OK&quot;.  The parameter will be used if you start Xonotic via that new shortcut.
-</p>
-<!--End Section 2-->
-<h3><a name="Is there some kind of rcon?">Is there some kind of rcon?</a></h3>
-<p class="Body">
-Yes there is a QuakeWorld compatible rcon.  To use it you must enter <tt>rcon_password &lt;password&gt;</tt> in the server console or server config file.  The Xonotic client has to set the same password in the same fashion.  You can then issue commands with <tt>rcon &lt;command&gt;</tt> if you are connected to the server or will have to set <tt>rcon_address &lt;ip/hostname&gt;</tt> or <tt>rcon_address &lt;ip/hostname&gt;:&lt;port&gt;</tt> to point to the server.  There are also external rcon tools but make sure you use a QW compatible rcon tool.
-</p>
-<!--End Section 2-->
-<h3><a name="How can I kick people who are using special characters in their names?">How can I kick people who are using special characters in their names?</a></h3>
-<p class="Body">
-Enter <tt>status</tt> at the server console.  You will see a list of all players.  In front of their names you will see a number (the player id).  You can kick the player you don't like with <tt>kick # &lt;player id&gt; &lt;reason&gt;</tt> (notice the space after #).
-</p>
-<!--End Section 2-->
-<!-- End SectLevel2 -->
-<!--End Section 1-->
-<h2><a name="Development">Development</a></h2>
-<!-- Start SectLevel2 -->
-<h3><a name="How can I create or edit Xonotic maps?">How can I create or edit Xonotic maps?</a></h3>
-<p class="Body">
-You need <a class="link" href="http://icculus.org/netradiant/">NetRadiant</a>, a stabilized Q3 map editor. For convenience, a snapshot configured for Xonotic is included in <tt>extra/</tt> for Windows and MAC-Intel, but the program is not officially supported by Xonotic.
-</p>
-<!--End Section 2-->
-<h3><a name="Where can I get latest development versions of the source code?">Where can I get latest development versions of the source code?</a></h3>
-<p class="Body">
-Please refer to <a class="link" href="http://dev.xonotic.org/projects/xonotic/wiki/Repository_Access">http://dev.xonotic.org/projects/xonotic/wiki/Repository_Access</a>
-</p>
-<p class="Body">
-<strong>Game data:</strong> to check out Xonotic git, you'll need a <a class="link" href="http://git-scm.com/">git client</a>.  
-</p>
-<p class="Body">
-For more information on how to compile the game please see <a class="link" href="http://dev.xonotic.org/projects/xonotic/wiki/Repository">http://dev.xonotic.org/projects/xonotic/wiki/Repository</a><strong>Access#Cloning-the-repository-and-compiling and <a class="link" href="http://dev.xonotic.org/projects/xonotic/wiki/Compiling">http://dev.xonotic.org/projects/xonotic/wiki/Compiling</a></strong>In_Windows
-</p>
-<!--End Section 2-->
-<!-- End SectLevel2 -->
-<!--End Section 1-->
-<!-- End SectLevel1 -->
-<hr>
-<br>
-<p align="right"> <small>This document was generated using <a class="link" href="http://www.maplefish.com/todd/aft.html">AFT v5.097</a></small> </p>
-                 <p><br style="clear:left" />
-        </p>
-         </div>
-         <!-- end content -->
-               <div id="footer">
-               </div>
-               <!-- end footer -->
-               <p class="subFooter">Come to the Xonotic IRC channel: <a href="irc://irc.quakenet.org/xonotic" title="#xonotic on irc.quakenet.org">#xonotic on irc.quakenet.org</a> or the team channel: <a href="irc://irc.freenode.net/xonotic" title="#xonotic on irc.freenode.net">#xonotic on irc.freenode.net</a></p>
-
-               <div id="valid">
-                       <p>&copy; 2009-2011 Xonotic.org</p>
-         </div>
-       </div><!-- end right -->
-</div>
-</body>
-</html>
diff --git a/Docs/faq.md b/Docs/faq.md
new file mode 100644 (file)
index 0000000..e515db4
--- /dev/null
@@ -0,0 +1,196 @@
+# Xonotic FAQs
+## How do I install Xonotic?
+
+**There is no need to install Xonotic!** The zip file you downloaded from the homepage has everything. All binaries to run the game on Linux, Windows and macOS are inside of it. Just unzip the archive and run the appropriate executable for your OS.
+
+For example, on Windows or macOS you can start the game by double-clicking the Xonotic logo. On Linux you can run xonotic-linux-glx.sh or xonotic-linux-sdl.sh - whichever one works better on your hardware.
+
+## Is there a Debian package available?
+
+There is an unofficial package available on [playdeb.net](http://www.playdeb.net/updates/ubuntu/17.04/?q=xonotic). Unfortunately, Xonotic is not in the Debian repositories yet. You can check the status of the bug report [here](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646377). If you can help us expedite this process, please contact us!
+
+## How do you pronounce the name Xonotic?
+
+There are two pronunciations, depending on where you live.
+
+US people are more likely to pronounce it : _zone + otic_  
+European people are more likely to pronounce it : _kso + notic_
+
+
+## How and why did you choose the logo?
+
+The logo design process took about a week, with a handful of people  contributing designs, and constantly adjusting those designs based on  feedback.
+
+The phoenix image of the logo obviously refers to the concept of  "rising from the ashes".
+
+Another aspect of the logo is the center ring, which has some  similarities to the Quake logo; it has a fatter bottom edge and thinner  top edge, though quake didn't use a complete ring shape. This is intended as a pay of respect to the Quake origins of the game, as the Darkplaces engine was originally based on the Quake 1 engine.
+
+# Troubleshooting
+
+## When I join a server or after a map change I see nothing but a black screen, but I can still move and shoot
+
+This is probably because you don't have the map that's running on the server or it didn't download correctly. Try clearing your _dlcache_ in your config folder and restarting Xonotic.
+
+For Linux users: you need to have libcurl installed, otherwise you won't be able to download any maps. libcurl should be available in any Linux distribution, just search for "libcurl" and install it in your distribution's package manager.
+
+## Can't launch Xonotic on macOS Sierra or later
+
+(Full error message: "You have reached this menu due to missing or unlocatable content/data. You may consider adding -basedir /path/to/game to your launch commandline.")
+
+In the Finder, control-click the app icon, then choose Open from the shortcut menu. Click Open on the dialog.
+
+This happens because Xonotic is not signed using an Apple developer key.
+
+## When I start Xonotic all I see is a black screen or a black screen with some checkered squares
+
+This happens when the engine can't load the data*.pk3 file or has trouble to initialize OpenGL. The reasons could be:
+  * On Linux: the current directory is not your Xonotic/ folder.
+  * On Mac: you tried to extract and move the files from a Xonotic update and it deleted the old files. When using the mac GUI please be sure to move only the files not the folders as that will delete the old files or use the mv console command which will not delete the old files.
+  * The engine could not initialize OpenGL. Please install the latest drivers for your graphic card. You will probably find one for your card there: [intel](http://intel.com), [AMD](http://amd.com), [nvidia](http://nvidia.com).
+  * Your download might be corrupted, please download Xonotic again.
+
+## Using Linux I only see the map but no players and items
+
+This happens when the engine has trouble initializing OpenGL. The reasons could be:
+
+  * The engine could not initialize OpenGL. Please install the latest drivers for your graphic card. You will probably find one for your card there: [intel](http://intel.com), [AMD](http://amd.com), [nvidia](http://nvidia.com).
+  * You do not have permissions needed for 3d acceleration. Usually you need to add yourself to the group video, you can do that via console as root like this: _usermod -a -G video YOURUSERNAME_. You need to logoff/in afterwards.
+
+## When I start Xonotic my screen is flickering
+
+This is known to happen on Windows with Intel graphic chips and is a bug in the graphics drivers. A workaround is to set Flip-Policiy to blit. Open the control panel, there should be an icon called Intel(R) GMA driver (or something like that), double click it. Click on 3D Settings to find the screen with those settings.
+
+## How can I speed up my frame rate?
+
+You can choose predefined performance settings in the Settings / Video menu or you can enable/disable single features. The greatest performance boost can be achieved by turning off dynamic lights and shadows in the Settings / Effects menu. Bloom is also quite resource intensive. Other fps boots include disabling Deluxemapping and Coronas. On older graphics cards or on-board/notebook chips with little video ram you can try to lower the texture quality in the Settings / Video menu. Some graphic cards (mostly ATI or quite old cards) run A LOT faster if you disable the Vertex Buffer Objects in the Settings / Video menu. An other thing that can greatly help on such cards is to disable the OpenGL 2.0 Shaders. Having that option enabled is faster on most cards however, that is why both are active by default.
+
+If none of that helps, you can try compiling Xonotic from [source](http://gitlab.com/xonotic/xonotic/wikis/Repository_Access).
+
+## The sound is broken, it crackles and stutters
+
+Try run xonotic-sdl.exe instead of xonotic.exe (on Windows). Adding the command line options -sndspeed 48000 and/or -sndstereo can also help on some systems (on Linux, Mac, Windows).
+
+## Mouse is too slow and sensitivity is at top (on Mac / Linux)
+
+Mac: The default mouse acceleration on Mac is very high and strange. The Xonotic defaults work fine with it but some mouse drivers seem to 'correct' the mouse acceleration and conflict with the Xonotic defaults. Try to **disable the option Turn off OS mouse acceleration** in the Settings / Input menu. Or the same via console: _apple_mouse_noaccel 0; vid_restart_
+Linux: A similar problem can arise on Linux. It's also Turn off OS mouse acceleration in the Settings / Input menu but the console command is different: _vid_dga 0; vid_restart;
+
+## I can't switch to 32 bit color depth (on Windows)
+
+Check if your desktop color depth is set to 32 bits per pixel. If it's just set to 16, Xonotic can't switch to 32 bit mode.
+
+## How to report crashes and bugs
+
+Use our [issue tracker](http://gitlab.com/xonotic/xonotic-data.pk3dir/issues) on Gitlab.
+
+If you want to investigate further:
+
+On Linux: In a xterm, cd into your Xonotic installation directory, start catchsegv ./xonotic-linux-686-sdl -condebug -developer > crash.txt 2>&1 and give the file crash.txt to the developers. Note that you can also use ./xonotic-linux-686-glx or if you have a 64bit system ./xonotic-linux-x86_64-sdl and ./xonotic-linux-x86_64-glx
+
+On Windows: Click Start->Run, and enter drwtsn32, click Ok in the next window, run Xonotic and wait for the crash. Then go to C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson there should be a file called "drwtsn32.log", give that file along with the engine's build date to the developers. You'll see that date when you open the ingame console (How do I open the console?). Note that some folders of that path may be hidden or have a translated name if you're using a non-english windows.
+
+## Where can I get more help?
+
+Visit the official Xonotic [forum](http://forums.xonotic.org/), there is a support and bug report area. Or get on [IRC](/chat) to chat with others or ask for help. There is the normal users channel (irc://irc.quakenet.org/xonotic) and the developers channel (irc://irc.freenode.net/xonotic)
+
+# General questions
+
+## Where are the configuration files located?
+
+  * Linux: ~/.xonotic
+  * Windows: C:\\Users\\\<your_user_name\>\\Saved Games\\xonotic
+  * Mac: ~/Library/Application Support/xonotic
+      * Library might be hidden on Mac so Finder won't display it
+
+## What is the difference between the config and install directories?
+
+The install directory is what you get when you unzip the downloaded file. We usually call it Xonotic. Since Xonotic (the game) doesn't need installation, Xonotic (the folder) can be anywhere you put it.
+
+The config directory (sometimes called user directory) has a specific [location](#config) depending on your OS but we usually call it ~/.xonotic since most players and devs are on linux. ~/.xonotic contains all your settings and it's where you can put additional maps or assets when experimenting with the game or running your own server.
+
+## How do I install new maps?
+
+Maps usually ship as .pk3 file. All you have to do is to copy this file to the config folder <your config folder>/data/ directory. Map packages that were downloaded from a server during playing end up in <your config folder>/data/dlcache and are only used till you exit Xonotic. If you want to play them locally or use them to setup a server of your own you can "accept" the packages by moving it one level up - right next to your config.cfg.
+
+An extensive list of maps is at [xonotic.co](http://xonotic.co)
+
+## How can I place a shortcut to Xonotic on my Linux desktop?
+
+Use the script xonotic-linux-sdl.sh or xonotic-linux-glx.sh instead of the binaries. The scripts will use the correct working directory, choose the right version (32 or 64 bit) and also allow you to start a extra X server.
+
+## How do I open the console?
+
+Press [shift]+[escape]. To close it press [escape]. While playing \` or ^ will also open the console.
+
+## What console commands/variables are there?
+
+An searchable list is available [here](http://www.xonotic.org/tools/cacs/), or you can search in-game using _apropos_ in console.
+
+## How can I use colors in my nickname and messages?
+
+Colors can be used in nicknames and chat messages via two ways: Either the simple way by typing ^ followed by a number between 0 and 9 or by typing ^x followed by three hexadecimal numbers (0-F) representing red, green and blue components of the color before the text. The second way allows for much more colors. For example if you type ^xF00message the text "message" will be displayed in red color. Simple examples:
+
+code   | rgb code  | color
+-------|-----------|--------
+^0     | ^x000     | black
+^1     | ^xF00     | red
+^2     | ^x0F0     | green
+^3     | ^xFF0     | yellow
+^4     | ^x00F     | blue
+^5     | ^x0FF     | cyan
+^6     | ^xF0F     | magenta
+^7     | ^xFFF     | white
+^8     |           | half-transparent black
+^9     | ^x888     | grey
+       | ^x800     | dark red
+       | ^x080     | dark green
+       | ^x880     | dark yellow
+       | ^x008     | dark blue
+       | ^x088     | dark cyan
+       | ^x808     | dark magenta
+
+## How do I watch/record demos?
+
+Demos are recordings of matches that you have played. To automatically record a demo each time you play enable the option Record demos while playing in the Multiplayer / Demos menu. Or if you just want to record some matches open the console and type rec <demos/name> before playing. That is before starting a game or connecting to a server. The demo file will then be stored in [your config folder](#config)/data/demos/<name>.dem. If you downloaded a demo, copy it to [\<your config folder\>](#config)/data/demos/<name>.dem. You might have to create this directory if you have never recorded a demo before. To watch demos you can choose a demo file in the Multiplayer / Demos and click the play button. Also you can watch demos typing _ply <demos/name>_ in the console ([How do I open the console?]({{< relref "#how-do-i-open-the-console" >}})). You can list all your demo files by typing _dem_ on the console.
+
+# Server setup
+
+## How do I start a server?
+
+Use the Multiplayer / Create menu to start a listen server. You will always have to play yourself in a listen server. If you want to create a server without being forced to play yourself please take a look at the file readme.txt in the Xonotic/server/ directory where the dedicated server is explained.
+
+## Which ports do I have to open in firewall/forward from my router to run a server?
+
+The default port is 26000 UDP. You can change that in the Multiplayer / Create menu or by starting Xonotic with the parameter -port <port> or having a line port <port> in the server config file. If you follow the tutorial mentioned above you do not need this command line argument as it will be done in the config file created for the server. To add the command line argument on Windows, create a new shortcut to xonotic.exe or xonotic-dedicated.exe and right click on it. Select properties and -port <port> in the "Target:" line. Be sure that the "Start in:" line contains the full path to your Xonotic folder and click "OK". The parameter will be used if you start Xonotic via that new shortcut.
+
+## Is there some kind of rcon?
+
+Yes there is a QuakeWorld compatible rcon. To use it you must enter rcon_password <password> in the server console or server config file. The Xonotic client has to set the same password in the same fashion. You can then issue commands with rcon <command> if you are connected to the server or will have to set rcon_address <ip/hostname> or rcon_address <ip/hostname>:<port> to point to the server. There are also external rcon tools but make sure you use a QW compatible rcon tool.
+
+## How can I kick people who are using special characters in their names?
+
+Enter status at the server console. You will see a list of all players. In front of their names you will see a number (the player id). You can kick the player you don't like with kick # <player id> <reason> (notice the space after #).
+
+# Nexuiz Related FAQs
+
+## What prompted the split from Nexuiz?
+
+**Lee Vermeulen**, the [Nexuiz project](http://alientrap.org/nexuiz) founder, decided to license the Nexuiz code (with **LordHavoc** licensing the [Darkplaces  engine](http://icculus.org/twilight/darkplaces/)) to a new game development company named [Illfonic](http://illfonic.com) so that they could develop a closed-source  version for the PS3. As part of this deal, IllFonic acquired the rights  to use the name Nexuiz along with the domain nexuiz.com, and are under  no obligation to contribute code back to the open-source Nexuiz project  (and have stated that they have no intention of doing so).
+
+When this was announced, the response from the Nexuiz community was  overwhelming negative, even among the development team and main  contributors. Vermeulen had not actively participated in the project for  several years and all development had been done by the community. Most  members have expressed a sense of betrayal and cited the project as an  example of [mushroom management](http://en.wikipedia.org/wiki/Mushroom_management). Vermeulen essentially cashed in  on the hard work of others and sold the code, name and reputation that  they had built up over years without him.
+
+Despite attempts to [reason with IllFonic](https://web.archive.org/web/20101212165111/http://alientrap.org/forum/viewtopic.php?f=4&t=6079), they have refused to change  the name of their project to a derivative name even though they have  directly stated that their "version" of Nexuiz is a completely different  game. The hijacking of the Nexuiz project by its absentee founder and  IllFonic made it clear that it had no future as it stood and thus the  community left to found **Xonotic**.
+
+It should also be noted that IllFonic's code may be in violation of  the GPL as most contributors to the Nexuiz codebase have not relicensed  their work for inclusion in a closed-source project. This has been  another source of outrage for many.
+
+**Update:** The GPL concerns have been cleared up by a recent [interview with LordHavoc](http://games.slashdot.org/story/10/03/24/070234/DarkPlaces-Dev-Forest-Hale-Corrects-Nexuiz-GPL-Stance).
+
+## Was a compromise attempted?
+
+Yes, many in the Nexuiz community tried to [reach a compromise](http://alientrap.org/forum/viewtopic.php?f=4&t=6079), such as having Illfonic  contribute some artwork and/or gamecode back to Nexuiz GPL and for them  to use a derivative name for their project, e.g. "Nexuiz Reloaded". ~~ IllFonic flatly refused such suggestions. ~~ This, along  with the clear stance that Alientrap has taken on this issue, made it  clear that no compromise could be reached.
+
+**Update!** It has been clarified that, despite some of misleading wording in previous communication, Illfonic will be contributing _some_ of the game code back to Nexuiz GPL, mainly having to do with bandwidth improvements and animation blending.
+
+## Do you despise Vermeulen, LordHavoc or Illfonic?
+
+**No!** Without the past work of Vermeulen and LordHavoc, we  would not have the game that we enjoy today. We wish them the best of  luck in their endeavors. We hope Illfonic's Nexuiz on PS3 is successful.  We simply have a difference of opinion on project management and the  result is going to be very positive; We're forming a game project that  matches what we wanted out of Nexuiz all along.
diff --git a/Docs/guide.md b/Docs/guide.md
new file mode 100644 (file)
index 0000000..c41f0ce
--- /dev/null
@@ -0,0 +1,334 @@
+---
+author: halogene
+comments: false
+type: tutorials
+title: Halogene's Newbie Corner
+---
+Preface
+=======
+
+This tutorial aims at showing all fundamental aspects of vanilla gameplay to enable new players to pick up the ropes quickly. It includes the information of all six blog posts of the [Newbie Corner](http://xonotic.org/posts/2014/halogenes-newbie-corner-comprehensive-tutorial/) as well as some new things that have changed or that I didn’t think about back then.
+
+Note that all this applies to vanilla Xonotic. Whereas movement aspects should usually apply more or less unchanged to modified servers offering minstagib, vehicle ctf or [Overkill](/okguide) gameplay, I will not explain the specifics of these game modifications/mutators - I simply lack the expertise in non-vanilla game modes. So if you want to fully apply the knowledge gained from this tutorial, search for vanilla servers (Xonotic icon next to it in server browser) or use the official [HUB] ones.
+
+Remember that the Xonotic player community is generally considered a very friendly and helpful one and for many people (including me) this is the key aspect that gets one hooked to this game. If you meet very strong players online and wonder how they do certain things, it usually pays off to simply ask them. Most of the experienced players will take their time to shortly explain gameplay techniques to newbies if asked nicely. Some of them might even offer to show you around by giving you a short live tutorial. That’s how I myself learned about blaster jumping and strafe turning for example.
+
+Even if the skill gap between you and another player is immense, it is highly improbable that the other player is cheating. There are a couple of mechanisms implemented in the game that effectively prevent cheating, and from my personal experience I am confident to say that cheating is not really an issue in Xonotic. The skill gap between newbies and experienced players mostly results from newbies not knowing gameplay mechanics and therefore lacking the ability to acquire skill in the first place. The purpose of this Newbie Corner is to allow any new player to develop the same skills that experienced players have already gained, simply by showing how it works.
+
+Movement
+========
+
+Even though people tend to be more interested in what the weapons do when they first try out a new first person shooter, I prefer to follow the structure that I established for my live newbie tutorials and to start off with the movement. Understanding and mastering Xonotic’s movement is a key success factor in this game, apart from making it incredibly fun to play once you get the hang of it. So let’s get started!
+
+Bunny Hopping
+-------------
+
+You may have noticed that players race around the maps at insane speeds, making them hard to hit and also hard to tell from which direction they’ll come next, should you survive an attack. You can do that too, and here’s how.
+
+In Xonotic you have a lot of movement control while you are in the air (“air control”), and to a great extent you’ll accelerate when pressing the forward button while flying. When you just walk around though, your feet are in constant contact with the ground, so the friction is slowing you down a lot. One of the keys to gain high speeds in Xonotic is therefore to touch the ground as little as possible. By constantly jumping (“bunny hopping”) you can keep ground contact to a minimum. The good thing is that you only need to keep the jump button pressed and you will jump again once you hit the ground (unless of course you disabled that in Settings → Input). If you press the forward button while holding the jump button, you’ll continuously get faster until you hit the acceleration limit.
+
+This is quite easy and there’s nothing really to master about plain forward bunny hopping. However, you’ll face complications if you now try to turn once you gained some speed. If you continue to press the forward key and simply turn the mouse, you’ll hardly manage to make a sharp turn (unless you stop jumping, which slows you down a lot). In order to perform sharper turns without loosing speed, thus making you more agile, do the following:
+
+Before the turn, while still bunny hopping, release the forward key. Once you’ve released the forward key (while still keeping the jump key pressed), hold down the strafe key in the direction you want to turn (for sharp right turn: strafe right). Keep holding the jump key and the strafe key and smoothly and steadily turn your mouse into the strafe direction (in my example, right). It’s vital to move the mouse smoothly, because any abrupt sudden movements will slow you down. I can’t stress this aspect enough – a lot of newcomers that I told this technique basically got all the key pressing part right but fail at moving the mouse smoothly. Softly accelerate and decelerate the mouse turn and maintain a steady turn speed in between. The movement needs to be fluent and soft to get the full benefit. Also note that releasing the forward key while you’ve already pressed the strafe key will slow you down too, so be sure to use the right order. You’ll notice that if you do it right, you actually don’t lose speed in turns, but rather start to accelerate! This technique is called “strafe turning”.
+
+Once you’re done turning, you can release the strafe key and press forward key again or even directly switch to the other direction. A good way to practice this is to use forward only for inital acceleration, and then to do turns left and right running in an number eight-shaped figure (I recommend the main room in the map “afterslime” for that).
+
+It takes a while to get used to, but if you practice it, this goes into your cerebellum sooner or later (depending on your age, mostly) and then you’ll never think about it again! At that point you’ll be bunny hopping all over the place at high speed. Mastering this technique is very rewarding, since running around a map at high speed is a bunch of fun.
+
+Beyond this, advanced techniques known from other games as “strafe jumping” and “circle jumping” can also be used, however their impact is limited in vanilla gameplay.
+
+***
+
+> *Strafe jumping* is about gaining additional speed when bunny hopping forward. Essentially you hold forward + strafe and point a bit into the strafe direction while bunny hopping and you constantly increase the angle slowly. When strafe jumping for distances longer than 4 or 5 of hops , you will have to switch the strafe (and turn) direction as you gradually bend your path into the strafe direction so you don't hop in a straight line, and also the effect comes from bending your direction and at some point you reach an angle that does not grant any additional acceleration any more, so you have to start over with a fresh angle.
+
+> *Circle jumping* on the other hand is a technique used to gain extra speed out of the stand. It works only when you walk on the floor, so it's mainly used to gain a little extra speed before your first jump. That way of course you can reach farther distances with your first jump, as seen in Smilecythe's video about the [Mega Armor jumps on HUB](https://youtu.be/-SMJx1OIDgk "Youtube: Mega Armor Jumps on Hub"). For circle jumping, you utilize a mechanic that increases your walking speed beyond the maximum speed you can gain by pressing plain forward. If you have the speedometer enabled, you will see that you can gain more than 500qu/s if you press forward, strafe and turn in the strafe direction rather fast and steadily. So what people do is that they make a quick 90 degree or even 180 degree with only forward + strafe key pressed (no jumping), and then they start to bunny hop (and strafe jump). This way they can start off with a bit more speed than by just starting a bunny hop. This is why many experienced players start a bunny hop with that awkward swipe that looks like they try to swing their weapon at someone.
+
+***
+
+These are techniques which are essential for Xonotic race mode / CTS where servers use cpma-like physics. In vanilla mode, the effect is limited but some times it may tip the scales or allow for certain jumps. If you would like to obtain a better understanding of how strafe jumping works, check out [Hero's strafe jumping lesson](http://www.xonotic.org/2013/02/a-strafe-jumping-lesson-from-hero "Youtube: Strafe Jumping Lesson from Hero"). These techniques can be practiced best on the Xonotic CTS/Defrag servers, but I recommend to approach these servers as a platform for learning and training movement. Some maps are designed for people that have perfectionized the above mentioned movement techniques, so don't let the maps discourage you. On half of the maps offered there I for example have a hard time even reaching the first waypoint, let alone finishing it - but it's excellent training as it provides direct feedback (=fail) if you use the technique right.
+
+
+
+Blaster Jumping
+-------------
+
+Let’s now have a look at two important aspects of a very useful movement tool in Xonotic, the blaster! While dealing somewhat low damage, the blaster is one of the most important weapons in Xonotic. It’s projectile creates a blast upon impact on any surface or object that deals little damage to players being nearby, but pushes such players away from the impact spot. That way, the push force of the blaster projectile impact can be used to move both other players and yourself around. You can test this easily by standing and shooting at the ground below you with the blaster. You’ll notice that you get pushed up into the air by the blast. Now if you jump at the same time, you can get pushed even higher. If you get the timing right, you can get very high, like from the upper platform to the roof or from the fan to crylink on the map Xoylent.
+
+But you’ll not always want to do very high jumps, for example if you’re on the run and need to hit a passageway without bumping your head on an arch above it (like the mega armor on Stormkeep coming from Hagar). In such cases, it can be useful to fire downwards while you are already (or still) in the air during bunny hopping, allowing the blaster projectile to travel a short distance before impact and having more space between impact and yourself, so the push is not that strong.
+
+You’ll have to experiment a bit with the timing of shooting and jumping to reliably achieve the desired jump heighth, but this will become muscle memory rather quickly since you’ll be using blaster jumps a lot in Xonotic gameplay.
+
+Wall Blastering
+-------------
+
+Now, when accelerating fast, you won’t always want to do that vertically. Some times the first few bunny hops are not fast enough to reach a place (or to get out of a place) in time. With the technique of wall blastering you can easily reach rather high horizontal speeds instantly, out of the stand.
+
+To master wall blastering, you’ll obviously need a wall. While it would seem logic to use a wall that you can blaster off in a 90 degree angle with a blaster shot backwards, it is at least equally effective and easier to use a wall that is parallel to your desired movement direction. For practicing this, you start off standing next to that wall and are facing into the desired movement direction. Then you start a bunny hop by pressing foward and then the jump key. While in the air from your first jump, you flick around (to approximately 8 o’clock if the wall is left from you, 4 o’clock if the wall is right to you), shoot the blaster at the wall, aiming slightly above your head. If you shoot parallel or even down a bit, you’ll get a high upwards boost, wasting energy into vertical acceleration, so be sure to aim a little bit upwards! After the flick shot turn back to your desired movement direction and contine to bunny hop. Do not release the jump key during the entire process.
+
+Now let’s tweak this a little more. You wouldn’t want to accelerate into your viewing direction when looking backwards during the flick shot, would you. That is why you should switch for the time you are not looking in your desired movement direction from the forward key to the respective strafe key (strafe right if you turn to a wall on your left, strafe left if you turn to a wall on your right). When turning back into movement direction, keep the strafe key pressed until you can switch to forward key again. You can use a smoother mouse movement for turning back at least for the last couple of degrees in order to gain extra acceleration as explained in the Bunny Hopping section. Also remember to release the forward key before pressing the strafe key, and vice versa!
+
+Once you’ve learned how to reliably accelerate out of the stand with this technique, you can also use it while already bunny hopping in order to gain extra horizontal speed. Just flick around when passing a wall to gain an extra boost. Note that the blaster projectile always needs to travel a bit until it hits the wall. The faster you get, the less you need to turn backwards, since you’ll travel forwards while the blaster is on its way to the wall. At very high speeds you will even be able to shoot at 10 o’clock or 2 o’clock respectively, so you’re not even facing backwards any more! But most maps don’t allow for such fast movement. Experiment and learn at which speed to use what angle, and you’ll be a fast flag runner very soon!
+
+Ramp Jumping
+------------
+
+Ramps are sloped surfaces that can be used for extra upwards boost when doing a jump. If done properly, you can get to places you would not be able to reach without using a jump pad or the blaster (see the section about blaster jumps), while not making any suspicious noises nor loosing any health. This makes ramp jumps especially useful in duels or 2v2 tdm matches and generally extends your movement options in all game modes. Ramp jumps are also very much fun to do!
+
+In my “live” newbie tutorials, I always demonstrate the ramp jump on this spot on the map Xoylent, as it’s rather easy to master and you get the idea how it actually works:
+
+To do a ramp jump, you simply jump onto the sloped surface and jump again. Of course you can keep the jump button pressed for convenience, as with bunny hopping you will automatically jump again when hitting the sloped surface. Now this sounds awfully easy to do, and it wouldn’t be a proper challenge to master if that was all you got to do, would it. So let’s have a close look at the technical aspects behind it.
+
+The easiest way to make a ramp jump boost you up high is to approach the ramp frontally, not sideways or parallelly (unless of course you’re doing a strafe turn jump upwards the ramp, but hey this is a newbie guide!).
+
+Make sure that you hit the ramp at a flat angle. If possible, try to hit it when still going upwards from your previous jump. If you’re already on your way down from the previous jump when you hit the ramp, the angle at which you hit it will be steeper - if the angle is too steep or even 90 degree you’ll get slowed down and the ramp won’t give you the desired upwards boost.
+
+The faster you are, the higher you will get. Ramp jumps that require a higher than walking speed to do are especially tricky, since you will need to bunny hop onto them and time your jumps so you hit the ramp at a good angle. In some cases, you’ll be able to ramp jump onto another ramp, which will result in a double ramp jump.
+
+You will find ramps on a lot of maps, if you look for them. Now that I’ve shown you the mechanics behind ramp jumping, I’ll include some examples of ramp jumps in some of the stock maps for you to try out.
+
+You will find ramps on a lot of maps, if you look for them. Keep your eyes open for ramps and interesting jumps to do with them, as most mappers put some ramps at strategic places. Ramp jumping is a lot of fun and mastering this technique can give you a real advantage over other players!
+
+Of course you can combine ramp jumping with blaster jumping to gain an [extra strong upwards boost](https://www.youtube.com/watch?v=TETTtt5r86s).
+
+Weapons
+-------
+Since we’ve now learned how to master Xonotic movement, it’s time to have a look at the weapons. I’ll go through Xonotic’s core weapons one by one.
+
+### Blaster
+
+I already explained the blaster as versatile movement tool in the Blaster Jumping Section. Apart from moving yourself around, you can also use it for juggling around *other* players, irritating annyoing campers or generally messing with other people’s movement. Pushing people around or forcing a prolonged bunny hop can be especially effective on space maps. Unless shooting at sitting ducks (such as campers), you might want to aim at your target’s feet to make use of its splash damage, as the blaster projectile needs some time to travel even though it is rather fast, thus aiming directly at moving targets can be rather tricky.
+
+The blaster does not eat any ammo. Secondary fire will switch to the previously used weapon.
+
+### Shotgun
+
+The shotgun is your second spawn weapon. Primary fire is very powerful in close combat and, due to the bullets’ spread and being insta hit, a useful finishing weapon at medium range. Note that the push force of primary fire will slow down targets moving towards you, which can be very effective on space maps at spots where players are supposed to touch down from distant jump pads. If you shoot them with shotgun while they are still flying, they probably won’t make it to their usual landing spot.
+
+The secondary fire mode allows you to swing the shotgun like a big trout and to slap other players, which is, apart from dealing rather lots of damage, very much fun to do.
+
+### Machinegun
+
+The machine gun’s (or “uzi’s”) primary fire has a high spread, so it’s useful mostly in close to medium range. Secondary fire has lower spread and shoots small bursts, which is more useful at medium to longer ranges. As the machine gun projectiles have a little push force and are fired rapidly, it can be quite useful for slowing down players that come at you at high speeds. In fact, it’s hard to get into slapping range of someone that has a steady aim as long as such player is firing the machine gun.
+
+You’ll notice a ring around your crosshair that shows the depleting ammo. Once it is empty, the machine gun automatically reloads. To avoid running around with a couple of bullets only and having to reload in the middle of a battle (which takes far too much time), you can reload the machine gun manually at a convenient time by using the “reload” bind that you can set up or by re-pressing the machine gun bind while already wielding the machine gun.
+
+### Mortar
+
+The mortar fires ballistic grenades which deal a lot of direct and splash damage in addition to pushing the player away from the impact. Whereas primary fire detonates upon impact, secondary fire detonates exactly 0.5 seconds after the first bounce of the grenade. With this knowledge you can time the detonation of secondary mortar. Mortar is a very effective weapon against any non-flying targets and to spam around corners.
+
+### Electro
+
+The electro primary behaves like an ordinary rocket launcher as you might know it from other games. However, it’s not really useful for doing high jumps. The secondary fire mode looks like some ordinary sluggish grenade like balls, but has a not so obvious special function: if you detonate the up to three blobs the secondary fire mode can release with primary fire, they will explode with a big WOOOSH that deals a lot of direct and splash damage (around 130 dmg!). This makes the electro especially useful for blocking entries, releasing upon several opponents that are busy fighting each other or spamming where you predict someone to come. Note that you only have to directly hit the balls when trying to set it off mid-air. Otherwise the splash of the primary's impact on a surface nearby is sufficient to set off the combo-explosion. This means that you can even set it off through walls (shooting blobs around a corner and hitting wall with primary) or even mid-air (just shoot through where your blobs fall).
+
+### Crylink
+
+The crylink has a couple of very non-obvious features, which makes this weapon rather interesting and unique. First of all, due to negative (!) push force, getting hit by crylink particles will effectively slow you down very much, no matter of the direction you’re moving in in relation to the firing player. Even if you move at insane speeds, getting hit by several crylink particles at once will make you perform a full stop. This makes the crylink very popular amongst defending CTF players, as you can really annoy fast flag runners with it provided you manage to hit them.
+
+The latter can, however, be quite tricky, given the high spread crylink primary has. Fortunately, crylink has another feature that is very unlikely to be discovered unless someone tells you about it: when you release primary fire, the spread of crylink primary will inverse. Let that sink in for a moment.
+
+    "When you release primary fire, the spread of crylink primary will inverse"
+
+Got it? This means that if you press the primary fire button, the particles will get fired with a certain spread. As long as you keep the primary fire button pressed, the spread will stay constant. Once you release it, the spread inverses, which means **all particles traverse a single spot**. Now the trick is to time the release so that as many as possible particles hit the opponent. The more particles you manage to land on the target, the more drastical the negative push effect will obviously be.
+
+Crylink secondary does not have the spread inversion feature, the particles leave the gun at a very low and constant spread. The particles of secondary fire are faster than primary fire, and they don’t bounce. Their negative push force can be used on other players to break their movement (especially trick jumps) and even to pull them drastically if you manage to hit them in mid-air.
+
+It wouldn't be Xonotic if you couldn't use the unique negative push force for movement as well. If you start a bunny hop and, just when you started to go up from your first hop, hit the floor with crylink secondary at about an angle of 45 degrees in front of you. The negative push of the implosion in front of you will catapult you forward (“crylink running”). This is probably the most efficient way to gain speed from stand. You can also use it to climb walls if you face a wall, jump and shoot the wall above your head with crylink secondary. Crylink climbing is also the most effective way to save you from falling off maps, provided there's a wall close by.
+
+### Vortex
+
+In the hands of a player with a good aim the vortex is probably the most powerful weapon in the entire game. It fires a single beam with zero spread that will instantly hit anything in its way and will even shoot through other players. You’ll notice a small ring around the crosshair when holding the vortex in your hands. If the ring is full, the vortex is charged (and also starts to glow red). Charging happens automatically once you hold the weapon, and it does not cost any ammo. Upon firing, the vortex obviously discharges and starts to recharge unless you switch to another weapon (what you should do, but more about weapon combos later). If charged, the vortex deals 80 dmg, if you shoot with it immediately again, it deals 64 dmg, minimum damage you can deal with vortex is 59 (if you switch to another weapon immediately after shooting and then shoot vortex immediately after reswitching to vortex, so it doesn’t have the refire time for recharging).
+
+Secondary fire only zooms in, as the weapon is strong enough as it is even without a secondary fire mode.
+
+### Hagar
+
+The hagar rapidly fires small rockets, since 0.8.2 without spread. By holding secondary you can load up to 4 rockets that you can fire simultaneously in a three-tip-star formation by releasing secondary fire. If you hold secondary fire too long, hagar will make a little beep and automatically release the loaded rockets so you can’t run around the map and just keeping hagar loaded all the time until you find someone. Unloading hagar secondary can deal a lot of damage at close range, however you’ll need to watch out not to get killed yourself by the splash damage it does. The high splash makes this weapon quite useful against opponents standing next to a wall so the rockets that miss will at least do splash damage. Due to the removed spread compared to 0.8.1, hagar can now also be used on long distances effectively, with the travel time of the projectiles opening yet another bit of gameplay depth. On most competitive servers you’ll be able to discharge the hagar secondary without firing the rockets by pressing primary again while still holding secondary.
+
+### Devastator
+
+The devastator also has some very interesting features that are not very typical for this kind of weapon. First of all you can use the secondary fire to immediately detonate remotely any rocket you fired (provided of course it is still flying). No need to hit a flying target directly, just get the rocket near and, BAM, there you go. Apart from the high splash damage, the explosion also deals quite a lot of push force, so if you want to push some flying player off the map, devastator is your weapon of choice as you can not only push players away from you (push direction obviously depends on the explosion’s position in relation to the player).
+
+But not enough, you can of course also use the devastator to push **yourself** around. If you happen to be flying and need some extra acceleration but there is no wall near to blaster yourself off, just shoot a rocket downwards and immediately detonate it. Yes, it hurts. A lot. But it might be worth it, be it to push you back onto the map if you are falling into the void or to prolong a blaster jump so you manage to reach a distant location. This technique is called “rocket flying”.
+
+You think I’m already done with the devastator? Not yet! In addition to this already very useful feature to remotely detonate your rockets you can also **guide** the rockets. Just keeping the primary fire button pressed and moving the mouse enables you to do some [interesting stuff](http://www.youtube.com/watch?v=UqfqWtXwjic) which can come in very handy in all sorts of situations.
+
+Of course you can combine rocket guiding and remote detonation.
+
+Gameplay Tricks
+===============
+
+Now that we’ve been examining movement and weapons, the air for new newbie stuff is starting to get thinner and thinner. In this section I’ll be providing some general gameplay hints that hopefully will make your life as a newbie out there on the servers easier – and longer :)
+
+Weapon Comboing
+---------------
+
+First of all, Xonotic encourages the usage of weapon combos. How so? Well, if you shoot, you will have to wait a short while (the refire time) until that weapon is able to shoot again, unless you’re holding a constant or rapid fire weapon (currently only hagar and mg). The refire time is rather short so it doesn’t feel like limiting you much if you’re not aware of the concept of weapon combos. But if you switch your weapon immediately after you shoot, you can land a second shot with the second weapon faster than you would be able to with a second shot of the first weapon, as the refire time is longer than the weapon switch delay. This way you are able to deal more damage per second by combining different weapons. Additionally, combining weapons also enables you to combine the specific benefits of two weapons, like slowing down a fast target with crylink in order to be able to easier finish it off with an instahit gun such as vortex.
+
+Keyboard Setup
+--------------
+
+This leads to the problem that it’s terrible difficult for any orthopedic healthy and sane person to do weapon combos efficiently and reliably with the default keyboard layout or (omg!) the mouse wheel. Fortunately, Xonotic allows you to re-configure the entire keyboard bindings very easily (settings window → input tab). I consider direct weapon binds per weapon the easiest way to access any weapon immediately, and would strongly recommend to place the relevant binds around your movement keys or on extra mouse buttons your desktop rodent may have. You will have to find a solution that feels comfortable for you, which might require some experimenting. I for example moved my movement keys from wasd to esdf in order to have more keys available around my movement keys for weapon binds. But that’s just an example, you’ll have to find out what works best for you.
+
+Don’t worry, impacts on your playing skills that result from redesigning your keyboard layout will, once you found a comfortable setup, be temporary only and the change WILL pay off in the longrun. Being able to pick the right weapon for the job instantly by means of a finger reflex is a great advantage in a FPS that is as fast paced as Xonotic.
+
+Splash Damage Travels Through Walls
+-----------------------------------
+
+Another thing you should be aware of is that splash damage travels through walls. Knowledge of this fact can come in very handy at various situations. Especially if you know or suspect someone to be on a higher level above you and the ceiling is thin, you can just try a lucky mortar or devastator shot at the ceiling. The hit indicator sound (that little beep) will tell you if your guess was right. If you’re very confident about the location of your opponent, you can even unleash an electro combo (see the weapons part above, electro) at the ceiling, which works surprisingly well and does a great amount of splash damage, but takes a bit more time to do.
+
+Using splash damage that travels through walls is a very useful and secure technique, as the opponent will obviously not be able to fire back at the same time.
+
+Stay Healthy
+------------
+
+This is something which is almost too obvious to be included here, but I’ve seen so many new players running right past health and armor pickups without taking them. In Xonotic, your starting health of 100 can be brought below zero very quickly. It takes any experienced player two shots to accomplish this, which typically are a two weapon combo so this goes **really** fast. If **one** player can finish you off that fast, imagine how long your life lasts in a typical **eight** player deathmatch. This is why it is absolutely crucial to pick up any health and armor you might find on your way, unless of course this puts you in a dangerous position that outweighs the advantages of a health/armor boost. A mega armor or mega health gives you additional 100 health or armor points respectively, which obviously equals the amount of damage you can take with your starting health – you could consider a mega armor or mega health an extra life. Megas respawn within 30 seconds of being taken.
+
+However, note that if you are above 100 health/armor, both health and armor will start to rot down to 100 a short while after you picked up your last health or armor respectively. The higher above 100 you are, the faster the rot goes. On the other hand if you are below 100 health, your health will start to regenerate a short while after you took damage for the last time. Again, the lower your health is, the faster it regenerates. This means if you get out of a battle with really low health and there is no health pickup anywhere near, it can be a good idea to retreat to a place out of action until you managed to regenerate a bit. Armor obviously does not regenerate.
+
+Listen
+------
+
+The fewer players you have in a match, the more important it gets to listen to the sounds they make. Each armor or health pickup size has its own distinctive pickup sound. Pickup sounds are louder and therefore easier to notice even at some distance than footsteps. If you know where which pickups are on the map you’re playing, you’ll be very often able to know where other players are before seeing them just by listening to the pickup sounds they make.
+
+Also note that the sound a player makes when getting hit varies depending on how low that player’s health is. When you hit a player and you hear the characteristic “very low health groan” (most newbies know that sound primarily from their own player model… :D), you’ll know that you’ll only need to deal a few damage points to finish that player off, so you can go for fast high spread (machinegun, shotgun) or fast splash damage weapons (crylink). Listening is an essential part of duel gameplay.
+
+Console ABC
+-----------
+
+Though the Xonotic menu is very powerful and offers almost every option you could wish for, some times it is faster and simpler to change settings via the built-in console. You can open the console by pressing `<Shift> <ESC>`. Now you have a command prompt where you can query and change settings or execute commands. If you already know how a command you are going to type is called, you can just type the first few letters and hit `<TAB>`. This will automatically complete the command. If the letters match several possible commands, it will auto-complete to the extent all potential completions match and show you all potential completions. For example, typing `cross` in console and hitting `<TAB>` will auto-complete to `crosshair` and show the commands like `crosshair`, `crosshair_alpha`, .... If you try this you will notice the console will show you not only the possible command completions, but also more info to each possible completion: what is its current (local!) setting, what is its default setting (in square brackets) and a short description what the command does.
+
+In most cases you won’t know the exact command to type, and this is where a special command will help you: `apropos`. If you, for example, want to know how to do change screen resolution, you can just type `apropos resolution` into console, and the console will spit out all commands with description that have the string “resolution” in their name or in their description.
+
+A very important and widely used console command is the command to call a vote. If you want to see what votes are allowed on a server, type `vhelp`. To call a vote (for example, to end the match), type `vcall <vote>` (in my example `vcall endmatch`).
+
+If you’d like to know more about the Xonotic console, check out [BlaXpirit’s forum thread about console tips and tricks](http://forums.xonotic.org/showthread.php?tid=2987). In case you find consoles a little too nerdy, you can change game settings in a similar detailedness also via the “Advanced Settings” dialog located in the Settings Window → Misc Tab. The search function there works just like the apropos command in the console.
+
+Optimizing Perception
+=====================
+
+Xonotic aims to be pretty and to offer an immersive gameplay experience by using realistic lighting, complex particle effects and a harmonious sound environment. Whereas all these elements may help you to dive deeper into the game atmosphere, they also provide an overhead of information for you to process that sometimes has no other use than creating such atmosphere. In some cases this can even lead to gameplay relevant information getting lost under such overhead. This section deals with configuring Xonotic so you can see and hear well at the cost of atmosphere (a lot of which will get lost in the process).
+
+To apply the tweaks I’ll resort to showing console commands mostly, simply because it is much shorter to just show the command here than to describe the menu path where to set the relevant configuration option. So be sure to have read the Console ABC section if you’re not already familiar with the Xonotic console.
+
+Visuals
+-------
+
+First of all let me state that I myself usually play with more or less regular settings because I like to experience the great work developers, modelers and mappers have done to create decent graphics. But if you intend to play competitively, it can be to your advantage to lower the complexity of what is displayed in order to be able to fully focus on the information that is relevant for your gameplay. In this section I will try to point out a couple of settings that can help reduce complexity while maintaining all relevant information. Be warned though, if you follow all suggestions contained in this section your game will look pug-ugly to say the best.
+
+### Damage Blur
+
+The first thing to do is to disable the damage blur. Getting hit is already bad enough, you won’t want to punish yourself with temporary blindness additionally. This is so crucial that I even disabled this “feature” in the left screenshot above in the “Visuals” caption, otherwise you wouldn’t have been able to see a thing there. If you haven’t done so already, disable this by doing
+
+    hud_damage_blur 0
+
+While we’re at it, we can also reduce the damage flash when getting hit:
+
+    hud_damage 0.4
+
+### Field of View
+
+It obviously is crucial to see what is happening around you. To increase the area that you can see, adjust the field of view to your liking. While the default value is at 90, I personally play with a field of view of 120, and find this a quite usable setting. Remember though, that changing the field of view has an impact on your ability to aim, very similar to changing settings of your mouse sensitivity. The higher the field of view, the harder it can be to aim. I have a lousy aim anyway, so I can play with fov 120 alright. You can change the field of view in the menu or via console by:
+
+    fov 120 (adjust to your liking)
+
+### Visible Players
+
+Most player models are really hard to spot, as they are optimized to look good and, to some extent, realistic. This means their textures are subject to the usual rendering procedures which calculate how much light from the surroundings will be reflected by the player models. Consequently, most models are hard to see in dark corners, and don’t have a strong contrast to the background in general. There is one model though that uses “fullbright” textures, which are always displayed at full brightness, and this is the "Mega Erebus”. With 0.8.2, first steps were taken to add fullbright skins for each and every model, in the course of which the "Mega Erebus" got removed (a bit too early) from the model selection menu. As a consequence, you cannot select it via menu for the time being, so you'll have to use the console for that, as it's still available.
+
+    playermodel "models/player/megaerebus.iqm"
+
+Now there is a way to make every other player be displayed to you as “Mega Erebus” even if they selected a different model, and you can do that by selecting it for your own player and forcing your own model on everyone. This can be done via menu, but here’s the console command:
+
+    cl_forceplayermodels 1
+
+Be warned though that the sounds other players make still remain the same, so don’t be shocked if a Mega Erebus is commenting to you in a Pinky Pie voice on servers that have ponies enabled. If you dislike other people using colors that may blend too well into the map, you can also select a particularly bright color for yourself and force it onto everyone as well:
+
+    cl_forceplayercolors 1
+
+These settings obviously have the disadvantage that you become extremely visible to everyone else, too - but it would be rather unfair if you could make everyone extremely visible while staying a grey mouse, wouldn’t it?
+
+### Reducing Effects
+
+I personally strongly dislike blood splatter and gibs flying around as a matter of taste, but disabling all the gory mess also has visual advantages beyond personal preference. The more unnecessary detail gets rendered, the harder it is to filter out the information that is actually relevant. Therefore, turning off gibs is a good way to get rid of a whole bunch of effects that only get in your way if you want to keep an overview in the heat of a fight:
+
+    cl_gentle_gibs 1 (note that you may need to restart Xonotic or reconnect for this change to take effect)
+
+But not only gibs can obscure things, also particle effects of explosions, coronas and bloom can impact on visibility:
+
+    cl_particles_alpha 0.2 (feel free to experiment with values between 0 and 1)
+    cl_particles_sparks 0
+    cl_particles_blood 0
+    r_coronas 0
+    r_bloom 0
+
+### Picmip and Simple Items
+
+Now the game still looks somewhat ok-ish. Time to change this! Let’s get rid of all those details in textures that generate contrasts where it isn’t needed:
+
+    gl_picmip_world 10
+    gl_texturecompression 1 (if you like, or need faster loading)
+
+What, still looks the same? Well, then do
+
+    vid_restart
+
+and enjoy :D
+
+Some people even like to replace the beautiful pickup models by twodimensional, bright sprites. I personally don’t see a visibility benefit, but the bright symbols could be considered as easier to spot. To enable “simple items”, do:
+
+    cl_simple_items 1
+
+You will have to reconnect to the server (or, if you test it in a local game, type `restart` in console). Note that this change only works on servers that allow this setting to be used.
+
+### Crosshair
+
+The next thing is to set an always visible crosshair. Though I personally like the per-weapon crosshairs, they unfortunately are not very bright. With them, I often had the problem of identifying where that crosshair actually is in the middle of a battle. Even though I probably ended up landing quite some hits this way due to my particularly fuzzy aim which seldomly places the crosshair on the target, I decided to make the crosshair really visible, now that I deliberately chose to use the darn thing. You can very comfortably configure the crosshair via the menu or just copy my settings:
+
+    crosshair 27 (this is really all about personal preference)
+    crosshair_alpha 1
+    crosshair_effect_scalefade 0
+    crosshair_effect_time 0
+    crosshair_enabled 2
+    crosshair_dot 1
+    crosshair_dot_color 0.24 1 0.13 (this too is all about personal preference)
+    crosshair_per_weapon 0
+    crosshair_color_per_weapon 1 (if you like to know the weapon per crosshair color)
+    crosshair_ring 0 (this removes the vortex ring, keep it if you like to see it)
+    crosshair_ring_reload 1 (mg reload ring might be useful)
+    crosshair_ring_reload_size 1 (adjust to your liking, default is too big imho)
+    crosshair_size 0.28 (adjust to your liking)
+
+### Fine Tuning
+
+If you have already set up weapon binds following the instructions above and are really confident about them, you might even choose to remove the rendered first person weapon model so it doesn’t block your view:
+
+    r_drawviewmodel 0
+
+Now you’ll only know what weapon you hold by remembering the bind you pressed last and by the color of the crosshair. But if you managed to get the weapon binds into your cerebellum, this is manageable - decide for yourself if you’re ready for this. I started using this setting when publishing the [Newbie Corner \#6](http://www.xonotic.org/2013/09/halogenes-newbie-corner-part-6-optimizing-perception), and feel very comfortable with it for already quite a while.
+
+When using the zoom to improve sight in a fast paced game like Xonotic, you won’t want the view to be impaired by some mask around the crosshair that generates the impression you look through some binoculars or something:
+
+    cl_reticle 0
+
+Also, who wants to waste time for the transition between zoom and non-zoom?
+
+    cl_zoomspeed -1
+
+Ever since I configured a dedicated zoom key that I can use on all weapons (you can do so via the Menu, Settings window, Input tab), I got annoyed by the zoom getting lost upon switching the weapon, which results in loosing your aim just when it is crucial to hit. You can disable this by doing:
+
+    cl_unpress_zoom_on_weapon_switch 0
+
+Bobbing effects are generally only for conveying a “realistic feel” but don’t serve a purpose that’s important for the gameplay. Quite to the contrary, they make your view less steady. So you might want to switch off all sorts of bobbings:
+
+    cl_bobfall 0
+    cl_bobmodel 0
+    cl_bobup 0
+
+If you like to keep an eye on the action (and on who takes which items) when you get fragged, you can disable automatically showing the scoreboard when dead with:
+
+    cl_deathscoreboard 0
+
+Audio
+-----
+
+Apart from all the visual stuff, you can of course also improve perception by adjusting the audio settings. While there is quite some remarkably good music in Xonotic, in-game music can distract you and predominate pickup or movement sounds that you might want to hear. The same goes for ambient sounds. Whereas these greatly add to the atmosphere of the game, they can prevent you from predicting where an opponent will come from, what the player’s approximate health status is and what is being picked up. So if you can do without the atmosphere, you might want to turn those off via the menu.
\ No newline at end of file
diff --git a/Docs/htmlfiles/faq.aft b/Docs/htmlfiles/faq.aft
deleted file mode 100644 (file)
index c40f794..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-#--- AFT (Almost Free Text) source file for Xonotic FAQ
-#--- WARNING: ALWAYS RUN AFT TWICE! (otherwise the toc is missing/not up to date)
-#--- use AFT v5.096 or later (http://www.maplefish.com/todd/aft.html)
-
-#---SET xversion=0.7
-#---SET zipname=xonotic-<version>.zip
-
-*Title: Xonotic %xversion% FAQ
-                       http://xonotic.com
-
-------
-
-*TOC
-
-------
-
-* Troubleshooting
-
-** How do I install Xonotic?
-Just unzip the |%zipname%| file.  You can do this with any archive program (like [7zip (http://7zip.org)]).  It's very important to keep the directory structure while unpacking (in WinZip this option is called "Use folder names").  The directory structure should look like this afterwards:
-^<<
-Xonotic/
-|-- Docs/
-|-- data/
-|   |-- common-spog.pk3
-|   `-- data*.pk3
-|-- Xonotic.app/
-|-- Xonotic-SDL.app/
-|-- server/
-|   `-- *
-|-- sources/
-|-- *.exe
-|-- *.dll
-`-- xonotic-linux-*
-^>>
-
-** When I start Xonotic all I see is a black screen or a black screen with some checkered squares
-This happens when the engine can't load the data*.pk3 file or has trouble to initialize OpenGL.  The reasons could be:
-       1. you unpacked the zip file without folder names (see [How do I install Xonotic?])
-       2. on Linux: the current directory is not your Xonotic/ folder.  See [How can I place a shortcut to Xonotic on my Linux desktop?] on how to fix this
-       3. on Mac: you tried to extract and move the files from a Xonotic update and it deleted the old files.  When using the mac GUI please be sure to move only the files not the folders as that will delete the old files or use the mv console command which will not delete the old files
-       4. the engine could not initialize OpenGL.  Please install the latest drivers for your graphic card.  You will probably find one for your card there: [intel (http://intel.com)] [ati (http://ati.com)] [nvidia (http://nvidia.com)]
-       5. your download might be corrupted, please download Xonotic again
-
-** Using Linux I only see the map but no players and items
-This happens when the engine has trouble to initialize OpenGL.  The reasons could be:
-       1. the engine could not initialize OpenGL.  Please install the latest drivers for your graphic card.  You will probably find one for your card there: [intel (http://intel.com)] [ati (http://ati.com)] [nvidia (http://nvidia.com)]
-       2. You do not have permissions needed for 3d acceleration.  Usually you need to add yourself to the group |video|, you can do that via console as root like this: |usermod -a -G video YOURUSERNAME|.  You need to logoff/in afterwards.
-
-** When I start Xonotic my screen is flickering
-This is known to happen on Windows with Intel graphic chips and is a bug in the graphics drivers.  A workaround is to set |Flip-Policiy| to |blit|.  Open the control panel, there should be an icon called |Intel(R) GMA driver| (or something like that), double click it. Click on |3D Settings| to find the screen with those settings.
-
-** How can I speed up my frame rate?
-You can choose predefined performance settings in the |Settings / Video| menu.  |Normal| is the default, |Medium| and |Low| run faster while |High|, |Ultra| and |Ultimate| enable more features you might want to test if you have a high end graphic card.  Or you can enable/disable single features.  The greatest performance boost can be achieved by turning off dynamic lights and shadows in the |Settings / Effects| menu.  Bloom is also quite resource intensive.  Other fps boots include disabling |Deluxemapping| and |Coronas|.  On older graphics cards or on-board/notebook chips with little video ram you can try to lower the texture quality in the |Settings / Video| menu.
-Some graphic cards (mostly ATI or quite old cards) run A LOT faster if you disable the |Vertex Buffer Objects| in the |Settings / Video| menu.  An other thing that can greatly help on such cards is to disable the |OpenGL 2.0 Shaders|.  Having that option enabled is faster on most cards however that is why both are active by default.
-
-** The sound is broken, it crackles and stutters
-Try run |xonotic-sdl.exe| instead of |xonotic.exe| (on Windows).  Adding the command line options |-sndspeed 48000| and/or |-sndstereo| can also help on some systems (on Linux, Mac, Windows).
-
-** Mouse is too slow and sensitivity is at top (on Mac / Linux)
-Mac: The default mouse acceleration on Mac is very high and strange.  The Xonotic defaults work fine with it but some mouse drivers seem to 'correct' the mouse acceleration and conflict with the Xonotic defaults.  Try to disable the option |Turn off OS mouse acceleration| in the |Settings / Input| menu.  Or the same via console: |apple__mouse__noaccel 0; vid__restart| ([How do I open the console?])
-Linux: A similar problem can arise on Linux.  Its also |Turn off OS mouse acceleration| in the |Settings / Input| menu but the console command is different: |vid__dga 0; vid__restart| ([How do I open the console?])
-
-** I can't switch to 32 bit color depth (on Windows)
-Check if your desktop color depth is set to 32 bits per pixel.  If it's just set to 16, Xonotic can't switch to 32 bit mode.
-
-** When I join a server or after a map change I see nothing but a black screen, but I can still move and shoot
-This is probably because you don't have the map that's running on the server.  As Xonotic supports map/content download the server might not be be setup (correctly) to support this and you will have to get the map the old fashioned way.  Those servers should have a download URL in their name or welcome message.  There is also a [wiki page (http://dev.xonotic.org/projects/xonotic/wiki/Maps)] dedicated to new maps.
-For Linux users: you need to have libcurl installed, otherwise you won't be able to download any maps.  libcurl should be available in any Linux distribution, just search for "libcurl" and install it in your distribution's package manager.
-
-** How to report crashes
-Register at http://dev.xonotic.org and submit a bug report.
-
-On Mac: IS THERE AN EASY WAY?
-
-On Linux: In a xterm, |cd| into your Xonotic installation directory, start |catchsegv ./xonotic-linux-686-sdl -condebug -developer > crash.txt 2>&1| and give the file crash.txt to the developers.  Note that you can also use |./xonotic-linux-686-glx| or if you have a 64bit system |./xonotic-linux-x86__64-sdl| and |./xonotic-linux-x86__64-glx|
-
-On Windows: Click Start->Run, and enter drwtsn32, click Ok in the next window, run Xonotic and wait for the crash.  Then go to |C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson| there should be a file called "drwtsn32.log", give that file along with the engine's build date to the developers.  You'll see that date when you open the ingame console ([How do I open the console?]).  Note that some folders of that path may be hidden or have a translated name if you're using a non-english windows.
-
-** Where can I get more help?
-Visit [the official Xonotic forum (http://xonotic.org/forum)] there is a [support and bug report area (http://dev.xonotic.org)].  Or get on [IRC (http://en.wikipedia.org/wiki/Internet__Relay__Chat)] to chat with other or ask for help.  There is the normal users channel (irc://irc.quakenet.org/xonotic) and the developers channel (irc://irc.freenode.net/xonotic)
-
-* General questions
-
-** How do I install new maps?
-Maps usually ship as *.pk3 file.  All you have to do is to copy this file to the |Xonotic/data/| (on Linux, Mac, Windows) OR |~/.xonotic/data/| (on Linux, Mac) directory.
-Map packages that were downloaded from a server during playing end up in |Xonotic/data/dlcache/| or |~/.xonotic/data/dlcache/| and are only used till you exit Xonotic. If you want to play them locally or use them to setup a server of your own you can "accept" the packages by moving it one level up - right next to your config.cfg.
-
-** How can I place a shortcut to Xonotic on my Linux desktop?
-Use the script |xonotic-linux-sdl.sh| or |xonotic-linux-glx.sh| instead of the binaries.  The scripts will use the correct |working directory|,choose the right version (32 or 64 bit) and also allow you to start a extra X server.
-
-** How do I open the console?
-Press |\[shift]+\[escape]|.  To close it press |\[escape]|.  While playing ` or ^ will also open the console.
-
-** What console commands/variables are there?
-You can get a list of variables by entering |cvarlist| on the console ([How do I open the console?]).  |cmdlist| will give you a list of available commands.  
-
-#An annotated version of that output can be found at the [Xonotic wiki (http://xx.org/wiki/pmwiki.php?n=Main.ConsoleCommands)].
-
-** How can I use colors in my nickname and messages?
-Colors can be used in nicknames and chat messages via two ways: Either the simple way by typing ^ followed by a number between 0 and 9 or by typing ^x followed by three hexadecimal numbers (0-F) representing red, green and blue components of the color before the text. The second way allows for much more colors. For example if you type ^xF00message the text "message" will be displayed in red color. Simple examples:
-
-       !        !            !                        !
-       ! code   ! rgb code   ! color                  !
-       !--------!-------------------------------------!
-       ! ^0     ! ^x000      ! black                  !
-       !--------!-------------------------------------!
-       ! ^1     ! ^xF00      ! red                    !
-       !--------!-------------------------------------!
-       ! ^2     ! ^x0F0      ! green                  !
-       !--------!-------------------------------------!
-       ! ^3     ! ^xFF0      ! yellow                 !
-       !--------!-------------------------------------!
-       ! ^4     ! ^x00F      ! blue                   !
-       !--------!-------------------------------------!
-       ! ^5     ! ^x0FF      ! cyan                   !
-       !--------!-------------------------------------!
-       ! ^6     ! ^xF0F      ! magenta                !
-       !--------!-------------------------------------!
-       ! ^7     ! ^xFFF      ! white                  !
-       !--------!-------------------------------------!
-       ! ^8     !            ! half-transparent black !
-       !--------!-------------------------------------!
-       ! ^9     ! ^x888      ! grey                   !
-       !--------!-------------------------------------!
-       !        ! ^x800      ! dark red               !
-       !--------!-------------------------------------!
-       !        ! ^x080      ! dark green             !
-       !--------!-------------------------------------!
-       !        ! ^x880      ! dark yellow            !
-       !--------!-------------------------------------!
-       !        ! ^x008      ! dark blue              !
-       !--------!-------------------------------------!
-       !        ! ^x088      ! dark cyan              !
-       !--------!-------------------------------------!
-       !        ! ^x808      ! dark magenta           !
-       !--------!-------------------------------------!
-
-** How do I watch/record demos?
-Demos are recordings of matches that you have played. To automatically record a demo each time you play enable the option |Record demos while playing| in the |Multiplayer / Demos| menu. Or if you just want to record some matches open the console and type |rec <demos/name>| before playing. That is before starting a game or connecting to a server. The demo file will then be stored in |Xonotic/data/demos/<name>.dem| (on Windows) or |~/.xonotic/data/demos/<name>.dem| (on Linux, Mac).
-If you downloaded a demo, copy it to |Xonotic/data/demos/<name>.dem| (on Linux, Mac, Windows) or |~/.xonotic/data/demos/<name>.dem| (on Linux, Mac).  You might have to create this directory if you have never recorded a demo before.
-To watch demos you can choose a demo file in the |Multiplayer / Demos| and click the play button. Also you can watch demos typing |ply <demos/name>| in the console ([How do I open the console?]). You can list all your demo files by typing |dem| on the console.  
-
-* Server setup
-
-** How do I start a server?
-Use the |Multiplayer / Create| menu to start a |listen server|.  You will always have to play yourself in a |listen server|.
-If you want to create a server without being forced to play yourself please take a look at the file |readme.txt| in the |Xonotic/server/| directory where the |dedicated server| is explained.
-
-** Which ports do I have to open in firewall/forward from my router to run a server?
-The default port is 26000 UDP.  You can change that in the |Multiplayer / Create| menu or by starting Xonotic with the parameter |-port <port>| or having a line |port <port>| in the server config file.
-If you follow the tutorial mentioned above you do not need this command line argument as it will be done in the config file created for the server.  To add the command line argument on Windows, create a new shortcut to |xonotic.exe| or |xonotic-dedicated.exe| and right click on it.  Select properties and |-port <port>| in the "Target:" line.  Be sure that the "Start in:" line contains the full path to your Xonotic folder and click "OK".  The parameter will be used if you start Xonotic via that new shortcut.
-
-** Is there some kind of rcon?
-Yes there is a QuakeWorld compatible rcon.  To use it you must enter |rcon__password <password>| in the server console or server config file.  The Xonotic client has to set the same password in the same fashion.  You can then issue commands with |rcon <command>| if you are connected to the server or will have to set |rcon__address <ip/hostname>| or |rcon__address <ip/hostname>:<port>| to point to the server.  There are also external rcon tools but make sure you use a QW compatible rcon tool.
-
-** How can I kick people who are using special characters in their names?
-Enter |status| at the server console.  You will see a list of all players.  In front of their names you will see a number (the player id).  You can kick the player you don't like with |kick # <player id> <reason>| (notice the space after #).
-
-* Development
-
-** How can I create or edit Xonotic maps?
-You need [NetRadiant (http://icculus.org/netradiant/)], a stabilized Q3 map editor. For convenience, a snapshot configured for Xonotic is included in |extra/| for Windows and MAC-Intel, but the program is not officially supported by Xonotic.
-
-** Where can I get latest development versions of the source code?
-Please refer to http://dev.xonotic.org/projects/xonotic/wiki/Repository_Access
-
-_Game data:_ to check out Xonotic git, you'll need a [git client (http://git-scm.com/)].  
-
-For more information on how to compile the game please see http://dev.xonotic.org/projects/xonotic/wiki/Repository_Access#Cloning-the-repository-and-compiling and http://dev.xonotic.org/projects/xonotic/wiki/Compiling_In_Windows
index 7ea9db6429f7c72341c5f54c6559686b9d2491a7..13376aa6d50c51af3b84c9cc3fde7b9635e0186e 100644 (file)
@@ -5,11 +5,11 @@ ______________
 CLIENT SIDE:\r
 \r
 Should already work without configuration. You can however use the following\r
-cvars for further tuning:\r
+cvars for further tuning (see xonotic.org/tools/cacs for more up-to-date information):\r
 \r
-   cl_curl_enabled              download support enabled (master switch, default: 1)\r
-   cl_curl_maxdownloads         maximum number of downloads at once (default: 1)\r
-   cl_curl_maxspeed             maximum total speed in KiB/s (default: 100)\r
+   cl_curl_enabled              download support enabled (master switch)\r
+   cl_curl_maxdownloads         maximum number of downloads at once\r
+   cl_curl_maxspeed             maximum total speed in KiB/s\r
 \r
 Downloaded packages end up in |Xonotic/data/dlcache/| or\r
 |~/.xonotic/data/dlcache/| and are only used till you exit Xonotic.\r
index 6a0c01ed074f75ecbbf22c7a301917878600681b..5ab3e356c2a97148bf875803a0aba3c7bb16772a 100644 (file)
@@ -57,14 +57,13 @@ data/data/wazat1.mapinfo for me. The file may look like:
     _diameter 1966.839355\r
     _spawnpoints 5\r
     has weapons\r
-       cdtrack 5\r
+    cdtrack 5\r
     gametype dm // defaults: timelimit=20 pointlimit=30 leadlimit=0\r
     gametype dom // defaults: timelimit=20 pointlimit=200 teams=2 leadlimit=0\r
     gametype lms // defaults: timelimit=20 lives=9 leadlimit=0\r
-    gametype arena // defaults: timelimit=20 pointlimit=10 leadlimit=0\r
 \r
 As I see, the menu autodetected that my map may be suitable for deathmatch,\r
-domination, last man standing and arena. But I want the map to be played in\r
+domination, last man standing and keepaway. But I want the map to be played in\r
 domination, deathmatch, team deathmatch only, and I also want different\r
 timelimits/fraglimits, so I will change the "gametype" lines to:\r
 \r
@@ -98,7 +97,6 @@ Team Deathmatch | gametype tdm [timelimit=...] [pointlimit=...] [teams=...] [lea
 Domination      | gametype dom [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                | 2, 3, or 4 teams, only if map has no dom_team ents\r
 CTF             | gametype ctf [timelimit=...] [caplimit=...] [leadlimit=...]                                              |\r
 LMS             | gametype lms [timelimit=...] [lives=...] [leadlimit=...]                                                 |\r
-Arena           | gametype arena [timelimit=...] [pointlinit=...] [leadlimit=...]                                          |\r
 Key Hunt        | gametype kh [timelimit=...] [pointlimit=...] [teams=...] [leadlimit=...]                                 | 2, 3, or 4 teams\r
 Assault         | gametype as [timelimit=...]                                                                              | never uses points\r
 Onslaught       | gametype ons [timelimit=...]                                                                             | never uses points\r
@@ -380,9 +378,9 @@ mapinfo file.
 \r
 To do this, I can add the following lines to my mapinfo file:\r
 \r
-    settemp_for_type ctf g_balance_laser_primary_force 200\r
-    settemp_for_type all g_start_weapon_shotgun 0\r
-    settemp_for_type all g_start_weapon_uzi 1\r
+    settemp_for_type ctf g_balance_blaster_primary_force 200\r
+    settemp_for_type all g_balance_shotgun_weaponstart 0\r
+    settemp_for_type all g_balance_machinegun_weaponstart 1\r
     settemp_for_type all sv_cullentities_trace 0\r
 \r
 These "settemp" settings are automatically removed when the map is left and\r
index 528e40a8e8f165d4436b7e5f78a3653bfcd2472e..b1e6b851b8ef2a34cc3b98b914dd00d8946e45ba 100644 (file)
@@ -1,11 +1,10 @@
-cvars:\r
+cvars (see xonotic.org/tools/cacs for more up-to-date information):\r
 ______________\r
 \r
-   sv_logscores_console                print scores to serverconsole after each match (default: 0, set to 1 to enable)\r
-   sv_logscores_file           print scores to a file after each match (default: 0)\r
-   sv_logscores_filename       filename of the output file if sv_logscores_file is enabled (default: "scores.log",\r
-                                 the file will be stored in Xonotic/data/data or ~/.xonotic/data/data)\r
-   sv_logscores_bots           choose whether bot are included in stats or not (default: 0)\r
+   sv_logscores_console                print scores to serverconsole after each match (set to 1 to enable)\r
+   sv_logscores_file           print scores to a file after each match \r
+   sv_logscores_filename       filename of the output file if sv_logscores_file is enabled (the file will be stored in Xonotic/data/data or ~/.xonotic/data/data)\r
+   sv_logscores_bots           choose whether bot are included in stats or not\r
 \r
 \r
 commands:\r
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..c3fbbba
--- /dev/null
+++ b/README.md
@@ -0,0 +1,54 @@
+# Xonotic
+
+![Xonotic Logo](http://xonotic.org/static/img/xonotic-logo.png)
+
+Xonotic is an addictive, arena-style first person shooter with crisp movement and a wide array of weapons. It combines intuitive mechanics with in-your-face action to elevate your heart rate. Xonotic is and will always be free-to-play. It is available under the [copyleft](https://www.gnu.org/copyleft/)-style [GPLv2](http://www.gnu.org/licenses/gpl-2.0.html) license.
+
+*Please note, [Gitlab](http://gitlab.com/xonotic/) is our home for repositories, issue tracking, wikis, etc. The repositories on GitHub are mirrors of GitLab's unless specified otherwise.*
+
+## Download
+
+### LATEST RELEASE: Xonotic 0.8.2 for Linux, Windows, and macOS
+
+If you're just here to play, you can download Xonotic as a zip package, torrent, or by using one of [these alternative methods](http://xonotic.org/download/).
+
+- [Download as torrent](http://dl.xonotic.org/xonotic-0.8.2.zip.torrent)
+- [Download as zip](http://dl.xonotic.org/xonotic-0.8.2.zip)
+
+No installation required, just unpack and run. Got questions? See the [FAQ](http://xonotic.org/faq) or [live chat](http://xonotic.org/chat/) with us.
+
+**sha256sum**: a22f7230f486c5825b55cfdadd73399c9b0fae98c9e081dd8ac76eca08359ad5  
+**Package size**: 946M  
+
+## Contributing
+
+We're mainly looking for help in the following areas:
+
+- [Translations](https://www.transifex.com/team-xonotic/xonotic/)
+- [Modeling and texturing](https://gitlab.com/xonotic/xonotic-data.pk3dir/issues?label_name=Area%3A+Assets)
+- Documentation
+  - Some of it is still scattered in [Docs](https://gitlab.com/xonotic/xonotic/tree/master/Docs) instead of being on our [wiki](https://gitlab.com/xonotic/xonotic/wikis/home)
+  - Some [wiki](https://gitlab.com/xonotic/xonotic/wikis/home) pages are slightly out of date or contain links to empty pages
+  - Fixing typos everywhere and anywhere - attention to detail is important to make a good impression on potential players
+  - Even if you're new, just letting us know what you're struggling with helps so we can focus on improving those areas first
+- Testing
+  - If you're running a server or play off-line often, please consider using the [autobuild](https://gitlab.com/xonotic/xonotic/wikis/Autobuilds) or [git](https://gitlab.com/xonotic/xonotic/wikis/Repository_Access) versions to help us find bugs (when playing online, the server's version of the gamecode is downloaded and used by all clients so you have to play offline or run your own server for testing)
+- PR
+  - Please don't create anything that looks official (social media accounts, entries on pages like steam, etc.) without contacting us, we like to manage things ourselves to keep the information up to date
+  - All other kinds of PR are very welcome - make videos or articles, share links, spread the word
+
+## Developing
+
+To compile the latest revision from git, [follow this guide](https://gitlab.com/xonotic/xonotic/wikis/Repository_Access). Learn more about the [directory structure here](https://gitlab.com/xonotic/xonotic/wikis/Git), or check out [our project page on GitLab](https://gitlab.com/groups/xonotic) to see development activity and code ([xonotic-data](https://gitlab.com/xonotic/xonotic-data.pk3dir) is where most development takes place).
+
+## Community
+
+The community is primarily active in the [forums](http://forums.xonotic.org/) and IRC, `#xonotic` on either `irc.freenode.net` (developer chat) or `irc.quakenet.org` (player chat).
+
+## Wiki
+
+[Our Gitlab wiki](https://gitlab.com/xonotic/xonotic/wikis/home) has a lot of information related to developing, playing or otherwise contributing to the game.
+
+## License
+
+Distributed under the GPLv2 license. See the [COPYING](COPYING) file for more details.
diff --git a/all b/all
index 7d54d00cae2823eda957da69789660020f2d8dd8..ca2a093cc9706400f1baf6a10bd3da1467116ed7 100755 (executable)
--- a/all
+++ b/all
@@ -19,15 +19,22 @@ LF="
 ESC="\e"
 
 d00=`pwd`
-while ! [ -f ./all ]; do
-       if [ x"`pwd`" = x"/" ]; then
+case "$0" in
+       /*/all)
+               export d0="${0%/all}"
+               ;;
+       */all)
+               export d0="$d00/${0%/all}"
+               ;;
+       */all.xonotic.sh)
+               ;;
+       *)
                $ECHO "Cannot find myself."
                $ECHO "Please run this script with the working directory inside a Xonotic checkout."
-               exit 1
-       fi
-       cd ..
-done
-export d0=`pwd`
+               ;;
+esac
+cd "$d0"
+d0=`pwd`
 SELF="$d0/all"
 
 # If we are on WINDOWS:
index bdf9aaf106f4b1e8d4df4559146cda21a7c93565..2fff41d242b9ecd0a762a2c9713bf5273609de36 100755 (executable)
@@ -1,9 +1,9 @@
-Copyright 2011-2015 Severin Meyer <sev.ch@web.de>
+Copyright 2011-2016 Severin Meyer <sev.ch@web.de>
 
 
 This is a special GPL version of the Xolonium font,
 intended for Xonotic. Find the public release at
-<http://openfontlibrary.org/font/xolonium>
+<http://fontlibrary.org/font/xolonium>
 
 
 This font is free software. You can redistribute and/or
index 2676016806c1cf0ddceae99b80cf1ea4d92f9224..cdcbb2870a1860999553482ef5b7e871fc419f8e 100644 (file)
Binary files a/data/font-xolonium.pk3dir/fonts/xolonium-bold.otf and b/data/font-xolonium.pk3dir/fonts/xolonium-bold.otf differ
index 18b1c5e9e45427d947f389c4277908e2d3d6c543..0d22516e19fd2f6d1106636e6505f8e68befe03e 100644 (file)
Binary files a/data/font-xolonium.pk3dir/fonts/xolonium-regular.otf and b/data/font-xolonium.pk3dir/fonts/xolonium-regular.otf differ
diff --git a/default.nix b/default.nix
new file mode 100644 (file)
index 0000000..c523b56
--- /dev/null
@@ -0,0 +1,2 @@
+{ pkgs ? import <nixpkgs> {}, cc ? null }@args:
+pkgs.callPackage ./derivation.nix args
diff --git a/derivation.nix b/derivation.nix
new file mode 100644 (file)
index 0000000..d036571
--- /dev/null
@@ -0,0 +1,587 @@
+# nix-shell -A shell
+# ./nix-build.sh -A xonotic
+# --argstr cc clang
+# for it in $(./nix-build.sh -A dockerImage --no-out-link); do docker load -i $it; done
+{
+    pkgs, lib,
+    cc ? null,
+    cmake ? pkgs.cmake_2_8,
+}:
+let
+    VERSION = "0.8.2";
+
+    x = {
+        # https://gitlab.com/xonotic/xonotic
+        srcs."xonotic" = localFilesMain ./.;
+        vers."xonotic" = "${VERSION}";
+
+        srcs."data/font-dejavu" = localFiles ./data/font-dejavu.pk3dir;
+        vers."data/font-dejavu" = "xonotic-${VERSION}";
+
+        srcs."data/font-nimbussansl" = localFiles ./data/font-nimbussansl.pk3dir;
+        vers."data/font-nimbussansl" = "xonotic-${VERSION}";
+
+        srcs."data/font-unifont" = localFiles ./data/font-unifont.pk3dir;
+        vers."data/font-unifont" = "xonotic-${VERSION}";
+
+        srcs."data/font-xolonium" = localFiles ./data/font-xolonium.pk3dir;
+        vers."data/font-xolonium" = "xonotic-${VERSION}";
+
+
+        # https://gitlab.com/xonotic/d0_blind_id
+        srcs."d0_blind_id" = localFiles ./d0_blind_id;
+        vers."d0_blind_id" = "xonotic-${VERSION}";
+
+
+        # https://gitlab.com/xonotic/darkplaces
+        srcs."darkplaces" = localFiles ./darkplaces;
+        vers."darkplaces" = "xonotic-${VERSION}";
+
+
+        # https://gitlab.com/xonotic/gmqcc
+        srcs."gmqcc" = localFiles ./gmqcc;
+        vers."gmqcc" = "xonotic-${VERSION}";
+
+
+        # https://gitlab.com/xonotic/netradiant
+        srcs."netradiant" = localFiles ./netradiant;
+        vers."netradiant" = "xonotic-${VERSION}";
+
+
+        # https://gitlab.com/xonotic/xonotic-data.pk3dir
+        srcs."data/xonotic-data" = localFilesCustom ./data/xonotic-data.pk3dir (name: type: type == "directory" || !(isCode name));
+        vers."data/xonotic-data" = builtins.getEnv "VERSION_data_xonotic_data_pk3dir";
+
+        srcs."data/xonotic-data/qcsrc" = localFilesCustom ./data/xonotic-data.pk3dir (name: type: type == "directory" || (isCode name));
+        vers."data/xonotic-data/qcsrc" = vers."data/xonotic-data";
+
+
+        # https://gitlab.com/xonotic/xonotic-maps.pk3dir
+        srcs."data/xonotic-maps" = localFiles ./data/xonotic-maps.pk3dir;
+        vers."data/xonotic-maps" = "${VERSION}";
+
+        # https://gitlab.com/xonotic/xonotic-music.pk3dir
+        srcs."data/xonotic-music" = localFiles ./data/xonotic-music.pk3dir;
+        vers."data/xonotic-music" = "${VERSION}";
+
+        # https://gitlab.com/xonotic/xonotic-nexcompat.pk3dir
+        srcs."data/xonotic-nexcompat" = localFiles ./data/xonotic-nexcompat.pk3dir;
+        vers."data/xonotic-nexcompat" = "${VERSION}";
+    };
+    inherit (x) srcs vers;
+
+    localFilesMain = src: let
+        project = toString ./.;
+        cleanSourceFilterMain = name: type: let
+            baseName = baseNameOf (toString name);
+            result = (cleanSourceFilter name type)
+                && !(name == "${project}/release")
+                && !(name == "${project}/d0_blind_id")
+                && !(name == "${project}/daemon")
+                && !(name == "${project}/darkplaces")
+                && !(name == "${project}/data")
+                && !(name == "${project}/gmqcc")
+                && !(name == "${project}/netradiant")
+                && !(name == "${project}/wiki" || name == "${project}/wiki.yes")
+                && !(name == "${project}/xonstat" || name == "${project}/xonstat.yes")
+            ;
+        in result;
+    in builtins.filterSource cleanSourceFilterMain src;
+
+    isCode = name: let
+        baseName = baseNameOf (toString name);
+        result = !(false
+            || (lib.hasSuffix ".ase" baseName)
+            || (lib.hasSuffix ".dem" baseName)
+            || (lib.hasSuffix ".dpm" baseName)
+            || (lib.hasSuffix ".framegroups" baseName)
+            || (lib.hasSuffix ".iqm" baseName)
+            || (lib.hasSuffix ".jpg" baseName)
+            || (lib.hasSuffix ".lmp" baseName)
+            || (lib.hasSuffix ".md3" baseName)
+            || (lib.hasSuffix ".mdl" baseName)
+            || (lib.hasSuffix ".obj" baseName)
+            || (lib.hasSuffix ".ogg" baseName)
+            || (lib.hasSuffix ".png" baseName)
+            || (lib.hasSuffix ".shader" baseName)
+            || (lib.hasSuffix ".skin" baseName)
+            || (lib.hasSuffix ".sounds" baseName)
+            || (lib.hasSuffix ".sp2" baseName)
+            || (lib.hasSuffix ".spr" baseName)
+            || (lib.hasSuffix ".spr32" baseName)
+            || (lib.hasSuffix ".svg" baseName)
+            || (lib.hasSuffix ".tga" baseName)
+            || (lib.hasSuffix ".wav" baseName)
+            || (lib.hasSuffix ".width" baseName)
+            || (lib.hasSuffix ".zym" baseName)
+        );
+    in result;
+
+    pk3 = drv: mkDerivation {
+        name = "${drv.name}.pk3";
+        version = drv.version;
+
+        nativeBuildInputs = with pkgs; [
+            zip
+        ];
+
+        phases = [ "installPhase" ];
+        installPhase = ''
+            (cd ${drv} && zip -r ${drv.pk3args or ""} $out .)
+        '';
+    };
+
+    targets = rec {
+        font-dejavu = mkDerivation rec {
+            name = "font-dejavu-${version}";
+            version = vers."data/font-dejavu";
+
+            src = srcs."data/font-dejavu";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                cp -r $src $out
+            '';
+        };
+
+        font-nimbussansl = mkDerivation rec {
+            name = "font-nimbussansl-${version}";
+            version = vers."data/font-nimbussansl";
+
+            src = srcs."data/font-nimbussansl";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                cp -r $src $out
+            '';
+        };
+
+        font-unifont = mkDerivation rec {
+            name = "font-unifont-${version}";
+            version = vers."data/font-unifont";
+
+            src = srcs."data/font-unifont";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                cp -r $src $out
+            '';
+        };
+
+        font-xolonium = mkDerivation rec {
+            name = "font-xolonium-${version}";
+            version = vers."data/font-xolonium";
+
+            src = srcs."data/font-xolonium";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                cp -r $src $out
+            '';
+        };
+
+        d0_blind_id = mkDerivation rec {
+            name = "d0_blind_id-${version}";
+            version = vers."d0_blind_id";
+
+            src = srcs."d0_blind_id";
+
+            nativeBuildInputs = [
+                cmake
+            ];
+
+            buildInputs = with pkgs; [
+                openssl
+            ];
+
+            installPhase = ''
+                mkdir -p $out/lib
+                mkdir -p $out/include/d0_blind_id
+
+                cp libd0_blind_id.so $out/lib
+                (cd $src; cp d0.h d0_blind_id.h $out/include/d0_blind_id)
+
+                cp libd0_rijndael.so $out/lib
+                (cd $src; cp d0_rijndael.h $out/include/d0_blind_id)
+            '';
+        };
+
+        darkplaces = let
+            unwrapped = mkDerivation rec {
+                name = "darkplaces-unwrapped-${version}";
+                version = vers."darkplaces";
+
+                src = srcs."darkplaces";
+
+                nativeBuildInputs = [
+                    cmake
+                ];
+
+                buildInputs = with pkgs; [
+                    SDL2
+
+                    zlib
+                    libjpeg
+                ];
+
+                installPhase = ''
+                    mkdir -p $out/bin
+                    cp darkplaces-{dedicated,sdl} $out/bin
+                '';
+            };
+            result = mkDerivation rec {
+                name = "darkplaces-${version}";
+                version = vers."darkplaces";
+
+                buildInputs = unwrapped.buildInputs ++ runtimeInputs;
+                runtimeInputs = with pkgs; [
+                    d0_blind_id
+
+                    freetype
+
+                    curl
+                    zlib
+
+                    libjpeg
+                    libpng
+
+                    libogg
+                    libtheora
+                    libvorbis
+                ];
+
+                phases = [ "installPhase" ];
+                installPhase = ''
+                    mkdir -p $out/bin
+
+                    cp -r ${unwrapped}/bin .
+                    chmod +w bin/*
+                    cd bin
+
+                    for exe in dedicated sdl; do
+                        f=darkplaces-$exe
+                        rpath=$(patchelf --print-rpath $f)
+                        rpath=''${rpath:+$rpath:}${lib.makeLibraryPath runtimeInputs}
+                        patchelf --set-rpath $rpath $f
+                        cp $f $out/bin/xonotic-linux64-$exe
+                    done
+                '';
+            };
+        in result;
+
+        gmqcc = mkDerivation rec {
+            name = "gmqcc-${version}";
+            version = vers."gmqcc";
+
+            src = srcs."gmqcc";
+
+            nativeBuildInputs = [
+                cmake
+            ];
+
+            installPhase = ''
+                mkdir -p $out/bin
+                cp gmqcc $out/bin
+            '';
+        };
+
+        netradiant = mkDerivation rec {
+            name = "netradiant-${version}";
+            version = vers."netradiant";
+
+            src = srcs."netradiant";
+
+            nativeBuildInputs = with pkgs; [
+                cmake
+                git
+            ];
+
+            buildInputs = with pkgs; [
+                pkgconfig
+                glib
+                pcre
+                libxml2
+                ncurses
+                libjpeg
+                libpng
+                minizip
+
+                mesa
+
+                xorg.libXt
+                xorg.libXmu
+                xorg.libSM
+                xorg.libICE
+                xorg.libpthreadstubs
+                xorg.libXdmcp
+
+                gnome2.gtk
+                gnome2.gtkglext
+                gnome3.gtk
+            ];
+        };
+
+        xonotic-data = mkDerivation rec {
+            name = "xonotic-data-${version}";
+            version = vers."data/xonotic-data";
+
+            src = srcs."data/xonotic-data";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                mkdir $out
+                cp -r $src/. $out
+                chmod -R +w $out
+                find $out -depth -type d -empty -exec rmdir {} \;
+            '';
+        };
+
+        xonotic-data-code = mkDerivation rec {
+            name = "xonotic-data-code-${version}";
+            version = vers."data/xonotic-data/qcsrc";
+
+            src = srcs."data/xonotic-data/qcsrc";
+
+            env = {
+                QCC = "${gmqcc}/bin/gmqcc";
+                VERSION = version;
+            };
+
+            nativeBuildInputs = with pkgs; [
+                cmake
+                git
+            ];
+
+            installPhase = ''
+                mkdir $out
+                cp -r $src/. $out
+                chmod -R +w $out
+                cp {menu,progs,csprogs}.{dat,lno} $out
+                cp csprogs-${version}.{dat,lno,txt} $out/.tmp
+                find $out -depth -type d -empty -exec rmdir {} \;
+            '';
+
+            passthru.csprogs = pkgs.runCommand "xonotic-data-csprogs-${version}" { inherit version; pk3name = "csprogs-${version}"; } ''
+                mkdir $out
+                cp ${xonotic-data-code}/.tmp/csprogs-${version}.{dat,lno,txt} $out
+            '';
+        };
+
+        # todo: build
+        xonotic-maps = mkDerivation rec {
+            name = "xonotic-maps-${version}";
+            version = vers."data/xonotic-maps";
+
+            src = srcs."data/xonotic-maps";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                mkdir $out
+                cp -r $src/. $out
+            '';
+
+            passthru.dance = mkDerivation rec {
+                name = "dance";
+                version = vers."data/xonotic-maps";
+
+                src = pkgs.fetchurl {
+                    url = http://beta.xonotic.org/autobuild-bsp/dance-full-88c416b8c11bdcecfdb889af2a2b97b4c0e2b8de-319ee7234504199da56f07ce25185f6d6cb889cd.pk3;
+                    sha256 = "1jgdg4mz56kbxcy3mwn4h5qlf3ahm1cmarp9l70fz9nfn6cnaknq";
+                };
+
+                phases = [ "installPhase" ];
+
+                installPhase = ''
+                    mkdir -p $out
+                    cd $out
+                    ${pkgs.unzip}/bin/unzip $src
+                '';
+            };
+        };
+
+        xonotic-music = mkDerivation rec {
+            name = "xonotic-music-${version}";
+            version = vers."data/xonotic-music";
+
+            src = srcs."data/xonotic-music";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                mkdir $out
+                cp -r $src/. $out
+            '';
+
+            passthru.pk3args = "-0";
+        };
+
+        xonotic-nexcompat = mkDerivation rec {
+            name = "xonotic-nexcompat-${version}";
+            version = vers."data/xonotic-nexcompat";
+
+            src = srcs."data/xonotic-nexcompat";
+
+            phases = [ "installPhase" ];
+            installPhase = ''
+                mkdir $out
+                cp -r $src/. $out
+            '';
+        };
+
+        xonotic-keys = mkDerivation rec {
+            name = "xonotic-keys-${version}";
+            version = vers."xonotic";
+
+            src = srcs."xonotic";
+
+            phases = [ "installPhase" ];
+
+            installPhase = ''
+                mkdir $out
+                cp $src/*.d0pk $out
+            '';
+        };
+
+        xonotic = mkDerivation rec {
+            name = "xonotic-${version}";
+            version = vers."xonotic";
+
+            src = srcs."xonotic";
+
+            env = {
+                XON_NO_DAEMON = "1";
+            };
+
+            passthru.paks = {
+                inherit
+                    font-dejavu
+                    font-nimbussansl
+                    font-unifont
+                    font-xolonium
+                    xonotic-data
+                    xonotic-data-code
+                    xonotic-maps
+                    xonotic-music
+                    xonotic-nexcompat
+                ;
+                xonotic-data-csprogs = xonotic-data-code.passthru.csprogs;
+                inherit (xonotic-maps)
+                    dance
+                ;
+            };
+
+            phases = [ "installPhase" ];
+
+            installPhase = ''
+                mkdir $out
+                cp -r $src/. $out
+                cp ${darkplaces}/bin/* $out
+
+                mkdir -p $out/data
+                ${lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v:
+                    # "cp ${pk3 v} $out/data/${k}.pk3"
+                    "ln -s ${v} $out/data/${k}.pk3dir"
+                ) passthru.paks)}
+
+                mkdir -p $out/mapping
+                ln -s ${netradiant} $out/mapping/${netradiant.name}
+            '';
+        };
+
+        dockerImage = let
+            main = pkgs.dockerTools.buildImage {
+                name = "xonotic";
+                tag = VERSION;
+                contents = mkDerivation {
+                    name = "xonotic-init";
+                    phases = [ "installPhase" ];
+                    installPhase = ''
+                        mkdir -p $out
+                        cat > $out/init <<EOF
+                        #!${stdenv.shell}
+                        ${pkgs.coreutils}/bin/ln -s ${xonotic-keys}/* /
+
+                        ${pkgs.coreutils}/bin/ls -l /
+                        ${pkgs.coreutils}/bin/ls -l /data
+
+                        exec ${darkplaces}/bin/xonotic-linux64-dedicated "\''${@}"
+                        EOF
+                        chmod +x $out/init
+                    '';
+                };
+                config.Entrypoint = "/init";
+            };
+            unpackImage = { name, from, to }: pkgs.dockerTools.buildImage {
+                name = "xonotic_${name}";
+                tag = VERSION;
+                contents = mkDerivation {
+                    name = "xonotic-${name}-init";
+                    phases = [ "installPhase" ];
+                    installPhase = ''
+                        mkdir -p $out
+                        cat > $out/init <<EOF
+                        #!${stdenv.shell}
+                        ${pkgs.coreutils}/bin/cp -r ${from} /data/${to}
+                        EOF
+                        chmod +x $out/init
+                    '';
+                };
+                config.Entrypoint = "/init";
+                fromImage = pkgs.dockerTools.buildImage {
+                    name = "xonotic_deps";
+                    contents = mkDerivation {
+                        name = "xonotic_deps";
+                        phases = [ "installPhase" ];
+                        installPhase = ''
+                            mkdir -p $out
+                            cat > $out/init <<EOF
+                            ${stdenv.shell}
+                            ${pkgs.coreutils}
+                            EOF
+                        '';
+                    };
+                };
+            };
+        in { main = main; }
+            // (lib.mapAttrs (k: v: unpackImage { name = k; from = pk3 v; to = "${v.pk3name or k}.pk3"; }) xonotic.paks)
+        ;
+    };
+
+    cleanSourceFilter = name: type: let
+        baseName = baseNameOf (toString name);
+        result = (lib.cleanSourceFilter name type)
+            && !(lib.hasSuffix ".nix" baseName)
+            && !(type == "directory" && baseName == ".git")
+            && !(type == "directory" && baseName == ".idea")
+            && !(type == "directory" && (lib.hasPrefix "cmake-build-" baseName))
+        ;
+    in result;
+
+    localFilesCustom = src: filter:
+        builtins.filterSource (name: type: (cleanSourceFilter name type) && (filter name type)) src
+    ;
+
+    localFiles = src: localFilesCustom src (name: type: true);
+
+    stdenv = if (cc == null) then pkgs.stdenv
+            else pkgs.overrideCC pkgs.stdenv pkgs."${cc}";
+
+    mkDerivation = {env ? {}, shellHook ? "", runtimeInputs ? [], ...}@args: stdenv.mkDerivation ({}
+        // { enableParallelBuilding = true; }
+        // (removeAttrs args ["env" "shellHook" "runtimeInputs"])
+        // env
+        // {
+            shellHook = ''
+                ${shellHook}
+                ${lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "export ${n}=${v}") env)}
+                export LD_LIBRARY_PATH=''${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${lib.makeLibraryPath runtimeInputs}
+            '';
+        }
+    );
+
+    shell = let inputs = (lib.mapAttrsToList (k: v: v) targets); in stdenv.mkDerivation (rec {
+        name = "xonotic-shell";
+        nativeBuildInputs = builtins.map (it: it.nativeBuildInputs) (builtins.filter (it: it?nativeBuildInputs) inputs);
+        buildInputs = builtins.map (it: it.buildInputs) (builtins.filter (it: it?buildInputs) inputs);
+        shellHook = builtins.map (it: it.shellHook) (builtins.filter (it: it?shellHook) inputs);
+    });
+in { inherit shell; } // targets
index ee92e116320912d691f4e7e5615a90627ada36a3..86e0cf0b9929fe7e8a916ffd7407705728e755ee 100755 (executable)
@@ -39,15 +39,15 @@ while test $# -gt 0; do
       echo $exec_prefix
       ;;
     --version)
-      echo 2.0.4
+      echo 2.0.5
       ;;
     --cflags)
       echo -I${prefix}/include/SDL2  -Dmain=SDL_main
       ;;
-#   --libs)
-#     echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows
-#     ;;
-#   --static-libs)
+#    --libs)
+#      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows
+#      ;;
+#    --static-libs)
     --libs|--static-libs)
       echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows  -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
       ;;
index 7647b5111e1fe97548e3c918eaa5f5e67e866c10..1a3fa285cdd9c2c234389784f0585e7df31fd53c 100644 (file)
@@ -72,14 +72,14 @@ extern "C" {
  *  specify the subsystems which you will be using in your application.
  */
 /* @{ */
-#define SDL_INIT_TIMER          0x00000001
-#define SDL_INIT_AUDIO          0x00000010
-#define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
-#define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
-#define SDL_INIT_HAPTIC         0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS         0x00004000
-#define SDL_INIT_NOPARACHUTE    0x00100000  /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER          0x00000001u
+#define SDL_INIT_AUDIO          0x00000010u
+#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC         0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS         0x00004000u
+#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */
 #define SDL_INIT_EVERYTHING ( \
                 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
@@ -95,8 +95,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
  *  This function initializes specific SDL subsystems
  *
  *  Subsystem initialization is ref-counted, you must call
- *  SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
- *  shutdown a subsystem manually (or call SDL_Quit to force shutdown).
+ *  SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
+ *  shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
  *  If a subsystem is already loaded then this call will
  *  increase the ref-count and return.
  */
index 4f6552146891c79027a5577632e95cfa7eaf82d9..d51f0d1ce2b461648fe17f9c8b4b453a0ed73a1d 100644 (file)
@@ -278,7 +278,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
  *      protect data structures that it accesses by calling SDL_LockAudio()
  *      and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL
  *      pointer here, and call SDL_QueueAudio() with some frequency, to queue
- *      more audio samples to be played.
+ *      more audio samples to be played (or for capture devices, call
+ *      SDL_DequeueAudio() with some frequency, to obtain audio samples).
  *    - \c desired->userdata is passed as the first parameter to your callback
  *      function. If you passed a NULL callback, this value is ignored.
  *
@@ -482,6 +483,10 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
 /**
  *  Queue more audio on non-callback devices.
  *
+ *  (If you are looking to retrieve queued audio from a non-callback capture
+ *  device, you want SDL_DequeueAudio() instead. This will return -1 to
+ *  signify an error if you use it with capture devices.)
+ *
  *  SDL offers two ways to feed audio to the device: you can either supply a
  *  callback that SDL triggers with some frequency to obtain more audio
  *  (pull method), or you can supply no callback, and then SDL will expect
@@ -516,21 +521,76 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
  */
 extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
 
+/**
+ *  Dequeue more audio on non-callback devices.
+ *
+ *  (If you are looking to queue audio for output on a non-callback playback
+ *  device, you want SDL_QueueAudio() instead. This will always return 0
+ *  if you use it with playback devices.)
+ *
+ *  SDL offers two ways to retrieve audio from a capture device: you can
+ *  either supply a callback that SDL triggers with some frequency as the
+ *  device records more audio data, (push method), or you can supply no
+ *  callback, and then SDL will expect you to retrieve data at regular
+ *  intervals (pull method) with this function.
+ *
+ *  There are no limits on the amount of data you can queue, short of
+ *  exhaustion of address space. Data from the device will keep queuing as
+ *  necessary without further intervention from you. This means you will
+ *  eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ *  Capture devices will not queue data when paused; if you are expecting
+ *  to not need captured audio for some length of time, use
+ *  SDL_PauseAudioDevice() to stop the capture device from queueing more
+ *  data. This can be useful during, say, level loading times. When
+ *  unpaused, capture devices will start queueing data from that point,
+ *  having flushed any capturable data available while paused.
+ *
+ *  This function is thread-safe, but dequeueing from the same device from
+ *  two threads at once does not promise which thread will dequeued data
+ *  first.
+ *
+ *  You may not dequeue audio from a device that is using an
+ *  application-supplied callback; doing so returns an error. You have to use
+ *  the audio callback, or dequeue audio with this function, but not both.
+ *
+ *  You should not call SDL_LockAudio() on the device before queueing; SDL
+ *  handles locking internally for this function.
+ *
+ *  \param dev The device ID from which we will dequeue audio.
+ *  \param data A pointer into where audio data should be copied.
+ *  \param len The number of bytes (not samples!) to which (data) points.
+ *  \return number of bytes dequeued, which could be less than requested.
+ *
+ *  \sa SDL_GetQueuedAudioSize
+ *  \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
+
 /**
  *  Get the number of bytes of still-queued audio.
  *
- *  This is the number of bytes that have been queued for playback with
- *  SDL_QueueAudio(), but have not yet been sent to the hardware.
+ *  For playback device:
+ *
+ *    This is the number of bytes that have been queued for playback with
+ *    SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ *    number may shrink at any time, so this only informs of pending data.
+ *
+ *    Once we've sent it to the hardware, this function can not decide the
+ *    exact byte boundary of what has been played. It's possible that we just
+ *    gave the hardware several kilobytes right before you called this
+ *    function, but it hasn't played any of it yet, or maybe half of it, etc.
+ *
+ *  For capture devices:
  *
- *  Once we've sent it to the hardware, this function can not decide the exact
- *  byte boundary of what has been played. It's possible that we just gave the
- *  hardware several kilobytes right before you called this function, but it
- *  hasn't played any of it yet, or maybe half of it, etc.
+ *    This is the number of bytes that have been captured by the device and
+ *    are waiting for you to dequeue. This number may grow at any time, so
+ *    this only informs of the lower-bound of available data.
  *
  *  You may not queue audio on a device that is using an application-supplied
  *  callback; calling this function on such a device always returns 0.
- *  You have to use the audio callback or queue audio with SDL_QueueAudio(),
- *  but not both.
+ *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ *  the audio callback, but not both.
  *
  *  You should not call SDL_LockAudio() on the device before querying; SDL
  *  handles locking internally for this function.
@@ -544,10 +604,17 @@ extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *da
 extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
 
 /**
- *  Drop any queued audio data waiting to be sent to the hardware.
+ *  Drop any queued audio data. For playback devices, this is any queued data
+ *  still waiting to be submitted to the hardware. For capture devices, this
+ *  is any data that was queued by the device that hasn't yet been dequeued by
+ *  the application.
  *
- *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- *  the hardware will start playing silence if more audio isn't queued.
+ *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ *  playback devices, the hardware will start playing silence if more audio
+ *  isn't queued. Unpaused capture devices will start filling the queue again
+ *  as soon as they have more data available (which, depending on the state
+ *  of the hardware and the thread, could be before this function call
+ *  returns!).
  *
  *  This will not prevent playback of queued audio that's already been sent
  *  to the hardware, as we can not undo that, so expect there to be some
@@ -557,8 +624,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
  *
  *  You may not queue audio on a device that is using an application-supplied
  *  callback; calling this function on such a device is always a no-op.
- *  You have to use the audio callback or queue audio with SDL_QueueAudio(),
- *  but not both.
+ *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ *  the audio callback, but not both.
  *
  *  You should not call SDL_LockAudio() on the device before clearing the
  *  queue; SDL handles locking internally for this function.
index 890986cc4e63ae6c593941f1defa9b1cf8c52d76..e5edc96bf1f3b501a45fe6ae77bc7b8f15224ca9 100644 (file)
@@ -1,3 +1,4 @@
+/* include/SDL_config.h.  Generated from SDL_config.h.in by configure.  */
 /*
   Simple DirectMedia Layer
   Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
   3. This notice may not be removed or altered from any source distribution.
 */
 
-#ifndef _SDL_config_windows_h
-#define _SDL_config_windows_h
+#ifndef _SDL_config_h
+#define _SDL_config_h
 
+/**
+ *  \file SDL_config.h.in
+ *
+ *  This is a set of defines to configure the SDL features
+ */
+
+/* General platform specific identifiers */
 #include "SDL_platform.h"
 
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H   1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
+/* Make sure that this isn't included by Visual C++ */
+#ifdef _MSC_VER
+#error You should run hg revert SDL_config.h 
 #endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
 
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
+/* C language features */
+/* #undef const */
+/* #undef inline */
+/* #undef volatile */
+
+/* C datatypes */
+#ifdef __LP64__
+#define SIZEOF_VOIDP 8
 #else
-# define SIZEOF_VOIDP 4
+#define SIZEOF_VOIDP 4
 #endif
+#define HAVE_GCC_ATOMICS 1
+/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
 
 #define HAVE_DDRAW_H 1
 #define HAVE_DINPUT_H 1
@@ -82,140 +57,308 @@ typedef unsigned int uintptr_t;
 #define HAVE_DXGI_H 1
 #define HAVE_XINPUT_H 1
 
-/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
-#ifdef HAVE_LIBC
+/* Comment this if you want to build without any C library requirements */
+#define HAVE_LIBC 1
+#if HAVE_LIBC
+
 /* Useful headers */
+/* #undef HAVE_ALLOCA_H */
+#define HAVE_SYS_TYPES_H 1
 #define HAVE_STDIO_H 1
 #define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
 #define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
 #define HAVE_CTYPE_H 1
 #define HAVE_MATH_H 1
+/* #undef HAVE_ICONV_H */
 #define HAVE_SIGNAL_H 1
+/* #undef HAVE_ALTIVEC_H */
+/* #undef HAVE_PTHREAD_NP_H */
+/* #undef HAVE_LIBUDEV_H */
+/* #undef HAVE_DBUS_DBUS_H */
+/* #undef HAVE_IBUS_IBUS_H */
+/* #undef HAVE_FCITX_FRONTEND_H */
 
 /* C library functions */
 #define HAVE_MALLOC 1
 #define HAVE_CALLOC 1
 #define HAVE_REALLOC 1
 #define HAVE_FREE 1
-#define HAVE_ALLOCA 1
+/* #undef HAVE_ALLOCA */
+#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
+#define HAVE_GETENV 1
+/* #undef HAVE_SETENV */
+#define HAVE_PUTENV 1
+/* #undef HAVE_UNSETENV */
+#endif
 #define HAVE_QSORT 1
 #define HAVE_ABS 1
+/* #undef HAVE_BCOPY */
 #define HAVE_MEMSET 1
 #define HAVE_MEMCPY 1
 #define HAVE_MEMMOVE 1
 #define HAVE_MEMCMP 1
 #define HAVE_STRLEN 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+#define HAVE_STRDUP 1
 #define HAVE__STRREV 1
 #define HAVE__STRUPR 1
 #define HAVE__STRLWR 1
+/* #undef HAVE_INDEX */
+/* #undef HAVE_RINDEX */
 #define HAVE_STRCHR 1
 #define HAVE_STRRCHR 1
 #define HAVE_STRSTR 1
+#define HAVE_ITOA 1
 #define HAVE__LTOA 1
+/* #undef HAVE__UITOA */
 #define HAVE__ULTOA 1
 #define HAVE_STRTOL 1
 #define HAVE_STRTOUL 1
+#define HAVE__I64TOA 1
+#define HAVE__UI64TOA 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
 #define HAVE_STRTOD 1
 #define HAVE_ATOI 1
 #define HAVE_ATOF 1
 #define HAVE_STRCMP 1
 #define HAVE_STRNCMP 1
 #define HAVE__STRICMP 1
+#define HAVE_STRCASECMP 1
 #define HAVE__STRNICMP 1
+#define HAVE_STRNCASECMP 1
+/* #undef HAVE_SSCANF */
+#define HAVE_VSSCANF 1
+/* #undef HAVE_SNPRINTF */
+#define HAVE_VSNPRINTF 1
+#define HAVE_M_PI /**/
 #define HAVE_ATAN 1
 #define HAVE_ATAN2 1
-#define HAVE_ACOS  1
-#define HAVE_ASIN  1
+#define HAVE_ACOS 1
+#define HAVE_ASIN 1
 #define HAVE_CEIL 1
+#define HAVE_COPYSIGN 1
 #define HAVE_COS 1
 #define HAVE_COSF 1
 #define HAVE_FABS 1
 #define HAVE_FLOOR 1
 #define HAVE_LOG 1
 #define HAVE_POW 1
+#define HAVE_SCALBN 1
 #define HAVE_SIN 1
 #define HAVE_SINF 1
 #define HAVE_SQRT 1
 #define HAVE_SQRTF 1
 #define HAVE_TAN 1
 #define HAVE_TANF 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
+#define HAVE_FSEEKO 1
+#define HAVE_FSEEKO64 1
+/* #undef HAVE_SIGACTION */
+/* #undef HAVE_SA_SIGACTION */
+/* #undef HAVE_SETJMP */
+#define HAVE_NANOSLEEP 1
+/* #undef HAVE_SYSCONF */
+/* #undef HAVE_SYSCTLBYNAME */
+/* #undef HAVE_CLOCK_GETTIME */
+/* #undef HAVE_GETPAGESIZE */
+/* #undef HAVE_MPROTECT */
+/* #undef HAVE_ICONV */
+/* #undef HAVE_PTHREAD_SETNAME_NP */
+/* #undef HAVE_PTHREAD_SET_NAME_NP */
+/* #undef HAVE_SEM_TIMEDWAIT */
+
 #else
-#define HAVE_STDARG_H   1
-#define HAVE_STDDEF_H   1
-#endif
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 1
+#endif /* HAVE_LIBC */
+
+/* SDL internal assertion support */
+/* #undef SDL_DEFAULT_ASSERT_LEVEL */
+
+/* Allow disabling of core subsystems */
+/* #undef SDL_ATOMIC_DISABLED */
+/* #undef SDL_AUDIO_DISABLED */
+/* #undef SDL_CPUINFO_DISABLED */
+/* #undef SDL_EVENTS_DISABLED */
+/* #undef SDL_FILE_DISABLED */
+/* #undef SDL_JOYSTICK_DISABLED */
+/* #undef SDL_HAPTIC_DISABLED */
+/* #undef SDL_LOADSO_DISABLED */
+/* #undef SDL_RENDER_DISABLED */
+/* #undef SDL_THREADS_DISABLED */
+/* #undef SDL_TIMERS_DISABLED */
+/* #undef SDL_VIDEO_DISABLED */
+/* #undef SDL_POWER_DISABLED */
+/* #undef SDL_FILESYSTEM_DISABLED */
 
 /* Enable various audio drivers */
+/* #undef SDL_AUDIO_DRIVER_ALSA */
+/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_ARTS */
+/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_HAIKU */
+/* #undef SDL_AUDIO_DRIVER_BSD */
+/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+/* #undef SDL_AUDIO_DRIVER_ANDROID */
+/* #undef SDL_AUDIO_DRIVER_XAUDIO2 */
 #define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2    1
-#define SDL_AUDIO_DRIVER_WINMM  1
-#define SDL_AUDIO_DRIVER_DISK   1
-#define SDL_AUDIO_DRIVER_DUMMY  1
+/* #undef SDL_AUDIO_DRIVER_ESD */
+/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_NACL */
+/* #undef SDL_AUDIO_DRIVER_NAS */
+/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_SNDIO */
+/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_OSS */
+/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
+/* #undef SDL_AUDIO_DRIVER_PAUDIO */
+/* #undef SDL_AUDIO_DRIVER_QSA */
+/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
+#define SDL_AUDIO_DRIVER_WINMM 1
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
 
 /* Enable various input drivers */
+/* #undef SDL_INPUT_LINUXEV */
+/* #undef SDL_INPUT_LINUXKD */
+/* #undef SDL_INPUT_TSLIB */
+/* #undef SDL_JOYSTICK_HAIKU */
 #define SDL_JOYSTICK_DINPUT 1
 #define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT   1
-#define SDL_HAPTIC_XINPUT   1
+/* #undef SDL_JOYSTICK_DUMMY */
+/* #undef SDL_JOYSTICK_IOKIT */
+/* #undef SDL_JOYSTICK_LINUX */
+/* #undef SDL_JOYSTICK_ANDROID */
+/* #undef SDL_JOYSTICK_WINMM */
+/* #undef SDL_JOYSTICK_USBHID */
+/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
+/* #undef SDL_JOYSTICK_EMSCRIPTEN */
+/* #undef SDL_HAPTIC_DUMMY */
+/* #undef SDL_HAPTIC_LINUX */
+/* #undef SDL_HAPTIC_IOKIT */
+#define SDL_HAPTIC_DINPUT 1
+#define SDL_HAPTIC_XINPUT 1
 
 /* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS  1
+/* #undef SDL_LOADSO_HAIKU */
+/* #undef SDL_LOADSO_DLOPEN */
+/* #undef SDL_LOADSO_DUMMY */
+/* #undef SDL_LOADSO_LDG */
+#define SDL_LOADSO_WINDOWS 1
 
 /* Enable various threading systems */
-#define SDL_THREAD_WINDOWS  1
+/* #undef SDL_THREAD_PTHREAD */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
+#define SDL_THREAD_WINDOWS 1
 
 /* Enable various timer systems */
-#define SDL_TIMER_WINDOWS   1
+/* #undef SDL_TIMER_HAIKU */
+/* #undef SDL_TIMER_DUMMY */
+/* #undef SDL_TIMER_UNIX */
+#define SDL_TIMER_WINDOWS 1
 
 /* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY  1
-#define SDL_VIDEO_DRIVER_WINDOWS    1
+/* #undef SDL_VIDEO_DRIVER_HAIKU */
+/* #undef SDL_VIDEO_DRIVER_COCOA */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+/* #undef SDL_VIDEO_DRIVER_WAYLAND */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_MIR */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_X11 */
+/* #undef SDL_VIDEO_DRIVER_RPI */
+/* #undef SDL_VIDEO_DRIVER_ANDROID */
+/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
+/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
+/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
+/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
+/* #undef SDL_VIDEO_DRIVER_X11_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
+/* #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY */
+/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
+/* #undef SDL_VIDEO_DRIVER_NACL */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
 
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D    1
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
+#define SDL_VIDEO_RENDER_D3D 1
+/* #undef SDL_VIDEO_RENDER_D3D11 */
+#define SDL_VIDEO_RENDER_OGL 1
+/* #undef SDL_VIDEO_RENDER_OGL_ES */
+/* #undef SDL_VIDEO_RENDER_OGL_ES2 */
+/* #undef SDL_VIDEO_RENDER_DIRECTFB */
 
 /* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL    1
-#endif
-
+#define SDL_VIDEO_OPENGL 1
+/* #undef SDL_VIDEO_OPENGL_ES */
+/* #undef SDL_VIDEO_OPENGL_ES2 */
+/* #undef SDL_VIDEO_OPENGL_BGL */
+/* #undef SDL_VIDEO_OPENGL_CGL */
+/* #undef SDL_VIDEO_OPENGL_EGL */
+/* #undef SDL_VIDEO_OPENGL_GLX */
+#define SDL_VIDEO_OPENGL_WGL 1
+/* #undef SDL_VIDEO_OPENGL_OSMESA */
+/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
 
 /* Enable system power support */
+/* #undef SDL_POWER_LINUX */
 #define SDL_POWER_WINDOWS 1
+/* #undef SDL_POWER_MACOSX */
+/* #undef SDL_POWER_HAIKU */
+/* #undef SDL_POWER_ANDROID */
+/* #undef SDL_POWER_EMSCRIPTEN */
+/* #undef SDL_POWER_HARDWIRED */
 
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS  1
+/* Enable system filesystem support */
+/* #undef SDL_FILESYSTEM_HAIKU */
+/* #undef SDL_FILESYSTEM_COCOA */
+/* #undef SDL_FILESYSTEM_DUMMY */
+/* #undef SDL_FILESYSTEM_UNIX */
+#define SDL_FILESYSTEM_WINDOWS 1
+/* #undef SDL_FILESYSTEM_NACL */
+/* #undef SDL_FILESYSTEM_ANDROID */
+/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
 
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES   1
-#endif
+/* Enable assembly routines */
+#define SDL_ASSEMBLY_ROUTINES 1
+/* #undef SDL_ALTIVEC_BLITTERS */
+
+/* Enable ime support */
+/* #undef SDL_USE_IME */
 
-#endif /* _SDL_config_windows_h */
+#endif /* _SDL_config_h */
index 1437f4c7053a9aa29633be3a288654e40cceb5c3..edb89ef49ec52ef5826aa42e328974c7b6b9c0c3 100644 (file)
@@ -136,6 +136,9 @@ typedef enum
 
     /* Drag and drop events */
     SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
+    SDL_DROPTEXT,                 /**< text/plain drag-and-drop event */
+    SDL_DROPBEGIN,                /**< A new set of drops is beginning (NULL filename) */
+    SDL_DROPCOMPLETE,             /**< Current set of drops is now complete (NULL filename) */
 
     /* Audio hotplug events */
     SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
@@ -461,9 +464,10 @@ typedef struct SDL_DollarGestureEvent
  */
 typedef struct SDL_DropEvent
 {
-    Uint32 type;        /**< ::SDL_DROPFILE */
+    Uint32 type;        /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
     Uint32 timestamp;
-    char *file;         /**< The file name, which should be freed with SDL_free() */
+    char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+    Uint32 windowID;    /**< The window that was dropped on, if any */
 } SDL_DropEvent;
 
 
index 42087eea1623db80586d779cfa6b081a95c2a937..e67fd9fd0e9c19cf9239831ca54ac59b3faf650a 100644 (file)
@@ -93,7 +93,7 @@ typedef struct SDL_GameControllerButtonBind
  *      }
  *  }
  *
- *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
  *  guid,name,mappings
  *
  *  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
@@ -136,14 +136,14 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingStr
 /**
  *  Get a mapping string for a GUID
  *
- *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ *  \return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available
  */
 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
 
 /**
  *  Get a mapping string for an open GameController
  *
- *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ *  \return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available
  */
 extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
 
index b36d78b1275a91a63bf7305638f1bc0b995fb90b..9421c8f17752d038fbf04b5903072517159f7050 100644 (file)
@@ -149,7 +149,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_CONSTANT   (1<<0)
+#define SDL_HAPTIC_CONSTANT   (1u<<0)
 
 /**
  *  \brief Sine wave effect supported.
@@ -158,7 +158,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SINE       (1<<1)
+#define SDL_HAPTIC_SINE       (1u<<1)
 
 /**
  *  \brief Left/Right effect supported.
@@ -169,7 +169,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
  *          we ran out of bits, and this is important for XInput devices.
  */
-#define SDL_HAPTIC_LEFTRIGHT     (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT     (1u<<2)
 
 /* !!! FIXME: put this back when we have more bits in 2.1 */
 /* #define SDL_HAPTIC_SQUARE     (1<<2) */
@@ -181,7 +181,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_TRIANGLE   (1<<3)
+#define SDL_HAPTIC_TRIANGLE   (1u<<3)
 
 /**
  *  \brief Sawtoothup wave effect supported.
@@ -190,7 +190,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
 
 /**
  *  \brief Sawtoothdown wave effect supported.
@@ -199,7 +199,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
 
 /**
  *  \brief Ramp effect supported.
@@ -208,7 +208,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticRamp
  */
-#define SDL_HAPTIC_RAMP       (1<<6)
+#define SDL_HAPTIC_RAMP       (1u<<6)
 
 /**
  *  \brief Spring effect supported - uses axes position.
@@ -218,7 +218,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_SPRING     (1<<7)
+#define SDL_HAPTIC_SPRING     (1u<<7)
 
 /**
  *  \brief Damper effect supported - uses axes velocity.
@@ -228,7 +228,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_DAMPER     (1<<8)
+#define SDL_HAPTIC_DAMPER     (1u<<8)
 
 /**
  *  \brief Inertia effect supported - uses axes acceleration.
@@ -238,7 +238,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_INERTIA    (1<<9)
+#define SDL_HAPTIC_INERTIA    (1u<<9)
 
 /**
  *  \brief Friction effect supported - uses axes movement.
@@ -248,14 +248,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_FRICTION   (1<<10)
+#define SDL_HAPTIC_FRICTION   (1u<<10)
 
 /**
  *  \brief Custom effect is supported.
  *
  *  User defined custom haptic effect.
  */
-#define SDL_HAPTIC_CUSTOM     (1<<11)
+#define SDL_HAPTIC_CUSTOM     (1u<<11)
 
 /* @} *//* Haptic effects */
 
@@ -268,7 +268,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticSetGain
  */
-#define SDL_HAPTIC_GAIN       (1<<12)
+#define SDL_HAPTIC_GAIN       (1u<<12)
 
 /**
  *  \brief Device can set autocenter.
@@ -277,7 +277,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticSetAutocenter
  */
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
 
 /**
  *  \brief Device can be queried for effect status.
@@ -286,7 +286,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticGetEffectStatus
  */
-#define SDL_HAPTIC_STATUS     (1<<14)
+#define SDL_HAPTIC_STATUS     (1u<<14)
 
 /**
  *  \brief Device can be paused.
@@ -294,7 +294,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *  \sa SDL_HapticPause
  *  \sa SDL_HapticUnpause
  */
-#define SDL_HAPTIC_PAUSE      (1<<15)
+#define SDL_HAPTIC_PAUSE      (1u<<15)
 
 
 /**
index 3bd5435fb002331dff1a382a9f305878c90b03d2..dd1546431abe02e1d24df8e95f5fca6768773dd0 100644 (file)
@@ -233,16 +233,27 @@ extern "C" {
 #define SDL_HINT_GRAB_KEYBOARD              "SDL_GRAB_KEYBOARD"
 
 /**
-*  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-*  This variable can be set to the following values:
-*    "0"       - Relative mouse mode uses raw input
-*    "1"       - Relative mouse mode uses mouse warping
-*
-*  By default SDL will use raw input for relative mouse mode
-*/
+ *  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Relative mouse mode uses raw input
+ *    "1"       - Relative mouse mode uses mouse warping
+ *
+ *  By default SDL will use raw input for relative mouse mode
+ */
 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    "SDL_MOUSE_RELATIVE_MODE_WARP"
 
+/**
+ *  \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Ignore mouse clicks that activate a window
+ *    "1"       - Generate events for mouse clicks that activate a window
+ *
+ *  By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
 /**
  *  \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
  *
@@ -257,8 +268,8 @@ extern "C" {
  *  this is problematic. This functionality can be disabled by setting this
  *  hint.
  *
- *  As of SDL 2.0.4, SDL_EnableScreenSaver and SDL_DisableScreenSaver accomplish
- *  the same thing on iOS. They should be preferred over this hint.
+ *  As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
+ *  accomplish the same thing on iOS. They should be preferred over this hint.
  *
  *  This variable can be set to the following values:
  *    "0"       - Enable idle timer
@@ -276,7 +287,35 @@ extern "C" {
  *    "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
  */
 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-    
+
+/**
+ *  \brief  A variable controlling whether controllers used with the Apple TV
+ *  generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Controller input does not generate UI events (the default).
+ *    "1"       - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief  A variable controlling whether the Apple TV remote's joystick axes
+ *         will automatically match the rotation of the remote.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Remote orientation does not affect joystick axes (the default).
+ *    "1"       - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
 /**
  *  \brief  A variable controlling whether the Android / iOS built-in
  *  accelerometer should be listed as a joystick device, rather than listing
@@ -369,7 +408,7 @@ extern "C" {
 *  Use this hint in case you need to set SDL's threads stack size to other than the default.
 *  This is specially useful if you build SDL against a non glibc libc library (such as musl) which
 *  provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
-*  Support for this hint is currently available only in the pthread backend.
+*  Support for this hint is currently available only in the pthread, Windows, and PSP backend.
 */
 #define SDL_HINT_THREAD_STACK_SIZE              "SDL_THREAD_STACK_SIZE"
 
@@ -431,7 +470,7 @@ extern "C" {
  *  privacy policy.
  *
  *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- *  before calling any SDL_Init functions.  The contents of the hint should
+ *  before calling any SDL_Init() functions.  The contents of the hint should
  *  be a valid URL.  For example, "http://www.example.com".
  *
  *  The default value is "", which will prevent SDL from adding a privacy policy
@@ -461,7 +500,7 @@ extern "C" {
  *  The contents of this hint should be encoded as a UTF8 string.
  *
  *  The default value is "Privacy Policy".  This hint should only be set during app
- *  initialization, preferably before any calls to SDL_Init.
+ *  initialization, preferably before any calls to SDL_Init().
  *
  *  For additional information on linking to a privacy policy, see the documentation for
  *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.
@@ -630,6 +669,44 @@ extern "C" {
  */
 #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4    "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
 
+/**
+ *  \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ *   "0"       - Surfaces with a colorkey or an alpha channel are saved to a
+ *               32-bit BMP file with an alpha mask. SDL will use the bitmap
+ *               header version 4 and set the alpha mask accordingly.
+ *   "1"       - Surfaces with a colorkey or an alpha channel are saved to a
+ *               32-bit BMP file without an alpha mask. The alpha channel data
+ *               will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ *   "0"       - SDL will raise the 0x406D1388 Exception to name threads.
+ *               This is the default behavior of SDL <= 2.0.4. (default)
+ *   "1"       - SDL will not raise this exception, and threads will be unnamed.
+ *               For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER           "SDL_RPI_VIDEO_LAYER"
+
 /**
  *  \brief  An enumeration of hint priorities
  */
@@ -669,6 +746,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  */
 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
 
+/**
+ *  \brief Get a hint
+ *
+ *  \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
 /**
  *  \brief Add a function to watch a particular hint
  *
index 266f3b3871d312b4c5155b5ad92602a80f5cfa0f..f5dbc94871ba0b1c22cadb010130eb4dcdfb48fc 100644 (file)
@@ -24,7 +24,7 @@
  *
  *  Include file for SDL joystick event handling
  *
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
  *   behind a device_index changing as joysticks are plugged and unplugged.
  *
  * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
index bbba0f07bc70e3d95e89ff34738e713238a92501..f80b6d2de88a77c2554072214ec945be4056f2fa 100644 (file)
@@ -136,7 +136,7 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
  *          copy it.  If the key doesn't have a name, this function returns an
  *          empty string ("").
  *
- *  \sa SDL_Key
+ *  \sa SDL_Keycode
  */
 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
 
index 9ce3754e93c3cd77dd5e1ef48ff089cdbcaf1050..67afea5e70f8108e0128a877630d812e04570af1 100644 (file)
@@ -63,7 +63,7 @@
 /* On Android SDL provides a Java class in SDLActivity.java that is the
    main activity entry point.
 
-   See README-android.txt for more details on extending that class.
+   See README-android.md for more details on extending that class.
  */
 #define SDL_MAIN_NEEDED
 
index ea9622f0f7627edb5474ad0bfc0931d866d8f21a..46f046d0c0f82e801c046b5f169779e75d221c6f 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
 typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
 
 /**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
  */
 typedef enum
 {
@@ -254,9 +254,11 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
 
 /**
- *  \brief Frees a cursor created with SDL_CreateCursor().
+ *  \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
  *
  *  \sa SDL_CreateCursor()
+ *  \sa SDL_CreateColorCursor()
+ *  \sa SDL_CreateSystemCursor()
  */
 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
 
index bcc127779dabd3a759a8ea41ed30537d15ce5316..15abee796bb107523bf12874f9be8b5c8bf277e3 100644 (file)
@@ -24,6 +24,7 @@
  *
  *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.
  */
+#include "SDL_config.h"
 
 #ifdef __IPHONEOS__
 #include <OpenGLES/ES1/gl.h>
index edcd1a24aeb8c2e5a94c3f6c769ec61406dac1ae..c961f0f7d1fc7982fae36a516ab596a4bcbd729f 100644 (file)
@@ -24,6 +24,8 @@
  *
  *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
  */
+#include "SDL_config.h"
+
 #ifndef _MSC_VER
 
 #ifdef __IPHONEOS__
index 8499c328962dce7a6e0d26ffe4fd7a32abce6be5..cf6a33f082be82f483292161ea323a3d6bbbd743 100644 (file)
@@ -29,6 +29,7 @@
 #define _SDL_pixels_h
 
 #include "SDL_stdinc.h"
+#include "SDL_endian.h"
 
 #include "begin_code.h"
 /* Set up for C function definitions, even when using C++ */
@@ -260,6 +261,19 @@ enum
         SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
                                SDL_PACKEDLAYOUT_2101010, 32, 4),
 
+    /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
     SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */
         SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
     SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */
index c6c21398b235cd034113bfc9a78fa24249857a88..03cf170610faa93a28f8908694068c4dfb540b50 100644 (file)
 /* lets us know what version of Mac OS X we're compiling on */
 #include "AvailabilityMacros.h"
 #include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
 #if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
 #undef __IPHONEOS__
 #define __IPHONEOS__ 1
 #undef __MACOSX__
 #else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
 #undef __MACOSX__
 #define __MACOSX__  1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
-# error SDL for Mac OS X only supports deploying on 10.5 and above.
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
 #endif /* TARGET_OS_IPHONE */
 #endif /* defined(__APPLE__) */
 
index e4ed2af6934e326b327fa0093b67afe978ef2eaf..60c87b66ab63b3243ded7707dc0bcc99131f4a38 100644 (file)
@@ -499,6 +499,30 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
  */
 extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
 
+/**
+ *  \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ *  \param renderer The renderer for which integer scaling should be set.
+ *  \param enable   Enable or disable integer scaling
+ *
+ *  This function restricts the logical viewport to integer values - that is, when
+ *  a resolution is between two multiples of a logical size, the viewport size is
+ *  rounded down to the lower multiple.
+ *
+ *  \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+                                                      SDL_bool enable);
+
+/**
+ *  \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ *  \param renderer The renderer from which integer scaling should be queried.
+ *
+ *  \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
 /**
  *  \brief Set the drawing area for rendering on the current target.
  *
@@ -658,7 +682,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
 /**
  *  \brief Clear the current rendering target with the drawing color
  *
- *  This function clears the entire rendering target, ignoring the viewport.
+ *  This function clears the entire rendering target, ignoring the viewport and
+ *  the clip rectangle.
  *
  *  \return 0 on success, or -1 on error
  */
index 6d7163d4d4e6b987c867e5964ac5f5ecd048e851..341dc5cce6a11dc041e626251adb88bd04fc4e4e 100644 (file)
@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
index f460ae7d408931513b0822c59827514c08e55c66..1ad3ac406adc324d21d9a5a130200102c916995f 100644 (file)
@@ -39,12 +39,12 @@ extern "C" {
 #endif
 
 /* RWops Types */
-#define SDL_RWOPS_UNKNOWN   0   /* Unknown stream type */
-#define SDL_RWOPS_WINFILE   1   /* Win32 file */
-#define SDL_RWOPS_STDFILE   2   /* Stdio file */
-#define SDL_RWOPS_JNIFILE   3   /* Android asset */
-#define SDL_RWOPS_MEMORY    4   /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5   /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN   0U  /* Unknown stream type */
+#define SDL_RWOPS_WINFILE   1U  /* Win32 file */
+#define SDL_RWOPS_STDFILE   2U  /* Stdio file */
+#define SDL_RWOPS_JNIFILE   3U  /* Android asset */
+#define SDL_RWOPS_MEMORY    4U  /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U  /* Read-Only memory stream */
 
 /**
  * This is the read/write operation structure -- very basic.
index 887bcd2d46281cb5724649155fc3c6fccf769368..fdf96415fa1453c8f6014486e0a9add313f03f30 100644 (file)
@@ -83,9 +83,6 @@
 #ifdef HAVE_FLOAT_H
 # include <float.h>
 #endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
 
 /**
  *  The number of elements in an array.
 #define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))
 #define SDL_TABLESIZE(table)    SDL_arraysize(table)
 
+/**
+ *  Macro useful for building other macros with strings in them
+ *
+ *  e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg)  #arg
+
 /**
  *  \name Cast operators
  *
index e63ca8903845151a84565f29a8ffc13b5a815362..e4a06a204df9631fa73d2e277f297e1074c5eefc 100644 (file)
@@ -118,6 +118,8 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
     (Uint32 flags, int width, int height, int depth,
      Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+    (Uint32 flags, int width, int height, int depth, Uint32 format);
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
                                                               int width,
                                                               int height,
@@ -127,6 +129,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
                                                               Uint32 Gmask,
                                                               Uint32 Bmask,
                                                               Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+    (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
 
 /**
@@ -184,6 +188,12 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
 /**
  *  Save a surface to a seekable SDL data stream (memory or file).
  *
+ *  Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ *  BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ *  24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ *  surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ *  not supported.
+ *
  *  If \c freedst is non-zero, the stream will be closed after being written.
  *
  *  \return 0 if successful or -1 if there was an error.
index 1056e526bc055dafa87486f0a8fb032aff750f55..71ba5f1f3b5e689791eb69e92f9e4beb7060ea68 100644 (file)
@@ -106,6 +106,10 @@ typedef struct ANativeWindow ANativeWindow;
 typedef void *EGLSurface;
 #endif
 
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
 /**
  *  These are the various supported windowing subsystems
  */
@@ -120,7 +124,8 @@ typedef enum
     SDL_SYSWM_WAYLAND,
     SDL_SYSWM_MIR,
     SDL_SYSWM_WINRT,
-    SDL_SYSWM_ANDROID
+    SDL_SYSWM_ANDROID,
+    SDL_SYSWM_VIVANTE
 } SDL_SYSWM_TYPE;
 
 /**
@@ -166,6 +171,13 @@ struct SDL_SysWMmsg
             int dummy;
             /* No UIKit window events yet */
         } uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+        struct
+        {
+            int dummy;
+            /* No Vivante window events yet */
+        } vivante;
 #endif
         /* Can't have an empty union */
         int dummy;
@@ -259,6 +271,14 @@ struct SDL_SysWMinfo
         } android;
 #endif
 
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+        struct
+        {
+            EGLNativeDisplayType display;
+            EGLNativeWindowType window;
+        } vivante;
+#endif
+
         /* Can't have an empty union */
         int dummy;
     } info;
index de1f160565a03d2f9d4e5ea1a505035b493db309..1700efdd105dca619bdd193e7e059c7d3cc8ac0d 100644 (file)
@@ -59,7 +59,7 @@ typedef struct SDL_version
 */
 #define SDL_MAJOR_VERSION   2
 #define SDL_MINOR_VERSION   0
-#define SDL_PATCHLEVEL      4
+#define SDL_PATCHLEVEL      5
 
 /**
  *  \brief Macro to determine SDL version program was compiled against.
index 52dbbc765d9fadf3d8063ee837239b683956dfb0..73c33eb328326b568ba3262d35d7fb2560cd5845 100644 (file)
@@ -83,6 +83,7 @@ typedef struct
  *  \sa SDL_SetWindowPosition()
  *  \sa SDL_SetWindowSize()
  *  \sa SDL_SetWindowBordered()
+ *  \sa SDL_SetWindowResizable()
  *  \sa SDL_SetWindowTitle()
  *  \sa SDL_ShowWindow()
  */
@@ -95,6 +96,7 @@ typedef struct SDL_Window SDL_Window;
  */
 typedef enum
 {
+    /* !!! FIXME: change this to name = (1<<x). */
     SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
     SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
     SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
@@ -109,13 +111,18 @@ typedef enum
     SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
     SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
     SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
-    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000       /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */
+    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */
+    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */
+    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */
+    SDL_WINDOW_POPUP_MENU    = 0x00080000       /**< window should be treated as a popup menu */
 } SDL_WindowFlags;
 
 /**
  *  \brief Used to indicate that you don't care what the window position is.
  */
-#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000u
 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
 #define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
 #define SDL_WINDOWPOS_ISUNDEFINED(X)    \
@@ -124,7 +131,7 @@ typedef enum
 /**
  *  \brief Used to indicate that the window position should be centered.
  */
-#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000u
 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
 #define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
 #define SDL_WINDOWPOS_ISCENTERED(X)    \
@@ -154,8 +161,9 @@ typedef enum
     SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
     SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
     SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
-    SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the
-                                         window be closed */
+    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
+    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
 } SDL_WindowEventID;
 
 /**
@@ -310,6 +318,25 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * re
  */
 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
 
+/**
+ *  \brief Get the usable desktop area represented by a display, with the
+ *         primary display located at 0,0
+ *
+ *  This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ *  reserved by the system removed. For example, on Mac OS X, this subtracts
+ *  the area occupied by the menu bar and dock.
+ *
+ *  Setting a window to be fullscreen generally bypasses these unusable areas,
+ *  so these are good guidelines for the maximum space available to a
+ *  non-fullscreen window.
+ *
+ *  \return 0 on success, or -1 if the index is out of range.
+ *
+ *  \sa SDL_GetDisplayBounds()
+ *  \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
 /**
  *  \brief Returns the number of available display modes.
  *
@@ -423,7 +450,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
  *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
  *               ::SDL_WINDOW_ALLOW_HIGHDPI.
  *
- *  \return The id of the window created, or zero if window creation failed.
+ *  \return The created window, or NULL if window creation failed.
  *
  *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
  *  in pixels may differ from its size in screen coordinates on platforms with
@@ -442,7 +469,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
  *
  *  \param data A pointer to driver-dependent window creation data
  *
- *  \return The id of the window created, or zero if window creation failed.
+ *  \return The created window, or NULL if window creation failed.
  *
  *  \sa SDL_DestroyWindow()
  */
@@ -586,6 +613,25 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
                                                int *h);
 
+/**
+ *  \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ *  \param window The window to query.
+ *  \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ *  \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ *  \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ *  \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ *  \return 0 on success, or -1 if getting this information is not supported.
+ *
+ *  \note if this function fails (returns -1), the size values will be
+ *        initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ *        if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+                                                     int *top, int *left,
+                                                     int *bottom, int *right);
+
 /**
  *  \brief Set the minimum size of a window's client area.
  *
@@ -661,6 +707,23 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
                                                    SDL_bool bordered);
 
+/**
+ *  \brief Set the user-resizable state of a window.
+ *
+ *  This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ *  allow/disallow user resizing of the window. This is a no-op if the
+ *  window's resizable state already matches the requested state.
+ *
+ *  \param window The window of which to change the resizable state.
+ *  \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ *  \note You can't change the resizable state of a fullscreen window.
+ *
+ *  \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+                                                    SDL_bool resizable);
+
 /**
  *  \brief Show a window.
  *
@@ -744,7 +807,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
  *  \return 0 on success, or -1 on error.
  *
  *  \sa SDL_GetWindowSurface()
- *  \sa SDL_UpdateWindowSurfaceRect()
+ *  \sa SDL_UpdateWindowSurface()
  */
 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
                                                          const SDL_Rect * rects,
@@ -801,6 +864,58 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
  */
 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
 
+/**
+ *  \brief Set the opacity for a window
+ *
+ *  \param window The window which will be made transparent or opaque
+ *  \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ *                 clamped internally between 0.0f and 1.0f.
+ * 
+ *  \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ *  \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ *  \brief Get the opacity of a window.
+ *
+ *  If transparency isn't supported on this platform, opacity will be reported
+ *  as 1.0f without error.
+ *
+ *  \param window The window in question.
+ *  \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ *  \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ *  \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ *  \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ *  \param modal_window The window that should be modal
+ *  \param parent_window The parent window
+ * 
+ *  \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ *  \brief Explicitly sets input focus to the window.
+ *
+ *  You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ *  this with caution, as you might give focus to a window that's completely
+ *  obscured by other windows.
+ *
+ *  \param window The window that should get the input focus
+ * 
+ *  \return 0 on success, or -1 otherwise.
+ *  \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
 /**
  *  \brief Set the gamma ramp for a window.
  *
@@ -920,7 +1035,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
 
 
 /**
- *  \brief Returns whether the screensaver is currently enabled (default on).
+ *  \brief Returns whether the screensaver is currently enabled (default off).
  *
  *  \sa SDL_EnableScreenSaver()
  *  \sa SDL_DisableScreenSaver()
index 97e4b0d15de240da45de0c3b31d9935cc5d407f4..18d70bec4327c4f4fb7509977eb693dad3fc3dd9 100644 (file)
@@ -1,10 +1,11 @@
 # sdl2 cmake project-config input for ./configure scripts
 
-set(prefix "/usr/local/cross-tools/i686-w64-mingw32") 
+set(prefix "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32") 
 set(exec_prefix "${prefix}")
 set(libdir "${exec_prefix}/lib")
-set(SDL2_PREFIX "/usr/local/cross-tools/i686-w64-mingw32")
-set(SDL2_EXEC_PREFIX "/usr/local/cross-tools/i686-w64-mingw32")
+set(SDL2_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32")
+set(SDL2_EXEC_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32")
 set(SDL2_LIBDIR "${exec_prefix}/lib")
 set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
 set(SDL2_LIBRARIES "-L${SDL2_LIBDIR}  -lmingw32 -lSDL2main -lSDL2  -mwindows")
+string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
index 5e6f56c541c71645bb48b6c7b47ce042d1b97c2b..d23898f4a706024b0bd31202cfe4c69420139fd3 100644 (file)
Binary files a/misc/builddeps/win32/sdl/lib/libSDL2.a and b/misc/builddeps/win32/sdl/lib/libSDL2.a differ
index 9959a5eb2b8a2c4436f41c2788ef5f78ecd00c7c..9cf149a2edbae08b6ed952e58ad44f661d7ee72a 100755 (executable)
@@ -5,10 +5,10 @@
 # It is necessary for linking the library.
 
 # The name that we can dlopen(3).
-dlname='../bin/SDL2.dll'
+dlname=''
 
 # Names of this library.
-library_names='libSDL2.dll.a'
+library_names=''
 
 # The name of the static archive.
 old_library='libSDL2.a'
@@ -25,7 +25,7 @@ weak_library_names=''
 # Version information for libSDL2.
 current=4
 age=4
-revision=0
+revision=1
 
 # Is this an already installed library?
 installed=yes
@@ -38,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/Users/slouken/release/SDL/SDL2-2.0.4/i686-w64-mingw32/lib'
+libdir='/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32/lib'
index 077e63bd7e786a5b1401e3fe4bc441495eea4b13..6f8ce45acf2c0ba3e6b077cae73c1bd71e9ec87a 100644 (file)
Binary files a/misc/builddeps/win32/sdl/lib/libSDL2_test.a and b/misc/builddeps/win32/sdl/lib/libSDL2_test.a differ
index 2a77bf170b057719314ad1def823ab1cd3ff0521..6d2bb72c2e6a819dea10a9aae21de27fa3adc42d 100644 (file)
Binary files a/misc/builddeps/win32/sdl/lib/libSDL2main.a and b/misc/builddeps/win32/sdl/lib/libSDL2main.a differ
index 379b9d94e19e86c015bd8679daaa1fab1f5ec602..aad052a0944960b2241c64179f5bc1920042809b 100644 (file)
@@ -1,13 +1,13 @@
 # sdl pkg-config source file
 
-prefix=/usr/local/cross-tools/i686-w64-mingw32
+prefix=/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 
 Name: sdl2
 Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
-Version: 2.0.4
+Version: 2.0.5
 Requires:
 Conflicts:
 Libs: -L${libdir}  -lmingw32 -lSDL2main -lSDL2  -mwindows
index a03b2d2706dc700013c570c4316b0c2a0c289067..b915f99edec28587c0aec12335849d08768475b6 100644 (file)
@@ -4,6 +4,9 @@
 # stolen back from Frank Belew
 # stolen from Manish Singh
 # Shamelessly stolen from Owen Taylor
+#
+# Changelog:
+# * also look for SDL2.framework under Mac OS X
 
 # serial 1
 
@@ -20,6 +23,10 @@ AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL
             sdl_exec_prefix="$withval", sdl_exec_prefix="")
 AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
                    , enable_sdltest=yes)
+AC_ARG_ENABLE(sdlframework, [  --disable-sdlframework Do not search for SDL2.framework],
+        , search_sdl_framework=yes)
+
+AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
 
   min_sdl_version=ifelse([$1], ,2.0.0,$1)
 
@@ -53,14 +60,36 @@ AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run
     fi
     AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
     PATH="$as_save_PATH"
-    AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
     no_sdl=""
 
-    if test "$SDL2_CONFIG" = "no" ; then
-      no_sdl=yes
-    else
-      SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
-      SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+    if test "$SDL2_CONFIG" = "no" -a "x$search_sdl_framework" = "xyes"; then
+      AC_MSG_CHECKING(for SDL2.framework)
+      if test "x$SDL2_FRAMEWORK" != x; then
+        sdl_framework=$SDL2_FRAMEWORK
+      else
+        for d in / ~/ /System/; do
+          if test -d "$dLibrary/Frameworks/SDL2.framework"; then
+            sdl_framework="$dLibrary/Frameworks/SDL2.framework"
+          fi
+        done
+      fi
+
+      if test -d $sdl_framework; then
+        AC_MSG_RESULT($sdl_framework)
+        sdl_framework_dir=`dirname $sdl_framework`
+        SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
+        SDL_LIBS="-F$sdl_framework_dir -Wl,-framework,SDL2"
+      else
+        no_sdl=yes
+      fi
+    fi
+
+    if test "$SDL2_CONFIG" != "no"; then
+      if test "x$sdl_pc" = "xno"; then
+        AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+        SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+        SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+      fi
 
       sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
              sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
@@ -141,12 +170,15 @@ int main (int argc, char *argv[])
         CFLAGS="$ac_save_CFLAGS"
         CXXFLAGS="$ac_save_CXXFLAGS"
         LIBS="$ac_save_LIBS"
+
+      fi
+      if test "x$sdl_pc" = "xno"; then
+        if test "x$no_sdl" = "xyes"; then
+          AC_MSG_RESULT(no)
+        else
+          AC_MSG_RESULT(yes)
+        fi
       fi
-    fi
-    if test "x$no_sdl" = x ; then
-      AC_MSG_RESULT(yes)
-    else
-      AC_MSG_RESULT(no)
     fi
   fi
   if test "x$no_sdl" = x ; then
index ee92e116320912d691f4e7e5615a90627ada36a3..86e0cf0b9929fe7e8a916ffd7407705728e755ee 100755 (executable)
@@ -39,15 +39,15 @@ while test $# -gt 0; do
       echo $exec_prefix
       ;;
     --version)
-      echo 2.0.4
+      echo 2.0.5
       ;;
     --cflags)
       echo -I${prefix}/include/SDL2  -Dmain=SDL_main
       ;;
-#   --libs)
-#     echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows
-#     ;;
-#   --static-libs)
+#    --libs)
+#      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows
+#      ;;
+#    --static-libs)
     --libs|--static-libs)
       echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows  -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
       ;;
index 7647b5111e1fe97548e3c918eaa5f5e67e866c10..1a3fa285cdd9c2c234389784f0585e7df31fd53c 100644 (file)
@@ -72,14 +72,14 @@ extern "C" {
  *  specify the subsystems which you will be using in your application.
  */
 /* @{ */
-#define SDL_INIT_TIMER          0x00000001
-#define SDL_INIT_AUDIO          0x00000010
-#define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
-#define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
-#define SDL_INIT_HAPTIC         0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS         0x00004000
-#define SDL_INIT_NOPARACHUTE    0x00100000  /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER          0x00000001u
+#define SDL_INIT_AUDIO          0x00000010u
+#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC         0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS         0x00004000u
+#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */
 #define SDL_INIT_EVERYTHING ( \
                 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
@@ -95,8 +95,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
  *  This function initializes specific SDL subsystems
  *
  *  Subsystem initialization is ref-counted, you must call
- *  SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
- *  shutdown a subsystem manually (or call SDL_Quit to force shutdown).
+ *  SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
+ *  shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
  *  If a subsystem is already loaded then this call will
  *  increase the ref-count and return.
  */
index 4f6552146891c79027a5577632e95cfa7eaf82d9..d51f0d1ce2b461648fe17f9c8b4b453a0ed73a1d 100644 (file)
@@ -278,7 +278,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
  *      protect data structures that it accesses by calling SDL_LockAudio()
  *      and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL
  *      pointer here, and call SDL_QueueAudio() with some frequency, to queue
- *      more audio samples to be played.
+ *      more audio samples to be played (or for capture devices, call
+ *      SDL_DequeueAudio() with some frequency, to obtain audio samples).
  *    - \c desired->userdata is passed as the first parameter to your callback
  *      function. If you passed a NULL callback, this value is ignored.
  *
@@ -482,6 +483,10 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
 /**
  *  Queue more audio on non-callback devices.
  *
+ *  (If you are looking to retrieve queued audio from a non-callback capture
+ *  device, you want SDL_DequeueAudio() instead. This will return -1 to
+ *  signify an error if you use it with capture devices.)
+ *
  *  SDL offers two ways to feed audio to the device: you can either supply a
  *  callback that SDL triggers with some frequency to obtain more audio
  *  (pull method), or you can supply no callback, and then SDL will expect
@@ -516,21 +521,76 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
  */
 extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
 
+/**
+ *  Dequeue more audio on non-callback devices.
+ *
+ *  (If you are looking to queue audio for output on a non-callback playback
+ *  device, you want SDL_QueueAudio() instead. This will always return 0
+ *  if you use it with playback devices.)
+ *
+ *  SDL offers two ways to retrieve audio from a capture device: you can
+ *  either supply a callback that SDL triggers with some frequency as the
+ *  device records more audio data, (push method), or you can supply no
+ *  callback, and then SDL will expect you to retrieve data at regular
+ *  intervals (pull method) with this function.
+ *
+ *  There are no limits on the amount of data you can queue, short of
+ *  exhaustion of address space. Data from the device will keep queuing as
+ *  necessary without further intervention from you. This means you will
+ *  eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ *  Capture devices will not queue data when paused; if you are expecting
+ *  to not need captured audio for some length of time, use
+ *  SDL_PauseAudioDevice() to stop the capture device from queueing more
+ *  data. This can be useful during, say, level loading times. When
+ *  unpaused, capture devices will start queueing data from that point,
+ *  having flushed any capturable data available while paused.
+ *
+ *  This function is thread-safe, but dequeueing from the same device from
+ *  two threads at once does not promise which thread will dequeued data
+ *  first.
+ *
+ *  You may not dequeue audio from a device that is using an
+ *  application-supplied callback; doing so returns an error. You have to use
+ *  the audio callback, or dequeue audio with this function, but not both.
+ *
+ *  You should not call SDL_LockAudio() on the device before queueing; SDL
+ *  handles locking internally for this function.
+ *
+ *  \param dev The device ID from which we will dequeue audio.
+ *  \param data A pointer into where audio data should be copied.
+ *  \param len The number of bytes (not samples!) to which (data) points.
+ *  \return number of bytes dequeued, which could be less than requested.
+ *
+ *  \sa SDL_GetQueuedAudioSize
+ *  \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
+
 /**
  *  Get the number of bytes of still-queued audio.
  *
- *  This is the number of bytes that have been queued for playback with
- *  SDL_QueueAudio(), but have not yet been sent to the hardware.
+ *  For playback device:
+ *
+ *    This is the number of bytes that have been queued for playback with
+ *    SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ *    number may shrink at any time, so this only informs of pending data.
+ *
+ *    Once we've sent it to the hardware, this function can not decide the
+ *    exact byte boundary of what has been played. It's possible that we just
+ *    gave the hardware several kilobytes right before you called this
+ *    function, but it hasn't played any of it yet, or maybe half of it, etc.
+ *
+ *  For capture devices:
  *
- *  Once we've sent it to the hardware, this function can not decide the exact
- *  byte boundary of what has been played. It's possible that we just gave the
- *  hardware several kilobytes right before you called this function, but it
- *  hasn't played any of it yet, or maybe half of it, etc.
+ *    This is the number of bytes that have been captured by the device and
+ *    are waiting for you to dequeue. This number may grow at any time, so
+ *    this only informs of the lower-bound of available data.
  *
  *  You may not queue audio on a device that is using an application-supplied
  *  callback; calling this function on such a device always returns 0.
- *  You have to use the audio callback or queue audio with SDL_QueueAudio(),
- *  but not both.
+ *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ *  the audio callback, but not both.
  *
  *  You should not call SDL_LockAudio() on the device before querying; SDL
  *  handles locking internally for this function.
@@ -544,10 +604,17 @@ extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *da
 extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
 
 /**
- *  Drop any queued audio data waiting to be sent to the hardware.
+ *  Drop any queued audio data. For playback devices, this is any queued data
+ *  still waiting to be submitted to the hardware. For capture devices, this
+ *  is any data that was queued by the device that hasn't yet been dequeued by
+ *  the application.
  *
- *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- *  the hardware will start playing silence if more audio isn't queued.
+ *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ *  playback devices, the hardware will start playing silence if more audio
+ *  isn't queued. Unpaused capture devices will start filling the queue again
+ *  as soon as they have more data available (which, depending on the state
+ *  of the hardware and the thread, could be before this function call
+ *  returns!).
  *
  *  This will not prevent playback of queued audio that's already been sent
  *  to the hardware, as we can not undo that, so expect there to be some
@@ -557,8 +624,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
  *
  *  You may not queue audio on a device that is using an application-supplied
  *  callback; calling this function on such a device is always a no-op.
- *  You have to use the audio callback or queue audio with SDL_QueueAudio(),
- *  but not both.
+ *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ *  the audio callback, but not both.
  *
  *  You should not call SDL_LockAudio() on the device before clearing the
  *  queue; SDL handles locking internally for this function.
index 890986cc4e63ae6c593941f1defa9b1cf8c52d76..da7709837c0aba537d849b8a8b2bc738e210fb0a 100644 (file)
@@ -1,3 +1,4 @@
+/* include/SDL_config.h.  Generated from SDL_config.h.in by configure.  */
 /*
   Simple DirectMedia Layer
   Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
   3. This notice may not be removed or altered from any source distribution.
 */
 
-#ifndef _SDL_config_windows_h
-#define _SDL_config_windows_h
+#ifndef _SDL_config_h
+#define _SDL_config_h
 
+/**
+ *  \file SDL_config.h.in
+ *
+ *  This is a set of defines to configure the SDL features
+ */
+
+/* General platform specific identifiers */
 #include "SDL_platform.h"
 
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H   1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef  _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
+/* Make sure that this isn't included by Visual C++ */
+#ifdef _MSC_VER
+#error You should run hg revert SDL_config.h 
 #endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
 
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
+/* C language features */
+/* #undef const */
+/* #undef inline */
+/* #undef volatile */
+
+/* C datatypes */
+#ifdef __LP64__
+#define SIZEOF_VOIDP 8
 #else
-# define SIZEOF_VOIDP 4
+#define SIZEOF_VOIDP 4
 #endif
+#define HAVE_GCC_ATOMICS 1
+/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
 
 #define HAVE_DDRAW_H 1
 #define HAVE_DINPUT_H 1
@@ -82,140 +57,308 @@ typedef unsigned int uintptr_t;
 #define HAVE_DXGI_H 1
 #define HAVE_XINPUT_H 1
 
-/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
-#ifdef HAVE_LIBC
+/* Comment this if you want to build without any C library requirements */
+#define HAVE_LIBC 1
+#if HAVE_LIBC
+
 /* Useful headers */
+/* #undef HAVE_ALLOCA_H */
+#define HAVE_SYS_TYPES_H 1
 #define HAVE_STDIO_H 1
 #define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
 #define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
 #define HAVE_CTYPE_H 1
 #define HAVE_MATH_H 1
+/* #undef HAVE_ICONV_H */
 #define HAVE_SIGNAL_H 1
+/* #undef HAVE_ALTIVEC_H */
+/* #undef HAVE_PTHREAD_NP_H */
+/* #undef HAVE_LIBUDEV_H */
+/* #undef HAVE_DBUS_DBUS_H */
+/* #undef HAVE_IBUS_IBUS_H */
+/* #undef HAVE_FCITX_FRONTEND_H */
 
 /* C library functions */
 #define HAVE_MALLOC 1
 #define HAVE_CALLOC 1
 #define HAVE_REALLOC 1
 #define HAVE_FREE 1
-#define HAVE_ALLOCA 1
+/* #undef HAVE_ALLOCA */
+#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
+#define HAVE_GETENV 1
+/* #undef HAVE_SETENV */
+#define HAVE_PUTENV 1
+/* #undef HAVE_UNSETENV */
+#endif
 #define HAVE_QSORT 1
 #define HAVE_ABS 1
+/* #undef HAVE_BCOPY */
 #define HAVE_MEMSET 1
 #define HAVE_MEMCPY 1
 #define HAVE_MEMMOVE 1
 #define HAVE_MEMCMP 1
 #define HAVE_STRLEN 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+#define HAVE_STRDUP 1
 #define HAVE__STRREV 1
 #define HAVE__STRUPR 1
 #define HAVE__STRLWR 1
+/* #undef HAVE_INDEX */
+/* #undef HAVE_RINDEX */
 #define HAVE_STRCHR 1
 #define HAVE_STRRCHR 1
 #define HAVE_STRSTR 1
+#define HAVE_ITOA 1
 #define HAVE__LTOA 1
+/* #undef HAVE__UITOA */
 #define HAVE__ULTOA 1
 #define HAVE_STRTOL 1
 #define HAVE_STRTOUL 1
+#define HAVE__I64TOA 1
+#define HAVE__UI64TOA 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
 #define HAVE_STRTOD 1
 #define HAVE_ATOI 1
 #define HAVE_ATOF 1
 #define HAVE_STRCMP 1
 #define HAVE_STRNCMP 1
 #define HAVE__STRICMP 1
+#define HAVE_STRCASECMP 1
 #define HAVE__STRNICMP 1
+#define HAVE_STRNCASECMP 1
+/* #undef HAVE_SSCANF */
+#define HAVE_VSSCANF 1
+/* #undef HAVE_SNPRINTF */
+#define HAVE_VSNPRINTF 1
+#define HAVE_M_PI /**/
 #define HAVE_ATAN 1
 #define HAVE_ATAN2 1
-#define HAVE_ACOS  1
-#define HAVE_ASIN  1
+#define HAVE_ACOS 1
+#define HAVE_ASIN 1
 #define HAVE_CEIL 1
+#define HAVE_COPYSIGN 1
 #define HAVE_COS 1
 #define HAVE_COSF 1
 #define HAVE_FABS 1
 #define HAVE_FLOOR 1
 #define HAVE_LOG 1
 #define HAVE_POW 1
+#define HAVE_SCALBN 1
 #define HAVE_SIN 1
 #define HAVE_SINF 1
 #define HAVE_SQRT 1
 #define HAVE_SQRTF 1
 #define HAVE_TAN 1
 #define HAVE_TANF 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
+#define HAVE_FSEEKO 1
+#define HAVE_FSEEKO64 1
+/* #undef HAVE_SIGACTION */
+/* #undef HAVE_SA_SIGACTION */
+#define HAVE_SETJMP 1
+#define HAVE_NANOSLEEP 1
+/* #undef HAVE_SYSCONF */
+/* #undef HAVE_SYSCTLBYNAME */
+/* #undef HAVE_CLOCK_GETTIME */
+/* #undef HAVE_GETPAGESIZE */
+/* #undef HAVE_MPROTECT */
+/* #undef HAVE_ICONV */
+/* #undef HAVE_PTHREAD_SETNAME_NP */
+/* #undef HAVE_PTHREAD_SET_NAME_NP */
+/* #undef HAVE_SEM_TIMEDWAIT */
+
 #else
-#define HAVE_STDARG_H   1
-#define HAVE_STDDEF_H   1
-#endif
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 1
+#endif /* HAVE_LIBC */
+
+/* SDL internal assertion support */
+/* #undef SDL_DEFAULT_ASSERT_LEVEL */
+
+/* Allow disabling of core subsystems */
+/* #undef SDL_ATOMIC_DISABLED */
+/* #undef SDL_AUDIO_DISABLED */
+/* #undef SDL_CPUINFO_DISABLED */
+/* #undef SDL_EVENTS_DISABLED */
+/* #undef SDL_FILE_DISABLED */
+/* #undef SDL_JOYSTICK_DISABLED */
+/* #undef SDL_HAPTIC_DISABLED */
+/* #undef SDL_LOADSO_DISABLED */
+/* #undef SDL_RENDER_DISABLED */
+/* #undef SDL_THREADS_DISABLED */
+/* #undef SDL_TIMERS_DISABLED */
+/* #undef SDL_VIDEO_DISABLED */
+/* #undef SDL_POWER_DISABLED */
+/* #undef SDL_FILESYSTEM_DISABLED */
 
 /* Enable various audio drivers */
+/* #undef SDL_AUDIO_DRIVER_ALSA */
+/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_ARTS */
+/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_HAIKU */
+/* #undef SDL_AUDIO_DRIVER_BSD */
+/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+/* #undef SDL_AUDIO_DRIVER_ANDROID */
+/* #undef SDL_AUDIO_DRIVER_XAUDIO2 */
 #define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2    1
-#define SDL_AUDIO_DRIVER_WINMM  1
-#define SDL_AUDIO_DRIVER_DISK   1
-#define SDL_AUDIO_DRIVER_DUMMY  1
+/* #undef SDL_AUDIO_DRIVER_ESD */
+/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_NACL */
+/* #undef SDL_AUDIO_DRIVER_NAS */
+/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_SNDIO */
+/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_OSS */
+/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
+/* #undef SDL_AUDIO_DRIVER_PAUDIO */
+/* #undef SDL_AUDIO_DRIVER_QSA */
+/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
+#define SDL_AUDIO_DRIVER_WINMM 1
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
 
 /* Enable various input drivers */
+/* #undef SDL_INPUT_LINUXEV */
+/* #undef SDL_INPUT_LINUXKD */
+/* #undef SDL_INPUT_TSLIB */
+/* #undef SDL_JOYSTICK_HAIKU */
 #define SDL_JOYSTICK_DINPUT 1
 #define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT   1
-#define SDL_HAPTIC_XINPUT   1
+/* #undef SDL_JOYSTICK_DUMMY */
+/* #undef SDL_JOYSTICK_IOKIT */
+/* #undef SDL_JOYSTICK_LINUX */
+/* #undef SDL_JOYSTICK_ANDROID */
+/* #undef SDL_JOYSTICK_WINMM */
+/* #undef SDL_JOYSTICK_USBHID */
+/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
+/* #undef SDL_JOYSTICK_EMSCRIPTEN */
+/* #undef SDL_HAPTIC_DUMMY */
+/* #undef SDL_HAPTIC_LINUX */
+/* #undef SDL_HAPTIC_IOKIT */
+#define SDL_HAPTIC_DINPUT 1
+#define SDL_HAPTIC_XINPUT 1
 
 /* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS  1
+/* #undef SDL_LOADSO_HAIKU */
+/* #undef SDL_LOADSO_DLOPEN */
+/* #undef SDL_LOADSO_DUMMY */
+/* #undef SDL_LOADSO_LDG */
+#define SDL_LOADSO_WINDOWS 1
 
 /* Enable various threading systems */
-#define SDL_THREAD_WINDOWS  1
+/* #undef SDL_THREAD_PTHREAD */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
+#define SDL_THREAD_WINDOWS 1
 
 /* Enable various timer systems */
-#define SDL_TIMER_WINDOWS   1
+/* #undef SDL_TIMER_HAIKU */
+/* #undef SDL_TIMER_DUMMY */
+/* #undef SDL_TIMER_UNIX */
+#define SDL_TIMER_WINDOWS 1
 
 /* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY  1
-#define SDL_VIDEO_DRIVER_WINDOWS    1
+/* #undef SDL_VIDEO_DRIVER_HAIKU */
+/* #undef SDL_VIDEO_DRIVER_COCOA */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+/* #undef SDL_VIDEO_DRIVER_WAYLAND */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_MIR */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_X11 */
+/* #undef SDL_VIDEO_DRIVER_RPI */
+/* #undef SDL_VIDEO_DRIVER_ANDROID */
+/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
+/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
+/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
+/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
+/* #undef SDL_VIDEO_DRIVER_X11_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
+/* #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY */
+/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
+/* #undef SDL_VIDEO_DRIVER_NACL */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
 
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D    1
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
+#define SDL_VIDEO_RENDER_D3D 1
+/* #undef SDL_VIDEO_RENDER_D3D11 */
+#define SDL_VIDEO_RENDER_OGL 1
+/* #undef SDL_VIDEO_RENDER_OGL_ES */
+/* #undef SDL_VIDEO_RENDER_OGL_ES2 */
+/* #undef SDL_VIDEO_RENDER_DIRECTFB */
 
 /* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL    1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2    1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL    1
-#endif
-
+#define SDL_VIDEO_OPENGL 1
+/* #undef SDL_VIDEO_OPENGL_ES */
+/* #undef SDL_VIDEO_OPENGL_ES2 */
+/* #undef SDL_VIDEO_OPENGL_BGL */
+/* #undef SDL_VIDEO_OPENGL_CGL */
+/* #undef SDL_VIDEO_OPENGL_EGL */
+/* #undef SDL_VIDEO_OPENGL_GLX */
+#define SDL_VIDEO_OPENGL_WGL 1
+/* #undef SDL_VIDEO_OPENGL_OSMESA */
+/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
 
 /* Enable system power support */
+/* #undef SDL_POWER_LINUX */
 #define SDL_POWER_WINDOWS 1
+/* #undef SDL_POWER_MACOSX */
+/* #undef SDL_POWER_HAIKU */
+/* #undef SDL_POWER_ANDROID */
+/* #undef SDL_POWER_EMSCRIPTEN */
+/* #undef SDL_POWER_HARDWIRED */
 
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS  1
+/* Enable system filesystem support */
+/* #undef SDL_FILESYSTEM_HAIKU */
+/* #undef SDL_FILESYSTEM_COCOA */
+/* #undef SDL_FILESYSTEM_DUMMY */
+/* #undef SDL_FILESYSTEM_UNIX */
+#define SDL_FILESYSTEM_WINDOWS 1
+/* #undef SDL_FILESYSTEM_NACL */
+/* #undef SDL_FILESYSTEM_ANDROID */
+/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
 
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES   1
-#endif
+/* Enable assembly routines */
+#define SDL_ASSEMBLY_ROUTINES 1
+/* #undef SDL_ALTIVEC_BLITTERS */
+
+/* Enable ime support */
+/* #undef SDL_USE_IME */
 
-#endif /* _SDL_config_windows_h */
+#endif /* _SDL_config_h */
index 1437f4c7053a9aa29633be3a288654e40cceb5c3..edb89ef49ec52ef5826aa42e328974c7b6b9c0c3 100644 (file)
@@ -136,6 +136,9 @@ typedef enum
 
     /* Drag and drop events */
     SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
+    SDL_DROPTEXT,                 /**< text/plain drag-and-drop event */
+    SDL_DROPBEGIN,                /**< A new set of drops is beginning (NULL filename) */
+    SDL_DROPCOMPLETE,             /**< Current set of drops is now complete (NULL filename) */
 
     /* Audio hotplug events */
     SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
@@ -461,9 +464,10 @@ typedef struct SDL_DollarGestureEvent
  */
 typedef struct SDL_DropEvent
 {
-    Uint32 type;        /**< ::SDL_DROPFILE */
+    Uint32 type;        /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
     Uint32 timestamp;
-    char *file;         /**< The file name, which should be freed with SDL_free() */
+    char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+    Uint32 windowID;    /**< The window that was dropped on, if any */
 } SDL_DropEvent;
 
 
index 42087eea1623db80586d779cfa6b081a95c2a937..e67fd9fd0e9c19cf9239831ca54ac59b3faf650a 100644 (file)
@@ -93,7 +93,7 @@ typedef struct SDL_GameControllerButtonBind
  *      }
  *  }
  *
- *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
  *  guid,name,mappings
  *
  *  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
@@ -136,14 +136,14 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingStr
 /**
  *  Get a mapping string for a GUID
  *
- *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ *  \return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available
  */
 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
 
 /**
  *  Get a mapping string for an open GameController
  *
- *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ *  \return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available
  */
 extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
 
index b36d78b1275a91a63bf7305638f1bc0b995fb90b..9421c8f17752d038fbf04b5903072517159f7050 100644 (file)
@@ -149,7 +149,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_CONSTANT   (1<<0)
+#define SDL_HAPTIC_CONSTANT   (1u<<0)
 
 /**
  *  \brief Sine wave effect supported.
@@ -158,7 +158,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SINE       (1<<1)
+#define SDL_HAPTIC_SINE       (1u<<1)
 
 /**
  *  \brief Left/Right effect supported.
@@ -169,7 +169,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
  *          we ran out of bits, and this is important for XInput devices.
  */
-#define SDL_HAPTIC_LEFTRIGHT     (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT     (1u<<2)
 
 /* !!! FIXME: put this back when we have more bits in 2.1 */
 /* #define SDL_HAPTIC_SQUARE     (1<<2) */
@@ -181,7 +181,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_TRIANGLE   (1<<3)
+#define SDL_HAPTIC_TRIANGLE   (1u<<3)
 
 /**
  *  \brief Sawtoothup wave effect supported.
@@ -190,7 +190,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
 
 /**
  *  \brief Sawtoothdown wave effect supported.
@@ -199,7 +199,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
 
 /**
  *  \brief Ramp effect supported.
@@ -208,7 +208,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticRamp
  */
-#define SDL_HAPTIC_RAMP       (1<<6)
+#define SDL_HAPTIC_RAMP       (1u<<6)
 
 /**
  *  \brief Spring effect supported - uses axes position.
@@ -218,7 +218,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_SPRING     (1<<7)
+#define SDL_HAPTIC_SPRING     (1u<<7)
 
 /**
  *  \brief Damper effect supported - uses axes velocity.
@@ -228,7 +228,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_DAMPER     (1<<8)
+#define SDL_HAPTIC_DAMPER     (1u<<8)
 
 /**
  *  \brief Inertia effect supported - uses axes acceleration.
@@ -238,7 +238,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_INERTIA    (1<<9)
+#define SDL_HAPTIC_INERTIA    (1u<<9)
 
 /**
  *  \brief Friction effect supported - uses axes movement.
@@ -248,14 +248,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_FRICTION   (1<<10)
+#define SDL_HAPTIC_FRICTION   (1u<<10)
 
 /**
  *  \brief Custom effect is supported.
  *
  *  User defined custom haptic effect.
  */
-#define SDL_HAPTIC_CUSTOM     (1<<11)
+#define SDL_HAPTIC_CUSTOM     (1u<<11)
 
 /* @} *//* Haptic effects */
 
@@ -268,7 +268,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticSetGain
  */
-#define SDL_HAPTIC_GAIN       (1<<12)
+#define SDL_HAPTIC_GAIN       (1u<<12)
 
 /**
  *  \brief Device can set autocenter.
@@ -277,7 +277,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticSetAutocenter
  */
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
 
 /**
  *  \brief Device can be queried for effect status.
@@ -286,7 +286,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticGetEffectStatus
  */
-#define SDL_HAPTIC_STATUS     (1<<14)
+#define SDL_HAPTIC_STATUS     (1u<<14)
 
 /**
  *  \brief Device can be paused.
@@ -294,7 +294,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *  \sa SDL_HapticPause
  *  \sa SDL_HapticUnpause
  */
-#define SDL_HAPTIC_PAUSE      (1<<15)
+#define SDL_HAPTIC_PAUSE      (1u<<15)
 
 
 /**
index 3bd5435fb002331dff1a382a9f305878c90b03d2..dd1546431abe02e1d24df8e95f5fca6768773dd0 100644 (file)
@@ -233,16 +233,27 @@ extern "C" {
 #define SDL_HINT_GRAB_KEYBOARD              "SDL_GRAB_KEYBOARD"
 
 /**
-*  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-*  This variable can be set to the following values:
-*    "0"       - Relative mouse mode uses raw input
-*    "1"       - Relative mouse mode uses mouse warping
-*
-*  By default SDL will use raw input for relative mouse mode
-*/
+ *  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Relative mouse mode uses raw input
+ *    "1"       - Relative mouse mode uses mouse warping
+ *
+ *  By default SDL will use raw input for relative mouse mode
+ */
 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    "SDL_MOUSE_RELATIVE_MODE_WARP"
 
+/**
+ *  \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Ignore mouse clicks that activate a window
+ *    "1"       - Generate events for mouse clicks that activate a window
+ *
+ *  By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
 /**
  *  \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
  *
@@ -257,8 +268,8 @@ extern "C" {
  *  this is problematic. This functionality can be disabled by setting this
  *  hint.
  *
- *  As of SDL 2.0.4, SDL_EnableScreenSaver and SDL_DisableScreenSaver accomplish
- *  the same thing on iOS. They should be preferred over this hint.
+ *  As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
+ *  accomplish the same thing on iOS. They should be preferred over this hint.
  *
  *  This variable can be set to the following values:
  *    "0"       - Enable idle timer
@@ -276,7 +287,35 @@ extern "C" {
  *    "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
  */
 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-    
+
+/**
+ *  \brief  A variable controlling whether controllers used with the Apple TV
+ *  generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Controller input does not generate UI events (the default).
+ *    "1"       - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief  A variable controlling whether the Apple TV remote's joystick axes
+ *         will automatically match the rotation of the remote.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Remote orientation does not affect joystick axes (the default).
+ *    "1"       - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
 /**
  *  \brief  A variable controlling whether the Android / iOS built-in
  *  accelerometer should be listed as a joystick device, rather than listing
@@ -369,7 +408,7 @@ extern "C" {
 *  Use this hint in case you need to set SDL's threads stack size to other than the default.
 *  This is specially useful if you build SDL against a non glibc libc library (such as musl) which
 *  provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
-*  Support for this hint is currently available only in the pthread backend.
+*  Support for this hint is currently available only in the pthread, Windows, and PSP backend.
 */
 #define SDL_HINT_THREAD_STACK_SIZE              "SDL_THREAD_STACK_SIZE"
 
@@ -431,7 +470,7 @@ extern "C" {
  *  privacy policy.
  *
  *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- *  before calling any SDL_Init functions.  The contents of the hint should
+ *  before calling any SDL_Init() functions.  The contents of the hint should
  *  be a valid URL.  For example, "http://www.example.com".
  *
  *  The default value is "", which will prevent SDL from adding a privacy policy
@@ -461,7 +500,7 @@ extern "C" {
  *  The contents of this hint should be encoded as a UTF8 string.
  *
  *  The default value is "Privacy Policy".  This hint should only be set during app
- *  initialization, preferably before any calls to SDL_Init.
+ *  initialization, preferably before any calls to SDL_Init().
  *
  *  For additional information on linking to a privacy policy, see the documentation for
  *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.
@@ -630,6 +669,44 @@ extern "C" {
  */
 #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4    "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
 
+/**
+ *  \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ *   "0"       - Surfaces with a colorkey or an alpha channel are saved to a
+ *               32-bit BMP file with an alpha mask. SDL will use the bitmap
+ *               header version 4 and set the alpha mask accordingly.
+ *   "1"       - Surfaces with a colorkey or an alpha channel are saved to a
+ *               32-bit BMP file without an alpha mask. The alpha channel data
+ *               will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ *   "0"       - SDL will raise the 0x406D1388 Exception to name threads.
+ *               This is the default behavior of SDL <= 2.0.4. (default)
+ *   "1"       - SDL will not raise this exception, and threads will be unnamed.
+ *               For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER           "SDL_RPI_VIDEO_LAYER"
+
 /**
  *  \brief  An enumeration of hint priorities
  */
@@ -669,6 +746,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  */
 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
 
+/**
+ *  \brief Get a hint
+ *
+ *  \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
 /**
  *  \brief Add a function to watch a particular hint
  *
index 266f3b3871d312b4c5155b5ad92602a80f5cfa0f..f5dbc94871ba0b1c22cadb010130eb4dcdfb48fc 100644 (file)
@@ -24,7 +24,7 @@
  *
  *  Include file for SDL joystick event handling
  *
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
  *   behind a device_index changing as joysticks are plugged and unplugged.
  *
  * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
index bbba0f07bc70e3d95e89ff34738e713238a92501..f80b6d2de88a77c2554072214ec945be4056f2fa 100644 (file)
@@ -136,7 +136,7 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
  *          copy it.  If the key doesn't have a name, this function returns an
  *          empty string ("").
  *
- *  \sa SDL_Key
+ *  \sa SDL_Keycode
  */
 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
 
index 9ce3754e93c3cd77dd5e1ef48ff089cdbcaf1050..67afea5e70f8108e0128a877630d812e04570af1 100644 (file)
@@ -63,7 +63,7 @@
 /* On Android SDL provides a Java class in SDLActivity.java that is the
    main activity entry point.
 
-   See README-android.txt for more details on extending that class.
+   See README-android.md for more details on extending that class.
  */
 #define SDL_MAIN_NEEDED
 
index ea9622f0f7627edb5474ad0bfc0931d866d8f21a..46f046d0c0f82e801c046b5f169779e75d221c6f 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
 typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
 
 /**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
  */
 typedef enum
 {
@@ -254,9 +254,11 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
 
 /**
- *  \brief Frees a cursor created with SDL_CreateCursor().
+ *  \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
  *
  *  \sa SDL_CreateCursor()
+ *  \sa SDL_CreateColorCursor()
+ *  \sa SDL_CreateSystemCursor()
  */
 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
 
index bcc127779dabd3a759a8ea41ed30537d15ce5316..15abee796bb107523bf12874f9be8b5c8bf277e3 100644 (file)
@@ -24,6 +24,7 @@
  *
  *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.
  */
+#include "SDL_config.h"
 
 #ifdef __IPHONEOS__
 #include <OpenGLES/ES1/gl.h>
index edcd1a24aeb8c2e5a94c3f6c769ec61406dac1ae..c961f0f7d1fc7982fae36a516ab596a4bcbd729f 100644 (file)
@@ -24,6 +24,8 @@
  *
  *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
  */
+#include "SDL_config.h"
+
 #ifndef _MSC_VER
 
 #ifdef __IPHONEOS__
index 8499c328962dce7a6e0d26ffe4fd7a32abce6be5..cf6a33f082be82f483292161ea323a3d6bbbd743 100644 (file)
@@ -29,6 +29,7 @@
 #define _SDL_pixels_h
 
 #include "SDL_stdinc.h"
+#include "SDL_endian.h"
 
 #include "begin_code.h"
 /* Set up for C function definitions, even when using C++ */
@@ -260,6 +261,19 @@ enum
         SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
                                SDL_PACKEDLAYOUT_2101010, 32, 4),
 
+    /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
     SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */
         SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
     SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */
index c6c21398b235cd034113bfc9a78fa24249857a88..03cf170610faa93a28f8908694068c4dfb540b50 100644 (file)
 /* lets us know what version of Mac OS X we're compiling on */
 #include "AvailabilityMacros.h"
 #include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
 #if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
 #undef __IPHONEOS__
 #define __IPHONEOS__ 1
 #undef __MACOSX__
 #else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
 #undef __MACOSX__
 #define __MACOSX__  1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
-# error SDL for Mac OS X only supports deploying on 10.5 and above.
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
 #endif /* TARGET_OS_IPHONE */
 #endif /* defined(__APPLE__) */
 
index e4ed2af6934e326b327fa0093b67afe978ef2eaf..60c87b66ab63b3243ded7707dc0bcc99131f4a38 100644 (file)
@@ -499,6 +499,30 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
  */
 extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
 
+/**
+ *  \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ *  \param renderer The renderer for which integer scaling should be set.
+ *  \param enable   Enable or disable integer scaling
+ *
+ *  This function restricts the logical viewport to integer values - that is, when
+ *  a resolution is between two multiples of a logical size, the viewport size is
+ *  rounded down to the lower multiple.
+ *
+ *  \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+                                                      SDL_bool enable);
+
+/**
+ *  \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ *  \param renderer The renderer from which integer scaling should be queried.
+ *
+ *  \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
 /**
  *  \brief Set the drawing area for rendering on the current target.
  *
@@ -658,7 +682,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
 /**
  *  \brief Clear the current rendering target with the drawing color
  *
- *  This function clears the entire rendering target, ignoring the viewport.
+ *  This function clears the entire rendering target, ignoring the viewport and
+ *  the clip rectangle.
  *
  *  \return 0 on success, or -1 on error
  */
index 6d7163d4d4e6b987c867e5964ac5f5ecd048e851..341dc5cce6a11dc041e626251adb88bd04fc4e4e 100644 (file)
@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
index f460ae7d408931513b0822c59827514c08e55c66..1ad3ac406adc324d21d9a5a130200102c916995f 100644 (file)
@@ -39,12 +39,12 @@ extern "C" {
 #endif
 
 /* RWops Types */
-#define SDL_RWOPS_UNKNOWN   0   /* Unknown stream type */
-#define SDL_RWOPS_WINFILE   1   /* Win32 file */
-#define SDL_RWOPS_STDFILE   2   /* Stdio file */
-#define SDL_RWOPS_JNIFILE   3   /* Android asset */
-#define SDL_RWOPS_MEMORY    4   /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5   /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN   0U  /* Unknown stream type */
+#define SDL_RWOPS_WINFILE   1U  /* Win32 file */
+#define SDL_RWOPS_STDFILE   2U  /* Stdio file */
+#define SDL_RWOPS_JNIFILE   3U  /* Android asset */
+#define SDL_RWOPS_MEMORY    4U  /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U  /* Read-Only memory stream */
 
 /**
  * This is the read/write operation structure -- very basic.
index 887bcd2d46281cb5724649155fc3c6fccf769368..fdf96415fa1453c8f6014486e0a9add313f03f30 100644 (file)
@@ -83,9 +83,6 @@
 #ifdef HAVE_FLOAT_H
 # include <float.h>
 #endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
 
 /**
  *  The number of elements in an array.
 #define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))
 #define SDL_TABLESIZE(table)    SDL_arraysize(table)
 
+/**
+ *  Macro useful for building other macros with strings in them
+ *
+ *  e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg)  #arg
+
 /**
  *  \name Cast operators
  *
index e63ca8903845151a84565f29a8ffc13b5a815362..e4a06a204df9631fa73d2e277f297e1074c5eefc 100644 (file)
@@ -118,6 +118,8 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
     (Uint32 flags, int width, int height, int depth,
      Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+    (Uint32 flags, int width, int height, int depth, Uint32 format);
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
                                                               int width,
                                                               int height,
@@ -127,6 +129,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
                                                               Uint32 Gmask,
                                                               Uint32 Bmask,
                                                               Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+    (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
 
 /**
@@ -184,6 +188,12 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
 /**
  *  Save a surface to a seekable SDL data stream (memory or file).
  *
+ *  Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ *  BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ *  24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ *  surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ *  not supported.
+ *
  *  If \c freedst is non-zero, the stream will be closed after being written.
  *
  *  \return 0 if successful or -1 if there was an error.
index 1056e526bc055dafa87486f0a8fb032aff750f55..71ba5f1f3b5e689791eb69e92f9e4beb7060ea68 100644 (file)
@@ -106,6 +106,10 @@ typedef struct ANativeWindow ANativeWindow;
 typedef void *EGLSurface;
 #endif
 
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
 /**
  *  These are the various supported windowing subsystems
  */
@@ -120,7 +124,8 @@ typedef enum
     SDL_SYSWM_WAYLAND,
     SDL_SYSWM_MIR,
     SDL_SYSWM_WINRT,
-    SDL_SYSWM_ANDROID
+    SDL_SYSWM_ANDROID,
+    SDL_SYSWM_VIVANTE
 } SDL_SYSWM_TYPE;
 
 /**
@@ -166,6 +171,13 @@ struct SDL_SysWMmsg
             int dummy;
             /* No UIKit window events yet */
         } uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+        struct
+        {
+            int dummy;
+            /* No Vivante window events yet */
+        } vivante;
 #endif
         /* Can't have an empty union */
         int dummy;
@@ -259,6 +271,14 @@ struct SDL_SysWMinfo
         } android;
 #endif
 
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+        struct
+        {
+            EGLNativeDisplayType display;
+            EGLNativeWindowType window;
+        } vivante;
+#endif
+
         /* Can't have an empty union */
         int dummy;
     } info;
index de1f160565a03d2f9d4e5ea1a505035b493db309..1700efdd105dca619bdd193e7e059c7d3cc8ac0d 100644 (file)
@@ -59,7 +59,7 @@ typedef struct SDL_version
 */
 #define SDL_MAJOR_VERSION   2
 #define SDL_MINOR_VERSION   0
-#define SDL_PATCHLEVEL      4
+#define SDL_PATCHLEVEL      5
 
 /**
  *  \brief Macro to determine SDL version program was compiled against.
index 52dbbc765d9fadf3d8063ee837239b683956dfb0..73c33eb328326b568ba3262d35d7fb2560cd5845 100644 (file)
@@ -83,6 +83,7 @@ typedef struct
  *  \sa SDL_SetWindowPosition()
  *  \sa SDL_SetWindowSize()
  *  \sa SDL_SetWindowBordered()
+ *  \sa SDL_SetWindowResizable()
  *  \sa SDL_SetWindowTitle()
  *  \sa SDL_ShowWindow()
  */
@@ -95,6 +96,7 @@ typedef struct SDL_Window SDL_Window;
  */
 typedef enum
 {
+    /* !!! FIXME: change this to name = (1<<x). */
     SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
     SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
     SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
@@ -109,13 +111,18 @@ typedef enum
     SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
     SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
     SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
-    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000       /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */
+    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */
+    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */
+    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */
+    SDL_WINDOW_POPUP_MENU    = 0x00080000       /**< window should be treated as a popup menu */
 } SDL_WindowFlags;
 
 /**
  *  \brief Used to indicate that you don't care what the window position is.
  */
-#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000u
 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
 #define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
 #define SDL_WINDOWPOS_ISUNDEFINED(X)    \
@@ -124,7 +131,7 @@ typedef enum
 /**
  *  \brief Used to indicate that the window position should be centered.
  */
-#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000u
 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
 #define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
 #define SDL_WINDOWPOS_ISCENTERED(X)    \
@@ -154,8 +161,9 @@ typedef enum
     SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
     SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
     SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
-    SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the
-                                         window be closed */
+    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
+    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
 } SDL_WindowEventID;
 
 /**
@@ -310,6 +318,25 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * re
  */
 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
 
+/**
+ *  \brief Get the usable desktop area represented by a display, with the
+ *         primary display located at 0,0
+ *
+ *  This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ *  reserved by the system removed. For example, on Mac OS X, this subtracts
+ *  the area occupied by the menu bar and dock.
+ *
+ *  Setting a window to be fullscreen generally bypasses these unusable areas,
+ *  so these are good guidelines for the maximum space available to a
+ *  non-fullscreen window.
+ *
+ *  \return 0 on success, or -1 if the index is out of range.
+ *
+ *  \sa SDL_GetDisplayBounds()
+ *  \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
 /**
  *  \brief Returns the number of available display modes.
  *
@@ -423,7 +450,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
  *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
  *               ::SDL_WINDOW_ALLOW_HIGHDPI.
  *
- *  \return The id of the window created, or zero if window creation failed.
+ *  \return The created window, or NULL if window creation failed.
  *
  *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
  *  in pixels may differ from its size in screen coordinates on platforms with
@@ -442,7 +469,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
  *
  *  \param data A pointer to driver-dependent window creation data
  *
- *  \return The id of the window created, or zero if window creation failed.
+ *  \return The created window, or NULL if window creation failed.
  *
  *  \sa SDL_DestroyWindow()
  */
@@ -586,6 +613,25 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
                                                int *h);
 
+/**
+ *  \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ *  \param window The window to query.
+ *  \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ *  \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ *  \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ *  \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ *  \return 0 on success, or -1 if getting this information is not supported.
+ *
+ *  \note if this function fails (returns -1), the size values will be
+ *        initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ *        if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+                                                     int *top, int *left,
+                                                     int *bottom, int *right);
+
 /**
  *  \brief Set the minimum size of a window's client area.
  *
@@ -661,6 +707,23 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
                                                    SDL_bool bordered);
 
+/**
+ *  \brief Set the user-resizable state of a window.
+ *
+ *  This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ *  allow/disallow user resizing of the window. This is a no-op if the
+ *  window's resizable state already matches the requested state.
+ *
+ *  \param window The window of which to change the resizable state.
+ *  \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ *  \note You can't change the resizable state of a fullscreen window.
+ *
+ *  \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+                                                    SDL_bool resizable);
+
 /**
  *  \brief Show a window.
  *
@@ -744,7 +807,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
  *  \return 0 on success, or -1 on error.
  *
  *  \sa SDL_GetWindowSurface()
- *  \sa SDL_UpdateWindowSurfaceRect()
+ *  \sa SDL_UpdateWindowSurface()
  */
 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
                                                          const SDL_Rect * rects,
@@ -801,6 +864,58 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
  */
 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
 
+/**
+ *  \brief Set the opacity for a window
+ *
+ *  \param window The window which will be made transparent or opaque
+ *  \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ *                 clamped internally between 0.0f and 1.0f.
+ * 
+ *  \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ *  \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ *  \brief Get the opacity of a window.
+ *
+ *  If transparency isn't supported on this platform, opacity will be reported
+ *  as 1.0f without error.
+ *
+ *  \param window The window in question.
+ *  \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ *  \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ *  \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ *  \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ *  \param modal_window The window that should be modal
+ *  \param parent_window The parent window
+ * 
+ *  \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ *  \brief Explicitly sets input focus to the window.
+ *
+ *  You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ *  this with caution, as you might give focus to a window that's completely
+ *  obscured by other windows.
+ *
+ *  \param window The window that should get the input focus
+ * 
+ *  \return 0 on success, or -1 otherwise.
+ *  \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
 /**
  *  \brief Set the gamma ramp for a window.
  *
@@ -920,7 +1035,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
 
 
 /**
- *  \brief Returns whether the screensaver is currently enabled (default on).
+ *  \brief Returns whether the screensaver is currently enabled (default off).
  *
  *  \sa SDL_EnableScreenSaver()
  *  \sa SDL_DisableScreenSaver()
index d5026284063ef8a24df5c667b54aff06f7782b37..01a0c05f0019415f3c2f29908588a3b06ed6222f 100644 (file)
@@ -1,10 +1,11 @@
 # sdl2 cmake project-config input for ./configure scripts
 
-set(prefix "/usr/local/cross-tools/x86_64-w64-mingw32") 
+set(prefix "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64") 
 set(exec_prefix "${prefix}")
 set(libdir "${exec_prefix}/lib")
-set(SDL2_PREFIX "/usr/local/cross-tools/x86_64-w64-mingw32")
-set(SDL2_EXEC_PREFIX "/usr/local/cross-tools/x86_64-w64-mingw32")
+set(SDL2_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64")
+set(SDL2_EXEC_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64")
 set(SDL2_LIBDIR "${exec_prefix}/lib")
 set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
 set(SDL2_LIBRARIES "-L${SDL2_LIBDIR}  -lmingw32 -lSDL2main -lSDL2  -mwindows")
+string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
index 21b5c1ffe88e90203bf74bc9ef369ceaa9599107..8c2e74a1b8fd475e6bf7e58d81f372569a88ddff 100644 (file)
Binary files a/misc/builddeps/win64/sdl/lib/libSDL2.a and b/misc/builddeps/win64/sdl/lib/libSDL2.a differ
index 99de4cdbab8548b5c992303c083ba9f4d447ff60..9ce29931463545b73fc58ccbedd1f7f2dfaa2ce3 100755 (executable)
@@ -5,10 +5,10 @@
 # It is necessary for linking the library.
 
 # The name that we can dlopen(3).
-dlname='../bin/SDL2.dll'
+dlname=''
 
 # Names of this library.
-library_names='libSDL2.dll.a'
+library_names=''
 
 # The name of the static archive.
 old_library='libSDL2.a'
@@ -25,7 +25,7 @@ weak_library_names=''
 # Version information for libSDL2.
 current=4
 age=4
-revision=0
+revision=1
 
 # Is this an already installed library?
 installed=yes
@@ -38,4 +38,4 @@ dlopen=''
 dlpreopen=''
 
 # Directory that this library needs to be installed in:
-libdir='/Users/slouken/release/SDL/SDL2-2.0.4/x86_64-w64-mingw32/lib'
+libdir='/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64/lib'
index a077b96a3d2a40ed657661f178967f23fddb29c7..5cf618018c3c4371b791cce637e5ba191ae99d6d 100644 (file)
Binary files a/misc/builddeps/win64/sdl/lib/libSDL2_test.a and b/misc/builddeps/win64/sdl/lib/libSDL2_test.a differ
index 6c9c286af134fc72b0e19015a89ede93a8d0fbde..57acf094ec9826694f7aaa72d326e078269e3980 100644 (file)
Binary files a/misc/builddeps/win64/sdl/lib/libSDL2main.a and b/misc/builddeps/win64/sdl/lib/libSDL2main.a differ
index 8e863414676728acb398818043998fbd22e25b07..5be7a89914e91a556b24745c537e4c4f15556629 100644 (file)
@@ -1,13 +1,13 @@
 # sdl pkg-config source file
 
-prefix=/usr/local/cross-tools/x86_64-w64-mingw32
+prefix=/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 
 Name: sdl2
 Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
-Version: 2.0.4
+Version: 2.0.5
 Requires:
 Conflicts:
 Libs: -L${libdir}  -lmingw32 -lSDL2main -lSDL2  -mwindows
index a03b2d2706dc700013c570c4316b0c2a0c289067..b915f99edec28587c0aec12335849d08768475b6 100644 (file)
@@ -4,6 +4,9 @@
 # stolen back from Frank Belew
 # stolen from Manish Singh
 # Shamelessly stolen from Owen Taylor
+#
+# Changelog:
+# * also look for SDL2.framework under Mac OS X
 
 # serial 1
 
@@ -20,6 +23,10 @@ AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL
             sdl_exec_prefix="$withval", sdl_exec_prefix="")
 AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
                    , enable_sdltest=yes)
+AC_ARG_ENABLE(sdlframework, [  --disable-sdlframework Do not search for SDL2.framework],
+        , search_sdl_framework=yes)
+
+AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
 
   min_sdl_version=ifelse([$1], ,2.0.0,$1)
 
@@ -53,14 +60,36 @@ AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run
     fi
     AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
     PATH="$as_save_PATH"
-    AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
     no_sdl=""
 
-    if test "$SDL2_CONFIG" = "no" ; then
-      no_sdl=yes
-    else
-      SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
-      SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+    if test "$SDL2_CONFIG" = "no" -a "x$search_sdl_framework" = "xyes"; then
+      AC_MSG_CHECKING(for SDL2.framework)
+      if test "x$SDL2_FRAMEWORK" != x; then
+        sdl_framework=$SDL2_FRAMEWORK
+      else
+        for d in / ~/ /System/; do
+          if test -d "$dLibrary/Frameworks/SDL2.framework"; then
+            sdl_framework="$dLibrary/Frameworks/SDL2.framework"
+          fi
+        done
+      fi
+
+      if test -d $sdl_framework; then
+        AC_MSG_RESULT($sdl_framework)
+        sdl_framework_dir=`dirname $sdl_framework`
+        SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
+        SDL_LIBS="-F$sdl_framework_dir -Wl,-framework,SDL2"
+      else
+        no_sdl=yes
+      fi
+    fi
+
+    if test "$SDL2_CONFIG" != "no"; then
+      if test "x$sdl_pc" = "xno"; then
+        AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+        SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+        SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+      fi
 
       sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
              sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
@@ -141,12 +170,15 @@ int main (int argc, char *argv[])
         CFLAGS="$ac_save_CFLAGS"
         CXXFLAGS="$ac_save_CXXFLAGS"
         LIBS="$ac_save_LIBS"
+
+      fi
+      if test "x$sdl_pc" = "xno"; then
+        if test "x$no_sdl" = "xyes"; then
+          AC_MSG_RESULT(no)
+        else
+          AC_MSG_RESULT(yes)
+        fi
       fi
-    fi
-    if test "x$no_sdl" = x ; then
-      AC_MSG_RESULT(yes)
-    else
-      AC_MSG_RESULT(no)
     fi
   fi
   if test "x$no_sdl" = x ; then
index 7647b5111e1fe97548e3c918eaa5f5e67e866c10..1a3fa285cdd9c2c234389784f0585e7df31fd53c 100644 (file)
@@ -72,14 +72,14 @@ extern "C" {
  *  specify the subsystems which you will be using in your application.
  */
 /* @{ */
-#define SDL_INIT_TIMER          0x00000001
-#define SDL_INIT_AUDIO          0x00000010
-#define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
-#define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
-#define SDL_INIT_HAPTIC         0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS         0x00004000
-#define SDL_INIT_NOPARACHUTE    0x00100000  /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER          0x00000001u
+#define SDL_INIT_AUDIO          0x00000010u
+#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC         0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS         0x00004000u
+#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */
 #define SDL_INIT_EVERYTHING ( \
                 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
@@ -95,8 +95,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
  *  This function initializes specific SDL subsystems
  *
  *  Subsystem initialization is ref-counted, you must call
- *  SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
- *  shutdown a subsystem manually (or call SDL_Quit to force shutdown).
+ *  SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
+ *  shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
  *  If a subsystem is already loaded then this call will
  *  increase the ref-count and return.
  */
index 4f6552146891c79027a5577632e95cfa7eaf82d9..d51f0d1ce2b461648fe17f9c8b4b453a0ed73a1d 100644 (file)
@@ -278,7 +278,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
  *      protect data structures that it accesses by calling SDL_LockAudio()
  *      and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL
  *      pointer here, and call SDL_QueueAudio() with some frequency, to queue
- *      more audio samples to be played.
+ *      more audio samples to be played (or for capture devices, call
+ *      SDL_DequeueAudio() with some frequency, to obtain audio samples).
  *    - \c desired->userdata is passed as the first parameter to your callback
  *      function. If you passed a NULL callback, this value is ignored.
  *
@@ -482,6 +483,10 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
 /**
  *  Queue more audio on non-callback devices.
  *
+ *  (If you are looking to retrieve queued audio from a non-callback capture
+ *  device, you want SDL_DequeueAudio() instead. This will return -1 to
+ *  signify an error if you use it with capture devices.)
+ *
  *  SDL offers two ways to feed audio to the device: you can either supply a
  *  callback that SDL triggers with some frequency to obtain more audio
  *  (pull method), or you can supply no callback, and then SDL will expect
@@ -516,21 +521,76 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
  */
 extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
 
+/**
+ *  Dequeue more audio on non-callback devices.
+ *
+ *  (If you are looking to queue audio for output on a non-callback playback
+ *  device, you want SDL_QueueAudio() instead. This will always return 0
+ *  if you use it with playback devices.)
+ *
+ *  SDL offers two ways to retrieve audio from a capture device: you can
+ *  either supply a callback that SDL triggers with some frequency as the
+ *  device records more audio data, (push method), or you can supply no
+ *  callback, and then SDL will expect you to retrieve data at regular
+ *  intervals (pull method) with this function.
+ *
+ *  There are no limits on the amount of data you can queue, short of
+ *  exhaustion of address space. Data from the device will keep queuing as
+ *  necessary without further intervention from you. This means you will
+ *  eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ *  Capture devices will not queue data when paused; if you are expecting
+ *  to not need captured audio for some length of time, use
+ *  SDL_PauseAudioDevice() to stop the capture device from queueing more
+ *  data. This can be useful during, say, level loading times. When
+ *  unpaused, capture devices will start queueing data from that point,
+ *  having flushed any capturable data available while paused.
+ *
+ *  This function is thread-safe, but dequeueing from the same device from
+ *  two threads at once does not promise which thread will dequeued data
+ *  first.
+ *
+ *  You may not dequeue audio from a device that is using an
+ *  application-supplied callback; doing so returns an error. You have to use
+ *  the audio callback, or dequeue audio with this function, but not both.
+ *
+ *  You should not call SDL_LockAudio() on the device before queueing; SDL
+ *  handles locking internally for this function.
+ *
+ *  \param dev The device ID from which we will dequeue audio.
+ *  \param data A pointer into where audio data should be copied.
+ *  \param len The number of bytes (not samples!) to which (data) points.
+ *  \return number of bytes dequeued, which could be less than requested.
+ *
+ *  \sa SDL_GetQueuedAudioSize
+ *  \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
+
 /**
  *  Get the number of bytes of still-queued audio.
  *
- *  This is the number of bytes that have been queued for playback with
- *  SDL_QueueAudio(), but have not yet been sent to the hardware.
+ *  For playback device:
+ *
+ *    This is the number of bytes that have been queued for playback with
+ *    SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ *    number may shrink at any time, so this only informs of pending data.
+ *
+ *    Once we've sent it to the hardware, this function can not decide the
+ *    exact byte boundary of what has been played. It's possible that we just
+ *    gave the hardware several kilobytes right before you called this
+ *    function, but it hasn't played any of it yet, or maybe half of it, etc.
+ *
+ *  For capture devices:
  *
- *  Once we've sent it to the hardware, this function can not decide the exact
- *  byte boundary of what has been played. It's possible that we just gave the
- *  hardware several kilobytes right before you called this function, but it
- *  hasn't played any of it yet, or maybe half of it, etc.
+ *    This is the number of bytes that have been captured by the device and
+ *    are waiting for you to dequeue. This number may grow at any time, so
+ *    this only informs of the lower-bound of available data.
  *
  *  You may not queue audio on a device that is using an application-supplied
  *  callback; calling this function on such a device always returns 0.
- *  You have to use the audio callback or queue audio with SDL_QueueAudio(),
- *  but not both.
+ *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ *  the audio callback, but not both.
  *
  *  You should not call SDL_LockAudio() on the device before querying; SDL
  *  handles locking internally for this function.
@@ -544,10 +604,17 @@ extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *da
 extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
 
 /**
- *  Drop any queued audio data waiting to be sent to the hardware.
+ *  Drop any queued audio data. For playback devices, this is any queued data
+ *  still waiting to be submitted to the hardware. For capture devices, this
+ *  is any data that was queued by the device that hasn't yet been dequeued by
+ *  the application.
  *
- *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- *  the hardware will start playing silence if more audio isn't queued.
+ *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ *  playback devices, the hardware will start playing silence if more audio
+ *  isn't queued. Unpaused capture devices will start filling the queue again
+ *  as soon as they have more data available (which, depending on the state
+ *  of the hardware and the thread, could be before this function call
+ *  returns!).
  *
  *  This will not prevent playback of queued audio that's already been sent
  *  to the hardware, as we can not undo that, so expect there to be some
@@ -557,8 +624,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
  *
  *  You may not queue audio on a device that is using an application-supplied
  *  callback; calling this function on such a device is always a no-op.
- *  You have to use the audio callback or queue audio with SDL_QueueAudio(),
- *  but not both.
+ *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ *  the audio callback, but not both.
  *
  *  You should not call SDL_LockAudio() on the device before clearing the
  *  queue; SDL handles locking internally for this function.
index 1437f4c7053a9aa29633be3a288654e40cceb5c3..edb89ef49ec52ef5826aa42e328974c7b6b9c0c3 100644 (file)
@@ -136,6 +136,9 @@ typedef enum
 
     /* Drag and drop events */
     SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
+    SDL_DROPTEXT,                 /**< text/plain drag-and-drop event */
+    SDL_DROPBEGIN,                /**< A new set of drops is beginning (NULL filename) */
+    SDL_DROPCOMPLETE,             /**< Current set of drops is now complete (NULL filename) */
 
     /* Audio hotplug events */
     SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
@@ -461,9 +464,10 @@ typedef struct SDL_DollarGestureEvent
  */
 typedef struct SDL_DropEvent
 {
-    Uint32 type;        /**< ::SDL_DROPFILE */
+    Uint32 type;        /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
     Uint32 timestamp;
-    char *file;         /**< The file name, which should be freed with SDL_free() */
+    char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+    Uint32 windowID;    /**< The window that was dropped on, if any */
 } SDL_DropEvent;
 
 
index 42087eea1623db80586d779cfa6b081a95c2a937..e67fd9fd0e9c19cf9239831ca54ac59b3faf650a 100644 (file)
@@ -93,7 +93,7 @@ typedef struct SDL_GameControllerButtonBind
  *      }
  *  }
  *
- *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
  *  guid,name,mappings
  *
  *  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
@@ -136,14 +136,14 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingStr
 /**
  *  Get a mapping string for a GUID
  *
- *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ *  \return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available
  */
 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
 
 /**
  *  Get a mapping string for an open GameController
  *
- *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ *  \return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available
  */
 extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
 
index b36d78b1275a91a63bf7305638f1bc0b995fb90b..9421c8f17752d038fbf04b5903072517159f7050 100644 (file)
@@ -149,7 +149,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_CONSTANT   (1<<0)
+#define SDL_HAPTIC_CONSTANT   (1u<<0)
 
 /**
  *  \brief Sine wave effect supported.
@@ -158,7 +158,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SINE       (1<<1)
+#define SDL_HAPTIC_SINE       (1u<<1)
 
 /**
  *  \brief Left/Right effect supported.
@@ -169,7 +169,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
  *          we ran out of bits, and this is important for XInput devices.
  */
-#define SDL_HAPTIC_LEFTRIGHT     (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT     (1u<<2)
 
 /* !!! FIXME: put this back when we have more bits in 2.1 */
 /* #define SDL_HAPTIC_SQUARE     (1<<2) */
@@ -181,7 +181,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_TRIANGLE   (1<<3)
+#define SDL_HAPTIC_TRIANGLE   (1u<<3)
 
 /**
  *  \brief Sawtoothup wave effect supported.
@@ -190,7 +190,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
 
 /**
  *  \brief Sawtoothdown wave effect supported.
@@ -199,7 +199,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticPeriodic
  */
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
 
 /**
  *  \brief Ramp effect supported.
@@ -208,7 +208,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticRamp
  */
-#define SDL_HAPTIC_RAMP       (1<<6)
+#define SDL_HAPTIC_RAMP       (1u<<6)
 
 /**
  *  \brief Spring effect supported - uses axes position.
@@ -218,7 +218,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_SPRING     (1<<7)
+#define SDL_HAPTIC_SPRING     (1u<<7)
 
 /**
  *  \brief Damper effect supported - uses axes velocity.
@@ -228,7 +228,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_DAMPER     (1<<8)
+#define SDL_HAPTIC_DAMPER     (1u<<8)
 
 /**
  *  \brief Inertia effect supported - uses axes acceleration.
@@ -238,7 +238,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_INERTIA    (1<<9)
+#define SDL_HAPTIC_INERTIA    (1u<<9)
 
 /**
  *  \brief Friction effect supported - uses axes movement.
@@ -248,14 +248,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticCondition
  */
-#define SDL_HAPTIC_FRICTION   (1<<10)
+#define SDL_HAPTIC_FRICTION   (1u<<10)
 
 /**
  *  \brief Custom effect is supported.
  *
  *  User defined custom haptic effect.
  */
-#define SDL_HAPTIC_CUSTOM     (1<<11)
+#define SDL_HAPTIC_CUSTOM     (1u<<11)
 
 /* @} *//* Haptic effects */
 
@@ -268,7 +268,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticSetGain
  */
-#define SDL_HAPTIC_GAIN       (1<<12)
+#define SDL_HAPTIC_GAIN       (1u<<12)
 
 /**
  *  \brief Device can set autocenter.
@@ -277,7 +277,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticSetAutocenter
  */
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
 
 /**
  *  \brief Device can be queried for effect status.
@@ -286,7 +286,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *
  *  \sa SDL_HapticGetEffectStatus
  */
-#define SDL_HAPTIC_STATUS     (1<<14)
+#define SDL_HAPTIC_STATUS     (1u<<14)
 
 /**
  *  \brief Device can be paused.
@@ -294,7 +294,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
  *  \sa SDL_HapticPause
  *  \sa SDL_HapticUnpause
  */
-#define SDL_HAPTIC_PAUSE      (1<<15)
+#define SDL_HAPTIC_PAUSE      (1u<<15)
 
 
 /**
index 3bd5435fb002331dff1a382a9f305878c90b03d2..dd1546431abe02e1d24df8e95f5fca6768773dd0 100644 (file)
@@ -233,16 +233,27 @@ extern "C" {
 #define SDL_HINT_GRAB_KEYBOARD              "SDL_GRAB_KEYBOARD"
 
 /**
-*  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-*  This variable can be set to the following values:
-*    "0"       - Relative mouse mode uses raw input
-*    "1"       - Relative mouse mode uses mouse warping
-*
-*  By default SDL will use raw input for relative mouse mode
-*/
+ *  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Relative mouse mode uses raw input
+ *    "1"       - Relative mouse mode uses mouse warping
+ *
+ *  By default SDL will use raw input for relative mouse mode
+ */
 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    "SDL_MOUSE_RELATIVE_MODE_WARP"
 
+/**
+ *  \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Ignore mouse clicks that activate a window
+ *    "1"       - Generate events for mouse clicks that activate a window
+ *
+ *  By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
 /**
  *  \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
  *
@@ -257,8 +268,8 @@ extern "C" {
  *  this is problematic. This functionality can be disabled by setting this
  *  hint.
  *
- *  As of SDL 2.0.4, SDL_EnableScreenSaver and SDL_DisableScreenSaver accomplish
- *  the same thing on iOS. They should be preferred over this hint.
+ *  As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
+ *  accomplish the same thing on iOS. They should be preferred over this hint.
  *
  *  This variable can be set to the following values:
  *    "0"       - Enable idle timer
@@ -276,7 +287,35 @@ extern "C" {
  *    "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
  */
 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-    
+
+/**
+ *  \brief  A variable controlling whether controllers used with the Apple TV
+ *  generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Controller input does not generate UI events (the default).
+ *    "1"       - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief  A variable controlling whether the Apple TV remote's joystick axes
+ *         will automatically match the rotation of the remote.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Remote orientation does not affect joystick axes (the default).
+ *    "1"       - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
 /**
  *  \brief  A variable controlling whether the Android / iOS built-in
  *  accelerometer should be listed as a joystick device, rather than listing
@@ -369,7 +408,7 @@ extern "C" {
 *  Use this hint in case you need to set SDL's threads stack size to other than the default.
 *  This is specially useful if you build SDL against a non glibc libc library (such as musl) which
 *  provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
-*  Support for this hint is currently available only in the pthread backend.
+*  Support for this hint is currently available only in the pthread, Windows, and PSP backend.
 */
 #define SDL_HINT_THREAD_STACK_SIZE              "SDL_THREAD_STACK_SIZE"
 
@@ -431,7 +470,7 @@ extern "C" {
  *  privacy policy.
  *
  *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- *  before calling any SDL_Init functions.  The contents of the hint should
+ *  before calling any SDL_Init() functions.  The contents of the hint should
  *  be a valid URL.  For example, "http://www.example.com".
  *
  *  The default value is "", which will prevent SDL from adding a privacy policy
@@ -461,7 +500,7 @@ extern "C" {
  *  The contents of this hint should be encoded as a UTF8 string.
  *
  *  The default value is "Privacy Policy".  This hint should only be set during app
- *  initialization, preferably before any calls to SDL_Init.
+ *  initialization, preferably before any calls to SDL_Init().
  *
  *  For additional information on linking to a privacy policy, see the documentation for
  *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.
@@ -630,6 +669,44 @@ extern "C" {
  */
 #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4    "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
 
+/**
+ *  \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ *   "0"       - Surfaces with a colorkey or an alpha channel are saved to a
+ *               32-bit BMP file with an alpha mask. SDL will use the bitmap
+ *               header version 4 and set the alpha mask accordingly.
+ *   "1"       - Surfaces with a colorkey or an alpha channel are saved to a
+ *               32-bit BMP file without an alpha mask. The alpha channel data
+ *               will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ *   "0"       - SDL will raise the 0x406D1388 Exception to name threads.
+ *               This is the default behavior of SDL <= 2.0.4. (default)
+ *   "1"       - SDL will not raise this exception, and threads will be unnamed.
+ *               For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER           "SDL_RPI_VIDEO_LAYER"
+
 /**
  *  \brief  An enumeration of hint priorities
  */
@@ -669,6 +746,13 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  */
 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
 
+/**
+ *  \brief Get a hint
+ *
+ *  \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
 /**
  *  \brief Add a function to watch a particular hint
  *
index 266f3b3871d312b4c5155b5ad92602a80f5cfa0f..f5dbc94871ba0b1c22cadb010130eb4dcdfb48fc 100644 (file)
@@ -24,7 +24,7 @@
  *
  *  Include file for SDL joystick event handling
  *
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
  *   behind a device_index changing as joysticks are plugged and unplugged.
  *
  * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
index bbba0f07bc70e3d95e89ff34738e713238a92501..f80b6d2de88a77c2554072214ec945be4056f2fa 100644 (file)
@@ -136,7 +136,7 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
  *          copy it.  If the key doesn't have a name, this function returns an
  *          empty string ("").
  *
- *  \sa SDL_Key
+ *  \sa SDL_Keycode
  */
 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
 
index 9ce3754e93c3cd77dd5e1ef48ff089cdbcaf1050..67afea5e70f8108e0128a877630d812e04570af1 100644 (file)
@@ -63,7 +63,7 @@
 /* On Android SDL provides a Java class in SDLActivity.java that is the
    main activity entry point.
 
-   See README-android.txt for more details on extending that class.
+   See README-android.md for more details on extending that class.
  */
 #define SDL_MAIN_NEEDED
 
index ea9622f0f7627edb5474ad0bfc0931d866d8f21a..46f046d0c0f82e801c046b5f169779e75d221c6f 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
 typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
 
 /**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
  */
 typedef enum
 {
@@ -254,9 +254,11 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
 
 /**
- *  \brief Frees a cursor created with SDL_CreateCursor().
+ *  \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
  *
  *  \sa SDL_CreateCursor()
+ *  \sa SDL_CreateColorCursor()
+ *  \sa SDL_CreateSystemCursor()
  */
 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
 
index bcc127779dabd3a759a8ea41ed30537d15ce5316..15abee796bb107523bf12874f9be8b5c8bf277e3 100644 (file)
@@ -24,6 +24,7 @@
  *
  *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.
  */
+#include "SDL_config.h"
 
 #ifdef __IPHONEOS__
 #include <OpenGLES/ES1/gl.h>
index edcd1a24aeb8c2e5a94c3f6c769ec61406dac1ae..c961f0f7d1fc7982fae36a516ab596a4bcbd729f 100644 (file)
@@ -24,6 +24,8 @@
  *
  *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
  */
+#include "SDL_config.h"
+
 #ifndef _MSC_VER
 
 #ifdef __IPHONEOS__
index 8499c328962dce7a6e0d26ffe4fd7a32abce6be5..cf6a33f082be82f483292161ea323a3d6bbbd743 100644 (file)
@@ -29,6 +29,7 @@
 #define _SDL_pixels_h
 
 #include "SDL_stdinc.h"
+#include "SDL_endian.h"
 
 #include "begin_code.h"
 /* Set up for C function definitions, even when using C++ */
@@ -260,6 +261,19 @@ enum
         SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
                                SDL_PACKEDLAYOUT_2101010, 32, 4),
 
+    /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
     SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */
         SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
     SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */
index c6c21398b235cd034113bfc9a78fa24249857a88..03cf170610faa93a28f8908694068c4dfb540b50 100644 (file)
 /* lets us know what version of Mac OS X we're compiling on */
 #include "AvailabilityMacros.h"
 #include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
 #if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
 #undef __IPHONEOS__
 #define __IPHONEOS__ 1
 #undef __MACOSX__
 #else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
 #undef __MACOSX__
 #define __MACOSX__  1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
-# error SDL for Mac OS X only supports deploying on 10.5 and above.
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
 #endif /* TARGET_OS_IPHONE */
 #endif /* defined(__APPLE__) */
 
index e4ed2af6934e326b327fa0093b67afe978ef2eaf..60c87b66ab63b3243ded7707dc0bcc99131f4a38 100644 (file)
@@ -499,6 +499,30 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
  */
 extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
 
+/**
+ *  \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ *  \param renderer The renderer for which integer scaling should be set.
+ *  \param enable   Enable or disable integer scaling
+ *
+ *  This function restricts the logical viewport to integer values - that is, when
+ *  a resolution is between two multiples of a logical size, the viewport size is
+ *  rounded down to the lower multiple.
+ *
+ *  \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+                                                      SDL_bool enable);
+
+/**
+ *  \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ *  \param renderer The renderer from which integer scaling should be queried.
+ *
+ *  \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
 /**
  *  \brief Set the drawing area for rendering on the current target.
  *
@@ -658,7 +682,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
 /**
  *  \brief Clear the current rendering target with the drawing color
  *
- *  This function clears the entire rendering target, ignoring the viewport.
+ *  This function clears the entire rendering target, ignoring the viewport and
+ *  the clip rectangle.
  *
  *  \return 0 on success, or -1 on error
  */
index 6d7163d4d4e6b987c867e5964ac5f5ecd048e851..341dc5cce6a11dc041e626251adb88bd04fc4e4e 100644 (file)
@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
index f460ae7d408931513b0822c59827514c08e55c66..1ad3ac406adc324d21d9a5a130200102c916995f 100644 (file)
@@ -39,12 +39,12 @@ extern "C" {
 #endif
 
 /* RWops Types */
-#define SDL_RWOPS_UNKNOWN   0   /* Unknown stream type */
-#define SDL_RWOPS_WINFILE   1   /* Win32 file */
-#define SDL_RWOPS_STDFILE   2   /* Stdio file */
-#define SDL_RWOPS_JNIFILE   3   /* Android asset */
-#define SDL_RWOPS_MEMORY    4   /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5   /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN   0U  /* Unknown stream type */
+#define SDL_RWOPS_WINFILE   1U  /* Win32 file */
+#define SDL_RWOPS_STDFILE   2U  /* Stdio file */
+#define SDL_RWOPS_JNIFILE   3U  /* Android asset */
+#define SDL_RWOPS_MEMORY    4U  /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U  /* Read-Only memory stream */
 
 /**
  * This is the read/write operation structure -- very basic.
index 887bcd2d46281cb5724649155fc3c6fccf769368..fdf96415fa1453c8f6014486e0a9add313f03f30 100644 (file)
@@ -83,9 +83,6 @@
 #ifdef HAVE_FLOAT_H
 # include <float.h>
 #endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
 
 /**
  *  The number of elements in an array.
 #define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))
 #define SDL_TABLESIZE(table)    SDL_arraysize(table)
 
+/**
+ *  Macro useful for building other macros with strings in them
+ *
+ *  e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg)  #arg
+
 /**
  *  \name Cast operators
  *
index e63ca8903845151a84565f29a8ffc13b5a815362..e4a06a204df9631fa73d2e277f297e1074c5eefc 100644 (file)
@@ -118,6 +118,8 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
     (Uint32 flags, int width, int height, int depth,
      Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+    (Uint32 flags, int width, int height, int depth, Uint32 format);
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
                                                               int width,
                                                               int height,
@@ -127,6 +129,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
                                                               Uint32 Gmask,
                                                               Uint32 Bmask,
                                                               Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+    (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
 
 /**
@@ -184,6 +188,12 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
 /**
  *  Save a surface to a seekable SDL data stream (memory or file).
  *
+ *  Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ *  BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ *  24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ *  surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ *  not supported.
+ *
  *  If \c freedst is non-zero, the stream will be closed after being written.
  *
  *  \return 0 if successful or -1 if there was an error.
index 1056e526bc055dafa87486f0a8fb032aff750f55..71ba5f1f3b5e689791eb69e92f9e4beb7060ea68 100644 (file)
@@ -106,6 +106,10 @@ typedef struct ANativeWindow ANativeWindow;
 typedef void *EGLSurface;
 #endif
 
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
 /**
  *  These are the various supported windowing subsystems
  */
@@ -120,7 +124,8 @@ typedef enum
     SDL_SYSWM_WAYLAND,
     SDL_SYSWM_MIR,
     SDL_SYSWM_WINRT,
-    SDL_SYSWM_ANDROID
+    SDL_SYSWM_ANDROID,
+    SDL_SYSWM_VIVANTE
 } SDL_SYSWM_TYPE;
 
 /**
@@ -166,6 +171,13 @@ struct SDL_SysWMmsg
             int dummy;
             /* No UIKit window events yet */
         } uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+        struct
+        {
+            int dummy;
+            /* No Vivante window events yet */
+        } vivante;
 #endif
         /* Can't have an empty union */
         int dummy;
@@ -259,6 +271,14 @@ struct SDL_SysWMinfo
         } android;
 #endif
 
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+        struct
+        {
+            EGLNativeDisplayType display;
+            EGLNativeWindowType window;
+        } vivante;
+#endif
+
         /* Can't have an empty union */
         int dummy;
     } info;
index de1f160565a03d2f9d4e5ea1a505035b493db309..1700efdd105dca619bdd193e7e059c7d3cc8ac0d 100644 (file)
@@ -59,7 +59,7 @@ typedef struct SDL_version
 */
 #define SDL_MAJOR_VERSION   2
 #define SDL_MINOR_VERSION   0
-#define SDL_PATCHLEVEL      4
+#define SDL_PATCHLEVEL      5
 
 /**
  *  \brief Macro to determine SDL version program was compiled against.
index 52dbbc765d9fadf3d8063ee837239b683956dfb0..73c33eb328326b568ba3262d35d7fb2560cd5845 100644 (file)
@@ -83,6 +83,7 @@ typedef struct
  *  \sa SDL_SetWindowPosition()
  *  \sa SDL_SetWindowSize()
  *  \sa SDL_SetWindowBordered()
+ *  \sa SDL_SetWindowResizable()
  *  \sa SDL_SetWindowTitle()
  *  \sa SDL_ShowWindow()
  */
@@ -95,6 +96,7 @@ typedef struct SDL_Window SDL_Window;
  */
 typedef enum
 {
+    /* !!! FIXME: change this to name = (1<<x). */
     SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
     SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
     SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
@@ -109,13 +111,18 @@ typedef enum
     SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
     SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
     SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
-    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000       /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */
+    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */
+    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */
+    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */
+    SDL_WINDOW_POPUP_MENU    = 0x00080000       /**< window should be treated as a popup menu */
 } SDL_WindowFlags;
 
 /**
  *  \brief Used to indicate that you don't care what the window position is.
  */
-#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000u
 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
 #define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
 #define SDL_WINDOWPOS_ISUNDEFINED(X)    \
@@ -124,7 +131,7 @@ typedef enum
 /**
  *  \brief Used to indicate that the window position should be centered.
  */
-#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000u
 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
 #define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
 #define SDL_WINDOWPOS_ISCENTERED(X)    \
@@ -154,8 +161,9 @@ typedef enum
     SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
     SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
     SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
-    SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the
-                                         window be closed */
+    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */
+    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
 } SDL_WindowEventID;
 
 /**
@@ -310,6 +318,25 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * re
  */
 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
 
+/**
+ *  \brief Get the usable desktop area represented by a display, with the
+ *         primary display located at 0,0
+ *
+ *  This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ *  reserved by the system removed. For example, on Mac OS X, this subtracts
+ *  the area occupied by the menu bar and dock.
+ *
+ *  Setting a window to be fullscreen generally bypasses these unusable areas,
+ *  so these are good guidelines for the maximum space available to a
+ *  non-fullscreen window.
+ *
+ *  \return 0 on success, or -1 if the index is out of range.
+ *
+ *  \sa SDL_GetDisplayBounds()
+ *  \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
 /**
  *  \brief Returns the number of available display modes.
  *
@@ -423,7 +450,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
  *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
  *               ::SDL_WINDOW_ALLOW_HIGHDPI.
  *
- *  \return The id of the window created, or zero if window creation failed.
+ *  \return The created window, or NULL if window creation failed.
  *
  *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
  *  in pixels may differ from its size in screen coordinates on platforms with
@@ -442,7 +469,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
  *
  *  \param data A pointer to driver-dependent window creation data
  *
- *  \return The id of the window created, or zero if window creation failed.
+ *  \return The created window, or NULL if window creation failed.
  *
  *  \sa SDL_DestroyWindow()
  */
@@ -586,6 +613,25 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
                                                int *h);
 
+/**
+ *  \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ *  \param window The window to query.
+ *  \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ *  \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ *  \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ *  \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ *  \return 0 on success, or -1 if getting this information is not supported.
+ *
+ *  \note if this function fails (returns -1), the size values will be
+ *        initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ *        if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+                                                     int *top, int *left,
+                                                     int *bottom, int *right);
+
 /**
  *  \brief Set the minimum size of a window's client area.
  *
@@ -661,6 +707,23 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
                                                    SDL_bool bordered);
 
+/**
+ *  \brief Set the user-resizable state of a window.
+ *
+ *  This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ *  allow/disallow user resizing of the window. This is a no-op if the
+ *  window's resizable state already matches the requested state.
+ *
+ *  \param window The window of which to change the resizable state.
+ *  \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ *  \note You can't change the resizable state of a fullscreen window.
+ *
+ *  \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+                                                    SDL_bool resizable);
+
 /**
  *  \brief Show a window.
  *
@@ -744,7 +807,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
  *  \return 0 on success, or -1 on error.
  *
  *  \sa SDL_GetWindowSurface()
- *  \sa SDL_UpdateWindowSurfaceRect()
+ *  \sa SDL_UpdateWindowSurface()
  */
 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
                                                          const SDL_Rect * rects,
@@ -801,6 +864,58 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
  */
 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
 
+/**
+ *  \brief Set the opacity for a window
+ *
+ *  \param window The window which will be made transparent or opaque
+ *  \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ *                 clamped internally between 0.0f and 1.0f.
+ * 
+ *  \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ *  \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ *  \brief Get the opacity of a window.
+ *
+ *  If transparency isn't supported on this platform, opacity will be reported
+ *  as 1.0f without error.
+ *
+ *  \param window The window in question.
+ *  \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ *  \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ *  \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ *  \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ *  \param modal_window The window that should be modal
+ *  \param parent_window The parent window
+ * 
+ *  \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ *  \brief Explicitly sets input focus to the window.
+ *
+ *  You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ *  this with caution, as you might give focus to a window that's completely
+ *  obscured by other windows.
+ *
+ *  \param window The window that should get the input focus
+ * 
+ *  \return 0 on success, or -1 otherwise.
+ *  \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
 /**
  *  \brief Set the gamma ramp for a window.
  *
@@ -920,7 +1035,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
 
 
 /**
- *  \brief Returns whether the screensaver is currently enabled (default on).
+ *  \brief Returns whether the screensaver is currently enabled (default off).
  *
  *  \sa SDL_EnableScreenSaver()
  *  \sa SDL_DisableScreenSaver()
index 835d005fe6999f6089fe0a08b7d86455d783ab6b..847840800b8af937b582c49eee3f67226064b7ac 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>BuildMachineOSBuild</key>
-       <string>15C50</string>
+       <string>15G1004</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleExecutable</key>
@@ -19,7 +19,7 @@
        <key>CFBundlePackageType</key>
        <string>FMWK</string>
        <key>CFBundleShortVersionString</key>
-       <string>2.0.4</string>
+       <string>2.0.5</string>
        <key>CFBundleSignature</key>
        <string>SDLX</string>
        <key>CFBundleSupportedPlatforms</key>
                <string>MacOSX</string>
        </array>
        <key>CFBundleVersion</key>
-       <string>2.0.4</string>
+       <string>2.0.5</string>
        <key>DTCompiler</key>
        <string>com.apple.compilers.llvm.clang.1_0</string>
        <key>DTPlatformBuild</key>
-       <string>7C68</string>
+       <string>8A218a</string>
        <key>DTPlatformVersion</key>
        <string>GM</string>
        <key>DTSDKBuild</key>
-       <string>15C43</string>
+       <string>16A300</string>
        <key>DTSDKName</key>
-       <string>macosx10.11</string>
+       <string>macosx10.12</string>
        <key>DTXcode</key>
-       <string>0720</string>
+       <string>0800</string>
        <key>DTXcodeBuild</key>
-       <string>7C68</string>
+       <string>8A218a</string>
 </dict>
 </plist>
old mode 100755 (executable)
new mode 100644 (file)
index 71d4c61..3b3742d
Binary files a/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 and b/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 differ
index 0bc8c6308d3d213e6358949cb920d841c36de2af..e43620a762a592da5294cec294f55b7cf3286330 100644 (file)
        <dict>
                <key>Resources/Info.plist</key>
                <data>
-               p+Cz4Y64VH6pZL+sceQcjAJniME=
+               bZkANAXaqONeP7JKT7J8irtx1LQ=
                </data>
        </dict>
        <key>files2</key>
        <dict>
                <key>Headers/SDL.h</key>
-               <data>
-               7nrs8rqLHJbbjdCsBibxA6rEHdE=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       CdryRAbw52YsQuFdpj/qR06oaHo=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       a4srnKbxf82ZmaXCq7fGtSIaNHcc15nwBQT5UZEacdg=
+                       </data>
+               </dict>
                <key>Headers/SDL_assert.h</key>
-               <data>
-               WAfvaSHAUBsbTpD1OW6bLIO3TDo=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       WAfvaSHAUBsbTpD1OW6bLIO3TDo=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       7h4T6jtDOHnLZ1roFa6aEyJAILLSrrhlWzgk6IzUtB4=
+                       </data>
+               </dict>
                <key>Headers/SDL_atomic.h</key>
-               <data>
-               6ZfydfmWn0sHmKXyYj1gCJC9EdQ=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       6ZfydfmWn0sHmKXyYj1gCJC9EdQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       qs0Y9jgGLKQ9yVStiLUB5aLJT2IMg5SySSiQ3MBEqN8=
+                       </data>
+               </dict>
                <key>Headers/SDL_audio.h</key>
-               <data>
-               QlFi0vrVOdDgVyOeeux8WYNfJtY=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       /MxxNRQLHaaeSVhIb0SlstG4ELE=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       x1R/NAiKCKC/GtvQF3Cm4vo7YZvQFnJIRFOiNKb6J/Y=
+                       </data>
+               </dict>
                <key>Headers/SDL_bits.h</key>
-               <data>
-               bBKWsjJQnPdjedRePFr25fPkhrM=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       bBKWsjJQnPdjedRePFr25fPkhrM=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       h6WjANhNEmQVIRbtG/HLujqwFn5p5/8OJ10HlnC3Oi4=
+                       </data>
+               </dict>
                <key>Headers/SDL_blendmode.h</key>
-               <data>
-               Qbv4ZV4rYaGKgwLfmRqpUXcfrzo=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       Qbv4ZV4rYaGKgwLfmRqpUXcfrzo=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       Rs3ArXRSkg2zVRTE2a2W+UDeBrpbvQvyOgUOjAUPDsA=
+                       </data>
+               </dict>
                <key>Headers/SDL_clipboard.h</key>
-               <data>
-               E2B/Gj1/db5PjecKc2tjGLGnnEU=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       E2B/Gj1/db5PjecKc2tjGLGnnEU=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       OUuHXrgGzo46jdpE1rSsVJh9BghlHsiT/hq31sJBTWQ=
+                       </data>
+               </dict>
                <key>Headers/SDL_config.h</key>
-               <data>
-               SICWRZVShJxQcjoldrByc8tKyiE=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       SICWRZVShJxQcjoldrByc8tKyiE=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       zotmPP+Z3SWxdGhfKX7zwbhorxrqqGXTbeOX8YKu6MY=
+                       </data>
+               </dict>
                <key>Headers/SDL_config_macosx.h</key>
-               <data>
-               AXT1YfhBssV2mdMI7radyWtrnV4=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       AXT1YfhBssV2mdMI7radyWtrnV4=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       +WkbuLwPgR9LP1fk6oE1nTlBcyy+rx2qpVDlOL1HVgk=
+                       </data>
+               </dict>
                <key>Headers/SDL_copying.h</key>
-               <data>
-               ksKqAB2l2GpnBa96oo8FhwfrjZs=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       ksKqAB2l2GpnBa96oo8FhwfrjZs=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       7nAZoUQ7ksvZg+awDU/oSMhHBe7+6WfRVxFAyQMqf2Q=
+                       </data>
+               </dict>
                <key>Headers/SDL_cpuinfo.h</key>
-               <data>
-               L1bug7VmDQNJDS/a2qhveSB41wg=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       L1bug7VmDQNJDS/a2qhveSB41wg=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       uPNtKToklnAbu/isfW41BRIKdMUPkGQIjonH3+EoSqU=
+                       </data>
+               </dict>
                <key>Headers/SDL_endian.h</key>
-               <data>
-               yIPSROTHpa65o98kvhVPa5vJd20=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       yIPSROTHpa65o98kvhVPa5vJd20=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       KrtyIfWm85EAqqRC1WvxEhDMd/mDlhpSM4cgsqtcBV4=
+                       </data>
+               </dict>
                <key>Headers/SDL_error.h</key>
-               <data>
-               EKMXAYytkozTsnGEetwJSWxDdXs=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       EKMXAYytkozTsnGEetwJSWxDdXs=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       SPul/9qHvppNntwC882a/WBVajzYBT1+tYPQ6DSGxFY=
+                       </data>
+               </dict>
                <key>Headers/SDL_events.h</key>
-               <data>
-               ADO6YH92cpZr0xch44chc5jDoBk=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       CPSA6t0dYtnPX0aOYMp2yBKYCII=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       iYBVsC4VTUXBruL7Z8GMlmSGqlXRS2265FofuNaPOYE=
+                       </data>
+               </dict>
                <key>Headers/SDL_filesystem.h</key>
-               <data>
-               z0ipNXSs0G+cMSE5xJ/1OLb0iww=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       z0ipNXSs0G+cMSE5xJ/1OLb0iww=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       170/Jgr1x08XVFMFP063CU5vq7J364U4FmkwKSoeouc=
+                       </data>
+               </dict>
                <key>Headers/SDL_gamecontroller.h</key>
-               <data>
-               +fEy8fr9o1eNqVcgZxdAGSB+fdg=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       iDeu/H14U1KryUM2D/Co453LtOU=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       wM7f8ttYHiwr0RPC6Lt86Hl46ZIcopI7u/TDDsiUKqE=
+                       </data>
+               </dict>
                <key>Headers/SDL_gesture.h</key>
-               <data>
-               gL8Pe0KmmUmvy06MPiwcXLy1RPc=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       gL8Pe0KmmUmvy06MPiwcXLy1RPc=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       uSiw21vM1GILKVz+FNJkrfXkTxSQ1xXDoYyYbLgxfpg=
+                       </data>
+               </dict>
                <key>Headers/SDL_haptic.h</key>
-               <data>
-               mZKe1lBgPwES+wjXj+NqIqG4D7g=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       Mq/rLF1FAkGpnwiQ1d54/wGZbcc=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       OuNe6t85VCJZ2Qm6pVJkqFJCoQVvPHOXp2triOR+cS8=
+                       </data>
+               </dict>
                <key>Headers/SDL_hints.h</key>
-               <data>
-               8ccADZ7c1T6VURxXmnucUptCjFE=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       ilKKw9O5YhM690t3JMdfnZWFK7A=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       9xxfD/BNMH9ZeZ6Vt+Awhdw31+6Ge4IJKLR7hJvQo4k=
+                       </data>
+               </dict>
                <key>Headers/SDL_joystick.h</key>
-               <data>
-               GQ1apgzllUcFXq08Wp6GXfaItxk=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       ClOTSR3VDFhV1hCfp17slV2L0nE=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       UJGdVwyqOlVhITntWwC6mj8nWYdL6uRT09oiRo1GME4=
+                       </data>
+               </dict>
                <key>Headers/SDL_keyboard.h</key>
-               <data>
-               wqXTQaRIpfh2YsZOyej8AymHDh4=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       2yGANM2j3KDAl2neetk1d8OlxKU=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       iTmNAG0t6x3v3EUQxgSU9UPgbNVBS3CluskwtTANO3U=
+                       </data>
+               </dict>
                <key>Headers/SDL_keycode.h</key>
-               <data>
-               6bL7lbeGExj/h8aqaSdhpq23rJY=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       6bL7lbeGExj/h8aqaSdhpq23rJY=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       Uh8oV1XZoVd2eDYWb+dR3Qa1TzIS1uAAHU7l7/rdJVc=
+                       </data>
+               </dict>
                <key>Headers/SDL_loadso.h</key>
-               <data>
-               NpMytx6UwU3pTsWYm9KbfrSeyBM=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       NpMytx6UwU3pTsWYm9KbfrSeyBM=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       5a3r50goTxzN3z+14C/VyW5w54z9e5DNTrN99aTuBP4=
+                       </data>
+               </dict>
                <key>Headers/SDL_log.h</key>
-               <data>
-               rghDDMt7l/53fcvzIf2ueASgru0=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       rghDDMt7l/53fcvzIf2ueASgru0=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       kBXM+MFIZIBsGOetv1LFzOhYWqOlgM7T6rRamLrXXsY=
+                       </data>
+               </dict>
                <key>Headers/SDL_main.h</key>
-               <data>
-               S4r/E0n7XChUx09exG9MmT+wVC4=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       sCHgY3RQ9/Waq6RXfI3e5ko2tFI=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       qQmapC5rQ+k4JPi6Klex07haM1HM+k7ddRKVRY7pVII=
+                       </data>
+               </dict>
                <key>Headers/SDL_messagebox.h</key>
-               <data>
-               AofMdqXibVh1eLBrQBaSJtT2TBA=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       AofMdqXibVh1eLBrQBaSJtT2TBA=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       OA0hxIIn3zrMJmBpURqqHGpUdbdYXQm+8zWjN9HBK+Q=
+                       </data>
+               </dict>
                <key>Headers/SDL_mouse.h</key>
-               <data>
-               I0gCdZwctoT8UsPkCyQcev84wic=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       2DiwOaEv3eVUPQOp6eijF8klb7s=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       lMp9UoCDXLUwWq7XXfhteZIKmurkNC7DSz90mqg8cm4=
+                       </data>
+               </dict>
                <key>Headers/SDL_mutex.h</key>
-               <data>
-               V9Eo8zGubHioHOR/zDh7vxX7Ot0=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       V9Eo8zGubHioHOR/zDh7vxX7Ot0=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       0+Jp5UYC5Q0gq0UA78HXeDS11cU7plXD2gdF9uEOj3Y=
+                       </data>
+               </dict>
                <key>Headers/SDL_name.h</key>
-               <data>
-               mEOy6xwQy0aKcghbHD2Gk8AiE2Y=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       mEOy6xwQy0aKcghbHD2Gk8AiE2Y=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       SmgwrJXssEcacZFXRiDMX9xEKqMyDQroMzMk49993/A=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengl.h</key>
-               <data>
-               uLy76O02VpeHP49lGqfyOJZVN98=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       uLy76O02VpeHP49lGqfyOJZVN98=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       wLqChYCR7CJXuJJszyfgZ4bmWgBV/xts/XXDTDacqbg=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengl_glext.h</key>
-               <data>
-               nqPX1ObCVYyVzW3VbD3C/1vaTRE=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       nqPX1ObCVYyVzW3VbD3C/1vaTRE=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       IULBL/m+rBc3UQPqu68w6FDM/Mda58oybFnlyn3OkjE=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengles.h</key>
-               <data>
-               Qe8Wo6WE/eFYjQpZNSkjrEdPH3k=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       gHnWXXRnsPIVHQherf5NBPICBEQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       tmnzU6otAGtXyGNO3Rgm47RNBMUC9uvGJRnRigm+Ds0=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengles2.h</key>
-               <data>
-               j2409OmIX5ZzPeAohEUZ9fTY0dA=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       1pbpsJhtHMiZ6LOkM1CFU88l7v4=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       59G3rOK0wqwYm1+uCwRZkyZcif9vFWHBYKJVIko9qx8=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengles2_gl2.h</key>
-               <data>
-               g4y04zPFy1H/qujSNGRd0vB7ClQ=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       g4y04zPFy1H/qujSNGRd0vB7ClQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       9GAwK0cg8YPrZHWVqMGpyVwKFz3Ay9VHiyz70jzWltA=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengles2_gl2ext.h</key>
-               <data>
-               bTlnL+42kbi+n/gH//X2p0pqeuM=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       bTlnL+42kbi+n/gH//X2p0pqeuM=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       5404JOHXH4pGO60gR/uLhz9zW6fKy9jvdMw5i1WTcpo=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengles2_gl2platform.h</key>
-               <data>
-               ByFMXJFtjcRglS/e0+DujyjC3dM=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       ByFMXJFtjcRglS/e0+DujyjC3dM=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       wlKRTsmTMrnniYqSvQklJfb9VF07J0MDpqzYOcfiDDY=
+                       </data>
+               </dict>
                <key>Headers/SDL_opengles2_khrplatform.h</key>
-               <data>
-               NLpJq9uBqjOpWhXISOQHPnTp/XQ=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       NLpJq9uBqjOpWhXISOQHPnTp/XQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       djHeDyzmR0e/2JNIbqpBqgi56MXlxlAbgcBFxuvwSyo=
+                       </data>
+               </dict>
                <key>Headers/SDL_pixels.h</key>
-               <data>
-               SYKqjrlfx4WBrF/7RJJcebj022I=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       Xvgibsz62Xj6AnQTD3nXR1RdP7w=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       6UZnQSfbBzEihA8AYXGuWafY4Q2rGbOIIICEM6NYb30=
+                       </data>
+               </dict>
                <key>Headers/SDL_platform.h</key>
-               <data>
-               yEP4Wx6FLQvho00DCxY4qMLDnV0=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       wq9EnHSCm8XK4eJux1ZR519KOy0=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       byh3kf3MVWzZVyLbsv+q4PyAVHFlQZsUb4cwrhtyKHM=
+                       </data>
+               </dict>
                <key>Headers/SDL_power.h</key>
-               <data>
-               Hht8UlX2Q+ZZYP4+TOUjRtFj+Ww=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       Hht8UlX2Q+ZZYP4+TOUjRtFj+Ww=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       UvkPQHn6hdbaJLPQ5kzRe/e0gLOv1n3E+JulK0DjxKA=
+                       </data>
+               </dict>
                <key>Headers/SDL_quit.h</key>
-               <data>
-               4gv2IjG2mCPLKUXLEgxBp+zQLuM=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       4gv2IjG2mCPLKUXLEgxBp+zQLuM=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       arq8WYQJrksLt0eOsjijzO5xyBEllBSguXTQo71QmiI=
+                       </data>
+               </dict>
                <key>Headers/SDL_rect.h</key>
-               <data>
-               ArluDPEgeo4k7O85ALBoryFpGyk=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       ArluDPEgeo4k7O85ALBoryFpGyk=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       gbazbfs1AzykEDJ4sFrAu0dmtzUbEwOQFafBS7eH7So=
+                       </data>
+               </dict>
                <key>Headers/SDL_render.h</key>
-               <data>
-               geL0fIDmDRM/s1nP1HdMh7Bn+KY=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       D0japjJ6ym/uoSUpQnbUHnNDu5s=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       c/5XEiLTcWSdqD9fa3GuTGVH83qKriuarIX/6pdjuCs=
+                       </data>
+               </dict>
                <key>Headers/SDL_revision.h</key>
-               <data>
-               U25Cfa7DqslNn/mqxEnMfgLnA9I=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       8ncx+diMb2Vfefe3XxBT7tDjqQQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       jfHrBzZLeEMPUigODAU3KGZP3UvwmZyO0gkuK1Jxi60=
+                       </data>
+               </dict>
                <key>Headers/SDL_rwops.h</key>
-               <data>
-               NLcf6LWtFIqQT/OcVl+KUtvGVIY=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       DaBBCXUHnuJqAswfBxrMjTGznLU=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       9Q1FoSoktxxFXBEkfND5aVYY2W2TOg5CaVnT7pUYFeE=
+                       </data>
+               </dict>
                <key>Headers/SDL_scancode.h</key>
-               <data>
-               cFbtc//t5wQjDoEFox2sb72ixzM=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       cFbtc//t5wQjDoEFox2sb72ixzM=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       imcWyCJ20Xb2gxJjs3a2ArJas11FDAlB7sPHOwuoTLY=
+                       </data>
+               </dict>
                <key>Headers/SDL_shape.h</key>
-               <data>
-               uI7SsJKg+9VUi3Ol3HSjbrfJiuw=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       uI7SsJKg+9VUi3Ol3HSjbrfJiuw=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       2t551rTZEMPl0aLCmAjkDLSDEFigY96X6cqZvRWqbB4=
+                       </data>
+               </dict>
                <key>Headers/SDL_stdinc.h</key>
-               <data>
-               EqWdk11X5VFG5/gIaFSC2tThVN0=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       UKINkMUBmh6G37JGdhy4vm5nXqY=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       Y3Ese7AsGxbczlpolRbaswp3Wc63deF3QggyuzGUaWg=
+                       </data>
+               </dict>
                <key>Headers/SDL_surface.h</key>
-               <data>
-               WoUDHhIvivPiGkT/PjIt7/Wag0k=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       Two0va+fVFaiXhlhgOY9/llpEZw=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       D9hAM0KyWDPRXIsik3F+i601/aEFra/CbdgrhgwgseI=
+                       </data>
+               </dict>
                <key>Headers/SDL_system.h</key>
-               <data>
-               mTKo4PBIinn03uXfN1DJ/He9e9k=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       mTKo4PBIinn03uXfN1DJ/He9e9k=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       b8MsbjBkpqYSflbHcYcGNfTvwCs6LkOTlfCroagtLPY=
+                       </data>
+               </dict>
                <key>Headers/SDL_syswm.h</key>
-               <data>
-               ZpNuqGdez02XRnDbUCnPQlvrpQg=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       enV9cJuGdUnZO1QlHW5sTuu7a6I=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       4xIVBafoNBEGMdBQoarbShg8lTmJzZtWFnOhemFCGq0=
+                       </data>
+               </dict>
                <key>Headers/SDL_thread.h</key>
-               <data>
-               7j7DqnFpoS63qhuVR2Q0gSa/4ds=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       7j7DqnFpoS63qhuVR2Q0gSa/4ds=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       G8Nrk6RRTWxDtQYJEn5Qo6wl+MZaTh/c6NzEgwwFd6E=
+                       </data>
+               </dict>
                <key>Headers/SDL_timer.h</key>
-               <data>
-               wTTvR/s4oORZCAHQrwGvEitdftg=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       wTTvR/s4oORZCAHQrwGvEitdftg=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       XXlmOyzGaHB9cV+ExAECBNr75+tSUVXhKN+oXovGrqs=
+                       </data>
+               </dict>
                <key>Headers/SDL_touch.h</key>
-               <data>
-               iTKBLV0gnsn1y4RjFyKjss42FAw=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       iTKBLV0gnsn1y4RjFyKjss42FAw=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       kt96CgBUHCsYb5bk8zIonTCA23GhM9HKsWpbOE5WuAk=
+                       </data>
+               </dict>
                <key>Headers/SDL_types.h</key>
-               <data>
-               sxzg0bkqO1atJAHHIFE6TMMWt+w=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       sxzg0bkqO1atJAHHIFE6TMMWt+w=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       U+e5nUQUJ0kM7y4x93oe6JZVcWjsssOlHwitGh+Oxuc=
+                       </data>
+               </dict>
                <key>Headers/SDL_version.h</key>
-               <data>
-               H5m85H3BgpanqxVVrr8x27umKn0=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       Shb8tayezQvZheoYHG/w0dZ74RQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       vp7z5LS6efRrPJHGCl33jorZuwWW/qusGbV/YS0V69k=
+                       </data>
+               </dict>
                <key>Headers/SDL_video.h</key>
-               <data>
-               vdRhnMIZssjdCJ72fNj04OTX3u0=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       0VCISfUtCna3Dgz1lDJ/yzsXYRw=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       hRR0gP6rfsCPS63Xb3iOXbtAq9J+w2K0n1EOcoF/sfQ=
+                       </data>
+               </dict>
                <key>Headers/begin_code.h</key>
-               <data>
-               WnMoGL8utnke7xWxpDeTFp+/QIA=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       WnMoGL8utnke7xWxpDeTFp+/QIA=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       GCO8amg+TMHAV+gV/E1TKPR6Pm2i3UCWpCABk5f/zZs=
+                       </data>
+               </dict>
                <key>Headers/close_code.h</key>
-               <data>
-               nnSi+1tlfaAkwmjGng6tRmzXcnw=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       nnSi+1tlfaAkwmjGng6tRmzXcnw=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       F1nVEPM19lh1dCbsk1yMBecmBYd0DrQb13nImbvdgBU=
+                       </data>
+               </dict>
                <key>Resources/Info.plist</key>
-               <data>
-               p+Cz4Y64VH6pZL+sceQcjAJniME=
-               </data>
+               <dict>
+                       <key>hash</key>
+                       <data>
+                       bZkANAXaqONeP7JKT7J8irtx1LQ=
+                       </data>
+                       <key>hash2</key>
+                       <data>
+                       KYKFeBKZJYQhDbO6O+et8ynCeQmtiB98QGh3JGyW3kY=
+                       </data>
+               </dict>
        </dict>
        <key>rules</key>
        <dict>
diff --git a/misc/buildsrc/sdl.sh b/misc/buildsrc/sdl.sh
new file mode 100755 (executable)
index 0000000..e1e794a
--- /dev/null
@@ -0,0 +1,51 @@
+#!?bin/sh
+
+set -ex
+
+builddeps=$PWD/../builddeps
+buildfiles=$PWD/../buildfiles
+
+enter() {
+       rm -rf tmp
+       mkdir tmp
+       cd tmp
+}
+
+leave() {
+       cd ..
+}
+
+enter
+curl -O http://libsdl.org/release/SDL2-2.0.5.dmg
+7z x *.dmg
+7z x *.hfs
+rm -rf "$buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A"
+mv SDL2/SDL2.framework/Versions/A  "$buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A"
+git add "$buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A"
+leave
+
+enter
+curl -O http://libsdl.org/release/SDL2-2.0.5.tar.gz
+tar xvf *.tar.gz
+cd SDL2*/
+LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_32/x86_64-slackware-linux/i686-w64-mingw32/lib:$HOME/opt/cross_toolchain_32/libexec/gcc/i686-w64-mingw32/4.8.3" \
+./configure --host=i686-w64-mingw32 --prefix="$PWD/../32" --disable-shared --enable-static CC="$HOME/opt/cross_toolchain_32/bin/i686-w64-mingw32-gcc -g1 -mstackrealign -Wl,--dynamicbase -Wl,--nxcompat"
+LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_32/x86_64-slackware-linux/i686-w64-mingw32/lib:$HOME/opt/cross_toolchain_32/libexec/gcc/i686-w64-mingw32/4.8.3" \
+make
+make install
+sed -i 's,^prefix=.*,prefix=${0%/bin/sdl2-config},' ../32/bin/sdl2-config
+rm -rf "$builddeps/win32/sdl"
+mv ../32 "$builddeps/win32/sdl"
+git add "$buillddeps/win32/sdl"
+make clean
+LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_64/x86_64-slackware-linux/x86_64-w64-mingw32/lib:$HOME/opt/cross_toolchain_64/libexec/gcc/x86_64-w64-mingw32/4.8.3" \
+./configure --host=i686-w64-mingw32 --prefix="$PWD/../64" --disable-shared --enable-static CC="$HOME/opt/cross_toolchain_64/bin/x86_64-w64-mingw32-gcc -g1 -Wl,--dynamicbase -Wl,--nxcompat"
+LD_LIBRARY_PATH="$HOME/opt/cross_toolchain_64/x86_64-slackware-linux/x86_64-w64-mingw32/lib:$HOME/opt/cross_toolchain_64/libexec/gcc/x86_64-w64-mingw32/4.8.3" \
+make
+make install
+sed -i 's,^prefix=.*,prefix=${0%/bin/sdl2-config},' ../64/bin/sdl2-config
+rm -rf "$builddeps/win64/sdl"
+mv ../64 "$builddeps/win64/sdl"
+git add "$buillddeps/win64/sdl"
+make clean
+leave
index 041f94ae8cd544de88f7f1d9249b4c1fdf6262d3..1355dcdfd90fc475075591be8c7a435b7bc1e831 100644 (file)
@@ -1,12 +1,12 @@
 # Current released version.
-V 0.8.1
+V 0.8.2
 
 # Download URL.
-D http://dl.xonotic.org/xonotic-0.8.1.zip
+D http://dl.xonotic.org/xonotic-0.8.2.zip
 
 # When releasing, create this string by:
 # date -u +%Y%m%d%H%M%S -d'now + 3 months'
-C 20151127205957
+C 20170701181425
 
 # Website URL.
 U http://www.xonotic.org/
@@ -27,6 +27,11 @@ U http://www.xonotic.org/
 B 104.238.159.167:
 B 108.61.164.188:
 B 85.25.139.30:
+B 51.15.46.239:
+B 163.172.104.191:
+B 89.163.144.198:
+B 51.38.113.134:
+B 85.114.138.57:
 
 # Emergency packs. Specify as:
 # E http://packurl/pack.pk3 file-in-pack.txt
@@ -39,6 +44,8 @@ R J9JepdOZjvCBXYfz8fj3civ4PulKF4/asnK9u5ZojYg=
 R 6QtAVwbWcJFYZDvSeuZHEaaJE4JoTzmNni/LPZUSOKE=
 R Lh+WWOrY7IjXqP7pekmlgy6R+N+tTBm6DBV1gUZvtZ4=
 R ggH3OBVqbVeCCBkLQZtFLvwxuTpfBAz+/scg3OwsPVo=
+R kV3UkVGqke8UhrgIWKhTOU/nDhk3f+OT7TVEfqh9xy0=
+R AaQzHJT+/f6XHfZ4Zabz2KR7dXwQsoKJ1XYICRNo7to=
 
 # Promoted servers. Always show up as recommended, even if "slow".
 # P <key or IP here>
diff --git a/misc/infrastructure/transifex.cron b/misc/infrastructure/transifex.cron
new file mode 100755 (executable)
index 0000000..1e5b08f
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -ex
+
+export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
+
+cd ~/xonotic/data/xonotic-data.pk3dir
+git checkout master
+git fetch origin master
+if git rev-list origin/master..master | grep .; then
+       echo "Blocked by local changes. Bailing out."
+       exit 1
+fi
+git reset --hard origin/master
+
+# Mode parameter:
+#   po:  just update the translations.
+#   all: also update the translation template. Will create a new commit every time, as the date header changes.
+export BATCH=true
+sh tx.sh po
+
+if [ x"`git ls-files -dm`" = x".tx/merge-base" ]; then
+       git reset --hard
+       exit 0
+fi
+git commit -a -m'Transifex autosync'
+git push origin master
index 00d311d4ee44ca4e4a46b4b15d23d446c1a167bd..03499ba98cdfec3f7edc38f91882bd688027be5d 100644 (file)
@@ -16,6 +16,7 @@ allrepos()
        "$@" gmqcc                         gmqcc.git                    master         ""
        "$@" xonstat                       xonstat.git                  master         "no"
        "$@" xonstatdb                     xonstatdb.git                master         "no"
+       "$@" xonotic.org                   xonotic.org.git              master         "no"
        "$@" wiki                          xonotic.wiki.git             master         "no"
 }
 
@@ -31,8 +32,7 @@ allmirrors()
        "$@" http ''   http://us.git.xonotic.org/xonotic/  ''
 
        # Gitlab host (divVerent).
-       # Disabled because of https://gitlab.com/gitlab-com/support-forum/issues/15
-       "$@" http ''   https://gitlab.com/xonotic/         ''
+       "$@" http gitlab   https://gitlab.com/xonotic/     ''
 
        # German host (divVerent).
        "$@" git  de   git://de.git.xonotic.org/xonotic/   ''
index b14a8b6f1acd8e0f67443f7a211fcdf3c80fa3af..ac6594fbf8214f39f84974beec21906046bd1d21 100644 (file)
@@ -63,7 +63,7 @@ mirrorspeed()
        # now actually time it
        (
                set +x
-               export REPO=$1 # so that the sh -c subshell can use it
+               export REPO="$1" # so that the sh -c subshell can use it
                { measure_time sh -c 'git ls-remote "$REPO" refs/heads/master >/dev/null 2>&1'; } 2>&1 >/dev/null | head -n 1 | cut -d ' ' -f 2 | tr -d . | sed 's,^0*,,' | grep . || echo 0
                        # unit: clock ticks (depends on what "time" returns
        )
index 4bbb0ec718f69ea6b6694b65fe625b92ae18eea3..0b30a9bdc55fdc646d8860766abf82716425686e 100644 (file)
@@ -88,7 +88,7 @@ release_common()
 
        getversion()
        {
-               gv=`grep "^gameversion " "$1/defaultXonotic.cfg" | awk '{ print $2 }'`
+               gv=`grep "^gameversion " "$1/xonotic-common.cfg" | awk '{ print $2 }'`
                major=$(($gv / 10000))
                minor=$((($gv / 100) - ($major * 100)))
                patch=$(($gv - ($major * 10000) - ($minor * 100)))
@@ -130,7 +130,6 @@ case "$cmd" in
                                # - .ssh/config must be configured so the following
                                #   host names are reachable and have a compile
                                #   infrastructure set up:
-                               #   - xonotic-build-linux32 (with gcc on x86)
                                #   - xonotic-build-linux64 (with gcc on x86_64)
                                #   - xonotic-build-win32 (with i586-mingw32msvc-g++)
                                #   - xonotic-build-win64 (with amd64-mingw32msvc-g++
@@ -241,14 +240,6 @@ case "$cmd" in
                verbose "$SELF" release-getbinary Xonotic/xonotic-osx-dedicated || good=false
                $good
                ;;
-       release-engine-linux32)
-               release_common
-               good=true
-               verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-sdl || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-glx || good=false
-               verbose "$SELF" release-getbinary Xonotic/xonotic-linux32-dedicated || good=false
-               $good
-               ;;
        release-engine-linux64)
                release_common
                good=true
@@ -261,7 +252,6 @@ case "$cmd" in
                release_common
                # TODO report failures here.
                good=false
-               verbose "$SELF" release-engine-linux32 && good=true
                verbose "$SELF" release-engine-linux64 && good=true
                verbose "$SELF" release-engine-win32 && good=true
                verbose "$SELF" release-engine-win64 && good=true
@@ -419,21 +409,21 @@ case "$cmd" in
                                        s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
                                        s/^gameversion_min [0-9]*/gameversion_min     0/;
                                        s/^gameversion_max [0-9]*/gameversion_max  9999/;
-                               " < defaultXonotic.cfg > defaultXonotic.cfg.new
+                               " < xonotic-common.cfg > xonotic-common.cfg.new
                        else
                                # >= 1.0
                                verbose sed "
                                        s/^set g_xonoticversion [^ ]* /set g_xonoticversion $versionstr /;
                                        s/^gameversion_min [0-9]*/gameversion_min $(( ($gv / 100) * 100 - 100 ))/;
                                        s/^gameversion_max [0-9]*/gameversion_max $(( ($gv / 100) * 100 + 199 ))/;
-                               " < defaultXonotic.cfg > defaultXonotic.cfg.new
+                               " < xonotic-common.cfg > xonotic-common.cfg.new
                        fi
-                       mv defaultXonotic.cfg.new defaultXonotic.cfg
+                       mv xonotic-common.cfg.new xonotic-common.cfg
                        case "$RELEASETYPE" in
                                release)
-                                       echo "" >> defaultXonotic.cfg
-                                       echo "// nicer menu" >> defaultXonotic.cfg
-                                       echo "set menu_watermark \"\"" >> defaultXonotic.cfg
+                                       echo "" >> xonotic-common.cfg
+                                       echo "// nicer menu" >> xonotic-common.cfg
+                                       echo "set menu_watermark \"\"" >> xonotic-common.cfg
                                        ;;
                        esac
                        (
index e1462c8bf9a4091a10f3ef008344c493e455c6b5..3b9b393508e5435f144a59a756b567f0d640923b 100644 (file)
@@ -26,7 +26,7 @@ case "$cmd" in
                cleandp=false
                cleanqcc=false
                cleanqc=false
-               compiled0=false
+               compiled0=
                debug=debug
                if [ -z "$CC" ]; then
                        export CC="gcc"
@@ -38,6 +38,10 @@ case "$cmd" in
                                        compiled0=true
                                        shift
                                        ;;
+                               -1)
+                                       compiled0=false
+                                       shift
+                                       ;;
                                -c)
                                        cleand0=true
                                        cleandp=true
@@ -119,6 +123,10 @@ case "$cmd" in
                        fi
                fi
 
+               if [ -z "$MAKE" ]; then
+                       MAKE=make
+               fi
+
                if [ -z "$MAKEFLAGS" ]; then
                        ncpus=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1`
                        if [ $ncpus -gt 1 ]; then
@@ -131,7 +139,14 @@ case "$cmd" in
 
                if [ -n "$WE_HATE_OUR_USERS" ]; then
                        # win32: use SDL2
-                       MAKEFLAGS="$MAKEFLAGS SDL_CONFIG=$d0/misc/builddeps/win32/sdl/bin/sdl2-config"
+                       case `uname -m` in
+                               x86_64)
+                                       MAKEFLAGS="$MAKEFLAGS SDL_CONFIG=$d0/misc/builddeps/win64/sdl/bin/sdl2-config"
+                                       ;;
+                               *)
+                                       MAKEFLAGS="$MAKEFLAGS SDL_CONFIG=$d0/misc/builddeps/win32/sdl/bin/sdl2-config"
+                                       ;;
+                       esac
 
                        # win32: don't rely on jpeg includes
                        MAKEFLAGS="$MAKEFLAGS LIB_JPEG= CFLAGS_LIBJPEG="
@@ -179,28 +194,32 @@ case "$cmd" in
                rm -f conftest
 
                verbose cd "$d0/d0_blind_id"
-               if ! $compiled0; then
+               if [ -z "$compiled0" ]; then
+                       # In doubt, compile.
+                       compiled0=true
+
                        # compilation of crypto library failed
                        # use binaries then, if we can...
                        mkdir -p .libs
                        if [ -n "$WE_HATE_OUR_USERS" ]; then
-                               verbose cp "$d0/misc/buildfiles/win32/libd0_blind_id"-* .libs/
-                               verbose cp "$d0/misc/buildfiles/win32/libd0_rijndael"-* .libs/
-                               verbose cp "$d0/misc/buildfiles/win32/libgmp"-* .libs/
+                               case `uname -m` in
+                                       x86_64)
+                                               verbose cp "$d0/misc/buildfiles/win64/libd0_blind_id"-* .libs/
+                                               verbose cp "$d0/misc/buildfiles/win64/libd0_rijndael"-* .libs/
+                                               verbose cp "$d0/misc/buildfiles/win64/libgmp"-* .libs/
+                                               compiled0=false
+                                               ;;
+                                       *)
+                                               verbose cp "$d0/misc/buildfiles/win32/libd0_blind_id"-* .libs/
+                                               verbose cp "$d0/misc/buildfiles/win32/libd0_rijndael"-* .libs/
+                                               verbose cp "$d0/misc/buildfiles/win32/libgmp"-* .libs/
+                                               compiled0=false
+                                               ;;
+                               esac
                        else
                                case "`uname`" in
                                        Linux)
                                                case `uname -m` in
-                                                       x86_64)
-                                                               # No cp commands, we want to use static linking instead.
-                                                               export CC="$CC -I../../../../misc/builddeps/linux64/d0_blind_id/include"
-                                                               export CC="$CC -L../../../../misc/builddeps/linux64/d0_blind_id/lib"
-                                                               export CC="$CC -Wl,-rpath,../../../../misc/builddeps/linux64/d0_blind_id/lib"
-                                                               export CC="$CC -I../../../../misc/builddeps/linux64/gmp/include"
-                                                               export CC="$CC -L../../../../misc/builddeps/linux64/gmp/lib"
-                                                               export CC="$CC -Wl,-rpath,../../../../misc/builddeps/linux64/gmp/lib"
-                                                               MAKEFLAGS="$MAKEFLAGS DP_LINK_CRYPTO=shared DP_LINK_CRYPTO_RIJNDAEL=shared LIB_CRYPTO=../../../../misc/builddeps/linux64/d0_blind_id/lib/libd0_blind_id.a LIB_CRYPTO+=../../../../misc/builddeps/linux64/gmp/lib/libgmp.a LIB_CRYPTO_RIJNDAEL=../../../../misc/builddeps/linux64/d0_blind_id/lib/libd0_rijndael.a"
-                                                               ;;
                                                        *86)
                                                                # No cp commands, we want to use static linking instead.
                                                                export CC="$CC -I../../../../misc/builddeps/linux32/d0_blind_id/include"
@@ -210,18 +229,20 @@ case "$cmd" in
                                                                export CC="$CC -L../../../../misc/builddeps/linux32/gmp/lib"
                                                                export CC="$CC -Wl,-rpath,../../../../misc/builddeps/linux32/gmp/lib"
                                                                MAKEFLAGS="$MAKEFLAGS DP_LINK_CRYPTO=shared DP_LINK_CRYPTO_RIJNDAEL=shared LIB_CRYPTO=../../../../misc/builddeps/linux32/d0_blind_id/lib/libd0_blind_id.a LIB_CRYPTO+=../../../../misc/builddeps/linux32/gmp/lib/libgmp.a LIB_CRYPTO_RIJNDAEL=../../../../misc/builddeps/linux32/d0_blind_id/lib/libd0_rijndael.a"
+                                                               compiled0=false
                                                                ;;
                                                        *)
-                                                               compiled0=true
+                                                               msg "Always need to compile libd0_blind_id on Linux `uname -m`."
                                                                ;;
                                                esac
                                                ;;
                                        Darwin)
                                                verbose cp "$d0/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_blind_id".* .libs/
                                                verbose cp "$d0/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/libd0_rijndael".* .libs/
+                                               compiled0=false
                                                ;;
                                        *)
-                                               compiled0=true
+                                               msg "Always need to compile libd0_blind_id on `uname`."
                                                ;;
                                esac
                        fi
@@ -229,30 +250,30 @@ case "$cmd" in
                if $compiled0; then
                        if $cleand0; then
                                if [ -f Makefile ]; then
-                                       verbose make $MAKEFLAGS distclean
+                                       verbose $MAKE $MAKEFLAGS distclean
                                fi
                        fi
                        if ! [ -f Makefile ]; then
                                verbose sh autogen.sh
                                verbose ./configure
                        fi
-                       verbose make $MAKEFLAGS
+                       verbose $MAKE $MAKEFLAGS
                fi
 
                verbose cd "$d0/gmqcc"
                if $cleanqcc; then
-                       verbose make $MAKEFLAGS clean
+                       verbose $MAKE $MAKEFLAGS clean
                fi
                if [ -n "$WE_HATE_OUR_USERS" ]; then
-                       verbose make $MAKEFLAGS gmqcc.exe
+                       verbose $MAKE $MAKEFLAGS gmqcc.exe
                else
-                       verbose make $MAKEFLAGS gmqcc
+                       verbose $MAKE $MAKEFLAGS gmqcc
                fi
 
                if [ -n "$MSYSTEM" ]; then
                        DATAMAKE=mingw32-make
                else
-                       DATAMAKE=make
+                       DATAMAKE=$MAKE
                fi
                verbose cd "$d0/data/xonotic-data.pk3dir"
                if $cleanqc; then
@@ -266,10 +287,10 @@ case "$cmd" in
                        $ECHO "Warning: invalid empty client, default clients will be used."
                fi
                if $cleandp; then
-                       verbose make $MAKEFLAGS clean
+                       verbose $MAKE $MAKEFLAGS clean
                fi
                for T in $TARGETS; do
-                       verbose make $MAKEFLAGS STRIP=: "$@" "$T"
+                       verbose $MAKE $MAKEFLAGS STRIP=: "$@" "$T"
                done
                for T in $BAD_TARGETS; do
                        $ECHO "Warning: discarded invalid client $T."
@@ -280,13 +301,20 @@ case "$cmd" in
        run)
                if [ -n "$WE_HATE_OUR_USERS" ]; then
                        client=
-                       export PATH="$d0/misc/buildfiles/win32:$d0/d0_blind_id/.libs:$PATH"
+                       case `uname -m` in
+                               x86_64)
+                                       export PATH="$d0/misc/buildfiles/win64:$d0/d0_blind_id/.libs:$PATH"
+                                       ;;
+                               *)
+                                       export PATH="$d0/misc/buildfiles/win32:$d0/d0_blind_id/.libs:$PATH"
+                                       ;;
+                       esac
                elif [ x"`uname`" = x"Darwin" ]; then
                        export DYLD_LIBRARY_PATH="$d0/misc/buildfiles/osx/Xonotic.app/Contents/MacOS:$d0/d0_blind_id/.libs"
                        export DYLD_FRAMEWORK_PATH="$d0/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks"
                        client=-sdl
                else
-                       export LD_LIBRARY_PATH="$d0/d0_blind_id/.libs"
+                       export LD_LIBRARY_PATH="$d0/d0_blind_id/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
                        client=-sdl
                fi
                case "$1" in
diff --git a/misc/tools/all/zsh_autocompletion/all/_all b/misc/tools/all/zsh_autocompletion/all/_all
new file mode 100644 (file)
index 0000000..e136198
--- /dev/null
@@ -0,0 +1,95 @@
+#compdef all
+
+zstyle ":completion:*:descriptions" format "%B%d%b"
+
+
+local context state line ret=1
+typeset -A opt_args
+
+
+local -a _1st_arguments
+_1st_arguments=(
+    'help:print the help message'
+    {update,pull}':update all repos'
+    'compile:compile the source code'
+    'clean:clean all repos'
+    'run:run the game'
+    'update-maps:download the latest version of all official maps from the autobuild server'
+    'compile-map:compile the specified maps'
+    'serverbench:run the server benchmark'
+    'fix_upstream_rebase:fix upstream rebase'
+    'fix_config:fix .git/config'
+    'keygen:generate ssh key for repo access if one does not exist yet'
+    {checkout,switch}':checkout a specific branch in repos where it exists and default branch elsewhere'
+    'branch:create a branch in a repo (asks for repo)'
+    {push,commit}':commit and push changes'
+    {each,foreach}':run a command in each repo'
+    'grep:run "git grep" in all repos'
+)
+
+_arguments -C \
+    '1: :->cmds' \
+    '*:: :->args' && ret=0
+
+
+case $state in
+    cmds)
+        _describe -t actions 'commands' _1st_arguments
+        ret=0
+        ;;
+
+    args)
+        case $words[1] in
+        run)
+            # choose version and autocomplete cvars
+            # possible TODO: check for OS and adapt to it
+            _arguments \
+                '1:Version:(sdl glx dedicated)' && ret=0
+            ;;
+
+        compile)
+            _arguments \
+                '1:Version:(sdl glx dedicated)' \
+                "-0[don't use precompiled d0_blind_id]" \
+                '-c[clean all before building]' \
+                '-qc[clean QuakeC binaries]' \
+                - '(release)' \
+                    '-r[build in release mode]' \
+                - '(profile)' \
+                    '-p[build in profile mode]' && ret=0
+            ;;
+
+        compile-map)
+            _files -W "(data/xonotic-maps.pk3dir/maps)" -g "*.map(:r)" && ret=0
+            ;;
+
+        clean)
+            _arguments \
+                - '(noreclone)' \
+                    '-f[force clean]' \
+                    '-u[go to upstream]' \
+                    '-U[go to upstream and fetch master]' \
+                    '-m[go to master]' \
+                    '-r[remove untracked files]' \
+                    '-D[kill branches]' \
+                - '(reclone)' \
+                    '--reclone[set all the other flags (effectively a reclone)]' && ret=0
+            ;;
+
+        update|pull)
+            _arguments \
+                "-N[reset git config for each repo]" \
+                '-l[find the best mirror in the specified location]' \
+                - '(ssh)' \
+                    {-p,-s}'[set ssh as push protocol and find the best mirror]' \
+                - '(git)' \
+                    '-g[set git as push protocol and find the best mirror]' \
+                - '(http)' \
+                    '-h[set http as push protocol and find the best mirror]' && ret=0
+            ;;
+
+        esac
+        ;;
+esac
+
+return ret
index 44f91b1e2cb759401106635b69491775d75b29a1..068478ac3f3cf7e1f860669d8db3c49a6a9ffa80 100755 (executable)
@@ -64,7 +64,7 @@ while [ -n "$allfiles" ]; do
 done
 
 export do_jpeg=true
-export dp_jpeg_if_not_dds=false
+export do_jpeg_if_not_dds=false
 export jpeg_qual_rgb=70
 export jpeg_qual_a=90
 export do_dds=false
index 7f10290e04ed15aa7495b14ee81b56ab19e59d55..2a8a366f59a542fe06c496efe3ad8870e1741a76 100755 (executable)
@@ -4,14 +4,20 @@ case "$2" in
        old)
                PATTERN='all-time fastest lap record with (.*)\n'
                ;;
-       new|*)
-               PATTERN='//RA?CE? RECORD SET (.*)\n'
+       cts)
+               PATTERN='//cts RECORD SET (.*)\n'
+               ;;
+       ctf)
+               PATTERN='//ctf RECORD SET (.*)\n'
+               ;;
+       new|race|rc|*)
+               PATTERN='//(?:RA?CE?|rc) RECORD SET (.*)\n'
                ;;
 esac
 
 d=$1
 i=0
-demotc.pl grep "$d" "$PATTERN" | while IFS=" " read -r timecode result; do
+./demotc.pl grep "$d" "$PATTERN" | while IFS=" " read -r timecode result; do
        timecode=${timecode%:}
        result=${result#\"}
        result=${result%\"}
@@ -28,6 +34,6 @@ demotc.pl grep "$d" "$PATTERN" | while IFS=" " read -r timecode result; do
        timecode_start=`echo "$timecode - $minutes*60 - $seconds - $tenths*0.1 - 2" | bc -l`
        timecode_end=`echo "$timecode + 2" | bc -l`
        i=$(($i + 1))
-       demotc.pl cut "$d" "playback-$i.dem" "$timecode_start" "$timecode_end"
-       demotc.pl cut "$d" "capture-$i.dem" "$timecode_start" "$timecode_end" --capture
+       ./demotc.pl cut "$d" "playback-$i.dem" "$timecode_start" "$timecode_end"
+       ./demotc.pl cut "$d" "capture-$i.dem" "$timecode_start" "$timecode_end" --capture
 done
diff --git a/misc/tools/encode-demos.sh b/misc/tools/encode-demos.sh
new file mode 100755 (executable)
index 0000000..ef920a9
--- /dev/null
@@ -0,0 +1,609 @@
+#!/bin/bash
+# name: encode-demos.sh
+# version: 0.6.3
+# author: Tyler "-z-" Mulligan <z@xnz.me>
+# license: GPL & MIT
+# date: 01-04-2017
+# description: headless encoding of demo files to HD video concurrently with Xfvb and parallel
+#
+# The encoding is done with a full Xonotic client inside Xfvb.
+# parallel is acting as a job queue.
+# You may want to create a new userdir such as `~/.xonotic-clean` for encoding.
+# If you don't want certain details of your player config carrying over.
+#
+# The following is a good starting point for 1080p videos:
+#
+# ```
+# // autoexec.cfg
+# bgmvolume 1
+#
+# vid_height 1080
+# vid_width 1920
+# scr_screenshot_gammaboost 1
+# cl_capturevideo_width 1920
+# cl_capturevideo_height 1080
+# cl_capturevideo_fps 60
+# cl_capturevideo_ogg 1
+# cl_capturevideo_ogg_theora_quality 63
+# cl_capturevideo_ogg_theora_bitrate -1
+# cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier 2
+# cl_capturevideo_ogg_theora_keyframe_maxinterval 500
+# cl_capturevideo_ogg_theora_keyframe_mininterval 1
+# cl_capturevideo_ogg_theora_keyframe_auto_threshold 80
+# cl_capturevideo_ogg_theora_noise_sensitivity 0
+# cl_capturevideo_ogg_vorbis_quality 10
+#
+# // HUD stuff
+# defer 5 "menu_watermark \"\""
+# set cl_allow_uid2name 0; set cl_allow_uidtracking 0
+# con_notify 0; con_notifysize 0; con_notifytime 0; showspeed 0; showfps 0
+# ```
+#
+
+# Customize
+USERDIR=${HOME}/.xonotic-clean                      # path to Xonotic userdir for client that does encoding
+GAMEDIR=${USERDIR}/data                             # path to Xonotic gamedir for client that does encoding
+XONOTIC_BIN="./all"                                 # binary used to launch Xonotic
+JOB_TIMEOUT="4h"                                    # if demo doesn't quit itself or hangs
+JOBS=4                                              # number of concurrent jobs
+DEFAULT_DEMO_LIST_FILE="demos.txt"                  # for batch
+DISPLAY=:1.0                                        # display for Xvfb
+DIMENSIONS=1920x1080                                # dimensions of virtual display
+COMPRESS=false                                      # whether to compress by default
+KILLER_KEYWORD_WATCHER=true                         # watch server logs for keyword, kill worker if true
+KILLER_KEYWORD="Server Disconnected"                # keyword
+KILLER_KEYWORD_WAIT="10s"                           # time to wait between polling watchers
+LIST_JOBS_FOLLOW_WAIT="10s"                         # how often to poll the job list with -f
+
+# Internal Constants
+SCRIPT_NAME=$(basename $0 .sh)
+VERSION=$(awk 'NR == 3 {print $3; exit}' $0)
+FFMPEG=$(which ffmpeg)
+QUEUE_FILE_DEMOS="/tmp/${SCRIPT_NAME}.jobqueue"
+QUEUE_FILE_COMPRESSING="/tmp/${SCRIPT_NAME}_compress.jobqueue"
+LOCK_FILE="/tmp/${SCRIPT_NAME}.lock"
+LOCK_FILE_COMPRESSING="/tmp/${SCRIPT_NAME}.lock"
+LOG_FILE="${SCRIPT_NAME}.log"
+REGEX_DEMOLIST_FILE="^[[:alnum:]]+\.txt$"
+REGEX_DURATION="^[0-9]+(d|h|m|s)$"
+REGEX_VIDEO_TYPES="^(mp4|webm)$"
+
+# State
+export KILLER_KEYWORD_WATCHING=true
+
+# Xonotic Helpers
+
+_check_xonotic_dir() {
+    local xon_dir=$1
+    if [[ ! -d ${xon_dir} ]]; then
+        echo "[ ERROR ] Unable to locate Xonotic"; exit 1
+    fi
+}
+
+_get_xonotic_dir() {
+    relative_dir=$(dirname $0)/../..
+    _check_xonotic_dir ${relative_dir}
+    export XONOTIC_DIR="$(cd ${relative_dir}; pwd)"
+}
+
+_kill_xonotic() {
+    pkill -f "\-simsound \-sessionid xonotic_${SCRIPT_NAME}_"
+}
+
+# Data Helpers
+###############
+
+_get_compression_command() {
+    if [[ ${FFMPEG} == "" ]]; then
+        echo "[ ERROR ] ffmpeg or avconv required"
+        exit 1
+    fi
+    if [[ ! $1 ]]; then
+        echo "[ ERROR ] Video name required"
+        exit 1
+    fi
+    local video_file=$1
+    local type="mp4"
+    if [[ $2 =~ ${REGEX_VIDEO_TYPES} ]]; then
+        type=$2
+    fi
+    # compress
+    if [[ ${type} == "mp4" ]]; then
+        local output_video_file=$(echo ${video_file} | sed 's/\.ogv$/\.mp4/')
+        command="${FFMPEG} -i ${video_file} -y -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart ${output_video_file}"
+    elif [[ ${type} == "webm" ]]; then
+        local output_video_file=$(echo ${video_file} | sed 's/\.ogv$/\.webm/')
+        command="${FFMPEG} -i ${video_file} -y -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 ${output_video_file}"
+    fi
+    echo ${command}
+}
+
+_get_demo_command() {
+    local demo_file=$1
+    local index=$2
+    name_format=$(basename "${demo_file}" .dem)
+    command="${XONOTIC_DIR}/${XONOTIC_BIN} run sdl -simsound -sessionid xonotic_${SCRIPT_NAME}_${index} -userdir \"${USERDIR}\" \
+        +log_file \"xonotic_${SCRIPT_NAME}_${index}_${name_format}.log\" \
+        +cl_capturevideo_nameformat \"${name_format}_\" \
+        +cl_capturevideo_number 0 \
+        +playdemo \"${demo_file}\" \
+        +toggle cl_capturevideo \
+        +alias cl_hook_shutdown quit \
+        > /dev/null 2>&1"
+    echo ${command}
+}
+
+_get_demos_from_file() {
+    local file=$1
+    if [[ -f ${file} ]]; then
+        local lines
+        OLD_IFS=${IFS}
+        IFS=$'\n' read -d '' -r -a lines < ${file}
+        IFS=${OLD_IFS}
+        echo ${lines[@]}
+    fi
+}
+
+# Queue Helpers
+################
+
+_queue_add_job() {
+    local queue_file=$1;
+    local command=$2;
+    local nice_name=${command};
+    local nice_queue_name=${queue_file##*/};
+    if [[ $3 ]]; then
+        nice_name=$3
+    fi
+    echo "[ INFO ] '${nice_queue_name/.jobqueue/}' new job: ${nice_name}"
+    echo "${command}" >> ${queue_file}
+}
+
+_queue_add_compression_jobs() {
+    local queue_file=$1; shift
+    local type=$1; shift
+    local videos="$@"
+    for video_file in ${videos[@]}; do
+        local command=$(_get_compression_command ${GAMEDIR}/${video_file} ${type})
+        _queue_add_job ${queue_file} "${command}" ${video_file}
+    done
+}
+
+_queue_add_demo_jobs() {
+    local queue_file=$1; shift
+    local timeout=$1; shift
+    local demos=$@
+    local i=0
+    for demo_file in ${demos[@]}; do
+        local command=$(_get_demo_command ${demo_file} ${i})
+        command="timeout ${timeout} ${command}"
+        _queue_add_job ${queue_file} "${command}" ${demo_file}
+        ((i++))
+    done
+}
+
+_get_active_demo_jobs() {
+    if [[ $(pgrep -caf "\-simsound \-sessionid xonotic_${SCRIPT_NAME}_") -gt 0 ]]; then
+        pgrep -af "\-simsound \-sessionid xonotic_${SCRIPT_NAME}_" |grep "dev/null" |awk '{ print $17 }' |sed 's/"//g;s/_$/\.dem/'
+    else
+        echo ""
+    fi
+}
+
+_get_active_demo_workers() {
+    if [[ $(pgrep -caf "\-simsound \-sessionid xonotic_${SCRIPT_NAME}_") -gt 0 ]]; then
+        pgrep -af "\-simsound \-sessionid xonotic_${SCRIPT_NAME}_" |grep "dev/null" |awk '{ print $11"_"$17 }' |sed 's/"//g;s/_$//'
+    else
+        echo ""
+    fi
+}
+
+_get_queue_jobs() {
+    local queue_file=$1
+    if [[ -f ${queue_file} ]]; then
+        cat ${queue_file} |awk '{ print $14 }'|sed 's/"//g;s/_$/\.dem/'
+    else
+        echo ""
+    fi
+}
+
+_get_completed_jobs() {
+    if [[ -f ${LOG_FILE} ]]; then
+        cat ${LOG_FILE} |awk '{ print $22 }'|sed 's/"//g;s/_$/\.dem/'
+    else
+        echo ""
+    fi
+}
+
+_run_compress_jobs() {
+    local queue_file=${QUEUE_FILE_COMPRESSING}
+    if [[ $1 ]]; then
+        queue_file=$1
+    fi
+    local start=$(date +%s)
+    (
+        flock -n 9 || exit 99
+        trap _cleanup_compress EXIT
+        if [[ -f ${queue_file} ]]; then
+            parallel -j${JOBS} --progress --eta --joblog "${LOG_FILE}" < ${queue_file}
+        else
+            echo "[ ERROR ] No jobs found"
+        fi
+    ) 9>${LOCK_FILE_COMPRESSING}
+    if [[ $? -eq 99 ]]; then
+        echo "[ ERROR ] lockfile exists, remove if you're sure jobs aren't running: ${LOCK_FILE_COMPRESSING}"
+        exit 1
+    fi
+    local end=$(date +%s)
+    local runtime=$((end-start))
+    printf 'Video Compression Time: %02dh:%02dm:%02ds\n' $((runtime/3600)) $((runtime%3600/60)) $((runtime%60))
+}
+
+_run_demo_jobs() {
+    local queue_file=${QUEUE_FILE_DEMOS}
+    if [[ $1 ]]; then
+        queue_file=$1
+    fi
+    local start=$(date +%s)
+    if [[ ${KILLER_KEYWORD_WATCHER} ]]; then
+        (sleep 5 && _log_killer_keyword_watcher ${KILLER_KEYWORD}) > /dev/null 2>&1 &
+    fi
+    if [[ $2 == "summary" ]]; then
+        (sleep 5 && echo && list_jobs) &
+    fi
+    (
+        flock -n 9 || exit 99
+        trap _cleanup EXIT
+        if [[ -f ${queue_file} ]]; then
+            parallel -j${JOBS} --progress --eta --joblog "${LOG_FILE}" < ${queue_file}
+        else
+            echo "[ ERROR ] No jobs found"
+        fi
+    ) 9>${LOCK_FILE}
+    if [[ $? -eq 99 ]]; then
+        echo "[ ERROR ] lockfile exists, remove if you're sure jobs aren't running: ${LOCK_FILE}"
+        exit 1
+    fi
+    local end=$(date +%s)
+    local runtime=$((end-start))
+    printf 'Demo Encoding Time: %02dh:%02dm:%02ds\n' $((runtime/3600)) $((runtime%3600/60)) $((runtime%60))
+}
+
+# Cleanup Helpers
+##################
+
+_cleanup() {
+    rm -f ${QUEUE_FILE_DEMOS}
+    rm -f ${LOCK_FILE}
+    rm -f ${GAMEDIR}/*.log
+    export KILLER_KEYWORD_WATCHING=false
+    sleep 1
+    _kill_xonotic
+}
+
+_cleanup_children() {
+    kill $(jobs -pr)
+}
+
+_cleanup_compress() {
+    rm -f ${QUEUE_FILE_COMPRESSING}
+}
+
+# Application Helpers
+######################
+
+_check_if_compress() {
+    local compress=$1; shift
+    local videos=$@
+    trap _cleanup_children SIGINT SIGTERM EXIT
+    if [[ ${compress} == "true" ]]; then
+        _run_compress_jobs ${QUEUE_FILE_COMPRESSING}
+    fi
+}
+
+_log_killer_keyword_watcher() {
+    local keyword="$@"
+    until [[ ${KILLER_KEYWORD_WATCHING} != "true" ]]; do
+        log_killer_keyword ${keyword}
+        sleep ${KILLER_KEYWORD_WAIT}
+    done
+}
+
+# Commands
+###########
+
+_run_xvfb() {
+    if [[ ! -f /tmp/.X1-lock ]]; then
+        /usr/bin/Xvfb :1 -screen 0 ${DIMENSIONS}x16 +extension RENDER & xvfb_pid=$!
+    else
+        xvfb_pid=$(pgrep -f Xvfb)
+    fi
+    echo "[ INFO ] Xvfb PID: ${xvfb_pid}"
+}
+
+compress() {
+    if [[ ${FFMPEG} == "" ]]; then
+        echo "[ ERROR ] ffmpeg or avconv required"
+        exit 1
+    fi
+    if [[ ! $1 ]]; then
+        echo "[ ERROR ] Video name required"
+        exit 1
+    fi
+    local video_file=$1; shift
+    local type="mp4"
+    local cleanup=""
+    if [[ $1 =~ ${REGEX_VIDEO_TYPES} ]]; then
+        type=$2
+        if [[ $2 == "--cleanup" ]]; then
+            cleanup=$2
+        fi
+    elif [[ $1 == "--cleanup" ]]; then
+        cleanup=$1
+    else
+        echo "[ ERROR ] Invalid type specified"
+    fi
+
+    # compress
+    local command=$(_get_compression_command ${GAMEDIR}/${video_file} ${type})
+    echo ${command}
+    echo "[ INFO ] Compressing '${video_file}'"
+    _queue_add_compression_jobs ${QUEUE_FILE_COMPRESSING} ${type} ${video_file[@]}
+    cat ${QUEUE_FILE_COMPRESSING}
+    _run_compress_jobs ${QUEUE_FILE_COMPRESSING}
+
+    if [[ ${cleanup} == "--cleanup" ]]; then
+        echo "[ INFO ] Cleaning up"
+        echo rm ${video_file}
+    fi
+}
+
+create_gif() {
+    local video=$1
+    local fps=${2:-15}
+    local width=${3:-320}
+    local start=${4:-0}
+    local length=${5:-999999}
+    local loop=${6:-1}
+    local output=$(basename ${video%.*}.gif)
+
+    # Generate palette for better quality
+    ${FFMPEG} -i ${GAMEDIR}/${video} -vf fps=${fps},scale=${width}:-1:flags=lanczos,palettegen ${GAMEDIR}/tmp_palette.png
+
+    # Generate gif using palette
+    ${FFMPEG} -i ${GAMEDIR}/${video} -i ${GAMEDIR}/tmp_palette.png -ss ${start} -t ${length} -loop ${loop} -filter_complex "fps=${fps},scale=${width}:-1:flags=lanczos[x];[x][1:v]paletteuse" ${GAMEDIR}/${output}
+
+    rm ${GAMEDIR}/tmp_palette.png
+}
+
+list_jobs() {
+    completed_jobs=$(_get_completed_jobs)
+    active_jobs=$(_get_active_demo_jobs)
+    all_jobs=$(_get_queue_jobs ${QUEUE_FILE_DEMOS})
+
+    echo -e "\nActive Jobs:\n-----------"
+    if [[ ${active_jobs} == "" ]]; then
+        echo "<None>"
+    else
+        echo ${active_jobs} |tr ' ' '\n' |sort |uniq -u
+    fi
+
+    echo -e "\nQueued Jobs:\n-----------"
+    if [[ ${#all_jobs[@]} -eq 0 ]]; then
+        echo "<None>"
+    else
+        if [[ ${active_jobs} == "" ]]; then
+            echo "<None>"
+        else
+            non_queued_jobs=$(echo "${active_jobs[@]}" "${completed_jobs[@]}" |tr ' ' '\n' |sort |uniq -u)
+            queued_jobs=$(echo "${all_jobs[@]}" "${non_queued_jobs[@]}" |tr ' ' '\n' |sort |uniq -u)
+            if [[ ${queued_jobs} == "" ]]; then
+                echo "<None>"
+            else
+                echo ${queued_jobs} | tr ' ' '\n' | sort | uniq -u
+            fi
+        fi
+    fi
+
+    echo -e "\nCompleted Jobs:\n--------------"
+    if [[ ${completed_jobs} == "" ]]; then
+        echo "<None>"
+    else
+        echo ${completed_jobs} | tr ' ' '\n' | sort | uniq -u
+    fi
+
+    echo
+
+    if  [[ $1 == "-f" ]]; then
+        sleep ${LIST_JOBS_FOLLOW_WAIT}
+        clear
+        date
+        list_jobs $1
+    fi
+}
+
+log_completed_jobs() {
+    local extra_flags=""
+    if [[ $1 ]]; then
+        extra_flags=$1
+    fi
+    tail ${extra_flags} ${LOG_FILE}
+}
+
+log_killer_keyword() {
+    local keyword="$@"
+    local workers=$(log_keyword_grep "worker" "${keyword}")
+    for z in ${workers[@]}; do
+        local process=${z[0]}
+        local pid=$(pgrep -fo ${process})
+        echo "killing PID: ${pid} | ${process}"
+        kill ${pid}
+     done
+}
+
+log_keyword_grep() {
+    if [[ ! $2 ]]; then
+        echo "[ ERROR ] Keyword required"
+        exit 1
+    fi
+    local type=${1:-worker}; shift
+    local keyword="$@"
+    for worker in $(_get_active_demo_workers); do
+        local log_file="${worker}.log"
+        local keyword_count=$(grep -c "${keyword}" "${GAMEDIR}/${log_file}")
+        if [[ ${keyword_count} > 0 ]]; then
+            if [[ ${type} == "worker" ]]; then
+                echo "${worker}"
+            else
+                echo "[ worker ] ${worker}"
+                grep "${keyword}" "${GAMEDIR}/${log_file}"
+            fi
+        fi
+    done
+}
+
+process_batch() {
+    local demo_list_file=${DEFAULT_DEMO_LIST_FILE}
+    local timeout=${JOB_TIMEOUT}
+    local -a videos=()
+    if [[ $1 =~ ${REGEX_DEMOLIST_FILE} ]]; then
+        demo_list_file=$1; shift
+    fi
+    if [[ $1 =~ ${REGEX_DURATION} ]]; then
+        timeout=$1; shift
+    fi
+    local compress=${COMPRESS}
+    if [[ $1 == "--compress" ]]; then
+        compress="true"
+    fi
+    echo "[ INFO ] Using '${demo_list_file}' with a timeout of ${timeout}"
+    local demos=$(_get_demos_from_file ${demo_list_file})
+    _queue_add_demo_jobs ${QUEUE_FILE_DEMOS} ${timeout} ${demos[@]}
+    if [[ ${compress} == "true" ]]; then
+        for v in ${demos[@]}; do
+            videos+=("video/$(basename ${v} | sed 's/.dem$/_000.ogv/')")
+        done
+        _queue_add_compression_jobs ${QUEUE_FILE_COMPRESSING} "mp4" "${videos[@]}"
+    fi
+    _run_demo_jobs ${QUEUE_FILE_DEMOS} "summary" && \
+        _check_if_compress ${compress} "${videos[@]}"
+}
+
+process_single() {
+    if [[ ! $1 ]]; then
+        echo "[ ERROR ] Demo name required"
+        exit 1
+    fi
+    local demo_file=$1
+    local timeout=${JOB_TIMEOUT}
+    if [[ $2 =~ ${REGEX_DURATION} ]]; then
+        timeout=$2; shift
+    fi
+    local compress=${COMPRESS}
+    if [[ $2 == "--compress" ]]; then
+        compress="true"
+    fi
+    echo "[ INFO ] Using '${demo_file}' with a timeout of ${timeout}"
+    _queue_add_demo_jobs ${QUEUE_FILE_DEMOS} ${timeout} ${demo_file}
+    if [[ ${compress} == "true" ]]; then
+        local video_file="video/$(basename "${demo_file}" .dem)_000.ogv"
+        _queue_add_compression_jobs ${QUEUE_FILE_COMPRESSING} "mp4" "${video_file}"
+    fi
+    _run_demo_jobs ${QUEUE_FILE_DEMOS} "summary" && \
+        _check_if_compress ${compress} ${video_file}
+}
+
+_version() {
+    echo ${VERSION}
+}
+
+_help() {
+    echo "./encode-demos.sh
+
+FLAGS
+
+    --version                                   prints the version string
+
+COMMANDS
+
+    Encoding
+    --------
+    batch  [demos.txt] [timeout] [--compress]           batch process a list of demos from file relative to \$USERDIR/data
+    single <demo> [timeout] [--compress]                process a single demo file in \$USERDIR/data. ex: demos/cool.dem
+                                                        'timeout' does not include '--compress', compress starts a new job
+    Compression
+    -----------
+    compress <video> [mp4|webm] [--cleanup]             compress an encoded ogv in \$USERDIR/data, ex: video/cool.ogv
+
+    Convert
+    -----------
+    gif <video> [fps] [width] [start] [length] [loop]   convert a video to gif in \$USERDIR/data, ex: video/cool.ogv
+
+    Job Management
+    --------------
+    grep <keyword>                                      grep the server logs of the workers
+    kkill <keyword>                                     keyword kill, kill a worker if string is matched
+    list [-f]                                           list currently active/queued/completed jobs
+    log [-f]                                            tail the current log (-f follows log)
+
+EXAMPLES
+
+    # outputs \$USERDIR/data/video/2015-06-11_00-26_solarium.ogv (very large)
+    ./encode-demos.sh single demos/2015-06-11_00-26_solarium.dem
+
+    # outputs \$USERDIR/data/video/2015-06-11_00-26_solarium.mp4 (optimal for youtube)
+    ./encode-demos.sh single demos/2015-06-11_00-26_solarium.dem --compress
+
+    # batch
+    ./encode-demos.sh batch demos.txt --compress
+
+    # compress a video in \$USERDIR/data (outputs test.mp4, and deletes the original)
+    ./encode-demos.sh compress video/test.ogv --cleanup
+
+    # convert video to gif (14 fps, 640 width, start at 4s, length of 4s, loop 100 times)
+    ./encode-demos.sh gif video/2017-04-01_11-53_afterslime_000.ogv 14 640 4 4 100
+
+    # list jobs
+    ./encode-demos.sh list
+
+    # inspect worker server logs
+    ./encode-demos.sh grep \"connected\"
+
+    # follow a completed job log
+    ./encode-demos.sh log -f
+
+    # Override the path to Xonotic (assumed from relative location of this script)
+    XONOTIC_DIR=\$HOME/some/other/dir; ./misc/tools/encode-demos.sh --version
+"
+}
+
+# Init
+######
+
+# Allow for overriding the path assumption
+# XONOTIC_DIR=$HOME/some/other/dir; ./misc/tools/encode-demos.sh --version
+if [[ -z ${XONOTIC_DIR} ]]; then
+    _get_xonotic_dir
+else
+    _check_xonotic_dir ${XONOTIC_DIR}
+fi
+
+case $1 in
+    # flags
+    '--version')        _version;;
+    ## commands
+    # encoding
+    'batch')            _run_xvfb; process_batch $2 $3 $4;;
+    'single')           _run_xvfb; process_single $2 $3 $4;;
+    # compression
+    'compress')         compress $2 $3 $4;;
+    # convert
+    'gif')              create_gif $2 $3 $4 $5 $6 $7;;
+    # monitoring/management
+    'grep')             log_keyword_grep 'normal' $2;;
+    'kkill')            log_killer_keyword $2;;
+    'list')             list_jobs $2;;
+    'log')              log_completed_jobs $2;;
+    # default
+    *)                  _help; exit 0;;
+esac
index 5462bbb8ed97cdbe434d76a05e2911de207dc6ec..0223e82a3a5c39ac0046d98706746e47fefbc45c 100755 (executable)
@@ -2,8 +2,9 @@
 
 use strict;
 use warnings;
-use MIDI;
+use MIDI::Event;
 use MIDI::Opus;
+use MIDI::Track;
 
 my ($filename, @others) = @ARGV;
 my $opus = MIDI::Opus->new({from_file => $filename});
@@ -59,7 +60,7 @@ for(@others)
 while(<STDIN>)
 {
        chomp;
-       my @arg = split /\s+/, $_;
+       my @arg = grep { $_ ne '' } split /\s+/, $_;
        my $cmd = shift @arg;
        print "Executing: $cmd @arg\n";
        if($cmd eq '#')
@@ -117,11 +118,11 @@ while(<STDIN>)
        {
                my $tracks = $opus->tracks_r();
                my ($track, $channel, $program) = @arg;
-               for(($track eq '*') ? (0..@$tracks-1) : $track)
+               for my $t(($track eq '*') ? (0..@$tracks-1) : $track)
                {
                        my @events = ();
-                       my $added = 0;
-                       for(abstime $tracks->[$_]->events())
+                       my %added = ();
+                       for(abstime $tracks->[$t]->events())
                        {
                                my $p = $chanpos{$_->[0]};
                                if(defined $p)
@@ -131,17 +132,48 @@ while(<STDIN>)
                                        {
                                                next
                                                        if $_->[0] eq 'patch_change';
-                                               if(!$added)
+                                               if(!$added{$t}{$c})
                                                {
                                                        push @events, ['patch_change', $_->[1], $c-1, $program-1]
                                                                if $program;
-                                                       $added = 1;
+                                                       $added{$t}{$c} = 1;
                                                }
                                        }
                                }
                                push @events, $_;
                        }
-                       $tracks->[$_]->events_r([reltime @events]);
+                       $tracks->[$t]->events_r([reltime @events]);
+               }
+       }
+       elsif($cmd eq 'control')
+       {
+               my $tracks = $opus->tracks_r();
+               my ($track, $channel, $control, $value) = @arg;
+               for my $t(($track eq '*') ? (0..@$tracks-1) : $track)
+               {
+                       my @events = ();
+                       my %added = ();
+                       for(abstime $tracks->[$t]->events())
+                       {
+                               my $p = $chanpos{$_->[0]};
+                               if(defined $p)
+                               {
+                                       my $c = $_->[$p] + 1;
+                                       if($channel eq '*' || $c == $channel)
+                                       {
+                                               next
+                                                       if $_->[0] eq 'control_change' && $_->[3] == $control;
+                                               if(!$added{$t}{$c})
+                                               {
+                                                       push @events, ['control_change', $_->[1], $c-1, $control, $value]
+                                                               if $value ne '';
+                                                       $added{$t}{$c} = 1;
+                                               }
+                                       }
+                               }
+                               push @events, $_;
+                       }
+                       $tracks->[$t]->events_r([reltime @events]);
                }
        }
        elsif($cmd eq 'transpose')
@@ -317,10 +349,12 @@ while(<STDIN>)
                print "  ticks [value]\n";
                print "  retrack\n";
                print "  program <track|*> <channel|*> <program (1-based)>\n";
+               print "  control <track|*> <channel|*> <control> <value>\n";
                print "  transpose <track|*> <channel|*> <delta>\n";
                print "  channel <track|*> <channel|*> <channel> [<channel> <channel> ...]\n";
                print "  percussion <track|*> <channel|*> <from> <to> [<from> <to> ...]\n";
                print "  tracks [trackno] [trackno] ...\n";
+               print "  save <filename.mid>\n";
        }
        print "Done with: $cmd @arg\n";
 }
index 7065f8520c908fe026e248a97cc5c57bfda552d8..b0d429dd2d6fd5c3bd20ba89936ea0e0076cf098 100755 (executable)
@@ -72,17 +72,8 @@ if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
                        excludes="$excludes --exclude=/Xonotic*.app"
                        excludes="$excludes --exclude=/xonotic-osx-*"
                        excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
-                       if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then
-                               excludes="$excludes --exclude=/xonotic-linux32-*"
-                               excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
-                       fi
-                       ;;
-               Linux:i?86)
-                       excludes="$excludes --exclude=/Xonotic*.app"
-                       excludes="$excludes --exclude=/xonotic-osx-*"
-                       excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
-                       excludes="$excludes --exclude=/xonotic-linux64-*"
-                       excludes="$excludes --exclude=/gmqcc/gmqcc.linux64"
+                       excludes="$excludes --exclude=/xonotic-linux32-*"
+                       excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
                        ;;
                *)
                        echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
index 7065f8520c908fe026e248a97cc5c57bfda552d8..b0d429dd2d6fd5c3bd20ba89936ea0e0076cf098 100755 (executable)
@@ -72,17 +72,8 @@ if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
                        excludes="$excludes --exclude=/Xonotic*.app"
                        excludes="$excludes --exclude=/xonotic-osx-*"
                        excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
-                       if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then
-                               excludes="$excludes --exclude=/xonotic-linux32-*"
-                               excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
-                       fi
-                       ;;
-               Linux:i?86)
-                       excludes="$excludes --exclude=/Xonotic*.app"
-                       excludes="$excludes --exclude=/xonotic-osx-*"
-                       excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
-                       excludes="$excludes --exclude=/xonotic-linux64-*"
-                       excludes="$excludes --exclude=/gmqcc/gmqcc.linux64"
+                       excludes="$excludes --exclude=/xonotic-linux32-*"
+                       excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
                        ;;
                *)
                        echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
index 4fb4a10dd6653b29b62930caf062f234e1578950..c257ed71077fd573b5adf1cdf10006d9998f1efe 100644 (file)
@@ -16,10 +16,10 @@ goto postarg
 :noarg\r
 if "%ProgramFiles(x86)%" == "" goto bit32\r
 :bit64\r
-set xonotic=xonotic-x64.exe\r
+set xonotic=xonotic.exe\r
 goto postarg\r
 :bit32\r
-set xonotic=xonotic.exe\r
+set xonotic=xonotic-x86.exe\r
 goto postarg\r
 :postarg\r
 \r
index 8938cdc6f36e2965aa5f32121af041ee05d1cacc..f21daaf8dd6d9a6f591d757a6341fa4fb149492a 100755 (executable)
@@ -31,7 +31,7 @@ use File::Temp;
        our $MINIMAPFLAGS = '';
 
        # Default order of commands
-       our $ORDER = 'vis,scale,light';
+       our $ORDER = 'vis,light,scale';
 
 # end of user changable part
 
index bbcedec0ddbc6a2db0fb9056a28b3a75d488ce6f..f8f3455206619a2b1c5ac3a5ca8b95154bd9e9dd 100755 (executable)
@@ -164,7 +164,8 @@ buildthemap()
        blobhash=$4
        commithash=$5
        if lwp-request -m HEAD "$url$M-$blobhash.pk3"; then
-               continue
+               # already compiled
+               return
        fi
 
        git reset --hard
@@ -237,13 +238,19 @@ screenshotthemap()
        M=$3
        blobhash=$4
        commithash=$5
+       if ! [ -f "$bspdir/$M-$blobhash.pk3" ]; then
+               # not downloaded yet
+               return
+       fi
+
        if lwp-request -m HEAD "$url$M-$blobhash/$M-000000.jpg"; then
-               continue
+               # already done
+               return
        fi
 
        if ! unzip -l "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp"; then
                # no BSP file
-               continue
+               return
        fi
 
        rm -rf ~/.xonotic/data
@@ -304,14 +311,12 @@ getthemap()
                if ! curl -o "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then
                        rm -f "$bspdir/$M-$blobhash.pk3"
                        echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet"
-                       getthemap_fail=true
                        return 0
                fi
        fi
        if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then
                rm -f "$bspdir/$M-$blobhash.pk3"
                echo "WARNING: could not download $url$M-$blobhash.pk3, invalid zip file"
-               getthemap_fail=true
                return 0
        fi
 }
@@ -376,13 +381,17 @@ case "$1" in
                        git clean -xfd
                        git checkout -f "$HASH"
 
+                       getthemap_fail=false
                        rundownload
+
+                       allmaps "$HASH" screenshotthemap "$REFNAME" "$url_http"
+
                        if $getthemap_fail; then
+                               # If any map fetch failed, we've skipped them and thus need to try again later.
+                               # Note that we're not going to re-screenshot maps because of this as we'll check for uploaded screenshots first.
                                continue
                        fi
 
-                       allmaps "$HASH" screenshotthemap "$REFNAME" "$url_http"
-
                        touch "$screenshot_cachedir/$HASH"
                done
                git checkout -f master
index 867fd7dbbeba17f126b94ea63259ab41ad8391d2..ce00dbc7729539208601680a86dd6b77e4c0bcd8 100755 (executable)
@@ -10,12 +10,14 @@ count=`yes x | head -n "$count" | tr -cd x`
 
 ./all run \
        -nosound \
+       -noconfig \
        +'locksession 0' \
        +'scr_screenshot_timestamp 0' \
        +'vid_fullscreen 0' \
        +'exec effects-ultra.cfg' \
        "$@" \
        +'sv_precacheplayermodels 0' \
+       +'cl_hidewaypoints 1' \
        +'r_motionblur 0' \
        +'r_damageblur 0' \
        +'r_letterbox -1' \
@@ -33,7 +35,7 @@ count=`yes x | head -n "$count" | tr -cd x`
        +'alias EGAD "noclip; NARF POIT"' \
        +'alias POIT "$catchme; set catchme \"${catchme}x\"; impulse 911; NARF TROZ"' \
        +'alias TROZ "screenshot; NARF POIT"' \
-       +'alias cl_hook_gamestart_all "cmd join; defer 2 ZORT"' \
+       +'alias cl_hook_gamestart_all "defer 1.1 \"cmd join\"; defer 2 ZORT"' \
        +"defer \"$watchdog\" quit" \
        +"map \"$map\"" \
        +'timelimit 0' \
diff --git a/nix-build.sh b/nix-build.sh
new file mode 100755 (executable)
index 0000000..e8ac520
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -euo pipefail
+cd ${0%/*}
+export VERSION_data_xonotic_data_pk3dir=$(cd $PWD/data/xonotic-data.pk3dir && git describe --tags --dirty --long --always)
+exec nix-build $@
index b8b4036e8f25ce2004e2983c75f879c4c733058a..44b16eb861c0a17f7436ccc7bb04a061e16a76d0 100644 (file)
@@ -9,9 +9,9 @@ add_custom_target(release)
 string(TIMESTAMP stamp "%Y%m%d")
 string(TIMESTAMP filestamp "%Y-%m-%d")
 
-file(STRINGS data/xonotic-data.pk3dir/defaultXonotic.cfg _contents REGEX "^gameversion ")
+file(STRINGS data/xonotic-data.pk3dir/xonotic-common.cfg _contents REGEX "^gameversion ")
 if (NOT _contents)
-    message(FATAL_ERROR "defaultXonotic.cfg does not contain gameversion")
+    message(FATAL_ERROR "xonotic-common.cfg does not contain gameversion")
 else ()
     string(REGEX REPLACE ".*gameversion ([0-9]+).*" "\\1" versionstr "${_contents}")
     math(EXPR versionstr_major "${versionstr} / 10000")
@@ -67,10 +67,6 @@ if (0)
     getbinary(Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-sdl-bin) # +x
     getbinary(Xonotic/xonotic-osx-dedicated) # +x
 
-    getbinary(Xonotic/xonotic-linux32-sdl) # +x
-    getbinary(Xonotic/xonotic-linux32-glx) # +x
-    getbinary(Xonotic/xonotic-linux32-dedicated) # +x
-
     getbinary(Xonotic/xonotic-linux64-sdl) # +x
     getbinary(Xonotic/xonotic-linux64-glx) # +x
     getbinary(Xonotic/xonotic-linux64-dedicated) # +x
diff --git a/release.nix b/release.nix
new file mode 100644 (file)
index 0000000..ae69b61
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    nixpkgs ? <nixpkgs>,
+    systems ? [ "i686-linux" "x86_64-linux" ],
+}:
+{
+    xonotic = (import <nixpkgs/lib>).genAttrs systems (system:
+        import ./default.nix {
+            pkgs = import nixpkgs { inherit system; };
+        }
+    );
+}
diff --git a/server/help.cfg b/server/help.cfg
deleted file mode 100644 (file)
index b5f555a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-// Simple help message system
-// It prints messages with the configured name and interval to all connected users
-// Exec this file and start the help system with the command help_loop
-// You can adjust those two settings and change the messages and their count
-// help_cfg_time is the time between two messages in seconds
-// help_cfg_prefix is prepended to each message, useful to color the nick and message differently
-// help_msg_count is from 0 to last message, thus one more then the last message number you want
-// the messages need to be starting from 0 and be consecutive
-// for manual use: help_inc switches to the next message, help_doit will print the current message, help_next will do both together
-
-// settings
-set help_cfg_nick "^2Help System^3"
-set help_cfg_time 300
-set help_cfg_prefix "^2"
-
-// help messages
-set help_msg_count 58
-set help_msg_0 "Big Admin is watching you, so please be friendly or feel their almighty ban-hammer!"
-set help_msg_1 "If you want to learn more about Xonotic read ^1'Halogene's Newbie Corner' (http://xonotic.org and click 'Guide') ${help_cfg_prefix}as it contains lots of useful tips and tricks, explains all the weapons and helps to improve your gameplay."
-set help_msg_2 "Please watch out for balanced teams and change by pressing F5 (teammenu) or F6 (auto join 'best' team)."
-set help_msg_3 "When trying to bunny-hop you can ^1hold the jump button ${help_cfg_prefix}while you are still in the air, this will make those jumps VERY easy to time and work more reliable."
-set help_msg_4 "When a vote is called you can accept it via F1 or reject it via F2 (default keys)."
-set help_msg_5 "Spectating other (good) players helps to learn new tricks. To spectate press F3 and then Mouse1 to switch between the players you want to spectate. F5, F6 or jump will get you back into the game (default keys)."
-set help_msg_6 "Being a beginner is great! You can learn so many new tricks and improve quickly. Watch others, ask for advice and use your common sense effectively."
-set help_msg_7 "If others are better than you, it does not mean they cheat. Save such complaints for when you have more experience and know what kind of funky stuff is possible."
-set help_msg_8 "In CTF, it's good to move around and get involved in the action. You get fragged quite a bit but you are also most helpful to your team."
-set help_msg_9 "Use the radar to see where your teammates are. Pressing zoom will expand the radar image to give you a better overview."
-set help_msg_10 "Most teammessages display waypoints by default. Use those to guide your teammates. You can also see them and the flagcarrier in the radar."
-set help_msg_11 "Protect your flagcarrier at all cost! Also save health and armor for him, he might need them more than you!"
-set help_msg_12 "You can use the Blaster and most explosive weapons to jump around. Just look 'at your feet' and press fire. If you also jump at the same time you get even higher."
-set help_msg_13 "Be friendly and helpful to other players! Being angry at others' mistakes is understandable, but nobody is perfect. Try to use calm words when telling them how to correct their mistake."
-set help_msg_14 "You can use the zoom key with all guns, only the Vortex has it as a extra function on Mouse2 (default key)."
-set help_msg_15 "Notice what is happening around you! If your base is empty in CTF then STAY and defend the flag! Make sure someone defends the flagcarrier or assist him yourself."
-set help_msg_16 "You can drop the weapon you currently have with Backspace (default key). You can help your unarmed teammates this way."
-set help_msg_17 "Learn to use the team messages! You find them in the Setting/Input menu. Try changing them to keys you can press easier than the defaults."
-set help_msg_18 "Gaming should be fun! Try to have a nice time, be helpful, mindful and treat others like you want to be treated."
-set help_msg_19 "Visit the official forum on ^1http://xonotic.org/forums/ ${help_cfg_prefix}and feel free to open a thread if you have questions."
-set help_msg_20 "If you already have a good weapon, it's a great idea to let your teammates get something better than the Shotgun too!"
-set help_msg_21 "Press T to chat with others, press Y for messages to your team only, press TAB to see the scores and U for the chat history (default keys)."
-set help_msg_22 "You can use ^1'suggestmap PART_OF_NAME' ${help_cfg_prefix}to make a map come up at the vote screen after a map was played."
-set help_msg_23 "The console is accessible through the ~ key or by pressing Shift+ESC. It has many more advanced features, use 'cmdlist' and 'cvarlist' to get a full list of available commands/settings."
-set help_msg_24 "The Blaster is a useful tool for gaining speed and jumping around, but it does little damage."
-set help_msg_25 "The Shotgun's primary firemode has spread and is more useful at a closer distance, use secondary for the melee attack and slap into other players faces!"
-set help_msg_26 "The Machine Gun secondary has a burst fire mode and less spread than the primary mode."
-set help_msg_27 "The Mortar is a good all around gun but takes some practice to aim it, because of the projectile's curve."
-set help_msg_28 "The Electro has a combo attack. Fire the primary mode at the balls from the secondary mode for a huge and powerful explosion."
-set help_msg_29 "The Crylink's primary fire bounces. Both firemodes pull your enemies, making it a great tool to stop a flag carrier."
-set help_msg_30 "The Vortex is a powerful sniper gun. Aim carefully!"
-set help_msg_31 "The Hagar is underestimated, but very powerful if you aim right. The secondary mode charges up to four rockets and causes devasting damage if you release them."
-set help_msg_32 "The Devastator is powerful but slow. Keep Mouse1 pressed to guide the rockets. Secondary firemode makes the rocket(s) explode."
-set help_msg_33 "The Arc is a strong lighting beam, which bends slighty if you move your mouse. The secondary firemode is very strong but short. Both firemodes also heal teammates if you shoot at them."
-set help_msg_34 "By default, explosions go through walls. Be careful when hiding behind walls!"
-set help_msg_35 "Get on IRC to chat with fellow players. ^1#xonotic on http://webchat.quakenet.org/ ${help_cfg_prefix}is the most famous place."
-set help_msg_36 "Don't drink and frag."
-set help_msg_37 "Don't shoot at players who are typing/chatting. You recognize those players by the keyboard symbols above their head."
-set help_msg_38 "'gg' is shorthand for 'Good Game', 'gl' means 'Good luck' and 'hf' 'Have fun'."
-set help_msg_39 "Players with the prefix '$bot_prefix${help_cfg_prefix}' in their nick are bots on this server. There is also a clan named [BOT]."
-set help_msg_40 "Read the help messages!"
-set help_msg_41 "Visit the stats page at ^1http://stats.xonotic.org/ ${help_cfg_prefix}and check out how you are doing in the rankings!"
-set help_msg_42 "Start playing 1on1 if you want to learn fast"
-set help_msg_43 "Visit the IRC channel ^1#xonotic.pickup on http://webchat.quakenet.org/ ${help_cfg_prefix}to get in touch with the experienced players. Ask the stuff and play with them!"
-set help_msg_44 "Look for servers that have a good ping for you. You can't play this game well with a ping > 100. If there are no servers close enough to you, cooperate with your friends to setup one."
-set help_msg_45 "If you want to play the next map you can cast a vote via 'vcall endmatch' in the console. Other players can vote using F1 and F2 (default keys)."
-set help_msg_46 "Always watch your back. Do not just run away, fight back as you retreat. Otherwise, you could be shot in the back."
-set help_msg_47 "Try to get as much armor and health as you can, but remember your teammates need armor and health too."
-set help_msg_48 "Do not attack if you have neither a good weapon, nor health, nor armor."
-set help_msg_49 "Standing still makes you an easy target. You can move around the map faster by bunny hopping."
-set help_msg_50 "You can use the Blaster to climb up walls. Before trying this, become familiar with the basics of Blaster movement."
-set help_msg_51 "You can control your movement in air. Use it to prevent yourself from falling off the map when somebody starts pushing you around."
-set help_msg_52 "Use the Blaster, Mortar or Devastator in space maps to push other players off the map. They will enjoy it."
-set help_msg_53 "You can turn off automatic weapon changing in the Player menu. If you configure your key bindings, manually switching weapons can be faster and easier."
-set help_msg_54 "Choose the right weapon for the job, not just the one that the game automatically puts in your hand."
-set help_msg_55 "Enter ^1'lsmaps' ${help_cfg_prefix}in the console to get a list of maps configured on the server."
-set help_msg_56 "While you are in the air, release the forward key, press one of the left/right keys and move your mouse in the same direction. This will bend your fly/jump path."
-set help_msg_57 "Hold the jump key to keep on jumping (called ^1'bunny-hopping'${help_cfg_prefix}) which will accelerate your speed."
-
-// aliases making up the actual helpsystem
-set help_tmp_index 0
-alias help_say "set help_tmp_oldnick \"$sv_adminnick\"; set sv_adminnick \"$help_cfg_nick\"; say \"$*\"; help_say2"
-alias help_say2 "set sv_adminnick \"$help_tmp_oldnick\""
-alias help_doit "sv_cmd rpn /help_tmp_msg help_msg_$help_tmp_index def; help_doit2"
-alias help_doit2 "help_say $help_cfg_prefix\"$help_tmp_msg\""
-alias help_inc "sv_cmd rpn /help_tmp_index help_tmp_index 1 add $help_msg_count mod def"
-alias help_next "help_inc; help_doit"
-alias help_loop "help_next; defer $help_cfg_time help_loop"
\ No newline at end of file
index 53f1775c854e4ec42745adf01afc92748936c77d..bcc6e524a52e8ead946318dca2cbc9d901558a4d 100644 (file)
@@ -1,33 +1,52 @@
-// A setting needs to be surrounded with " if it contains special
-// characters like space, semicolon (seperates commands) or starts
-// with // (begins a comment for the rest of the line or next
-// semicolon).  While just "" means 'no/empty setting'.
+// This is an example config, to actually use it, copy it to ~/.xonotic/data on linux
+// or the equivalent directory on your OS (https://xonotic.org/faq/#config).
+
+// Two slashes start a comment until the end of the line.
+// Surround settings with double quotes (e.g. cvar_name "some value") unless they're a single number or word.
+// Cvar means console variable.
+// Just "" means empty string.
+// Semicolon separates commands (in console or in aliases).
+
+// Search for settings and descriptions using the 'search' command in console
+// or online: https://xonotic.org/tools/cacs/
+
+
+
 
 /////////////////////////////////////////////////////////////////////
-// Everything has some sensible defaults so you do NOT really need to
-// change anything.  But here are some settings you SHOULD change to
-// make it 'YOUR' server.  IF so remove the // from the line start and
-// change them to your liking.
+// Things you SHOULD change to make the server "yours" (remove the // and change the value):
 
-//sv_public 1  // 0 if the server should not be on the public servers list
-//sv_status_privacy 1  // 1 hides IP addresses from "status" replies shown to clients, 0 shows them. Enables players to identify wellknown punks on your server OR is a thread to anonymity.. depending on your point of view :)
+//sv_public 1  // 0 or -1 (see description) if the server should not be on the public servers list
 //hostname "Xonotic $g_xonoticversion Server"  // this name will appear on the server list (the $g_xonoticversion gets replaced with the current version)
-//sv_motd ""   // this message (unless "") is displayed to players on connect
-//maxplayers 8 // number of players allowed on the server
+//sv_motd ""   // displayed on connect - good place for contact info (IRC, forum nick, etc.) so players can reach you when something is wrong with your server
+
+// This sets the remote console password on the server, you also need to set the cvar to the same value on your client to use the 'rcon' command.
+// Empty means rcon is disabled.
+//rcon_password ""
+
+
+/////////////////////////////////////////////////////////////////////
+// Everything below has some sensible defaults so you don't really need to change anything.
+// It's meant as examples for people who want to customize the server more.
+// The values shown are either defaults or examples (for up to date defaults, see 'search' (or 'apropos') in console.
+
+//maxplayers 8 // number of player slots on the server (including spectators)
+
+//net_address 0.0.0.0  // ONLY change this if you have problems with your server. Specifies the network interface used by the engine.  Set it to one of your internal IPs
 
 //port 26000   // the port used by the server
-//You are RECOMMENDED to change this value to a free port number on your server
-//above 1024. The reason is that some bad ISPs might filter "gaming" ports, and
-//changing the port your server runs on may make your server available to these
-//people. Changing the port breaks nothing, the default simply matches Quake as
-//we use a Quake-derived protocol and didn't do our own IANA port assignment yet
-//(if anyone wants to go through that process, we'd be glad).
+// You are RECOMMENDED to change this value to a free port number on your server
+// above 1024. The reason is that some bad ISPs might filter "gaming" ports, and
+// changing the port your server runs on may make your server available to these
+// people. Changing the port breaks nothing, the default simply matches Quake as
+// we use a Quake-derived protocol and didn't do our own IANA port assignment yet
+// (if anyone wants to go through that process, we'd be glad).
 
 //log_file "server.log"        // server console output will also be copied to this file. This: "${serverconfig}.log" uses variable substitution to make the logfile have the same name as your config file with .log appended which is useful if you run several servers
 //g_start_delay 15     // delay before the game starts to let players join the server first
 
 // List of maps to play on the server.  Set to "" to autodetect (which would enumerate ALL maps.  Maps that don't support the current game mode will be skipped, so you don't need to remove them here.
-//g_maplist "afterslime dance g-23 glowplant leave_em_behind newtonian-nightmare nexballarena red-planet runningman space-elevator stormkeep techassault xoylent"
+//g_maplist "afterslime atelier boil catharsis courtfun dance drain erbium finalrage fuse geoplanetary glowplant implosion leave_em_behind nexballarena oilrig runningman runningmanctf silentsiege solarium space-elevator stormkeep techassault vorix warfare xoylent"
 //g_maplist_shuffle 1  // 0 always selects the next map out of g_maplist (but then better set g_maplist_votable 0 below to prevent repetitive votes), 1 will select random maps each time
 //g_maplist_mostrecent_count 3 // number of maps that have to be played before a map can be repeated
 
 //g_lms_lives_override -1      // lives for LMS
 //g_nexball_goallimit -1       // goals for NEXBALL
 
-//g_ctf_ignore_frags 1 // set to 1 to ignore kills except for FC kills
+//g_ctf_ignore_frags 0 // set to 1 to ignore kills except for FC kills
 
 // TEAMS for key hunt (change this to 2, 3, 4 to set a fixed keyhunt style)
 //g_keyhunt_teams_override -1  // teams for KH
 
 // GAME MODE: what type of server do you want to host?
-// possible values: dm (deathmatch), tdm (team deathmatch), dom (domination), ctf (ctf), ft (freeze tag), lms (last man standing), ka (keepaway), inv (invasion), kh (keyhunt), as (assault), ons (onslaught), rc (race), nb (nexball)
-//gametype dm
+// possible values: dm (deathmatch), tdm (team deathmatch), ctf (capture the flag), ca (clan arena), ft (freeze tag), kh (keyhunt), as (assault), dom (domination), lms (last man standing), ka (keepaway), inv (invasion), ons (onslaught), rc (race), cts (complete the stage), nb (nexball)
+//gametype dm  // default gamemode
 
+// TIPS: uncomment this if you want help messages on your server - one per match 20 seconds after the map loads
+//alias sv_hook_gamestart_all "defer 20 help_next"
 
 
 
 // Some settings you MIGHT want to change.  Again IF so remove the //
 // from the line start and change them to your liking.
 
-//net_address 0.0.0.0  // ONLY change this if you have problems with your server. Specifies the network interface used by the engine.  Set it you one of you internal IPs
-
-//rcon_password ""     // you can use rcon if this password is set.  you need to set the same password in your client if you want to issue rcon commands
-//rcon_restricted_password ""  // put here the password for a "restricted" rcon user (see below)
-
-//bot_number 0 // number of bots to add
 //skill 4      // the bots skill level
-//minplayers 0 // add bots if less then that number of players playing. MAKE SURE ITS LESS THEN maxplayers or people will get blocked by bots!
+//minplayers 0 // add bots if less then that number of players playing
 //g_maxplayers 0 // above this player count, only allow spectators
 //bot_prefix [BOT]     // prepend this to all botnames
 //bot_suffix ""        // append this to all botnames
 //g_maplist_votable_abstain 0  // when 1, people get a "don't care" selection in the vote screen
 //g_maplist_votable_nodetail 1 // when 1, people can't see how many voted for what (to thwart abusive "influential" first votes)
 
+sv_vote_gametype 1     // set to 1 to enable voting for gametypes after every match
+//sv_vote_gametype_options "dm kh dom tdm mygametype"  // the gametypes to vote for, custom gametypes are supported
+//set sv_vote_gametype_mygametype_name "My Mode"       // Name displayed for the custom gametype "mygametype" (replace "mygametype" with the name you set in sv_vote_gametype_options)
+//set sv_vote_gametype_mygametype_type "ft"    // the basetype that the custom gametype is derived from
+//set sv_vote_gametype_mygametype_description "This is my custom gametype"     // the description for the custom gametype
+// Custom icons for custom gametypes are supported and have to be located in a server pk3 as gfx/menu/default/gametype_mygametype
+
 //sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoauto shuffleteams"   // players can vote for those commands or use them if they are masters. You canm also add 'g_grappling_hook' for hook voting, and 'sv_fbskin_green sv_fbskin_red sv_fbskin_orange sv_fbskin_off' for fbskin voting.
 //sv_vote_master_commands "movetored movetoblue movetoyellow movetopink"       // add commands masters can use if logged in or elected. You may want to put 'kickban' here, so masters can keep out punks. It may be good to also put "sv_status_privacy 0" then...
 //rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban\" status \"sv_cmd teamstatus\" movetoauto movetored movetoblue movetoyellow movetopink"      // commands for the (stronger) rcon restricted
+//rcon_restricted_password ""  // put here the password for a "restricted" rcon user (see below)
 
 //sv_vote_call 1       // 0 will disable the normal voting
 //sv_vote_master 1     // 0 will disable voting to become master, good if you prefer to use the master password instead
 //sv_autotaunt 1       // 0 to disallow autotaunts
 
 
+
+
 /////////////////////////////////////////////////////////////////////
 // Settings you MIGHT want to change for PRIVACY reasons.
-//
-// The settings here may impact your or your players' privacy and serve to
-// optimize the game for further releases.
-//
-// Change them, or comment them out to turn them off.
+
+//sv_status_privacy 1  // 1 hides IP addresses from "status" replies shown to clients, 0 shows them. Enables players to identify wellknown punks on your server OR is a threat to anonymity.. depending on your point of view :)
 
 // This line sends the following data to our servers:
 // - Date and time
 //
 // No information about your server will be published - all published data sets
 // will include data from multiple servers.
-//   
-sv_weaponstats_file http://www.xonotic.org/weaponbalance/
+//
+sv_weaponstats_file "http://www.xonotic.org/weaponbalance/"
 
 
 
@@ -154,10 +176,10 @@ sv_weaponstats_file http://www.xonotic.org/weaponbalance/
 //sv_maxrate 1000000   // limits client connections to this rate in bytes/seconds
 
 // see Docs/mapdownload.txt for more info
-//sv_curl_defaulturl http://www.xonotic.com/contentdownload/getmap.php?file=   //fallback download URL
+//sv_curl_defaulturl http://www.xonotic.org/contentdownload/getmap.php?file=   //fallback download URL
 
 //sv_defaultcharacter 0        // 1 will force a specific model for all players
-//sv_defaultplayermodel models/player/nexus.zym        // this model will be used
+//sv_defaultplayermodel models/player/erebus.iqm       // this model will be used
 //sv_defaultplayerskin 0       // this skin number will be forced for all players
 //sv_defaultplayercolors ""    // you can even force player colors here (16*shirt+pants)
 //g_fullbrightplayers 0        // 1 to make players fullbright
@@ -172,6 +194,8 @@ sv_weaponstats_file http://www.xonotic.org/weaponbalance/
 //g_spawnshieldtime 1  // time for which players are protected after spawn
 
 
+
+
 /////////////////////////////////////////////////////////////////////
 // "Obvious" mutators that are allowed on a "pure" server
 //g_instagib 0 // set to 1 for InstaGib
@@ -181,6 +205,15 @@ sv_weaponstats_file http://www.xonotic.org/weaponbalance/
 
 
 
+/////////////////////////////////////////////////////////////////////
+// Overkill mod settings
+
+// To enable Overkill, put 'exec ruleset-overkill.cfg' at the top of this file (above any other cvar changes), don't use 'g_overkill 1' directly.
+// You should also consider enabling 'g_fullbrightplayers 1'.
+
+
+
+
 /////////////////////////////////////////////////////////////////////
 // WARNING: anything below this line makes your server "impure"!
 
index d45ae168d5ca5e70b465170000ac7f1837395d54..5eca583426492853f41e80125acc13521b5521ee 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 case "$(uname -m)" in
-  x86_64)      executable="xonotic-linux64-dedicated" ;;
-  *)           executable="xonotic-linux32-dedicated" ;;
+  i?86)        executable="xonotic-linux32-dedicated" ;;  # Not supported anymore but you can build your own.
+  *)   executable="xonotic-linux64-dedicated" ;;
 esac
 
 cd "`dirname "${0}"`"
index 4ef3d03030318a37fe05ba54b6ae3a3a62b56bfd..137fc4ed27bacc5f4db5b82600047fa4a4f89989 100755 (executable)
@@ -13,8 +13,8 @@ case "${0##*/}" in
 esac
 
 case "$(uname -m)" in
-  x86_64)      arch="linux64" ;;
-  *)           arch="linux32" ;;
+  i?86)        arch="linux32" ;;  # Not supported anymore but you can build your own.
+  *)   arch="linux64" ;;
 esac
 
 xonotic="xonotic-${arch}-${mode}"