Include the source of the Darkplaces engine too
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Jul 2011 20:13:25 +0000 (23:13 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Jul 2011 20:13:25 +0000 (23:13 +0300)
277 files changed:
misc/source/darkplaces-src/.gitattributes [new file with mode: 0644]
misc/source/darkplaces-src/.gitignore [new file with mode: 0644]
misc/source/darkplaces-src/BSDmakefile [new file with mode: 0644]
misc/source/darkplaces-src/COPYING [new file with mode: 0644]
misc/source/darkplaces-src/DPiOS.xcodeproj/project.pbxproj [new file with mode: 0644]
misc/source/darkplaces-src/Darkplaces.app/Contents/Info.plist [new file with mode: 0644]
misc/source/darkplaces-src/Darkplaces.app/Contents/PkgInfo [new file with mode: 0644]
misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/._Darkplaces.icns [new file with mode: 0644]
misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/Darkplaces.icns [new file with mode: 0644]
misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/English.lproj/InfoPlist.strings [new file with mode: 0644]
misc/source/darkplaces-src/Doxyfile [new file with mode: 0644]
misc/source/darkplaces-src/Info.plist [new file with mode: 0644]
misc/source/darkplaces-src/README.iOS [new file with mode: 0644]
misc/source/darkplaces-src/SDLMain.h [new file with mode: 0644]
misc/source/darkplaces-src/SDLMain.m [new file with mode: 0644]
misc/source/darkplaces-src/bih.c [new file with mode: 0644]
misc/source/darkplaces-src/bih.h [new file with mode: 0644]
misc/source/darkplaces-src/bspfile.h [new file with mode: 0644]
misc/source/darkplaces-src/builddate.c [new file with mode: 0644]
misc/source/darkplaces-src/cap_avi.c [new file with mode: 0644]
misc/source/darkplaces-src/cap_avi.h [new file with mode: 0644]
misc/source/darkplaces-src/cap_ogg.c [new file with mode: 0644]
misc/source/darkplaces-src/cap_ogg.h [new file with mode: 0644]
misc/source/darkplaces-src/cd_bsd.c [new file with mode: 0644]
misc/source/darkplaces-src/cd_linux.c [new file with mode: 0644]
misc/source/darkplaces-src/cd_null.c [new file with mode: 0644]
misc/source/darkplaces-src/cd_sdl.c [new file with mode: 0644]
misc/source/darkplaces-src/cd_shared.c [new file with mode: 0644]
misc/source/darkplaces-src/cd_win.c [new file with mode: 0644]
misc/source/darkplaces-src/cdaudio.h [new file with mode: 0644]
misc/source/darkplaces-src/cl_collision.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_collision.h [new file with mode: 0644]
misc/source/darkplaces-src/cl_demo.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_dyntexture.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_dyntexture.h [new file with mode: 0644]
misc/source/darkplaces-src/cl_gecko.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_gecko.h [new file with mode: 0644]
misc/source/darkplaces-src/cl_input.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_main.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_parse.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_particles.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_screen.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_screen.h [new file with mode: 0644]
misc/source/darkplaces-src/cl_video.c [new file with mode: 0644]
misc/source/darkplaces-src/cl_video.h [new file with mode: 0644]
misc/source/darkplaces-src/cl_video_jamdecode.c [new file with mode: 0644]
misc/source/darkplaces-src/client.h [new file with mode: 0644]
misc/source/darkplaces-src/clprogdefs.h [new file with mode: 0644]
misc/source/darkplaces-src/clvm_cmds.c [new file with mode: 0644]
misc/source/darkplaces-src/clvm_cmds.h [new file with mode: 0644]
misc/source/darkplaces-src/cmd.c [new file with mode: 0644]
misc/source/darkplaces-src/cmd.h [new file with mode: 0644]
misc/source/darkplaces-src/collision.c [new file with mode: 0644]
misc/source/darkplaces-src/collision.h [new file with mode: 0644]
misc/source/darkplaces-src/common.c [new file with mode: 0644]
misc/source/darkplaces-src/common.h [new file with mode: 0644]
misc/source/darkplaces-src/conproc.c [new file with mode: 0644]
misc/source/darkplaces-src/conproc.h [new file with mode: 0644]
misc/source/darkplaces-src/console.c [new file with mode: 0644]
misc/source/darkplaces-src/console.h [new file with mode: 0644]
misc/source/darkplaces-src/crypto-keygen-standalone-brute.sh [new file with mode: 0644]
misc/source/darkplaces-src/crypto-keygen-standalone.c [new file with mode: 0644]
misc/source/darkplaces-src/crypto.c [new file with mode: 0644]
misc/source/darkplaces-src/crypto.h [new file with mode: 0644]
misc/source/darkplaces-src/csprogs.c [new file with mode: 0644]
misc/source/darkplaces-src/csprogs.h [new file with mode: 0644]
misc/source/darkplaces-src/curves.c [new file with mode: 0644]
misc/source/darkplaces-src/curves.h [new file with mode: 0644]
misc/source/darkplaces-src/cvar.c [new file with mode: 0644]
misc/source/darkplaces-src/cvar.h [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-dedicated.dev [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-dedicated.dsp [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-dedicated.vcproj [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-sdl.dev [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-sdl.dsp [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-sdl.vcproj [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces-wgl.vcproj [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.dev [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.dsp [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.dsw [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.ico [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.rc [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.sln [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.txt [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces.xpm [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces16x16.png [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces24x24.png [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces32x32.png [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces48x48.png [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces64x64.png [new file with mode: 0644]
misc/source/darkplaces-src/darkplaces72x72.png [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/README.txt [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/csprogsdefs.qc [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/dpextensions.qc [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/menudefs.qc [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/progsdefs.qc [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/source_compare.pl [new file with mode: 0644]
misc/source/darkplaces-src/dpdefs/source_compare.txt [new file with mode: 0644]
misc/source/darkplaces-src/dpsoftrast.c [new file with mode: 0644]
misc/source/darkplaces-src/dpsoftrast.h [new file with mode: 0644]
misc/source/darkplaces-src/dpvsimpledecode.c [new file with mode: 0644]
misc/source/darkplaces-src/dpvsimpledecode.h [new file with mode: 0644]
misc/source/darkplaces-src/draw.h [new file with mode: 0644]
misc/source/darkplaces-src/filematch.c [new file with mode: 0644]
misc/source/darkplaces-src/fogeval.pl [new file with mode: 0644]
misc/source/darkplaces-src/fractalnoise.c [new file with mode: 0644]
misc/source/darkplaces-src/fs.c [new file with mode: 0644]
misc/source/darkplaces-src/fs.h [new file with mode: 0644]
misc/source/darkplaces-src/ft2.c [new file with mode: 0644]
misc/source/darkplaces-src/ft2.h [new file with mode: 0644]
misc/source/darkplaces-src/ft2_defs.h [new file with mode: 0644]
misc/source/darkplaces-src/ft2_fontdefs.h [new file with mode: 0644]
misc/source/darkplaces-src/gl_backend.c [new file with mode: 0644]
misc/source/darkplaces-src/gl_backend.h [new file with mode: 0644]
misc/source/darkplaces-src/gl_draw.c [new file with mode: 0644]
misc/source/darkplaces-src/gl_rmain.c [new file with mode: 0644]
misc/source/darkplaces-src/gl_rsurf.c [new file with mode: 0644]
misc/source/darkplaces-src/gl_textures.c [new file with mode: 0644]
misc/source/darkplaces-src/glquake.h [new file with mode: 0644]
misc/source/darkplaces-src/hmac.c [new file with mode: 0644]
misc/source/darkplaces-src/hmac.h [new file with mode: 0644]
misc/source/darkplaces-src/host.c [new file with mode: 0644]
misc/source/darkplaces-src/host_cmd.c [new file with mode: 0644]
misc/source/darkplaces-src/image.c [new file with mode: 0644]
misc/source/darkplaces-src/image.h [new file with mode: 0644]
misc/source/darkplaces-src/image_png.c [new file with mode: 0644]
misc/source/darkplaces-src/image_png.h [new file with mode: 0644]
misc/source/darkplaces-src/input.h [new file with mode: 0644]
misc/source/darkplaces-src/intoverflow.h [new file with mode: 0644]
misc/source/darkplaces-src/jpeg.c [new file with mode: 0644]
misc/source/darkplaces-src/jpeg.h [new file with mode: 0644]
misc/source/darkplaces-src/keys.c [new file with mode: 0644]
misc/source/darkplaces-src/keys.h [new file with mode: 0644]
misc/source/darkplaces-src/keysym2ucs.c [new file with mode: 0644]
misc/source/darkplaces-src/lhfont.h [new file with mode: 0644]
misc/source/darkplaces-src/lhnet.c [new file with mode: 0644]
misc/source/darkplaces-src/lhnet.h [new file with mode: 0644]
misc/source/darkplaces-src/libcurl.c [new file with mode: 0644]
misc/source/darkplaces-src/libcurl.h [new file with mode: 0644]
misc/source/darkplaces-src/makefile [new file with mode: 0644]
misc/source/darkplaces-src/makefile.inc [new file with mode: 0644]
misc/source/darkplaces-src/mathlib.c [new file with mode: 0644]
misc/source/darkplaces-src/mathlib.h [new file with mode: 0644]
misc/source/darkplaces-src/matrixlib.c [new file with mode: 0644]
misc/source/darkplaces-src/matrixlib.h [new file with mode: 0644]
misc/source/darkplaces-src/mdfour.c [new file with mode: 0644]
misc/source/darkplaces-src/mdfour.h [new file with mode: 0644]
misc/source/darkplaces-src/menu.c [new file with mode: 0644]
misc/source/darkplaces-src/menu.h [new file with mode: 0644]
misc/source/darkplaces-src/meshqueue.c [new file with mode: 0644]
misc/source/darkplaces-src/meshqueue.h [new file with mode: 0644]
misc/source/darkplaces-src/mingw_note.txt [new file with mode: 0644]
misc/source/darkplaces-src/mod_skeletal_animatevertices_generic.c [new file with mode: 0644]
misc/source/darkplaces-src/mod_skeletal_animatevertices_generic.h [new file with mode: 0644]
misc/source/darkplaces-src/mod_skeletal_animatevertices_sse.c [new file with mode: 0644]
misc/source/darkplaces-src/mod_skeletal_animatevertices_sse.h [new file with mode: 0644]
misc/source/darkplaces-src/model_alias.c [new file with mode: 0644]
misc/source/darkplaces-src/model_alias.h [new file with mode: 0644]
misc/source/darkplaces-src/model_brush.c [new file with mode: 0644]
misc/source/darkplaces-src/model_brush.h [new file with mode: 0644]
misc/source/darkplaces-src/model_dpmodel.h [new file with mode: 0644]
misc/source/darkplaces-src/model_iqm.h [new file with mode: 0644]
misc/source/darkplaces-src/model_psk.h [new file with mode: 0644]
misc/source/darkplaces-src/model_shared.c [new file with mode: 0644]
misc/source/darkplaces-src/model_shared.h [new file with mode: 0644]
misc/source/darkplaces-src/model_sprite.c [new file with mode: 0644]
misc/source/darkplaces-src/model_sprite.h [new file with mode: 0644]
misc/source/darkplaces-src/model_zymotic.h [new file with mode: 0644]
misc/source/darkplaces-src/modelgen.h [new file with mode: 0644]
misc/source/darkplaces-src/mprogdefs.h [new file with mode: 0644]
misc/source/darkplaces-src/mvm_cmds.c [new file with mode: 0644]
misc/source/darkplaces-src/netconn.c [new file with mode: 0644]
misc/source/darkplaces-src/netconn.h [new file with mode: 0644]
misc/source/darkplaces-src/nexuiz.ico [new file with mode: 0644]
misc/source/darkplaces-src/nexuiz.rc [new file with mode: 0644]
misc/source/darkplaces-src/nexuiz.xpm [new file with mode: 0644]
misc/source/darkplaces-src/palette.c [new file with mode: 0644]
misc/source/darkplaces-src/palette.h [new file with mode: 0644]
misc/source/darkplaces-src/polygon.c [new file with mode: 0644]
misc/source/darkplaces-src/polygon.h [new file with mode: 0644]
misc/source/darkplaces-src/portals.c [new file with mode: 0644]
misc/source/darkplaces-src/portals.h [new file with mode: 0644]
misc/source/darkplaces-src/pr_comp.h [new file with mode: 0644]
misc/source/darkplaces-src/progdefs.h [new file with mode: 0644]
misc/source/darkplaces-src/progs.h [new file with mode: 0644]
misc/source/darkplaces-src/progsvm.h [new file with mode: 0644]
misc/source/darkplaces-src/protocol.c [new file with mode: 0644]
misc/source/darkplaces-src/protocol.h [new file with mode: 0644]
misc/source/darkplaces-src/prvm_cmds.c [new file with mode: 0644]
misc/source/darkplaces-src/prvm_cmds.h [new file with mode: 0644]
misc/source/darkplaces-src/prvm_edict.c [new file with mode: 0644]
misc/source/darkplaces-src/prvm_exec.c [new file with mode: 0644]
misc/source/darkplaces-src/prvm_execprogram.h [new file with mode: 0644]
misc/source/darkplaces-src/prvm_offsets.h [new file with mode: 0644]
misc/source/darkplaces-src/qtypes.h [new file with mode: 0644]
misc/source/darkplaces-src/quakedef.h [new file with mode: 0644]
misc/source/darkplaces-src/r_explosion.c [new file with mode: 0644]
misc/source/darkplaces-src/r_lerpanim.c [new file with mode: 0644]
misc/source/darkplaces-src/r_lerpanim.h [new file with mode: 0644]
misc/source/darkplaces-src/r_lightning.c [new file with mode: 0644]
misc/source/darkplaces-src/r_modules.c [new file with mode: 0644]
misc/source/darkplaces-src/r_modules.h [new file with mode: 0644]
misc/source/darkplaces-src/r_shadow.c [new file with mode: 0644]
misc/source/darkplaces-src/r_shadow.h [new file with mode: 0644]
misc/source/darkplaces-src/r_sky.c [new file with mode: 0644]
misc/source/darkplaces-src/r_sprites.c [new file with mode: 0644]
misc/source/darkplaces-src/r_textures.h [new file with mode: 0644]
misc/source/darkplaces-src/render.h [new file with mode: 0644]
misc/source/darkplaces-src/resource.h [new file with mode: 0644]
misc/source/darkplaces-src/sbar.c [new file with mode: 0644]
misc/source/darkplaces-src/sbar.h [new file with mode: 0644]
misc/source/darkplaces-src/screen.h [new file with mode: 0644]
misc/source/darkplaces-src/server.h [new file with mode: 0644]
misc/source/darkplaces-src/shader_glsl.h [new file with mode: 0644]
misc/source/darkplaces-src/shader_hlsl.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_3dras.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_3dras.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_3dras_typedefs.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_alsa.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_bsd.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_coreaudio.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_main.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_main.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_mem.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_mix.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_modplug.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_modplug.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_null.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_ogg.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_ogg.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_oss.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_sdl.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_wav.c [new file with mode: 0644]
misc/source/darkplaces-src/snd_wav.h [new file with mode: 0644]
misc/source/darkplaces-src/snd_win.c [new file with mode: 0644]
misc/source/darkplaces-src/sound.h [new file with mode: 0644]
misc/source/darkplaces-src/spritegn.h [new file with mode: 0644]
misc/source/darkplaces-src/sv_demo.c [new file with mode: 0644]
misc/source/darkplaces-src/sv_demo.h [new file with mode: 0644]
misc/source/darkplaces-src/sv_main.c [new file with mode: 0644]
misc/source/darkplaces-src/sv_move.c [new file with mode: 0644]
misc/source/darkplaces-src/sv_phys.c [new file with mode: 0644]
misc/source/darkplaces-src/sv_user.c [new file with mode: 0644]
misc/source/darkplaces-src/svbsp.c [new file with mode: 0644]
misc/source/darkplaces-src/svbsp.h [new file with mode: 0644]
misc/source/darkplaces-src/svvm_cmds.c [new file with mode: 0644]
misc/source/darkplaces-src/sys.h [new file with mode: 0644]
misc/source/darkplaces-src/sys_linux.c [new file with mode: 0644]
misc/source/darkplaces-src/sys_sdl.c [new file with mode: 0644]
misc/source/darkplaces-src/sys_shared.c [new file with mode: 0644]
misc/source/darkplaces-src/sys_win.c [new file with mode: 0644]
misc/source/darkplaces-src/thread.h [new file with mode: 0644]
misc/source/darkplaces-src/thread_null.c [new file with mode: 0644]
misc/source/darkplaces-src/thread_pthread.c [new file with mode: 0644]
misc/source/darkplaces-src/thread_sdl.c [new file with mode: 0644]
misc/source/darkplaces-src/thread_win.c [new file with mode: 0644]
misc/source/darkplaces-src/timing.h [new file with mode: 0644]
misc/source/darkplaces-src/todo [new file with mode: 0644]
misc/source/darkplaces-src/utf8lib.c [new file with mode: 0644]
misc/source/darkplaces-src/utf8lib.h [new file with mode: 0644]
misc/source/darkplaces-src/vid.h [new file with mode: 0644]
misc/source/darkplaces-src/vid_agl.c [new file with mode: 0644]
misc/source/darkplaces-src/vid_agl_mackeys.h [new file with mode: 0644]
misc/source/darkplaces-src/vid_glx.c [new file with mode: 0644]
misc/source/darkplaces-src/vid_null.c [new file with mode: 0644]
misc/source/darkplaces-src/vid_sdl.c [new file with mode: 0644]
misc/source/darkplaces-src/vid_shared.c [new file with mode: 0644]
misc/source/darkplaces-src/vid_wgl.c [new file with mode: 0644]
misc/source/darkplaces-src/view.c [new file with mode: 0644]
misc/source/darkplaces-src/wad.c [new file with mode: 0644]
misc/source/darkplaces-src/wad.h [new file with mode: 0644]
misc/source/darkplaces-src/world.c [new file with mode: 0644]
misc/source/darkplaces-src/world.h [new file with mode: 0644]
misc/source/darkplaces-src/zone.c [new file with mode: 0644]
misc/source/darkplaces-src/zone.h [new file with mode: 0644]
misc/source/netradiant-src/libs/filematch.c [new file with mode: 0644]
misc/source/netradiant-src/libs/filematch.h [new file with mode: 0644]

diff --git a/misc/source/darkplaces-src/.gitattributes b/misc/source/darkplaces-src/.gitattributes
new file mode 100644 (file)
index 0000000..ec3bfe3
--- /dev/null
@@ -0,0 +1,222 @@
+* -crlf
+
+*.0 -diff -crlf
+*.1 crlf=input
+*.3 crlf=input
+*.7z -diff -crlf
+*.ac crlf=input
+*.a -diff -crlf
+*.afm crlf=input
+*.aft crlf=input
+*.ai -diff -crlf
+*.aliases crlf=input
+all crlf=input
+*.am crlf=input
+*.animinfo crlf=input
+*.aps -diff -crlf
+*.asc -diff -crlf
+*.ase -crlf
+*.bat -crlf
+*.bgs crlf=input
+*.blend1 -diff -crlf
+*.blend -diff -crlf
+blind_id -diff -crlf
+*.bmp -diff -crlf
+branch-manager crlf=input
+*.brand crlf=input
+BSDmakefile crlf=input
+bsp2ent crlf=input
+*.bsp -diff -crlf
+*.cache -diff -crlf
+*.cbp -crlf
+*.cbp -diff -crlf
+*.c crlf=input
+*.cfg crlf=input
+*.cg crlf=input
+ChangeLog crlf=input
+CHANGES crlf=input
+cjpeg -diff -crlf
+COMPILING crlf=input
+compress-texture crlf=input
+*.conf crlf=input
+CONTRIBUTORS crlf=input
+COPYING crlf=input
+*.cpp crlf=input
+create crlf=input
+*.cron crlf=input
+*.css crlf=input
+*.cvswrappers crlf=input
+*.d0pk -diff -crlf
+*.db -diff -crlf
+*.default crlf=input
+*.def crlf=input
+*.dem -diff -crlf
+*.dev -crlf
+dir -diff -crlf
+djpeg -diff -crlf
+*.dll -diff -crlf
+DOCS -diff -crlf
+*.dot crlf=input
+DoxyConfig crlf=input
+doxyfile crlf=input
+Doxyfile crlf=input
+*.doxygen crlf=input
+*.dpm -diff -crlf
+*.dsp -crlf
+*.dsw -crlf
+*.dtd crlf=input
+*.dylib -diff -crlf
+empty -diff -crlf
+*.EncoderPlugin crlf=input
+*.flac -diff -crlf
+*.form crlf=input
+*.framegroups crlf=input
+*.game crlf=input
+*.gdb crlf=input
+gendox crlf=input
+gendoxfunctions crlf=input
+genDoxyfile crlf=input
+*.gif -diff -crlf
+*.gitattributes crlf=input
+git-branch-manager crlf=input
+git-filter-index crlf=input
+git-filter-repository crlf=input
+*.gitignore crlf=input
+git-pk3-import crlf=input
+git-pk3-merge crlf=input
+git-pullall crlf=input
+git-recurse crlf=input
+git-split-repository crlf=input
+git-svn-checkout crlf=input
+git-svn-update crlf=input
+git-update-octopus crlf=input
+*.glp crlf=input
+*.glsl crlf=input
+GPL crlf=input
+*.hardwired crlf=input
+*.h crlf=input
+*.hs crlf=input
+*.html crlf=input
+*.html-part crlf=input
+*.icns -diff -crlf
+*.ico -diff -crlf
+*.idl crlf=input
+*.idsoftware crlf=input
+*.inc crlf=input
+*.in crlf=input
+*.info-1 -diff -crlf
+*.info-2 -diff -crlf
+*.info -diff -crlf
+*.inl crlf=input
+*.instantaction crlf=input
+*.iqm -diff -crlf
+*.java crlf=input
+*.jhm crlf=input
+*.jnlp crlf=input
+jpegtran -diff -crlf
+*.jpg -diff -crlf
+*.jsmooth crlf=input
+*.la crlf=input
+LGPL crlf=input
+LICENSE crlf=input
+*.lmp -diff -crlf
+*.loaders crlf=input
+*.lso -diff -crlf
+*.m4 crlf=input
+makefile crlf=input
+Makefile crlf=input
+makespr32 crlf=input
+*.map -crlf filter=mapclean
+*.mapinfo crlf=input
+*.m crlf=input
+*.md3 -diff -crlf
+*.md5anim -crlf
+*.md5mesh -crlf
+*.mdl -diff -crlf
+*.med crlf=input
+*.mf crlf=input
+*.mid -diff -crlf
+*.mk crlf=input
+*.mkdir -diff -crlf
+*.mmpz -diff -crlf
+*.modules crlf=input
+*.nib -crlf
+*.obj -crlf
+OFFSETS -diff -crlf
+*.ogg -diff -crlf
+*.options crlf=input
+pangorc crlf=input
+*.patch crlf=input
+*.patchsets crlf=input
+*.pc crlf=input
+*.pcx -diff -crlf
+*.pfb -diff -crlf
+*.pfm -diff -crlf
+*.pk3 -diff -crlf
+PkgInfo crlf=input
+*.pl crlf=input
+*.plist crlf=input
+*.pm crlf=input
+*.png -diff -crlf
+POSITIONS -diff -crlf
+*.proj -crlf
+*.properties crlf=input
+*.psd -diff -crlf
+*.py crlf=input
+*.q3map1 crlf=input
+*.qc crlf=input
+*.qdt crlf=input
+*.qh crlf=input
+*.rb crlf=input
+*.rc2 crlf=input
+*.rc -crlf
+rdjpgcom -diff -crlf
+*.readme crlf=input
+README crlf=input
+*.rtlights -diff -crlf
+SCHEMA crlf=input
+*.scm crlf=input
+sdl-config crlf=input
+SDL -diff -crlf
+*.shader crlf=input
+*.sh crlf=input
+*.skin crlf=input
+*.sln -crlf
+*.sounds crlf=input
+*.sp2 -diff -crlf
+*.spr32 -diff -crlf
+*.spr -diff -crlf
+*.src crlf=input
+*.strings crlf=input
+strip crlf=input
+*.svg -diff -crlf
+*.TAB -diff -crlf
+*.tga -diff -crlf
+TMAP -diff -crlf
+todo crlf=input
+TODO crlf=input
+*.ttf -diff -crlf
+*.TTF -diff -crlf
+*.txt crlf=input
+update-shaderlists crlf=input
+*.vbs -crlf
+*.vcproj -crlf
+versionbuilder crlf=input
+*.wav -diff -crlf
+*.waypoints -diff -crlf
+w crlf=input
+*.width crlf=input
+*.workspace -crlf
+wrjpgcom -diff -crlf
+*.xcf -diff -crlf
+*.xlink crlf=input
+*.xml crlf=input
+xonotic-map-compiler-autobuild crlf=input
+xonotic-map-compiler crlf=input
+xonotic-map-screenshot crlf=input
+xonotic-osx-agl crlf=input
+xonotic-osx-sdl crlf=input
+*.xpm crlf=input
+*.zip -diff -crlf
+zipdiff crlf=input
+*.zym -diff -crlf
diff --git a/misc/source/darkplaces-src/.gitignore b/misc/source/darkplaces-src/.gitignore
new file mode 100644 (file)
index 0000000..de9a5ad
--- /dev/null
@@ -0,0 +1,20 @@
+*.d
+*.o
+*.i
+*.s
+ChangeLog
+darkplaces-agl
+darkplaces-glx
+darkplaces-sdl
+darkplaces-dedicated
+gmon.out
+*.ncb
+*.opt
+*.plg
+*.exe
+darkplaces_private.h
+darkplaces_private.rc
+Makefile.win
+*.dll
+*.dylib
+*.dSYM
diff --git a/misc/source/darkplaces-src/BSDmakefile b/misc/source/darkplaces-src/BSDmakefile
new file mode 100644 (file)
index 0000000..ac9793a
--- /dev/null
@@ -0,0 +1,111 @@
+#####  DP_MAKE_TARGET autodetection and arch specific variables #####
+
+.ifndef DP_MAKE_TARGET
+
+DP_MAKE_TARGET=bsd
+
+.endif
+DP_ARCH != uname
+
+# Command used to delete files
+CMD_RM=$(CMD_UNIXRM)
+
+# default targets
+TARGETS_DEBUG=sv-debug cl-debug sdl-debug
+TARGETS_PROFILE=sv-profile cl-profile sdl-profile
+TARGETS_RELEASE=sv-release cl-release sdl-release
+TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile
+TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz
+
+# X11 libs
+UNIX_X11LIBPATH=/usr/X11R6/lib
+
+# BSD configuration
+.if $(DP_MAKE_TARGET) == "bsd"
+
+# FreeBSD uses OSS
+.if $(DP_ARCH) == "FreeBSD"
+DEFAULT_SNDAPI=OSS
+.else
+DEFAULT_SNDAPI=BSD
+.endif
+OBJ_CD=$(OBJ_BSDCD)
+
+OBJ_CL=$(OBJ_GLX)
+OBJ_ICON=
+OBJ_ICON_NEXUIZ=
+
+LDFLAGS_CL=$(LDFLAGS_BSDCL)
+LDFLAGS_SV=$(LDFLAGS_BSDSV)
+LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
+
+SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
+SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
+SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
+
+EXE_CL=$(EXE_UNIXCL)
+EXE_SV=$(EXE_UNIXSV)
+EXE_SDL=$(EXE_UNIXSDL)
+EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
+EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
+EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
+
+# libjpeg dependency (set these to "" if you want to use dynamic loading instead)
+CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
+LIB_JPEG=-ljpeg
+
+.endif
+
+
+##### Sound configuration #####
+
+.ifndef DP_SOUND_API
+DP_SOUND_API=$(DEFAULT_SNDAPI)
+.endif
+
+# NULL: no sound
+.if $(DP_SOUND_API) == "NULL"
+OBJ_SOUND=$(OBJ_SND_NULL)
+LIB_SOUND=$(LIB_SND_NULL)
+.endif
+
+# OSS: Open Sound System
+.if $(DP_SOUND_API) == "OSS"
+OBJ_SOUND=$(OBJ_SND_OSS)
+LIB_SOUND=$(LIB_SND_OSS)
+.endif
+
+# BSD: BSD / Sun audio API
+.if $(DP_SOUND_API) == "BSD"
+OBJ_SOUND=$(OBJ_SND_BSD)
+LIB_SOUND=$(LIB_SND_BSD)
+.endif
+
+
+##### Extra CFLAGS #####
+
+CFLAGS_MAKEDEP=-MD
+.ifdef DP_FS_BASEDIR
+CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
+.else
+CFLAGS_FS=
+.endif
+
+CFLAGS_PRELOAD=
+.ifdef DP_PRELOAD_DEPENDENCIES
+LDFLAGS_CL+=$(LDFLAGS_UNIXCL_PRELOAD)
+LDFLAGS_SV+=$(LDFLAGS_UNIXSV_PRELOAD)
+LDFLAGS_SDL+=$(LDFLAGS_UNIXSDL_PRELOAD)
+CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
+.endif
+
+
+##### BSD Make specific definitions #####
+
+MAKE:=$(MAKE) -f BSDmakefile
+
+DO_LD=$(CC) -o $@ $> $(LDFLAGS)
+
+
+##### Definitions shared by all makefiles #####
+.include "makefile.inc"
diff --git a/misc/source/darkplaces-src/COPYING b/misc/source/darkplaces-src/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/misc/source/darkplaces-src/DPiOS.xcodeproj/project.pbxproj b/misc/source/darkplaces-src/DPiOS.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..e73b85c
--- /dev/null
@@ -0,0 +1,845 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 45;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+               1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+               28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
+               28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
+               7463B77812F9CE6B00983F6A /* bih.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C012F9CE6B00983F6A /* bih.c */; };
+               7463B77912F9CE6B00983F6A /* cap_avi.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C312F9CE6B00983F6A /* cap_avi.c */; };
+               7463B77A12F9CE6B00983F6A /* cap_ogg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C512F9CE6B00983F6A /* cap_ogg.c */; };
+               7463B77B12F9CE6B00983F6A /* cd_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C712F9CE6B00983F6A /* cd_sdl.c */; };
+               7463B77C12F9CE6B00983F6A /* cd_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6C812F9CE6B00983F6A /* cd_shared.c */; };
+               7463B77D12F9CE6B00983F6A /* cl_collision.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CA12F9CE6B00983F6A /* cl_collision.c */; };
+               7463B77E12F9CE6B00983F6A /* cl_demo.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CC12F9CE6B00983F6A /* cl_demo.c */; };
+               7463B77F12F9CE6B00983F6A /* cl_dyntexture.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CD12F9CE6B00983F6A /* cl_dyntexture.c */; };
+               7463B78012F9CE6B00983F6A /* cl_gecko.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6CF12F9CE6B00983F6A /* cl_gecko.c */; };
+               7463B78112F9CE6B00983F6A /* cl_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D112F9CE6B00983F6A /* cl_input.c */; };
+               7463B78212F9CE6B00983F6A /* cl_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D212F9CE6B00983F6A /* cl_main.c */; };
+               7463B78312F9CE6B00983F6A /* cl_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D312F9CE6B00983F6A /* cl_parse.c */; };
+               7463B78412F9CE6B00983F6A /* cl_particles.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D412F9CE6B00983F6A /* cl_particles.c */; };
+               7463B78512F9CE6B00983F6A /* cl_screen.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D512F9CE6B00983F6A /* cl_screen.c */; };
+               7463B78612F9CE6B00983F6A /* cl_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6D712F9CE6B00983F6A /* cl_video.c */; };
+               7463B78712F9CE6B00983F6A /* cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6DC12F9CE6B00983F6A /* cmd.c */; };
+               7463B78812F9CE6B00983F6A /* collision.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6DE12F9CE6B00983F6A /* collision.c */; };
+               7463B78912F9CE6B00983F6A /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E012F9CE6B00983F6A /* common.c */; };
+               7463B78A12F9CE6B00983F6A /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E212F9CE6B00983F6A /* console.c */; };
+               7463B78B12F9CE6B00983F6A /* crypto.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E412F9CE6B00983F6A /* crypto.c */; };
+               7463B78C12F9CE6B00983F6A /* csprogs.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E612F9CE6B00983F6A /* csprogs.c */; };
+               7463B78D12F9CE6B00983F6A /* curves.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6E812F9CE6B00983F6A /* curves.c */; };
+               7463B78E12F9CE6B00983F6A /* cvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6EA12F9CE6B00983F6A /* cvar.c */; };
+               7463B78F12F9CE6B00983F6A /* dpsoftrast.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6EC12F9CE6B00983F6A /* dpsoftrast.c */; };
+               7463B79012F9CE6B00983F6A /* dpvsimpledecode.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6EE12F9CE6B00983F6A /* dpvsimpledecode.c */; };
+               7463B79112F9CE6B00983F6A /* filematch.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F112F9CE6B00983F6A /* filematch.c */; };
+               7463B79212F9CE6B00983F6A /* fractalnoise.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F212F9CE6B00983F6A /* fractalnoise.c */; };
+               7463B79312F9CE6B00983F6A /* fs.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F312F9CE6B00983F6A /* fs.c */; };
+               7463B79412F9CE6B00983F6A /* ft2.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F712F9CE6B00983F6A /* ft2.c */; };
+               7463B79512F9CE6B00983F6A /* gl_backend.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6F912F9CE6B00983F6A /* gl_backend.c */; };
+               7463B79612F9CE6B00983F6A /* gl_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FB12F9CE6B00983F6A /* gl_draw.c */; };
+               7463B79712F9CE6B00983F6A /* gl_rmain.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FC12F9CE6B00983F6A /* gl_rmain.c */; };
+               7463B79812F9CE6B00983F6A /* gl_rsurf.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FD12F9CE6B00983F6A /* gl_rsurf.c */; };
+               7463B79912F9CE6B00983F6A /* gl_textures.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B6FE12F9CE6B00983F6A /* gl_textures.c */; };
+               7463B79A12F9CE6B00983F6A /* hmac.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70012F9CE6B00983F6A /* hmac.c */; };
+               7463B79B12F9CE6B00983F6A /* host_cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70212F9CE6B00983F6A /* host_cmd.c */; };
+               7463B79C12F9CE6B00983F6A /* host.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70312F9CE6B00983F6A /* host.c */; };
+               7463B79D12F9CE6B00983F6A /* image_png.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70412F9CE6B00983F6A /* image_png.c */; };
+               7463B79E12F9CE6B00983F6A /* image.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70612F9CE6B00983F6A /* image.c */; };
+               7463B79F12F9CE6B00983F6A /* jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70A12F9CE6B00983F6A /* jpeg.c */; };
+               7463B7A012F9CE6B00983F6A /* keys.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70C12F9CE6B00983F6A /* keys.c */; };
+               7463B7A112F9CE6B00983F6A /* lhnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B70F12F9CE6B00983F6A /* lhnet.c */; };
+               7463B7A212F9CE6B00983F6A /* libcurl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71112F9CE6B00983F6A /* libcurl.c */; };
+               7463B7A312F9CE6B00983F6A /* mathlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71312F9CE6B00983F6A /* mathlib.c */; };
+               7463B7A412F9CE6B00983F6A /* matrixlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71512F9CE6B00983F6A /* matrixlib.c */; };
+               7463B7A512F9CE6B00983F6A /* mdfour.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71712F9CE6B00983F6A /* mdfour.c */; };
+               7463B7A612F9CE6B00983F6A /* menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71912F9CE6B00983F6A /* menu.c */; };
+               7463B7A712F9CE6B00983F6A /* meshqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71B12F9CE6B00983F6A /* meshqueue.c */; };
+               7463B7A812F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71D12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c */; };
+               7463B7A912F9CE6B00983F6A /* model_alias.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B71F12F9CE6B00983F6A /* model_alias.c */; };
+               7463B7AA12F9CE6B00983F6A /* model_brush.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72112F9CE6B00983F6A /* model_brush.c */; };
+               7463B7AB12F9CE6B00983F6A /* model_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72612F9CE6B00983F6A /* model_shared.c */; };
+               7463B7AC12F9CE6B00983F6A /* model_sprite.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72812F9CE6B00983F6A /* model_sprite.c */; };
+               7463B7AD12F9CE6B00983F6A /* mvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72D12F9CE6B00983F6A /* mvm_cmds.c */; };
+               7463B7AE12F9CE6B00983F6A /* netconn.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B72E12F9CE6B00983F6A /* netconn.c */; };
+               7463B7AF12F9CE6B00983F6A /* palette.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73012F9CE6B00983F6A /* palette.c */; };
+               7463B7B012F9CE6B00983F6A /* polygon.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73212F9CE6B00983F6A /* polygon.c */; };
+               7463B7B112F9CE6B00983F6A /* portals.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73412F9CE6B00983F6A /* portals.c */; };
+               7463B7B212F9CE6B00983F6A /* protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73A12F9CE6B00983F6A /* protocol.c */; };
+               7463B7B312F9CE6B00983F6A /* prvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73C12F9CE6B00983F6A /* prvm_cmds.c */; };
+               7463B7B412F9CE6B00983F6A /* prvm_edict.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73E12F9CE6B00983F6A /* prvm_edict.c */; };
+               7463B7B512F9CE6B00983F6A /* prvm_exec.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B73F12F9CE6B00983F6A /* prvm_exec.c */; };
+               7463B7B612F9CE6B00983F6A /* r_explosion.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74312F9CE6B00983F6A /* r_explosion.c */; };
+               7463B7B712F9CE6B00983F6A /* r_lightning.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74412F9CE6B00983F6A /* r_lightning.c */; };
+               7463B7B812F9CE6B00983F6A /* r_modules.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74512F9CE6B00983F6A /* r_modules.c */; };
+               7463B7B912F9CE6B00983F6A /* r_shadow.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74712F9CE6B00983F6A /* r_shadow.c */; };
+               7463B7BA12F9CE6B00983F6A /* r_sky.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74912F9CE6B00983F6A /* r_sky.c */; };
+               7463B7BB12F9CE6B00983F6A /* r_sprites.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74A12F9CE6B00983F6A /* r_sprites.c */; };
+               7463B7BC12F9CE6B00983F6A /* sbar.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B74E12F9CE6B00983F6A /* sbar.c */; };
+               7463B7BD12F9CE6B00983F6A /* snd_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75212F9CE6B00983F6A /* snd_main.c */; };
+               7463B7BE12F9CE6B00983F6A /* snd_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75412F9CE6B00983F6A /* snd_mem.c */; };
+               7463B7BF12F9CE6B00983F6A /* snd_mix.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75512F9CE6B00983F6A /* snd_mix.c */; };
+               7463B7C012F9CE6B00983F6A /* snd_modplug.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75612F9CE6B00983F6A /* snd_modplug.c */; };
+               7463B7C112F9CE6B00983F6A /* snd_ogg.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75812F9CE6B00983F6A /* snd_ogg.c */; };
+               7463B7C212F9CE6B00983F6A /* snd_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75A12F9CE6B00983F6A /* snd_sdl.c */; };
+               7463B7C312F9CE6B00983F6A /* snd_wav.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75B12F9CE6B00983F6A /* snd_wav.c */; };
+               7463B7C412F9CE6B00983F6A /* sv_demo.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B75F12F9CE6B00983F6A /* sv_demo.c */; };
+               7463B7C512F9CE6B00983F6A /* sv_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76112F9CE6B00983F6A /* sv_main.c */; };
+               7463B7C612F9CE6B00983F6A /* sv_move.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76212F9CE6B00983F6A /* sv_move.c */; };
+               7463B7C712F9CE6B00983F6A /* sv_phys.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76312F9CE6B00983F6A /* sv_phys.c */; };
+               7463B7C812F9CE6B00983F6A /* sv_user.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76412F9CE6B00983F6A /* sv_user.c */; };
+               7463B7C912F9CE6B00983F6A /* svbsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76512F9CE6B00983F6A /* svbsp.c */; };
+               7463B7CA12F9CE6B00983F6A /* svvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76712F9CE6B00983F6A /* svvm_cmds.c */; };
+               7463B7CB12F9CE6B00983F6A /* sys_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76812F9CE6B00983F6A /* sys_sdl.c */; };
+               7463B7CC12F9CE6B00983F6A /* sys_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76912F9CE6B00983F6A /* sys_shared.c */; };
+               7463B7CD12F9CE6B00983F6A /* utf8lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76C12F9CE6B00983F6A /* utf8lib.c */; };
+               7463B7CE12F9CE6B00983F6A /* vid_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76E12F9CE6B00983F6A /* vid_sdl.c */; };
+               7463B7CF12F9CE6B00983F6A /* vid_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B76F12F9CE6B00983F6A /* vid_shared.c */; };
+               7463B7D012F9CE6B00983F6A /* view.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77112F9CE6B00983F6A /* view.c */; };
+               7463B7D112F9CE6B00983F6A /* wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77212F9CE6B00983F6A /* wad.c */; };
+               7463B7D212F9CE6B00983F6A /* world.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77412F9CE6B00983F6A /* world.c */; };
+               7463B7D312F9CE6B00983F6A /* zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B77612F9CE6B00983F6A /* zone.c */; };
+               7463B7D912F9CF8F00983F6A /* darkplaces64x64.png in Resources */ = {isa = PBXBuildFile; fileRef = 7463B7D812F9CF8F00983F6A /* darkplaces64x64.png */; };
+               7463B7EA12F9D11E00983F6A /* mod_skeletal_animatevertices_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B7E812F9D11E00983F6A /* mod_skeletal_animatevertices_sse.c */; };
+               7463B7EF12F9D17D00983F6A /* builddate.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B7ED12F9D17D00983F6A /* builddate.c */; };
+               7463B7F012F9D17D00983F6A /* clvm_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 7463B7EE12F9D17D00983F6A /* clvm_cmds.c */; };
+               7487D481130102AA00AEE909 /* thread_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 7487D47F130102AA00AEE909 /* thread_sdl.c */; };
+               FD779ED20E26B9B000F39101 /* libSDLSimulator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD779ED00E26B9B000F39101 /* libSDLSimulator.a */; };
+               FD779ED30E26B9B000F39101 /* libSDLiPhoneOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD779ED10E26B9B000F39101 /* libSDLiPhoneOS.a */; };
+               FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD779EDD0E26BA1200F39101 /* CoreAudio.framework */; };
+               FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD77A0840E26BDB800F39101 /* AudioToolbox.framework */; };
+               FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+               1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+               1D6058910D05DD3D006BFB54 /* DPiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DPiOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
+               1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+               28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+               28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+               7463B6C012F9CE6B00983F6A /* bih.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bih.c; sourceTree = "<group>"; };
+               7463B6C112F9CE6B00983F6A /* bih.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bih.h; sourceTree = "<group>"; };
+               7463B6C212F9CE6B00983F6A /* bspfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bspfile.h; sourceTree = "<group>"; };
+               7463B6C312F9CE6B00983F6A /* cap_avi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cap_avi.c; sourceTree = "<group>"; };
+               7463B6C412F9CE6B00983F6A /* cap_avi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cap_avi.h; sourceTree = "<group>"; };
+               7463B6C512F9CE6B00983F6A /* cap_ogg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cap_ogg.c; sourceTree = "<group>"; };
+               7463B6C612F9CE6B00983F6A /* cap_ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cap_ogg.h; sourceTree = "<group>"; };
+               7463B6C712F9CE6B00983F6A /* cd_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cd_sdl.c; sourceTree = "<group>"; };
+               7463B6C812F9CE6B00983F6A /* cd_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cd_shared.c; sourceTree = "<group>"; };
+               7463B6C912F9CE6B00983F6A /* cdaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cdaudio.h; sourceTree = "<group>"; };
+               7463B6CA12F9CE6B00983F6A /* cl_collision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_collision.c; sourceTree = "<group>"; };
+               7463B6CB12F9CE6B00983F6A /* cl_collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_collision.h; sourceTree = "<group>"; };
+               7463B6CC12F9CE6B00983F6A /* cl_demo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_demo.c; sourceTree = "<group>"; };
+               7463B6CD12F9CE6B00983F6A /* cl_dyntexture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_dyntexture.c; sourceTree = "<group>"; };
+               7463B6CE12F9CE6B00983F6A /* cl_dyntexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_dyntexture.h; sourceTree = "<group>"; };
+               7463B6CF12F9CE6B00983F6A /* cl_gecko.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_gecko.c; sourceTree = "<group>"; };
+               7463B6D012F9CE6B00983F6A /* cl_gecko.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_gecko.h; sourceTree = "<group>"; };
+               7463B6D112F9CE6B00983F6A /* cl_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_input.c; sourceTree = "<group>"; };
+               7463B6D212F9CE6B00983F6A /* cl_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_main.c; sourceTree = "<group>"; };
+               7463B6D312F9CE6B00983F6A /* cl_parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_parse.c; sourceTree = "<group>"; };
+               7463B6D412F9CE6B00983F6A /* cl_particles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_particles.c; sourceTree = "<group>"; };
+               7463B6D512F9CE6B00983F6A /* cl_screen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_screen.c; sourceTree = "<group>"; };
+               7463B6D612F9CE6B00983F6A /* cl_screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_screen.h; sourceTree = "<group>"; };
+               7463B6D712F9CE6B00983F6A /* cl_video.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cl_video.c; sourceTree = "<group>"; };
+               7463B6D812F9CE6B00983F6A /* cl_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cl_video.h; sourceTree = "<group>"; };
+               7463B6D912F9CE6B00983F6A /* client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = client.h; sourceTree = "<group>"; };
+               7463B6DA12F9CE6B00983F6A /* clprogdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clprogdefs.h; sourceTree = "<group>"; };
+               7463B6DB12F9CE6B00983F6A /* clvm_cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clvm_cmds.h; sourceTree = "<group>"; };
+               7463B6DC12F9CE6B00983F6A /* cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cmd.c; sourceTree = "<group>"; };
+               7463B6DD12F9CE6B00983F6A /* cmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmd.h; sourceTree = "<group>"; };
+               7463B6DE12F9CE6B00983F6A /* collision.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = collision.c; sourceTree = "<group>"; };
+               7463B6DF12F9CE6B00983F6A /* collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = collision.h; sourceTree = "<group>"; };
+               7463B6E012F9CE6B00983F6A /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = "<group>"; };
+               7463B6E112F9CE6B00983F6A /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
+               7463B6E212F9CE6B00983F6A /* console.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = console.c; sourceTree = "<group>"; };
+               7463B6E312F9CE6B00983F6A /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = console.h; sourceTree = "<group>"; };
+               7463B6E412F9CE6B00983F6A /* crypto.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = crypto.c; sourceTree = "<group>"; };
+               7463B6E512F9CE6B00983F6A /* crypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto.h; sourceTree = "<group>"; };
+               7463B6E612F9CE6B00983F6A /* csprogs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = csprogs.c; sourceTree = "<group>"; };
+               7463B6E712F9CE6B00983F6A /* csprogs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = csprogs.h; sourceTree = "<group>"; };
+               7463B6E812F9CE6B00983F6A /* curves.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = curves.c; sourceTree = "<group>"; };
+               7463B6E912F9CE6B00983F6A /* curves.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = curves.h; sourceTree = "<group>"; };
+               7463B6EA12F9CE6B00983F6A /* cvar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cvar.c; sourceTree = "<group>"; };
+               7463B6EB12F9CE6B00983F6A /* cvar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cvar.h; sourceTree = "<group>"; };
+               7463B6EC12F9CE6B00983F6A /* dpsoftrast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dpsoftrast.c; sourceTree = "<group>"; };
+               7463B6ED12F9CE6B00983F6A /* dpsoftrast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dpsoftrast.h; sourceTree = "<group>"; };
+               7463B6EE12F9CE6B00983F6A /* dpvsimpledecode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dpvsimpledecode.c; sourceTree = "<group>"; };
+               7463B6EF12F9CE6B00983F6A /* dpvsimpledecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dpvsimpledecode.h; sourceTree = "<group>"; };
+               7463B6F012F9CE6B00983F6A /* draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = draw.h; sourceTree = "<group>"; };
+               7463B6F112F9CE6B00983F6A /* filematch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = filematch.c; sourceTree = "<group>"; };
+               7463B6F212F9CE6B00983F6A /* fractalnoise.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fractalnoise.c; sourceTree = "<group>"; };
+               7463B6F312F9CE6B00983F6A /* fs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fs.c; sourceTree = "<group>"; };
+               7463B6F412F9CE6B00983F6A /* fs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fs.h; sourceTree = "<group>"; };
+               7463B6F512F9CE6B00983F6A /* ft2_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2_defs.h; sourceTree = "<group>"; };
+               7463B6F612F9CE6B00983F6A /* ft2_fontdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2_fontdefs.h; sourceTree = "<group>"; };
+               7463B6F712F9CE6B00983F6A /* ft2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ft2.c; sourceTree = "<group>"; };
+               7463B6F812F9CE6B00983F6A /* ft2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ft2.h; sourceTree = "<group>"; };
+               7463B6F912F9CE6B00983F6A /* gl_backend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_backend.c; sourceTree = "<group>"; };
+               7463B6FA12F9CE6B00983F6A /* gl_backend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gl_backend.h; sourceTree = "<group>"; };
+               7463B6FB12F9CE6B00983F6A /* gl_draw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_draw.c; sourceTree = "<group>"; };
+               7463B6FC12F9CE6B00983F6A /* gl_rmain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_rmain.c; sourceTree = "<group>"; };
+               7463B6FD12F9CE6B00983F6A /* gl_rsurf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_rsurf.c; sourceTree = "<group>"; };
+               7463B6FE12F9CE6B00983F6A /* gl_textures.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gl_textures.c; sourceTree = "<group>"; };
+               7463B6FF12F9CE6B00983F6A /* glquake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glquake.h; sourceTree = "<group>"; };
+               7463B70012F9CE6B00983F6A /* hmac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hmac.c; sourceTree = "<group>"; };
+               7463B70112F9CE6B00983F6A /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hmac.h; sourceTree = "<group>"; };
+               7463B70212F9CE6B00983F6A /* host_cmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = host_cmd.c; sourceTree = "<group>"; };
+               7463B70312F9CE6B00983F6A /* host.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = host.c; sourceTree = "<group>"; };
+               7463B70412F9CE6B00983F6A /* image_png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = image_png.c; sourceTree = "<group>"; };
+               7463B70512F9CE6B00983F6A /* image_png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = image_png.h; sourceTree = "<group>"; };
+               7463B70612F9CE6B00983F6A /* image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = image.c; sourceTree = "<group>"; };
+               7463B70712F9CE6B00983F6A /* image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = image.h; sourceTree = "<group>"; };
+               7463B70812F9CE6B00983F6A /* input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = input.h; sourceTree = "<group>"; };
+               7463B70912F9CE6B00983F6A /* intoverflow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intoverflow.h; sourceTree = "<group>"; };
+               7463B70A12F9CE6B00983F6A /* jpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jpeg.c; sourceTree = "<group>"; };
+               7463B70B12F9CE6B00983F6A /* jpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jpeg.h; sourceTree = "<group>"; };
+               7463B70C12F9CE6B00983F6A /* keys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keys.c; sourceTree = "<group>"; };
+               7463B70D12F9CE6B00983F6A /* keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keys.h; sourceTree = "<group>"; };
+               7463B70E12F9CE6B00983F6A /* lhfont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lhfont.h; sourceTree = "<group>"; };
+               7463B70F12F9CE6B00983F6A /* lhnet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lhnet.c; sourceTree = "<group>"; };
+               7463B71012F9CE6B00983F6A /* lhnet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lhnet.h; sourceTree = "<group>"; };
+               7463B71112F9CE6B00983F6A /* libcurl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = libcurl.c; sourceTree = "<group>"; };
+               7463B71212F9CE6B00983F6A /* libcurl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libcurl.h; sourceTree = "<group>"; };
+               7463B71312F9CE6B00983F6A /* mathlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mathlib.c; sourceTree = "<group>"; };
+               7463B71412F9CE6B00983F6A /* mathlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mathlib.h; sourceTree = "<group>"; };
+               7463B71512F9CE6B00983F6A /* matrixlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = matrixlib.c; sourceTree = "<group>"; };
+               7463B71612F9CE6B00983F6A /* matrixlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = matrixlib.h; sourceTree = "<group>"; };
+               7463B71712F9CE6B00983F6A /* mdfour.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mdfour.c; sourceTree = "<group>"; };
+               7463B71812F9CE6B00983F6A /* mdfour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mdfour.h; sourceTree = "<group>"; };
+               7463B71912F9CE6B00983F6A /* menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = menu.c; sourceTree = "<group>"; };
+               7463B71A12F9CE6B00983F6A /* menu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = menu.h; sourceTree = "<group>"; };
+               7463B71B12F9CE6B00983F6A /* meshqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = meshqueue.c; sourceTree = "<group>"; };
+               7463B71C12F9CE6B00983F6A /* meshqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = meshqueue.h; sourceTree = "<group>"; };
+               7463B71D12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mod_skeletal_animatevertices_generic.c; sourceTree = "<group>"; };
+               7463B71E12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mod_skeletal_animatevertices_generic.h; sourceTree = "<group>"; };
+               7463B71F12F9CE6B00983F6A /* model_alias.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_alias.c; sourceTree = "<group>"; };
+               7463B72012F9CE6B00983F6A /* model_alias.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_alias.h; sourceTree = "<group>"; };
+               7463B72112F9CE6B00983F6A /* model_brush.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_brush.c; sourceTree = "<group>"; };
+               7463B72212F9CE6B00983F6A /* model_brush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_brush.h; sourceTree = "<group>"; };
+               7463B72312F9CE6B00983F6A /* model_dpmodel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_dpmodel.h; sourceTree = "<group>"; };
+               7463B72412F9CE6B00983F6A /* model_iqm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_iqm.h; sourceTree = "<group>"; };
+               7463B72512F9CE6B00983F6A /* model_psk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_psk.h; sourceTree = "<group>"; };
+               7463B72612F9CE6B00983F6A /* model_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_shared.c; sourceTree = "<group>"; };
+               7463B72712F9CE6B00983F6A /* model_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_shared.h; sourceTree = "<group>"; };
+               7463B72812F9CE6B00983F6A /* model_sprite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = model_sprite.c; sourceTree = "<group>"; };
+               7463B72912F9CE6B00983F6A /* model_sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_sprite.h; sourceTree = "<group>"; };
+               7463B72A12F9CE6B00983F6A /* model_zymotic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = model_zymotic.h; sourceTree = "<group>"; };
+               7463B72B12F9CE6B00983F6A /* modelgen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modelgen.h; sourceTree = "<group>"; };
+               7463B72C12F9CE6B00983F6A /* mprogdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mprogdefs.h; sourceTree = "<group>"; };
+               7463B72D12F9CE6B00983F6A /* mvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mvm_cmds.c; sourceTree = "<group>"; };
+               7463B72E12F9CE6B00983F6A /* netconn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = netconn.c; sourceTree = "<group>"; };
+               7463B72F12F9CE6B00983F6A /* netconn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = netconn.h; sourceTree = "<group>"; };
+               7463B73012F9CE6B00983F6A /* palette.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = palette.c; sourceTree = "<group>"; };
+               7463B73112F9CE6B00983F6A /* palette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = palette.h; sourceTree = "<group>"; };
+               7463B73212F9CE6B00983F6A /* polygon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = polygon.c; sourceTree = "<group>"; };
+               7463B73312F9CE6B00983F6A /* polygon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = polygon.h; sourceTree = "<group>"; };
+               7463B73412F9CE6B00983F6A /* portals.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = portals.c; sourceTree = "<group>"; };
+               7463B73512F9CE6B00983F6A /* portals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = portals.h; sourceTree = "<group>"; };
+               7463B73612F9CE6B00983F6A /* pr_comp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pr_comp.h; sourceTree = "<group>"; };
+               7463B73712F9CE6B00983F6A /* progdefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progdefs.h; sourceTree = "<group>"; };
+               7463B73812F9CE6B00983F6A /* progs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progs.h; sourceTree = "<group>"; };
+               7463B73912F9CE6B00983F6A /* progsvm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = progsvm.h; sourceTree = "<group>"; };
+               7463B73A12F9CE6B00983F6A /* protocol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = protocol.c; sourceTree = "<group>"; };
+               7463B73B12F9CE6B00983F6A /* protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = "<group>"; };
+               7463B73C12F9CE6B00983F6A /* prvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prvm_cmds.c; sourceTree = "<group>"; };
+               7463B73D12F9CE6B00983F6A /* prvm_cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prvm_cmds.h; sourceTree = "<group>"; };
+               7463B73E12F9CE6B00983F6A /* prvm_edict.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prvm_edict.c; sourceTree = "<group>"; };
+               7463B73F12F9CE6B00983F6A /* prvm_exec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prvm_exec.c; sourceTree = "<group>"; };
+               7463B74012F9CE6B00983F6A /* prvm_execprogram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prvm_execprogram.h; sourceTree = "<group>"; };
+               7463B74112F9CE6B00983F6A /* qtypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = qtypes.h; sourceTree = "<group>"; };
+               7463B74212F9CE6B00983F6A /* quakedef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = quakedef.h; sourceTree = "<group>"; };
+               7463B74312F9CE6B00983F6A /* r_explosion.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_explosion.c; sourceTree = "<group>"; };
+               7463B74412F9CE6B00983F6A /* r_lightning.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_lightning.c; sourceTree = "<group>"; };
+               7463B74512F9CE6B00983F6A /* r_modules.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_modules.c; sourceTree = "<group>"; };
+               7463B74612F9CE6B00983F6A /* r_modules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r_modules.h; sourceTree = "<group>"; };
+               7463B74712F9CE6B00983F6A /* r_shadow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_shadow.c; sourceTree = "<group>"; };
+               7463B74812F9CE6B00983F6A /* r_shadow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r_shadow.h; sourceTree = "<group>"; };
+               7463B74912F9CE6B00983F6A /* r_sky.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_sky.c; sourceTree = "<group>"; };
+               7463B74A12F9CE6B00983F6A /* r_sprites.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = r_sprites.c; sourceTree = "<group>"; };
+               7463B74B12F9CE6B00983F6A /* r_textures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = r_textures.h; sourceTree = "<group>"; };
+               7463B74C12F9CE6B00983F6A /* render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = render.h; sourceTree = "<group>"; };
+               7463B74D12F9CE6B00983F6A /* resource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = "<group>"; };
+               7463B74E12F9CE6B00983F6A /* sbar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sbar.c; sourceTree = "<group>"; };
+               7463B74F12F9CE6B00983F6A /* sbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sbar.h; sourceTree = "<group>"; };
+               7463B75012F9CE6B00983F6A /* screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screen.h; sourceTree = "<group>"; };
+               7463B75112F9CE6B00983F6A /* server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = server.h; sourceTree = "<group>"; };
+               7463B75212F9CE6B00983F6A /* snd_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_main.c; sourceTree = "<group>"; };
+               7463B75312F9CE6B00983F6A /* snd_main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_main.h; sourceTree = "<group>"; };
+               7463B75412F9CE6B00983F6A /* snd_mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_mem.c; sourceTree = "<group>"; };
+               7463B75512F9CE6B00983F6A /* snd_mix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_mix.c; sourceTree = "<group>"; };
+               7463B75612F9CE6B00983F6A /* snd_modplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_modplug.c; sourceTree = "<group>"; };
+               7463B75712F9CE6B00983F6A /* snd_modplug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_modplug.h; sourceTree = "<group>"; };
+               7463B75812F9CE6B00983F6A /* snd_ogg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_ogg.c; sourceTree = "<group>"; };
+               7463B75912F9CE6B00983F6A /* snd_ogg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_ogg.h; sourceTree = "<group>"; };
+               7463B75A12F9CE6B00983F6A /* snd_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_sdl.c; sourceTree = "<group>"; };
+               7463B75B12F9CE6B00983F6A /* snd_wav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snd_wav.c; sourceTree = "<group>"; };
+               7463B75C12F9CE6B00983F6A /* snd_wav.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = snd_wav.h; sourceTree = "<group>"; };
+               7463B75D12F9CE6B00983F6A /* sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sound.h; sourceTree = "<group>"; };
+               7463B75E12F9CE6B00983F6A /* spritegn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spritegn.h; sourceTree = "<group>"; };
+               7463B75F12F9CE6B00983F6A /* sv_demo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_demo.c; sourceTree = "<group>"; };
+               7463B76012F9CE6B00983F6A /* sv_demo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sv_demo.h; sourceTree = "<group>"; };
+               7463B76112F9CE6B00983F6A /* sv_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_main.c; sourceTree = "<group>"; };
+               7463B76212F9CE6B00983F6A /* sv_move.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_move.c; sourceTree = "<group>"; };
+               7463B76312F9CE6B00983F6A /* sv_phys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_phys.c; sourceTree = "<group>"; };
+               7463B76412F9CE6B00983F6A /* sv_user.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sv_user.c; sourceTree = "<group>"; };
+               7463B76512F9CE6B00983F6A /* svbsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = svbsp.c; sourceTree = "<group>"; };
+               7463B76612F9CE6B00983F6A /* svbsp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = svbsp.h; sourceTree = "<group>"; };
+               7463B76712F9CE6B00983F6A /* svvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = svvm_cmds.c; sourceTree = "<group>"; };
+               7463B76812F9CE6B00983F6A /* sys_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sys_sdl.c; sourceTree = "<group>"; };
+               7463B76912F9CE6B00983F6A /* sys_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sys_shared.c; sourceTree = "<group>"; };
+               7463B76A12F9CE6B00983F6A /* sys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sys.h; sourceTree = "<group>"; };
+               7463B76B12F9CE6B00983F6A /* timing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timing.h; sourceTree = "<group>"; };
+               7463B76C12F9CE6B00983F6A /* utf8lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utf8lib.c; sourceTree = "<group>"; };
+               7463B76D12F9CE6B00983F6A /* utf8lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8lib.h; sourceTree = "<group>"; };
+               7463B76E12F9CE6B00983F6A /* vid_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vid_sdl.c; sourceTree = "<group>"; };
+               7463B76F12F9CE6B00983F6A /* vid_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vid_shared.c; sourceTree = "<group>"; };
+               7463B77012F9CE6B00983F6A /* vid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vid.h; sourceTree = "<group>"; };
+               7463B77112F9CE6B00983F6A /* view.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = view.c; sourceTree = "<group>"; };
+               7463B77212F9CE6B00983F6A /* wad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wad.c; sourceTree = "<group>"; };
+               7463B77312F9CE6B00983F6A /* wad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wad.h; sourceTree = "<group>"; };
+               7463B77412F9CE6B00983F6A /* world.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = world.c; sourceTree = "<group>"; };
+               7463B77512F9CE6B00983F6A /* world.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = world.h; sourceTree = "<group>"; };
+               7463B77612F9CE6B00983F6A /* zone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zone.c; sourceTree = "<group>"; };
+               7463B77712F9CE6B00983F6A /* zone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zone.h; sourceTree = "<group>"; };
+               7463B7D812F9CF8F00983F6A /* darkplaces64x64.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = darkplaces64x64.png; sourceTree = "<group>"; };
+               7463B7E812F9D11E00983F6A /* mod_skeletal_animatevertices_sse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mod_skeletal_animatevertices_sse.c; sourceTree = "<group>"; };
+               7463B7E912F9D11E00983F6A /* mod_skeletal_animatevertices_sse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mod_skeletal_animatevertices_sse.h; sourceTree = "<group>"; };
+               7463B7ED12F9D17D00983F6A /* builddate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = builddate.c; sourceTree = "<group>"; };
+               7463B7EE12F9D17D00983F6A /* clvm_cmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = clvm_cmds.c; sourceTree = "<group>"; };
+               7487D47F130102AA00AEE909 /* thread_sdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = thread_sdl.c; sourceTree = "<group>"; };
+               7487D480130102AA00AEE909 /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread.h; sourceTree = "<group>"; };
+               8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+               FD779ED00E26B9B000F39101 /* libSDLSimulator.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDLSimulator.a; path = lib/libSDLSimulator.a; sourceTree = "<group>"; };
+               FD779ED10E26B9B000F39101 /* libSDLiPhoneOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDLiPhoneOS.a; path = lib/libSDLiPhoneOS.a; sourceTree = "<group>"; };
+               FD779EDD0E26BA1200F39101 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+               FD77A0840E26BDB800F39101 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+               FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               FD779ED20E26B9B000F39101 /* libSDLSimulator.a in Frameworks */,
+                               FD779ED30E26B9B000F39101 /* libSDLiPhoneOS.a in Frameworks */,
+                               1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+                               1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+                               28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */,
+                               28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
+                               FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */,
+                               FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */,
+                               FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1D6058910D05DD3D006BFB54 /* DPiOS.app */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+                       isa = PBXGroup;
+                       children = (
+                               29B97315FDCFA39411CA2CEA /* Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               FD779EC50E26B99E00F39101 /* Libraries */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = CustomTemplate;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               7487D47F130102AA00AEE909 /* thread_sdl.c */,
+                               7487D480130102AA00AEE909 /* thread.h */,
+                               7463B7ED12F9D17D00983F6A /* builddate.c */,
+                               7463B7EE12F9D17D00983F6A /* clvm_cmds.c */,
+                               7463B7E812F9D11E00983F6A /* mod_skeletal_animatevertices_sse.c */,
+                               7463B7E912F9D11E00983F6A /* mod_skeletal_animatevertices_sse.h */,
+                               7463B6C012F9CE6B00983F6A /* bih.c */,
+                               7463B6C112F9CE6B00983F6A /* bih.h */,
+                               7463B6C212F9CE6B00983F6A /* bspfile.h */,
+                               7463B6C312F9CE6B00983F6A /* cap_avi.c */,
+                               7463B6C412F9CE6B00983F6A /* cap_avi.h */,
+                               7463B6C512F9CE6B00983F6A /* cap_ogg.c */,
+                               7463B6C612F9CE6B00983F6A /* cap_ogg.h */,
+                               7463B6C712F9CE6B00983F6A /* cd_sdl.c */,
+                               7463B6C812F9CE6B00983F6A /* cd_shared.c */,
+                               7463B6C912F9CE6B00983F6A /* cdaudio.h */,
+                               7463B6CA12F9CE6B00983F6A /* cl_collision.c */,
+                               7463B6CB12F9CE6B00983F6A /* cl_collision.h */,
+                               7463B6CC12F9CE6B00983F6A /* cl_demo.c */,
+                               7463B6CD12F9CE6B00983F6A /* cl_dyntexture.c */,
+                               7463B6CE12F9CE6B00983F6A /* cl_dyntexture.h */,
+                               7463B6CF12F9CE6B00983F6A /* cl_gecko.c */,
+                               7463B6D012F9CE6B00983F6A /* cl_gecko.h */,
+                               7463B6D112F9CE6B00983F6A /* cl_input.c */,
+                               7463B6D212F9CE6B00983F6A /* cl_main.c */,
+                               7463B6D312F9CE6B00983F6A /* cl_parse.c */,
+                               7463B6D412F9CE6B00983F6A /* cl_particles.c */,
+                               7463B6D512F9CE6B00983F6A /* cl_screen.c */,
+                               7463B6D612F9CE6B00983F6A /* cl_screen.h */,
+                               7463B6D712F9CE6B00983F6A /* cl_video.c */,
+                               7463B6D812F9CE6B00983F6A /* cl_video.h */,
+                               7463B6D912F9CE6B00983F6A /* client.h */,
+                               7463B6DA12F9CE6B00983F6A /* clprogdefs.h */,
+                               7463B6DB12F9CE6B00983F6A /* clvm_cmds.h */,
+                               7463B6DC12F9CE6B00983F6A /* cmd.c */,
+                               7463B6DD12F9CE6B00983F6A /* cmd.h */,
+                               7463B6DE12F9CE6B00983F6A /* collision.c */,
+                               7463B6DF12F9CE6B00983F6A /* collision.h */,
+                               7463B6E012F9CE6B00983F6A /* common.c */,
+                               7463B6E112F9CE6B00983F6A /* common.h */,
+                               7463B6E212F9CE6B00983F6A /* console.c */,
+                               7463B6E312F9CE6B00983F6A /* console.h */,
+                               7463B6E412F9CE6B00983F6A /* crypto.c */,
+                               7463B6E512F9CE6B00983F6A /* crypto.h */,
+                               7463B6E612F9CE6B00983F6A /* csprogs.c */,
+                               7463B6E712F9CE6B00983F6A /* csprogs.h */,
+                               7463B6E812F9CE6B00983F6A /* curves.c */,
+                               7463B6E912F9CE6B00983F6A /* curves.h */,
+                               7463B6EA12F9CE6B00983F6A /* cvar.c */,
+                               7463B6EB12F9CE6B00983F6A /* cvar.h */,
+                               7463B6EC12F9CE6B00983F6A /* dpsoftrast.c */,
+                               7463B6ED12F9CE6B00983F6A /* dpsoftrast.h */,
+                               7463B6EE12F9CE6B00983F6A /* dpvsimpledecode.c */,
+                               7463B6EF12F9CE6B00983F6A /* dpvsimpledecode.h */,
+                               7463B6F012F9CE6B00983F6A /* draw.h */,
+                               7463B6F112F9CE6B00983F6A /* filematch.c */,
+                               7463B6F212F9CE6B00983F6A /* fractalnoise.c */,
+                               7463B6F312F9CE6B00983F6A /* fs.c */,
+                               7463B6F412F9CE6B00983F6A /* fs.h */,
+                               7463B6F512F9CE6B00983F6A /* ft2_defs.h */,
+                               7463B6F612F9CE6B00983F6A /* ft2_fontdefs.h */,
+                               7463B6F712F9CE6B00983F6A /* ft2.c */,
+                               7463B6F812F9CE6B00983F6A /* ft2.h */,
+                               7463B6F912F9CE6B00983F6A /* gl_backend.c */,
+                               7463B6FA12F9CE6B00983F6A /* gl_backend.h */,
+                               7463B6FB12F9CE6B00983F6A /* gl_draw.c */,
+                               7463B6FC12F9CE6B00983F6A /* gl_rmain.c */,
+                               7463B6FD12F9CE6B00983F6A /* gl_rsurf.c */,
+                               7463B6FE12F9CE6B00983F6A /* gl_textures.c */,
+                               7463B6FF12F9CE6B00983F6A /* glquake.h */,
+                               7463B70012F9CE6B00983F6A /* hmac.c */,
+                               7463B70112F9CE6B00983F6A /* hmac.h */,
+                               7463B70212F9CE6B00983F6A /* host_cmd.c */,
+                               7463B70312F9CE6B00983F6A /* host.c */,
+                               7463B70412F9CE6B00983F6A /* image_png.c */,
+                               7463B70512F9CE6B00983F6A /* image_png.h */,
+                               7463B70612F9CE6B00983F6A /* image.c */,
+                               7463B70712F9CE6B00983F6A /* image.h */,
+                               7463B70812F9CE6B00983F6A /* input.h */,
+                               7463B70912F9CE6B00983F6A /* intoverflow.h */,
+                               7463B70A12F9CE6B00983F6A /* jpeg.c */,
+                               7463B70B12F9CE6B00983F6A /* jpeg.h */,
+                               7463B70C12F9CE6B00983F6A /* keys.c */,
+                               7463B70D12F9CE6B00983F6A /* keys.h */,
+                               7463B70E12F9CE6B00983F6A /* lhfont.h */,
+                               7463B70F12F9CE6B00983F6A /* lhnet.c */,
+                               7463B71012F9CE6B00983F6A /* lhnet.h */,
+                               7463B71112F9CE6B00983F6A /* libcurl.c */,
+                               7463B71212F9CE6B00983F6A /* libcurl.h */,
+                               7463B71312F9CE6B00983F6A /* mathlib.c */,
+                               7463B71412F9CE6B00983F6A /* mathlib.h */,
+                               7463B71512F9CE6B00983F6A /* matrixlib.c */,
+                               7463B71612F9CE6B00983F6A /* matrixlib.h */,
+                               7463B71712F9CE6B00983F6A /* mdfour.c */,
+                               7463B71812F9CE6B00983F6A /* mdfour.h */,
+                               7463B71912F9CE6B00983F6A /* menu.c */,
+                               7463B71A12F9CE6B00983F6A /* menu.h */,
+                               7463B71B12F9CE6B00983F6A /* meshqueue.c */,
+                               7463B71C12F9CE6B00983F6A /* meshqueue.h */,
+                               7463B71D12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c */,
+                               7463B71E12F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.h */,
+                               7463B71F12F9CE6B00983F6A /* model_alias.c */,
+                               7463B72012F9CE6B00983F6A /* model_alias.h */,
+                               7463B72112F9CE6B00983F6A /* model_brush.c */,
+                               7463B72212F9CE6B00983F6A /* model_brush.h */,
+                               7463B72312F9CE6B00983F6A /* model_dpmodel.h */,
+                               7463B72412F9CE6B00983F6A /* model_iqm.h */,
+                               7463B72512F9CE6B00983F6A /* model_psk.h */,
+                               7463B72612F9CE6B00983F6A /* model_shared.c */,
+                               7463B72712F9CE6B00983F6A /* model_shared.h */,
+                               7463B72812F9CE6B00983F6A /* model_sprite.c */,
+                               7463B72912F9CE6B00983F6A /* model_sprite.h */,
+                               7463B72A12F9CE6B00983F6A /* model_zymotic.h */,
+                               7463B72B12F9CE6B00983F6A /* modelgen.h */,
+                               7463B72C12F9CE6B00983F6A /* mprogdefs.h */,
+                               7463B72D12F9CE6B00983F6A /* mvm_cmds.c */,
+                               7463B72E12F9CE6B00983F6A /* netconn.c */,
+                               7463B72F12F9CE6B00983F6A /* netconn.h */,
+                               7463B73012F9CE6B00983F6A /* palette.c */,
+                               7463B73112F9CE6B00983F6A /* palette.h */,
+                               7463B73212F9CE6B00983F6A /* polygon.c */,
+                               7463B73312F9CE6B00983F6A /* polygon.h */,
+                               7463B73412F9CE6B00983F6A /* portals.c */,
+                               7463B73512F9CE6B00983F6A /* portals.h */,
+                               7463B73612F9CE6B00983F6A /* pr_comp.h */,
+                               7463B73712F9CE6B00983F6A /* progdefs.h */,
+                               7463B73812F9CE6B00983F6A /* progs.h */,
+                               7463B73912F9CE6B00983F6A /* progsvm.h */,
+                               7463B73A12F9CE6B00983F6A /* protocol.c */,
+                               7463B73B12F9CE6B00983F6A /* protocol.h */,
+                               7463B73C12F9CE6B00983F6A /* prvm_cmds.c */,
+                               7463B73D12F9CE6B00983F6A /* prvm_cmds.h */,
+                               7463B73E12F9CE6B00983F6A /* prvm_edict.c */,
+                               7463B73F12F9CE6B00983F6A /* prvm_exec.c */,
+                               7463B74012F9CE6B00983F6A /* prvm_execprogram.h */,
+                               7463B74112F9CE6B00983F6A /* qtypes.h */,
+                               7463B74212F9CE6B00983F6A /* quakedef.h */,
+                               7463B74312F9CE6B00983F6A /* r_explosion.c */,
+                               7463B74412F9CE6B00983F6A /* r_lightning.c */,
+                               7463B74512F9CE6B00983F6A /* r_modules.c */,
+                               7463B74612F9CE6B00983F6A /* r_modules.h */,
+                               7463B74712F9CE6B00983F6A /* r_shadow.c */,
+                               7463B74812F9CE6B00983F6A /* r_shadow.h */,
+                               7463B74912F9CE6B00983F6A /* r_sky.c */,
+                               7463B74A12F9CE6B00983F6A /* r_sprites.c */,
+                               7463B74B12F9CE6B00983F6A /* r_textures.h */,
+                               7463B74C12F9CE6B00983F6A /* render.h */,
+                               7463B74D12F9CE6B00983F6A /* resource.h */,
+                               7463B74E12F9CE6B00983F6A /* sbar.c */,
+                               7463B74F12F9CE6B00983F6A /* sbar.h */,
+                               7463B75012F9CE6B00983F6A /* screen.h */,
+                               7463B75112F9CE6B00983F6A /* server.h */,
+                               7463B75212F9CE6B00983F6A /* snd_main.c */,
+                               7463B75312F9CE6B00983F6A /* snd_main.h */,
+                               7463B75412F9CE6B00983F6A /* snd_mem.c */,
+                               7463B75512F9CE6B00983F6A /* snd_mix.c */,
+                               7463B75612F9CE6B00983F6A /* snd_modplug.c */,
+                               7463B75712F9CE6B00983F6A /* snd_modplug.h */,
+                               7463B75812F9CE6B00983F6A /* snd_ogg.c */,
+                               7463B75912F9CE6B00983F6A /* snd_ogg.h */,
+                               7463B75A12F9CE6B00983F6A /* snd_sdl.c */,
+                               7463B75B12F9CE6B00983F6A /* snd_wav.c */,
+                               7463B75C12F9CE6B00983F6A /* snd_wav.h */,
+                               7463B75D12F9CE6B00983F6A /* sound.h */,
+                               7463B75E12F9CE6B00983F6A /* spritegn.h */,
+                               7463B75F12F9CE6B00983F6A /* sv_demo.c */,
+                               7463B76012F9CE6B00983F6A /* sv_demo.h */,
+                               7463B76112F9CE6B00983F6A /* sv_main.c */,
+                               7463B76212F9CE6B00983F6A /* sv_move.c */,
+                               7463B76312F9CE6B00983F6A /* sv_phys.c */,
+                               7463B76412F9CE6B00983F6A /* sv_user.c */,
+                               7463B76512F9CE6B00983F6A /* svbsp.c */,
+                               7463B76612F9CE6B00983F6A /* svbsp.h */,
+                               7463B76712F9CE6B00983F6A /* svvm_cmds.c */,
+                               7463B76812F9CE6B00983F6A /* sys_sdl.c */,
+                               7463B76912F9CE6B00983F6A /* sys_shared.c */,
+                               7463B76A12F9CE6B00983F6A /* sys.h */,
+                               7463B76B12F9CE6B00983F6A /* timing.h */,
+                               7463B76C12F9CE6B00983F6A /* utf8lib.c */,
+                               7463B76D12F9CE6B00983F6A /* utf8lib.h */,
+                               7463B76E12F9CE6B00983F6A /* vid_sdl.c */,
+                               7463B76F12F9CE6B00983F6A /* vid_shared.c */,
+                               7463B77012F9CE6B00983F6A /* vid.h */,
+                               7463B77112F9CE6B00983F6A /* view.c */,
+                               7463B77212F9CE6B00983F6A /* wad.c */,
+                               7463B77312F9CE6B00983F6A /* wad.h */,
+                               7463B77412F9CE6B00983F6A /* world.c */,
+                               7463B77512F9CE6B00983F6A /* world.h */,
+                               7463B77612F9CE6B00983F6A /* zone.c */,
+                               7463B77712F9CE6B00983F6A /* zone.h */,
+                       );
+                       name = Sources;
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               7463B7D812F9CF8F00983F6A /* darkplaces64x64.png */,
+                               8D1107310486CEB800E47090 /* Info.plist */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */,
+                               FD77A0840E26BDB800F39101 /* AudioToolbox.framework */,
+                               FD779EDD0E26BA1200F39101 /* CoreAudio.framework */,
+                               28FD15070DC6FC5B0079059D /* QuartzCore.framework */,
+                               28FD14FF0DC6FC520079059D /* OpenGLES.framework */,
+                               1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+                               1D30AB110D05D00D00671497 /* Foundation.framework */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+               FD779EC50E26B99E00F39101 /* Libraries */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FD779ED00E26B9B000F39101 /* libSDLSimulator.a */,
+                               FD779ED10E26B9B000F39101 /* libSDLiPhoneOS.a */,
+                       );
+                       name = Libraries;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               1D6058900D05DD3D006BFB54 /* DPiOS */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "DPiOS" */;
+                       buildPhases = (
+                               1D60588D0D05DD3D006BFB54 /* Resources */,
+                               1D60588E0D05DD3D006BFB54 /* Sources */,
+                               1D60588F0D05DD3D006BFB54 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = DPiOS;
+                       productName = DPiOS;
+                       productReference = 1D6058910D05DD3D006BFB54 /* DPiOS.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DPiOS" */;
+                       compatibilityVersion = "Xcode 3.1";
+                       developmentRegion = English;
+                       hasScannedForEncodings = 1;
+                       knownRegions = (
+                               English,
+                               Japanese,
+                               French,
+                               German,
+                       );
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               1D6058900D05DD3D006BFB54 /* DPiOS */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               1D60588D0D05DD3D006BFB54 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               7463B7D912F9CF8F00983F6A /* darkplaces64x64.png in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               1D60588E0D05DD3D006BFB54 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               7463B77812F9CE6B00983F6A /* bih.c in Sources */,
+                               7463B77912F9CE6B00983F6A /* cap_avi.c in Sources */,
+                               7463B77A12F9CE6B00983F6A /* cap_ogg.c in Sources */,
+                               7463B77B12F9CE6B00983F6A /* cd_sdl.c in Sources */,
+                               7463B77C12F9CE6B00983F6A /* cd_shared.c in Sources */,
+                               7463B77D12F9CE6B00983F6A /* cl_collision.c in Sources */,
+                               7463B77E12F9CE6B00983F6A /* cl_demo.c in Sources */,
+                               7463B77F12F9CE6B00983F6A /* cl_dyntexture.c in Sources */,
+                               7463B78012F9CE6B00983F6A /* cl_gecko.c in Sources */,
+                               7463B78112F9CE6B00983F6A /* cl_input.c in Sources */,
+                               7463B78212F9CE6B00983F6A /* cl_main.c in Sources */,
+                               7463B78312F9CE6B00983F6A /* cl_parse.c in Sources */,
+                               7463B78412F9CE6B00983F6A /* cl_particles.c in Sources */,
+                               7463B78512F9CE6B00983F6A /* cl_screen.c in Sources */,
+                               7463B78612F9CE6B00983F6A /* cl_video.c in Sources */,
+                               7463B78712F9CE6B00983F6A /* cmd.c in Sources */,
+                               7463B78812F9CE6B00983F6A /* collision.c in Sources */,
+                               7463B78912F9CE6B00983F6A /* common.c in Sources */,
+                               7463B78A12F9CE6B00983F6A /* console.c in Sources */,
+                               7463B78B12F9CE6B00983F6A /* crypto.c in Sources */,
+                               7463B78C12F9CE6B00983F6A /* csprogs.c in Sources */,
+                               7463B78D12F9CE6B00983F6A /* curves.c in Sources */,
+                               7463B78E12F9CE6B00983F6A /* cvar.c in Sources */,
+                               7463B78F12F9CE6B00983F6A /* dpsoftrast.c in Sources */,
+                               7463B79012F9CE6B00983F6A /* dpvsimpledecode.c in Sources */,
+                               7463B79112F9CE6B00983F6A /* filematch.c in Sources */,
+                               7463B79212F9CE6B00983F6A /* fractalnoise.c in Sources */,
+                               7463B79312F9CE6B00983F6A /* fs.c in Sources */,
+                               7463B79412F9CE6B00983F6A /* ft2.c in Sources */,
+                               7463B79512F9CE6B00983F6A /* gl_backend.c in Sources */,
+                               7463B79612F9CE6B00983F6A /* gl_draw.c in Sources */,
+                               7463B79712F9CE6B00983F6A /* gl_rmain.c in Sources */,
+                               7463B79812F9CE6B00983F6A /* gl_rsurf.c in Sources */,
+                               7463B79912F9CE6B00983F6A /* gl_textures.c in Sources */,
+                               7463B79A12F9CE6B00983F6A /* hmac.c in Sources */,
+                               7463B79B12F9CE6B00983F6A /* host_cmd.c in Sources */,
+                               7463B79C12F9CE6B00983F6A /* host.c in Sources */,
+                               7463B79D12F9CE6B00983F6A /* image_png.c in Sources */,
+                               7463B79E12F9CE6B00983F6A /* image.c in Sources */,
+                               7463B79F12F9CE6B00983F6A /* jpeg.c in Sources */,
+                               7463B7A012F9CE6B00983F6A /* keys.c in Sources */,
+                               7463B7A112F9CE6B00983F6A /* lhnet.c in Sources */,
+                               7463B7A212F9CE6B00983F6A /* libcurl.c in Sources */,
+                               7463B7A312F9CE6B00983F6A /* mathlib.c in Sources */,
+                               7463B7A412F9CE6B00983F6A /* matrixlib.c in Sources */,
+                               7463B7A512F9CE6B00983F6A /* mdfour.c in Sources */,
+                               7463B7A612F9CE6B00983F6A /* menu.c in Sources */,
+                               7463B7A712F9CE6B00983F6A /* meshqueue.c in Sources */,
+                               7463B7A812F9CE6B00983F6A /* mod_skeletal_animatevertices_generic.c in Sources */,
+                               7463B7A912F9CE6B00983F6A /* model_alias.c in Sources */,
+                               7463B7AA12F9CE6B00983F6A /* model_brush.c in Sources */,
+                               7463B7AB12F9CE6B00983F6A /* model_shared.c in Sources */,
+                               7463B7AC12F9CE6B00983F6A /* model_sprite.c in Sources */,
+                               7463B7AD12F9CE6B00983F6A /* mvm_cmds.c in Sources */,
+                               7463B7AE12F9CE6B00983F6A /* netconn.c in Sources */,
+                               7463B7AF12F9CE6B00983F6A /* palette.c in Sources */,
+                               7463B7B012F9CE6B00983F6A /* polygon.c in Sources */,
+                               7463B7B112F9CE6B00983F6A /* portals.c in Sources */,
+                               7463B7B212F9CE6B00983F6A /* protocol.c in Sources */,
+                               7463B7B312F9CE6B00983F6A /* prvm_cmds.c in Sources */,
+                               7463B7B412F9CE6B00983F6A /* prvm_edict.c in Sources */,
+                               7463B7B512F9CE6B00983F6A /* prvm_exec.c in Sources */,
+                               7463B7B612F9CE6B00983F6A /* r_explosion.c in Sources */,
+                               7463B7B712F9CE6B00983F6A /* r_lightning.c in Sources */,
+                               7463B7B812F9CE6B00983F6A /* r_modules.c in Sources */,
+                               7463B7B912F9CE6B00983F6A /* r_shadow.c in Sources */,
+                               7463B7BA12F9CE6B00983F6A /* r_sky.c in Sources */,
+                               7463B7BB12F9CE6B00983F6A /* r_sprites.c in Sources */,
+                               7463B7BC12F9CE6B00983F6A /* sbar.c in Sources */,
+                               7463B7BD12F9CE6B00983F6A /* snd_main.c in Sources */,
+                               7463B7BE12F9CE6B00983F6A /* snd_mem.c in Sources */,
+                               7463B7BF12F9CE6B00983F6A /* snd_mix.c in Sources */,
+                               7463B7C012F9CE6B00983F6A /* snd_modplug.c in Sources */,
+                               7463B7C112F9CE6B00983F6A /* snd_ogg.c in Sources */,
+                               7463B7C212F9CE6B00983F6A /* snd_sdl.c in Sources */,
+                               7463B7C312F9CE6B00983F6A /* snd_wav.c in Sources */,
+                               7463B7C412F9CE6B00983F6A /* sv_demo.c in Sources */,
+                               7463B7C512F9CE6B00983F6A /* sv_main.c in Sources */,
+                               7463B7C612F9CE6B00983F6A /* sv_move.c in Sources */,
+                               7463B7C712F9CE6B00983F6A /* sv_phys.c in Sources */,
+                               7463B7C812F9CE6B00983F6A /* sv_user.c in Sources */,
+                               7463B7C912F9CE6B00983F6A /* svbsp.c in Sources */,
+                               7463B7CA12F9CE6B00983F6A /* svvm_cmds.c in Sources */,
+                               7463B7CB12F9CE6B00983F6A /* sys_sdl.c in Sources */,
+                               7463B7CC12F9CE6B00983F6A /* sys_shared.c in Sources */,
+                               7463B7CD12F9CE6B00983F6A /* utf8lib.c in Sources */,
+                               7463B7CE12F9CE6B00983F6A /* vid_sdl.c in Sources */,
+                               7463B7CF12F9CE6B00983F6A /* vid_shared.c in Sources */,
+                               7463B7D012F9CE6B00983F6A /* view.c in Sources */,
+                               7463B7D112F9CE6B00983F6A /* wad.c in Sources */,
+                               7463B7D212F9CE6B00983F6A /* world.c in Sources */,
+                               7463B7D312F9CE6B00983F6A /* zone.c in Sources */,
+                               7463B7EA12F9D11E00983F6A /* mod_skeletal_animatevertices_sse.c in Sources */,
+                               7463B7EF12F9D17D00983F6A /* builddate.c in Sources */,
+                               7463B7F012F9D17D00983F6A /* clvm_cmds.c in Sources */,
+                               7487D481130102AA00AEE909 /* thread_sdl.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+               1D6058940D05DD3E006BFB54 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               INFOPLIST_FILE = Info.plist;
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SRCROOT)/lib\"",
+                               );
+                               PRODUCT_NAME = DPiOS;
+                       };
+                       name = Debug;
+               };
+               1D6058950D05DD3E006BFB54 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = YES;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = "";
+                               INFOPLIST_FILE = Info.plist;
+                               LIBRARY_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SRCROOT)/lib\"",
+                               );
+                               PRODUCT_NAME = DPiOS;
+                       };
+                       name = Release;
+               };
+               C01FCF4F08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+                               "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               GCC_C_LANGUAGE_STANDARD = c99;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               HEADER_SEARCH_PATHS = ./include;
+                               LIBRARY_SEARCH_PATHS = ./lib;
+                               ONLY_ACTIVE_ARCH = YES;
+                               OTHER_CFLAGS = "";
+                               PREBINDING = NO;
+                               SDKROOT = iphoneos;
+                       };
+                       name = Debug;
+               };
+               C01FCF5008A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+                               "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               GCC_C_LANGUAGE_STANDARD = c99;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               HEADER_SEARCH_PATHS = ./include;
+                               LIBRARY_SEARCH_PATHS = ./lib;
+                               OTHER_CFLAGS = "";
+                               PREBINDING = NO;
+                               SDKROOT = iphoneos;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "DPiOS" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               1D6058940D05DD3E006BFB54 /* Debug */,
+                               1D6058950D05DD3E006BFB54 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C01FCF4E08A954540054247B /* Build configuration list for PBXProject "DPiOS" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4F08A954540054247B /* Debug */,
+                               C01FCF5008A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/misc/source/darkplaces-src/Darkplaces.app/Contents/Info.plist b/misc/source/darkplaces-src/Darkplaces.app/Contents/Info.plist
new file mode 100644 (file)
index 0000000..68abd98
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>darkplaces-sdl</string>
+       <key>CFBundleIconFile</key>
+       <string>Darkplaces</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>1.0</string>
+</dict>
+</plist>
diff --git a/misc/source/darkplaces-src/Darkplaces.app/Contents/PkgInfo b/misc/source/darkplaces-src/Darkplaces.app/Contents/PkgInfo
new file mode 100644 (file)
index 0000000..bd04210
--- /dev/null
@@ -0,0 +1 @@
+APPL????
\ No newline at end of file
diff --git a/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/._Darkplaces.icns b/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/._Darkplaces.icns
new file mode 100644 (file)
index 0000000..0ddac7c
Binary files /dev/null and b/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/._Darkplaces.icns differ
diff --git a/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/Darkplaces.icns b/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/Darkplaces.icns
new file mode 100644 (file)
index 0000000..262e82c
Binary files /dev/null and b/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/Darkplaces.icns differ
diff --git a/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/English.lproj/InfoPlist.strings b/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/English.lproj/InfoPlist.strings
new file mode 100644 (file)
index 0000000..5d6a57e
Binary files /dev/null and b/misc/source/darkplaces-src/Darkplaces.app/Contents/Resources/English.lproj/InfoPlist.strings differ
diff --git a/misc/source/darkplaces-src/Doxyfile b/misc/source/darkplaces-src/Doxyfile
new file mode 100644 (file)
index 0000000..322052e
--- /dev/null
@@ -0,0 +1,1503 @@
+# Doxyfile 1.5.9
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = darkplaces
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses. 
+# With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this tag. 
+# The format is ext=language, where ext is a file extension, and language is one of 
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, 
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat 
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), 
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
+# doxygen. The layout file controls the global structure of the generated output files 
+# in an output format independent way. The create the layout file that represents 
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
+# of the layout file.
+
+LAYOUT_FILE            = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = .
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = 
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
+# are set, an additional index file will be generated that can be used as input for 
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = 
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. 
+# For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to FRAME, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature. Other possible values 
+# for this tag are: HIERARCHIES, which will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list; 
+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which 
+# disables this behavior completely. For backwards compatibility with previous 
+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE 
+# respectively.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Options related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff --git a/misc/source/darkplaces-src/Info.plist b/misc/source/darkplaces-src/Info.plist
new file mode 100644 (file)
index 0000000..3873788
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>en</string>
+       <key>CFBundleDisplayName</key>
+       <string>${PRODUCT_NAME}</string>
+       <key>CFBundleExecutable</key>
+       <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleIconFile</key>
+       <string>darkplaces64x64</string>
+       <key>CFBundleIdentifier</key>
+       <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>${PRODUCT_NAME}</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>1.0</string>
+       <key>LSRequiresIPhoneOS</key>
+       <false/>
+</dict>
+</plist>
diff --git a/misc/source/darkplaces-src/README.iOS b/misc/source/darkplaces-src/README.iOS
new file mode 100644 (file)
index 0000000..58007ed
--- /dev/null
@@ -0,0 +1,6 @@
+To build DarkPlaces for iOS, you need to extract this zip into the source folder:
+http://ghdigital.com/~havoc/SDLiOS20110208.zip
+
+This is built from the in-development version of SDL 1.3, to make an updated include folder and libSDL*.a files, you need to get the SDL 1.3 source (from hg or a nightly build or whatever), then simply open Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj and build libSDL for both simulator and device and then the SDL Application xcode template.
+
+Then copy the include folder and two libSDL*.a files from the Xcode-iPhoneOS/SDL/build/Debug-template (or Release-template) into the darkplaces source folder, and it will build with your updated files.
diff --git a/misc/source/darkplaces-src/SDLMain.h b/misc/source/darkplaces-src/SDLMain.h
new file mode 100644 (file)
index 0000000..4683df5
--- /dev/null
@@ -0,0 +1,11 @@
+/*   SDLMain.m - main entry point for our Cocoa-ized SDL app
+       Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
+       Non-NIB-Code & other changes: Max Horn <max@quendi.de>
+
+    Feel free to customize this file to suit your needs
+*/
+
+#import <Cocoa/Cocoa.h>
+
+@interface SDLMain : NSObject
+@end
diff --git a/misc/source/darkplaces-src/SDLMain.m b/misc/source/darkplaces-src/SDLMain.m
new file mode 100644 (file)
index 0000000..2434f81
--- /dev/null
@@ -0,0 +1,381 @@
+/*   SDLMain.m - main entry point for our Cocoa-ized SDL app
+       Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
+       Non-NIB-Code & other changes: Max Horn <max@quendi.de>
+
+    Feel free to customize this file to suit your needs
+*/
+
+#include "SDL.h"
+#include "SDLMain.h"
+#include <sys/param.h> /* for MAXPATHLEN */
+#include <unistd.h>
+
+/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
+ but the method still is there and works. To avoid warnings, we declare
+ it ourselves here. */
+@interface NSApplication(SDL_Missing_Methods)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end
+
+/* Use this flag to determine whether we use SDLMain.nib or not */
+#define                SDL_USE_NIB_FILE        0
+
+/* Use this flag to determine whether we use CPS (docking) or not */
+#define                SDL_USE_CPS             1
+#ifdef SDL_USE_CPS
+/* Portions of CPS.h */
+typedef struct CPSProcessSerNum
+{
+       UInt32          lo;
+       UInt32          hi;
+} CPSProcessSerNum;
+
+extern OSErr   CPSGetCurrentProcess( CPSProcessSerNum *psn);
+extern OSErr   CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+extern OSErr   CPSSetFrontProcess( CPSProcessSerNum *psn);
+
+#endif /* SDL_USE_CPS */
+
+static int    gArgc;
+static char  **gArgv;
+static BOOL   gFinderLaunch;
+static BOOL   gCalledAppMainline = FALSE;
+
+static NSString *getApplicationName(void)
+{
+    const NSDictionary *dict;
+    NSString *appName = 0;
+
+    /* Determine the application name */
+    dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
+    if (dict)
+        appName = [dict objectForKey: @"CFBundleName"];
+    
+    if (![appName length])
+        appName = [[NSProcessInfo processInfo] processName];
+
+    return appName;
+}
+
+#if SDL_USE_NIB_FILE
+/* A helper category for NSString */
+@interface NSString (ReplaceSubString)
+- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
+@end
+#endif
+
+@interface NSApplication (SDLApplication)
+@end
+
+@implementation NSApplication (SDLApplication)
+/* Invoked from the Quit menu item */
+- (void)terminate:(id)sender
+{
+    /* Post a SDL_QUIT event */
+    SDL_Event event;
+    event.type = SDL_QUIT;
+    SDL_PushEvent(&event);
+}
+@end
+
+/* The main class of the application, the application's delegate */
+@implementation SDLMain
+
+/* Set the working directory to the .app's parent directory */
+- (void) setupWorkingDirectory:(BOOL)shouldChdir
+{
+    if (shouldChdir)
+    {
+        char parentdir[MAXPATHLEN];
+        CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+        CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
+        if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) {
+            chdir(parentdir);   /* chdir to the binary app's parent */
+        }
+        CFRelease(url);
+        CFRelease(url2);
+    }
+}
+
+#if SDL_USE_NIB_FILE
+
+/* Fix menu to contain the real app name instead of "SDL App" */
+- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
+{
+    NSRange aRange;
+    NSEnumerator *enumerator;
+    NSMenuItem *menuItem;
+
+    aRange = [[aMenu title] rangeOfString:@"SDL App"];
+    if (aRange.length != 0)
+        [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
+
+    enumerator = [[aMenu itemArray] objectEnumerator];
+    while ((menuItem = [enumerator nextObject]))
+    {
+        aRange = [[menuItem title] rangeOfString:@"SDL App"];
+        if (aRange.length != 0)
+            [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
+        if ([menuItem hasSubmenu])
+            [self fixMenu:[menuItem submenu] withAppName:appName];
+    }
+}
+
+#else
+
+static void setApplicationMenu(void)
+{
+    /* warning: this code is very odd */
+    NSMenu *appleMenu;
+    NSMenuItem *menuItem;
+    NSString *title;
+    NSString *appName;
+    
+    appName = getApplicationName();
+    appleMenu = [[NSMenu alloc] initWithTitle:@""];
+    
+    /* Add menu items */
+    title = [@"About " stringByAppendingString:appName];
+    [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+
+    [appleMenu addItem:[NSMenuItem separatorItem]];
+
+    title = [@"Hide " stringByAppendingString:appName];
+    [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
+
+    menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+    [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+
+    [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+    [appleMenu addItem:[NSMenuItem separatorItem]];
+
+    title = [@"Quit " stringByAppendingString:appName];
+    [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
+
+    
+    /* Put menu into the menubar */
+    menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+    [menuItem setSubmenu:appleMenu];
+    [[NSApp mainMenu] addItem:menuItem];
+
+    /* Tell the application object that this is now the application menu */
+    [NSApp setAppleMenu:appleMenu];
+
+    /* Finally give up our references to the objects */
+    [appleMenu release];
+    [menuItem release];
+}
+
+/* Create a window menu */
+static void setupWindowMenu(void)
+{
+    NSMenu      *windowMenu;
+    NSMenuItem  *windowMenuItem;
+    NSMenuItem  *menuItem;
+
+    windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
+    
+    /* "Minimize" item */
+    menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+    [windowMenu addItem:menuItem];
+    [menuItem release];
+    
+    /* Put menu into the menubar */
+    windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
+    [windowMenuItem setSubmenu:windowMenu];
+    [[NSApp mainMenu] addItem:windowMenuItem];
+    
+    /* Tell the application object that this is now the window menu */
+    [NSApp setWindowsMenu:windowMenu];
+
+    /* Finally give up our references to the objects */
+    [windowMenu release];
+    [windowMenuItem release];
+}
+
+/* Replacement for NSApplicationMain */
+static void CustomApplicationMain (int argc, char **argv)
+{
+    NSAutoreleasePool  *pool = [[NSAutoreleasePool alloc] init];
+    SDLMain                            *sdlMain;
+
+    /* Ensure the application object is initialised */
+    [NSApplication sharedApplication];
+    
+#ifdef SDL_USE_CPS
+    {
+        CPSProcessSerNum PSN;
+        /* Tell the dock about us */
+        if (!CPSGetCurrentProcess(&PSN))
+            if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
+                if (!CPSSetFrontProcess(&PSN))
+                    [NSApplication sharedApplication];
+    }
+#endif /* SDL_USE_CPS */
+
+    /* Set up the menubar */
+    [NSApp setMainMenu:[[NSMenu alloc] init]];
+    setApplicationMenu();
+    setupWindowMenu();
+
+    /* Create SDLMain and make it the app delegate */
+    sdlMain = [[SDLMain alloc] init];
+    [NSApp setDelegate:sdlMain];
+    
+    /* Start the main event loop */
+    [NSApp run];
+    
+    [sdlMain release];
+    [pool release];
+}
+
+#endif
+
+
+/*
+ * Catch document open requests...this lets us notice files when the app
+ *  was launched by double-clicking a document, or when a document was
+ *  dragged/dropped on the app's icon. You need to have a
+ *  CFBundleDocumentsType section in your Info.plist to get this message,
+ *  apparently.
+ *
+ * Files are added to gArgv, so to the app, they'll look like command line
+ *  arguments. Previously, apps launched from the finder had nothing but
+ *  an argv[0].
+ *
+ * This message may be received multiple times to open several docs on launch.
+ *
+ * This message is ignored once the app's mainline has been called.
+ */
+- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
+{
+    const char *temparg;
+    size_t arglen;
+    char *arg;
+    char **newargv;
+
+    if (!gFinderLaunch)  /* MacOS is passing command line args. */
+        return FALSE;
+
+    if (gCalledAppMainline)  /* app has started, ignore this document. */
+        return FALSE;
+
+    temparg = [filename UTF8String];
+    arglen = SDL_strlen(temparg) + 1;
+    arg = (char *) SDL_malloc(arglen);
+    if (arg == NULL)
+        return FALSE;
+
+    newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
+    if (newargv == NULL)
+    {
+        SDL_free(arg);
+        return FALSE;
+    }
+    gArgv = newargv;
+
+    SDL_strlcpy(arg, temparg, arglen);
+    gArgv[gArgc++] = arg;
+    gArgv[gArgc] = NULL;
+    return TRUE;
+}
+
+
+/* Called when the internal event loop has just started running */
+- (void) applicationDidFinishLaunching: (NSNotification *) note
+{
+    int status;
+
+    /* Set the working directory to the .app's parent directory */
+    [self setupWorkingDirectory:gFinderLaunch];
+
+#if SDL_USE_NIB_FILE
+    /* Set the main menu to contain the real app name instead of "SDL App" */
+    [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
+#endif
+
+    /* Hand off to main application code */
+    gCalledAppMainline = TRUE;
+    status = SDL_main (gArgc, gArgv);
+
+    /* We're done, thank you for playing */
+    exit(status);
+}
+@end
+
+
+@implementation NSString (ReplaceSubString)
+
+- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
+{
+    unsigned int bufferSize;
+    unsigned int selfLen = [self length];
+    unsigned int aStringLen = [aString length];
+    unichar *buffer;
+    NSRange localRange;
+    NSString *result;
+
+    bufferSize = selfLen + aStringLen - aRange.length;
+    buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar));
+    
+    /* Get first part into buffer */
+    localRange.location = 0;
+    localRange.length = aRange.location;
+    [self getCharacters:buffer range:localRange];
+    
+    /* Get middle part into buffer */
+    localRange.location = 0;
+    localRange.length = aStringLen;
+    [aString getCharacters:(buffer+aRange.location) range:localRange];
+     
+    /* Get last part into buffer */
+    localRange.location = aRange.location + aRange.length;
+    localRange.length = selfLen - localRange.location;
+    [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
+    
+    /* Build output string */
+    result = [NSString stringWithCharacters:buffer length:bufferSize];
+    
+    NSDeallocateMemoryPages(buffer, bufferSize);
+    
+    return result;
+}
+
+@end
+
+
+
+#ifdef main
+#  undef main
+#endif
+
+
+/* Main entry point to executable - should *not* be SDL_main! */
+int main (int argc, char **argv)
+{
+    /* Copy the arguments into a global variable */
+    /* This is passed if we are launched by double-clicking */
+    if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
+        gArgv = (char **) SDL_malloc(sizeof (char *) * 2);
+        gArgv[0] = argv[0];
+        gArgv[1] = NULL;
+        gArgc = 1;
+        gFinderLaunch = YES;
+    } else {
+        int i;
+        gArgc = argc;
+        gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1));
+        for (i = 0; i <= argc; i++)
+            gArgv[i] = argv[i];
+        gFinderLaunch = NO;
+    }
+
+#if SDL_USE_NIB_FILE
+    NSApplicationMain (argc, argv);
+#else
+    CustomApplicationMain (argc, argv);
+#endif
+    return 0;
+}
+
diff --git a/misc/source/darkplaces-src/bih.c b/misc/source/darkplaces-src/bih.c
new file mode 100644 (file)
index 0000000..7a25c66
--- /dev/null
@@ -0,0 +1,216 @@
+
+// This code written in 2010 by Forest Hale (lordhavoc ghdigital com), and placed into public domain.
+
+#include <stdlib.h>
+#include <string.h>
+#include "bih.h"
+
+static int BIH_BuildNode(bih_t *bih, int numchildren, int *leaflist, float *totalmins, float *totalmaxs)
+{
+       int i;
+       int j;
+       int longestaxis;
+       int axis = 0;
+       int nodenum;
+       int front = 0;
+       int back = 0;
+       bih_node_t *node;
+       bih_leaf_t *child;
+       float splitdist;
+       float d;
+       float mins[3];
+       float maxs[3];
+       float size[3];
+       float frontmins[3];
+       float frontmaxs[3];
+       float backmins[3];
+       float backmaxs[3];
+       // calculate bounds of children
+       child = bih->leafs + leaflist[0];
+       mins[0] = child->mins[0];
+       mins[1] = child->mins[1];
+       mins[2] = child->mins[2];
+       maxs[0] = child->maxs[0];
+       maxs[1] = child->maxs[1];
+       maxs[2] = child->maxs[2];
+       for (i = 1;i < numchildren;i++)
+       {
+               child = bih->leafs + leaflist[i];
+               if (mins[0] > child->mins[0]) mins[0] = child->mins[0];
+               if (mins[1] > child->mins[1]) mins[1] = child->mins[1];
+               if (mins[2] > child->mins[2]) mins[2] = child->mins[2];
+               if (maxs[0] < child->maxs[0]) maxs[0] = child->maxs[0];
+               if (maxs[1] < child->maxs[1]) maxs[1] = child->maxs[1];
+               if (maxs[2] < child->maxs[2]) maxs[2] = child->maxs[2];
+       }
+       size[0] = maxs[0] - mins[0];
+       size[1] = maxs[1] - mins[1];
+       size[2] = maxs[2] - mins[2];
+       // provide bounds to caller
+       totalmins[0] = mins[0];
+       totalmins[1] = mins[1];
+       totalmins[2] = mins[2];
+       totalmaxs[0] = maxs[0];
+       totalmaxs[1] = maxs[1];
+       totalmaxs[2] = maxs[2];
+       // if we run out of nodes it's the caller's fault, but don't crash
+       if (bih->numnodes == bih->maxnodes)
+       {
+               if (!bih->error)
+                       bih->error = BIHERROR_OUT_OF_NODES;
+               return 0;
+       }
+       nodenum = bih->numnodes++;
+       node = bih->nodes + nodenum;
+       // store bounds for node
+       node->mins[0] = mins[0];
+       node->mins[1] = mins[1];
+       node->mins[2] = mins[2];
+       node->maxs[0] = maxs[0];
+       node->maxs[1] = maxs[1];
+       node->maxs[2] = maxs[2];
+       node->front = 0;
+       node->back = 0;
+       node->frontmin = 0;
+       node->backmax = 0;
+       memset(node->children, -1, sizeof(node->children));
+       // check if there are few enough children to store an unordered node
+       if (numchildren <= BIH_MAXUNORDEREDCHILDREN)
+       {
+               node->type = BIH_UNORDERED;
+               for (j = 0;j < numchildren;j++)
+                       node->children[j] = leaflist[j];
+               return nodenum;
+       }
+       // pick longest axis
+       longestaxis = 0;
+       if (size[0] < size[1]) longestaxis = 1;
+       if (size[longestaxis] < size[2]) longestaxis = 2;
+       // iterate possible split axis choices, starting with the longest axis, if
+       // all fail it means all children have the same bounds and we simply split
+       // the list in half because each node can only have two children.
+       for (j = 0;j < 3;j++)
+       {
+               // pick an axis
+               axis = (longestaxis + j) % 3;
+               // sort children into front and back lists
+               splitdist = (node->mins[axis] + node->maxs[axis]) * 0.5f;
+               front = 0;
+               back = 0;
+               for (i = 0;i < numchildren;i++)
+               {
+                       child = bih->leafs + leaflist[i];
+                       d = (child->mins[axis] + child->maxs[axis]) * 0.5f;
+                       if (d < splitdist)
+                               bih->leafsortscratch[back++] = leaflist[i];
+                       else
+                               leaflist[front++] = leaflist[i];
+               }
+               // now copy the back ones into the space made in the leaflist for them
+               if (back)
+                       memcpy(leaflist + front, bih->leafsortscratch, back*sizeof(leaflist[0]));
+               // if both sides have some children, it's good enough for us.
+               if (front && back)
+                       break;
+       }
+       if (j == 3)
+       {
+               // somewhat common case: no good choice, divide children arbitrarily
+               axis = 0;
+               back = numchildren >> 1;
+               front = numchildren - back;
+       }
+
+       // we now have front and back children divided in leaflist...
+       node->type = (bih_nodetype_t)((int)BIH_SPLITX + axis);
+       node->front = BIH_BuildNode(bih, front, leaflist, frontmins, frontmaxs);
+       node->frontmin = frontmins[axis];
+       node->back = BIH_BuildNode(bih, back, leaflist + front, backmins, backmaxs);
+       node->backmax = backmaxs[axis];
+       return nodenum;
+}
+
+int BIH_Build(bih_t *bih, int numleafs, bih_leaf_t *leafs, int maxnodes, bih_node_t *nodes, int *temp_leafsort, int *temp_leafsortscratch)
+{
+       int i;
+
+       memset(bih, 0, sizeof(*bih));
+       bih->numleafs = numleafs;
+       bih->leafs = leafs;
+       bih->leafsort = temp_leafsort;
+       bih->leafsortscratch = temp_leafsortscratch;
+       bih->numnodes = 0;
+       bih->maxnodes = maxnodes;
+       bih->nodes = nodes;
+
+       // clear things we intend to rebuild
+       memset(bih->nodes, 0, sizeof(bih->nodes[0]) * bih->maxnodes);
+       for (i = 0;i < bih->numleafs;i++)
+               bih->leafsort[i] = i;
+
+       bih->rootnode = BIH_BuildNode(bih, bih->numleafs, bih->leafsort, bih->mins, bih->maxs);
+       return bih->error;
+}
+
+static void BIH_GetTriangleListForBox_Node(const bih_t *bih, int nodenum, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, int *numtrianglespointer, const float *mins, const float *maxs)
+{
+       int axis;
+       bih_node_t *node;
+       bih_leaf_t *leaf;
+       for(;;)
+       {
+               node = bih->nodes + nodenum;
+               // check if this is an unordered node (which holds an array of leaf numbers)
+               if (node->type == BIH_UNORDERED)
+               {
+                       for (axis = 0;axis < BIH_MAXUNORDEREDCHILDREN && node->children[axis] >= 0;axis++)
+                       {
+                               leaf = bih->leafs + node->children[axis];
+                               if (mins[0] > leaf->maxs[0] || maxs[0] < leaf->mins[0]
+                                || mins[1] > leaf->maxs[1] || maxs[1] < leaf->mins[1]
+                                || mins[2] > leaf->maxs[2] || maxs[2] < leaf->mins[2])
+                                       continue;
+                               switch(leaf->type)
+                               {
+                               case BIH_RENDERTRIANGLE:
+                                       if (*numtrianglespointer >= maxtriangles)
+                                       {
+                                               ++*numtrianglespointer; // so the caller can detect overflow
+                                               break;
+                                       }
+                                       if(trianglelist_surf)
+                                               trianglelist_surf[*numtrianglespointer] = leaf->surfaceindex;
+                                       trianglelist_idx[*numtrianglespointer] = leaf->itemindex;
+                                       ++*numtrianglespointer;
+                                       break;
+                               default:
+                                       break;
+                               }
+                       }
+                       return;
+               }
+               // splitting node
+               axis = node->type - BIH_SPLITX;
+               if (mins[axis] < node->backmax)
+               {
+                       if (maxs[axis] > node->frontmin)
+                               BIH_GetTriangleListForBox_Node(bih, node->front, maxtriangles, trianglelist_idx, trianglelist_surf, numtrianglespointer, mins, maxs);
+                       nodenum = node->back;
+                       continue;
+               }
+               if (maxs[axis] > node->frontmin)
+               {
+                       nodenum = node->front;
+                       continue;
+               }
+               // fell between the child groups, nothing here
+               return;
+       }
+}
+
+int BIH_GetTriangleListForBox(const bih_t *bih, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, const float *mins, const float *maxs)
+{
+       int numtriangles = 0;
+       BIH_GetTriangleListForBox_Node(bih, bih->rootnode, maxtriangles, trianglelist_idx, trianglelist_surf, &numtriangles, mins, maxs);
+       return numtriangles;
+}
diff --git a/misc/source/darkplaces-src/bih.h b/misc/source/darkplaces-src/bih.h
new file mode 100644 (file)
index 0000000..43b659e
--- /dev/null
@@ -0,0 +1,91 @@
+
+// This code written in 2010 by Forest Hale (lordhavoc ghdigital com), and placed into public domain.
+
+// Based on information in http://zach.in.tu-clausthal.de/papers/vrst02.html (in particular vrst02_boxtree.pdf)
+
+#ifndef BIH_H
+#define BIH_H
+
+#define BIH_MAXUNORDEREDCHILDREN 8
+
+typedef enum biherror_e
+{
+       BIHERROR_OK, // no error, be happy
+       BIHERROR_OUT_OF_NODES // could not produce complete hierarchy, maxnodes too low (should be roughly half of numleafs)
+}
+biherror_t;
+
+typedef enum bih_nodetype_e
+{
+       BIH_SPLITX = 0,
+       BIH_SPLITY = 1,
+       BIH_SPLITZ = 2,
+       BIH_UNORDERED = 3,
+}
+bih_nodetype_t;
+
+typedef enum bih_leaftype_e
+{
+       BIH_BRUSH = 4,
+       BIH_COLLISIONTRIANGLE = 5,
+       BIH_RENDERTRIANGLE = 6
+}
+bih_leaftype_t;
+
+typedef struct bih_node_s
+{
+       bih_nodetype_t type; // = BIH_SPLITX and similar values
+       // TODO: store just one float for distance, and have BIH_SPLITMINX and BIH_SPLITMAXX distinctions, to reduce memory footprint and traversal time, as described in the paper (vrst02_boxtree.pdf)
+       // TODO: move bounds data to parent node and remove it from leafs?
+       float mins[3];
+       float maxs[3];
+       // node indexes of children (always > this node's index)
+       int front;
+       int back;
+       // interval of children
+       float frontmin; // children[0]
+       float backmax; // children[1]
+       // BIH_UNORDERED uses this for a list of leafindex (all >= 0), -1 = end of list
+       int children[BIH_MAXUNORDEREDCHILDREN];
+}
+bih_node_t;
+
+typedef struct bih_leaf_s
+{
+       bih_leaftype_t type; // = BIH_BRUSH And similar values
+       float mins[3];
+       float maxs[3];
+       // data past this point is generic and entirely up to the caller...
+       int textureindex;
+       int surfaceindex;
+       int itemindex; // triangle or brush index
+}
+bih_leaf_t;
+
+typedef struct bih_s
+{
+       // permanent fields
+       // leafs are constructed by caller before calling BIH_Build
+       int numleafs;
+       bih_leaf_t *leafs;
+       // nodes are constructed by BIH_Build
+       int numnodes;
+       bih_node_t *nodes;
+       int rootnode; // 0 if numnodes > 0, -1 otherwise
+       // bounds calculated by BIH_Build
+       float mins[3];
+       float maxs[3];
+
+       // fields used only during BIH_Build:
+       int maxnodes;
+       int error; // set to a value if an error occurs in building (such as numnodes == maxnodes)
+       int *leafsort;
+       int *leafsortscratch;
+}
+bih_t;
+
+int BIH_Build(bih_t *bih, int numleafs, bih_leaf_t *leafs, int maxnodes, bih_node_t *nodes, int *temp_leafsort, int *temp_leafsortscratch);
+
+int BIH_GetTriangleListForBox(const bih_t *bih, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, const float *mins, const float *maxs);
+
+#endif
diff --git a/misc/source/darkplaces-src/bspfile.h b/misc/source/darkplaces-src/bspfile.h
new file mode 100644 (file)
index 0000000..648b294
--- /dev/null
@@ -0,0 +1,299 @@
+/*
+Copyright (C) 1996-1997 Id Software, Inc.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+
+#define MAX_MAP_HULLS 16 // Q1BSP has 4, Hexen2 Q1BSP has 8, MCBSP has 16
+
+//=============================================================================
+
+
+#define BSPVERSION     29
+
+typedef struct lump_s
+{
+       int             fileofs, filelen;
+} lump_t;
+
+#define        LUMP_ENTITIES   0
+#define        LUMP_PLANES             1
+#define        LUMP_TEXTURES   2
+#define        LUMP_VERTEXES   3
+#define        LUMP_VISIBILITY 4
+#define        LUMP_NODES              5
+#define        LUMP_TEXINFO    6
+#define        LUMP_FACES              7
+#define        LUMP_LIGHTING   8
+#define        LUMP_CLIPNODES  9
+#define        LUMP_LEAFS              10
+#define        LUMP_MARKSURFACES 11
+#define        LUMP_EDGES              12
+#define        LUMP_SURFEDGES  13
+#define        LUMP_MODELS             14
+#define        HEADER_LUMPS    15
+
+typedef struct hullinfo_s
+{
+       int                     filehulls;
+       float           hullsizes[MAX_MAP_HULLS][2][3];
+} hullinfo_t;
+
+// WARNING: this struct does NOT match q1bsp's disk format because MAX_MAP_HULLS has been changed by Sajt's MCBSP code, this struct is only being used in memory as a result
+typedef struct dmodel_s
+{
+       float           mins[3], maxs[3];
+       float           origin[3];
+       int                     headnode[MAX_MAP_HULLS];
+       int                     visleafs;               // not including the solid leaf 0
+       int                     firstface, numfaces;
+} dmodel_t;
+
+typedef struct dheader_s
+{
+       int                     version;
+       lump_t          lumps[HEADER_LUMPS];
+} dheader_t;
+
+typedef struct dmiptexlump_s
+{
+       int                     nummiptex;
+       int                     dataofs[4];             // [nummiptex]
+} dmiptexlump_t;
+
+#define        MIPLEVELS       4
+typedef struct miptex_s
+{
+       char            name[16];
+       unsigned        width, height;
+       unsigned        offsets[MIPLEVELS];             // four mip maps stored
+} miptex_t;
+
+
+typedef struct dvertex_s
+{
+       float   point[3];
+} dvertex_t;
+
+
+// 0-2 are axial planes
+#define        PLANE_X                 0
+#define        PLANE_Y                 1
+#define        PLANE_Z                 2
+
+// 3-5 are non-axial planes snapped to the nearest
+#define        PLANE_ANYX              3
+#define        PLANE_ANYY              4
+#define        PLANE_ANYZ              5
+
+typedef struct dplane_s
+{
+       float   normal[3];
+       float   dist;
+       int             type;           // PLANE_X - PLANE_ANYZ ?remove? trivial to regenerate
+} dplane_t;
+
+
+// contents values in Q1 maps
+#define CONTENTS_EMPTY                 -1
+#define CONTENTS_SOLID                 -2
+#define CONTENTS_WATER                 -3
+#define CONTENTS_SLIME                 -4
+#define CONTENTS_LAVA                          -5
+#define CONTENTS_SKY                           -6
+// these were #ifdef QUAKE2 in the quake source
+#define CONTENTS_ORIGIN                        -7 // removed at csg time
+#define CONTENTS_CLIP                          -8 // changed to contents_solid
+#define CONTENTS_CURRENT_0             -9
+#define CONTENTS_CURRENT_90            -10
+#define CONTENTS_CURRENT_180           -11
+#define CONTENTS_CURRENT_270           -12
+#define CONTENTS_CURRENT_UP            -13
+#define CONTENTS_CURRENT_DOWN          -14
+
+//contents flags in Q2 maps
+#define CONTENTSQ2_SOLID                       0x00000001 // an eye is never valid in a solid
+#define CONTENTSQ2_WINDOW                      0x00000002 // translucent, but not watery
+#define CONTENTSQ2_AUX                         0x00000004
+#define CONTENTSQ2_LAVA                                0x00000008
+#define CONTENTSQ2_SLIME                       0x00000010
+#define CONTENTSQ2_WATER                       0x00000020
+#define CONTENTSQ2_MIST                                0x00000040
+#define CONTENTSQ2_AREAPORTAL          0x00008000
+#define CONTENTSQ2_PLAYERCLIP          0x00010000
+#define CONTENTSQ2_MONSTERCLIP         0x00020000
+#define CONTENTSQ2_CURRENT_0           0x00040000
+#define CONTENTSQ2_CURRENT_90          0x00080000
+#define CONTENTSQ2_CURRENT_180         0x00100000
+#define CONTENTSQ2_CURRENT_270         0x00200000
+#define CONTENTSQ2_CURRENT_UP          0x00400000
+#define CONTENTSQ2_CURRENT_DOWN                0x00800000
+#define CONTENTSQ2_ORIGIN                      0x01000000 // removed before bsping an entity
+#define CONTENTSQ2_MONSTER                     0x02000000 // should never be on a brush, only in game
+#define CONTENTSQ2_DEADMONSTER         0x04000000
+#define CONTENTSQ2_DETAIL                      0x08000000 // brushes to be added after vis leafs
+#define CONTENTSQ2_TRANSLUCENT         0x10000000 // auto set if any surface has trans
+#define CONTENTSQ2_LADDER                      0x20000000
+
+//contents flags in Q3 maps
+#define CONTENTSQ3_SOLID                       0x00000001 // solid (opaque and transparent)
+#define CONTENTSQ3_LAVA                                0x00000008 // lava
+#define CONTENTSQ3_SLIME                       0x00000010 // slime
+#define CONTENTSQ3_WATER                       0x00000020 // water
+#define CONTENTSQ3_FOG                         0x00000040 // unused?
+#define CONTENTSQ3_AREAPORTAL          0x00008000 // areaportal (separates areas)
+#define CONTENTSQ3_PLAYERCLIP          0x00010000 // block players
+#define CONTENTSQ3_MONSTERCLIP         0x00020000 // block monsters
+#define CONTENTSQ3_TELEPORTER          0x00040000 // hint for Q3's bots
+#define CONTENTSQ3_JUMPPAD                     0x00080000 // hint for Q3's bots
+#define CONTENTSQ3_CLUSTERPORTAL       0x00100000 // hint for Q3's bots
+#define CONTENTSQ3_DONOTENTER          0x00200000 // hint for Q3's bots
+#define CONTENTSQ3_BOTCLIP                     0x00400000 // hint for Q3's bots
+#define CONTENTSQ3_ORIGIN                      0x01000000 // used by origin brushes to indicate origin of bmodel (removed by map compiler)
+#define CONTENTSQ3_BODY                                0x02000000 // used by bbox entities (should never be on a brush)
+#define CONTENTSQ3_CORPSE                      0x04000000 // used by dead bodies (SOLID_CORPSE in darkplaces)
+#define CONTENTSQ3_DETAIL                      0x08000000 // brushes that do not split the bsp tree (decorations)
+#define CONTENTSQ3_STRUCTURAL          0x10000000 // brushes that split the bsp tree
+#define CONTENTSQ3_TRANSLUCENT         0x20000000 // leaves surfaces that are inside for rendering
+#define CONTENTSQ3_TRIGGER                     0x40000000 // used by trigger entities
+#define CONTENTSQ3_NODROP                      0x80000000 // remove items that fall into this brush
+
+#define SUPERCONTENTS_SOLID                    0x00000001
+#define SUPERCONTENTS_WATER                    0x00000002
+#define SUPERCONTENTS_SLIME                    0x00000004
+#define SUPERCONTENTS_LAVA                     0x00000008
+#define SUPERCONTENTS_SKY                      0x00000010
+#define SUPERCONTENTS_BODY                     0x00000020
+#define SUPERCONTENTS_CORPSE           0x00000040
+#define SUPERCONTENTS_NODROP           0x00000080
+#define SUPERCONTENTS_PLAYERCLIP       0x00000100
+#define SUPERCONTENTS_MONSTERCLIP      0x00000200
+#define SUPERCONTENTS_DONOTENTER       0x00000400
+#define SUPERCONTENTS_BOTCLIP          0x00000800
+#define SUPERCONTENTS_OPAQUE           0x00001000
+// TODO: is there any reason to define:
+//   fog?
+//   areaportal?
+//   teleporter?
+//   jumppad?
+//   clusterportal?
+//   detail?         (div0) no, game code should not be allowed to differentiate between structural and detail
+//   structural?     (div0) no, game code should not be allowed to differentiate between structural and detail
+//   trigger?        (div0) no, as these are always solid anyway, and that's all that matters for trigger brushes
+#define SUPERCONTENTS_LIQUIDSMASK      (SUPERCONTENTS_LAVA | SUPERCONTENTS_SLIME | SUPERCONTENTS_WATER)
+#define SUPERCONTENTS_VISBLOCKERMASK   SUPERCONTENTS_OPAQUE
+
+/*
+#define SUPERCONTENTS_DEADMONSTER      0x00000000
+#define SUPERCONTENTS_CURRENT_0                0x00000000
+#define SUPERCONTENTS_CURRENT_90       0x00000000
+#define SUPERCONTENTS_CURRENT_180      0x00000000
+#define SUPERCONTENTS_CURRENT_270      0x00000000
+#define SUPERCONTENTS_CURRENT_DOWN     0x00000000
+#define SUPERCONTENTS_CURRENT_UP       0x00000000
+#define SUPERCONTENTS_AREAPORTAL       0x00000000
+#define SUPERCONTENTS_AUX                      0x00000000
+#define SUPERCONTENTS_CLUSTERPORTAL    0x00000000
+#define SUPERCONTENTS_DETAIL           0x00000000
+#define SUPERCONTENTS_STRUCTURAL       0x00000000
+#define SUPERCONTENTS_DONOTENTER       0x00000000
+#define SUPERCONTENTS_JUMPPAD          0x00000000
+#define SUPERCONTENTS_LADDER           0x00000000
+#define SUPERCONTENTS_MONSTER          0x00000000
+#define SUPERCONTENTS_MONSTERCLIP      0x00000000
+#define SUPERCONTENTS_PLAYERCLIP       0x00000000
+#define SUPERCONTENTS_TELEPORTER       0x00000000
+#define SUPERCONTENTS_TRANSLUCENT      0x00000000
+#define SUPERCONTENTS_TRIGGER          0x00000000
+#define SUPERCONTENTS_WINDOW           0x00000000
+*/
+
+
+typedef struct dnode_s
+{
+       int                     planenum;
+       short           children[2];    // negative numbers are -(leafs+1), not nodes
+       short           mins[3];                // for sphere culling
+       short           maxs[3];
+       unsigned short  firstface;
+       unsigned short  numfaces;       // counting both sides
+} dnode_t;
+
+typedef struct dclipnode_s
+{
+       int                     planenum;
+       short           children[2];    // negative numbers are contents
+} dclipnode_t;
+
+
+typedef struct texinfo_s
+{
+       float           vecs[2][4];             // [s/t][xyz offset]
+       int                     miptex;
+       int                     flags;
+} texinfo_t;
+#define        TEX_SPECIAL             1               // sky or slime, no lightmap or 256 subdivision
+
+// note that edge 0 is never used, because negative edge nums are used for
+// counterclockwise use of the edge in a face
+typedef struct dedge_s
+{
+       unsigned short  v[2];           // vertex numbers
+} dedge_t;
+
+#define        MAXLIGHTMAPS    4
+typedef struct dface_s
+{
+       // LordHavoc: changed from short to unsigned short for q2 support
+       unsigned short  planenum;
+       short           side;
+
+       int                     firstedge;              // we must support > 64k edges
+       short           numedges;
+       short           texinfo;
+
+// lighting info
+       unsigned char           styles[MAXLIGHTMAPS];
+       int                     lightofs;               // start of [numstyles*surfsize] samples
+} dface_t;
+
+
+
+#define        AMBIENT_WATER   0
+#define        AMBIENT_SKY             1
+#define        AMBIENT_SLIME   2
+#define        AMBIENT_LAVA    3
+
+#define        NUM_AMBIENTS                    4               // automatic ambient sounds
+
+// leaf 0 is the generic CONTENTS_SOLID leaf, used for all solid areas
+// all other leafs need visibility info
+typedef struct dleaf_s
+{
+       int                     contents;
+       int                     visofs;                         // -1 = no visibility info
+
+       short           mins[3];                        // for frustum culling
+       short           maxs[3];
+
+       unsigned short          firstmarksurface;
+       unsigned short          nummarksurfaces;
+
+       unsigned char           ambient_level[NUM_AMBIENTS];
+} dleaf_t;
+
diff --git a/misc/source/darkplaces-src/builddate.c b/misc/source/darkplaces-src/builddate.c
new file mode 100644 (file)
index 0000000..061173e
--- /dev/null
@@ -0,0 +1,12 @@
+#define STRINGIFY2(arg) #arg
+#define STRINGIFY(arg) STRINGIFY2(arg)
+
+extern const char *buildstring;
+const char *buildstring = __TIME__ " " __DATE__
+#ifdef SVNREVISION
+" " STRINGIFY(SVNREVISION)
+#endif
+#ifdef BUILDTYPE
+" " STRINGIFY(BUILDTYPE)
+#endif
+;
diff --git a/misc/source/darkplaces-src/cap_avi.c b/misc/source/darkplaces-src/cap_avi.c
new file mode 100644 (file)
index 0000000..e7cf88d
--- /dev/null
@@ -0,0 +1,719 @@
+#include "quakedef.h"
+#include "cap_avi.h"
+
+#define AVI_MASTER_INDEX_SIZE 640 // GB ought to be enough for anyone
+
+typedef struct capturevideostate_avi_formatspecific_s
+{
+       // AVI stuff
+       fs_offset_t videofile_firstchunkframes_offset;
+       fs_offset_t videofile_totalframes_offset1;
+       fs_offset_t videofile_totalframes_offset2;
+       fs_offset_t videofile_totalsampleframes_offset;
+       int videofile_ix_master_audio_inuse;
+       fs_offset_t videofile_ix_master_audio_inuse_offset;
+       fs_offset_t videofile_ix_master_audio_start_offset;
+       int videofile_ix_master_video_inuse;
+       fs_offset_t videofile_ix_master_video_inuse_offset;
+       fs_offset_t videofile_ix_master_video_start_offset;
+       fs_offset_t videofile_ix_movistart;
+       fs_offset_t position;
+       qboolean canseek;
+       sizebuf_t riffbuffer;
+       unsigned char riffbufferdata[128];
+       sizebuf_t riffindexbuffer;
+       int riffstacklevel;
+       fs_offset_t riffstackstartoffset[4];
+       fs_offset_t riffstacksizehint[4];
+       const char *riffstackfourcc[4];
+}
+capturevideostate_avi_formatspecific_t;
+#define LOAD_FORMATSPECIFIC_AVI() capturevideostate_avi_formatspecific_t *format = (capturevideostate_avi_formatspecific_t *) cls.capturevideo.formatspecific
+
+static void SCR_CaptureVideo_RIFF_Start(void)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       memset(&format->riffbuffer, 0, sizeof(sizebuf_t));
+       format->riffbuffer.maxsize = sizeof(format->riffbufferdata);
+       format->riffbuffer.data = format->riffbufferdata;
+       format->position = 0;
+}
+
+static void SCR_CaptureVideo_RIFF_Flush(void)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (format->riffbuffer.cursize > 0)
+       {
+               if (!FS_Write(cls.capturevideo.videofile, format->riffbuffer.data, format->riffbuffer.cursize))
+                       cls.capturevideo.error = true;
+               format->position += format->riffbuffer.cursize;
+               format->riffbuffer.cursize = 0;
+               format->riffbuffer.overflowed = false;
+       }
+}
+
+static void SCR_CaptureVideo_RIFF_FlushNoIncrease(void)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (format->riffbuffer.cursize > 0)
+       {
+               if (!FS_Write(cls.capturevideo.videofile, format->riffbuffer.data, format->riffbuffer.cursize))
+                       cls.capturevideo.error = true;
+               format->riffbuffer.cursize = 0;
+               format->riffbuffer.overflowed = false;
+       }
+}
+
+static void SCR_CaptureVideo_RIFF_WriteBytes(const unsigned char *data, size_t size)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       SCR_CaptureVideo_RIFF_Flush();
+       if (!FS_Write(cls.capturevideo.videofile, data, size))
+               cls.capturevideo.error = true;
+       format->position += size;
+}
+
+static void SCR_CaptureVideo_RIFF_Write32(int n)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (format->riffbuffer.cursize + 4 > format->riffbuffer.maxsize)
+               SCR_CaptureVideo_RIFF_Flush();
+       MSG_WriteLong(&format->riffbuffer, n);
+}
+
+static void SCR_CaptureVideo_RIFF_Write16(int n)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (format->riffbuffer.cursize + 2 > format->riffbuffer.maxsize)
+               SCR_CaptureVideo_RIFF_Flush();
+       MSG_WriteShort(&format->riffbuffer, n);
+}
+
+static void SCR_CaptureVideo_RIFF_WriteFourCC(const char *chunkfourcc)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (format->riffbuffer.cursize + (int)strlen(chunkfourcc) > format->riffbuffer.maxsize)
+               SCR_CaptureVideo_RIFF_Flush();
+       MSG_WriteUnterminatedString(&format->riffbuffer, chunkfourcc);
+}
+
+static void SCR_CaptureVideo_RIFF_WriteTerminatedString(const char *string)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (format->riffbuffer.cursize + (int)strlen(string) > format->riffbuffer.maxsize)
+               SCR_CaptureVideo_RIFF_Flush();
+       MSG_WriteString(&format->riffbuffer, string);
+}
+
+static fs_offset_t SCR_CaptureVideo_RIFF_GetPosition(void)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       SCR_CaptureVideo_RIFF_Flush();
+       //return FS_Tell(cls.capturevideo.videofile);
+       return format->position;
+}
+
+static void SCR_CaptureVideo_RIFF_Push(const char *chunkfourcc, const char *listtypefourcc, fs_offset_t sizeHint)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if (listtypefourcc && sizeHint >= 0)
+               sizeHint += 4; // size hint is for INNER size
+       SCR_CaptureVideo_RIFF_WriteFourCC(chunkfourcc);
+       SCR_CaptureVideo_RIFF_Write32(sizeHint);
+       SCR_CaptureVideo_RIFF_Flush();
+       format->riffstacksizehint[format->riffstacklevel] = sizeHint;
+       format->riffstackstartoffset[format->riffstacklevel] = SCR_CaptureVideo_RIFF_GetPosition();
+       format->riffstackfourcc[format->riffstacklevel] = chunkfourcc;
+       ++format->riffstacklevel;
+       if (listtypefourcc)
+               SCR_CaptureVideo_RIFF_WriteFourCC(listtypefourcc);
+}
+
+static void SCR_CaptureVideo_RIFF_Pop(void)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       fs_offset_t offset, sizehint;
+       int x;
+       unsigned char sizebytes[4];
+       // write out the chunk size and then return to the current file position
+       format->riffstacklevel--;
+       offset = SCR_CaptureVideo_RIFF_GetPosition();
+
+       sizehint = format->riffstacksizehint[format->riffstacklevel];
+       x = (int)(offset - (format->riffstackstartoffset[format->riffstacklevel]));
+
+       if(x != sizehint)
+       {
+               if(sizehint != -1)
+               {
+                       int i;
+                       Con_Printf("WARNING: invalid size hint %d when writing video data (actual size: %d)\n", (int) sizehint, x);
+                       for(i = 0; i <= format->riffstacklevel; ++i)
+                       {
+                               Con_Printf("  RIFF level %d = %s\n", i, format->riffstackfourcc[i]);
+                       }
+               }
+               sizebytes[0] = (x) & 0xff;sizebytes[1] = (x >> 8) & 0xff;sizebytes[2] = (x >> 16) & 0xff;sizebytes[3] = (x >> 24) & 0xff;
+               if(FS_Seek(cls.capturevideo.videofile, -(x + 4), SEEK_END) >= 0)
+               {
+                       FS_Write(cls.capturevideo.videofile, sizebytes, 4);
+               }
+               FS_Seek(cls.capturevideo.videofile, 0, SEEK_END);
+       }
+
+       if (offset & 1)
+       {
+               SCR_CaptureVideo_RIFF_WriteBytes((unsigned char *) "\0", 1);
+       }
+}
+
+static void GrowBuf(sizebuf_t *buf, int extralen)
+{
+       if(buf->cursize + extralen > buf->maxsize)
+       {
+               int oldsize = buf->maxsize;
+               unsigned char *olddata;
+               olddata = buf->data;
+               buf->maxsize = max(buf->maxsize * 2, 4096);
+               buf->data = (unsigned char *) Mem_Alloc(tempmempool, buf->maxsize);
+               if(olddata)
+               {
+                       memcpy(buf->data, olddata, oldsize);
+                       Mem_Free(olddata);
+               }
+       }
+}
+
+static void SCR_CaptureVideo_RIFF_IndexEntry(const char *chunkfourcc, int chunksize, int flags)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       if(!format->canseek)
+               Host_Error("SCR_CaptureVideo_RIFF_IndexEntry called on non-seekable AVI");
+
+       if (format->riffstacklevel != 2)
+               Sys_Error("SCR_Capturevideo_RIFF_IndexEntry: RIFF stack level is %i (should be 2)\n", format->riffstacklevel);
+       GrowBuf(&format->riffindexbuffer, 16);
+       SCR_CaptureVideo_RIFF_Flush();
+       MSG_WriteUnterminatedString(&format->riffindexbuffer, chunkfourcc);
+       MSG_WriteLong(&format->riffindexbuffer, flags);
+       MSG_WriteLong(&format->riffindexbuffer, (int)FS_Tell(cls.capturevideo.videofile) - format->riffstackstartoffset[1]);
+       MSG_WriteLong(&format->riffindexbuffer, chunksize);
+}
+
+static void SCR_CaptureVideo_RIFF_MakeIxChunk(const char *fcc, const char *dwChunkId, fs_offset_t masteridx_counter, int *masteridx_count, fs_offset_t masteridx_start)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       int nMatching;
+       int i;
+       fs_offset_t ix = SCR_CaptureVideo_RIFF_GetPosition();
+       fs_offset_t pos, sz;
+       
+       if(!format->canseek)
+               Host_Error("SCR_CaptureVideo_RIFF_MakeIxChunk called on non-seekable AVI");
+
+       if(*masteridx_count >= AVI_MASTER_INDEX_SIZE)
+               return;
+
+       nMatching = 0; // go through index and enumerate them
+       for(i = 0; i < format->riffindexbuffer.cursize; i += 16)
+               if(!memcmp(format->riffindexbuffer.data + i, dwChunkId, 4))
+                       ++nMatching;
+
+       sz = 2+2+4+4+4+4+4;
+       for(i = 0; i < format->riffindexbuffer.cursize; i += 16)
+               if(!memcmp(format->riffindexbuffer.data + i, dwChunkId, 4))
+                       sz += 8;
+
+       SCR_CaptureVideo_RIFF_Push(fcc, NULL, sz);
+       SCR_CaptureVideo_RIFF_Write16(2); // wLongsPerEntry
+       SCR_CaptureVideo_RIFF_Write16(0x0100); // bIndexType=1, bIndexSubType=0
+       SCR_CaptureVideo_RIFF_Write32(nMatching); // nEntriesInUse
+       SCR_CaptureVideo_RIFF_WriteFourCC(dwChunkId); // dwChunkId
+       SCR_CaptureVideo_RIFF_Write32(format->videofile_ix_movistart & (fs_offset_t) 0xFFFFFFFFu);
+       SCR_CaptureVideo_RIFF_Write32(((fs_offset_t) format->videofile_ix_movistart) >> 32);
+       SCR_CaptureVideo_RIFF_Write32(0); // dwReserved
+
+       for(i = 0; i < format->riffindexbuffer.cursize; i += 16)
+               if(!memcmp(format->riffindexbuffer.data + i, dwChunkId, 4))
+               {
+                       unsigned int *p = (unsigned int *) (format->riffindexbuffer.data + i);
+                       unsigned int flags = p[1];
+                       unsigned int rpos = p[2];
+                       unsigned int size = p[3];
+                       size &= ~0x80000000;
+                       if(!(flags & 0x10)) // no keyframe?
+                               size |= 0x80000000;
+                       SCR_CaptureVideo_RIFF_Write32(rpos + 8);
+                       SCR_CaptureVideo_RIFF_Write32(size);
+               }
+
+       SCR_CaptureVideo_RIFF_Flush();
+       SCR_CaptureVideo_RIFF_Pop();
+       pos = SCR_CaptureVideo_RIFF_GetPosition();
+
+       if(FS_Seek(cls.capturevideo.videofile, masteridx_start + 16 * *masteridx_count, SEEK_SET) >= 0)
+       {
+               SCR_CaptureVideo_RIFF_Write32(ix & (fs_offset_t) 0xFFFFFFFFu);
+               SCR_CaptureVideo_RIFF_Write32(((fs_offset_t) ix) >> 32);
+               SCR_CaptureVideo_RIFF_Write32(pos - ix);
+               SCR_CaptureVideo_RIFF_Write32(nMatching);
+               SCR_CaptureVideo_RIFF_FlushNoIncrease();
+       }
+
+       if(FS_Seek(cls.capturevideo.videofile, masteridx_counter, SEEK_SET) >= 0)
+       {
+               SCR_CaptureVideo_RIFF_Write32(++*masteridx_count);
+               SCR_CaptureVideo_RIFF_FlushNoIncrease();
+       }
+
+       FS_Seek(cls.capturevideo.videofile, 0, SEEK_END); // return value doesn't matter here
+}
+
+static void SCR_CaptureVideo_RIFF_Finish(qboolean final)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       // close the "movi" list
+       SCR_CaptureVideo_RIFF_Pop();
+       if(format->videofile_ix_master_video_inuse_offset)
+               SCR_CaptureVideo_RIFF_MakeIxChunk("ix00", "00dc", format->videofile_ix_master_video_inuse_offset, &format->videofile_ix_master_video_inuse, format->videofile_ix_master_video_start_offset);
+       if(format->videofile_ix_master_audio_inuse_offset)
+               SCR_CaptureVideo_RIFF_MakeIxChunk("ix01", "01wb", format->videofile_ix_master_audio_inuse_offset, &format->videofile_ix_master_audio_inuse, format->videofile_ix_master_audio_start_offset);
+       // write the idx1 chunk that we've been building while saving the frames (for old style players)
+       if(final && format->videofile_firstchunkframes_offset)
+       // TODO replace index creating by OpenDML ix##/##ix/indx chunk so it works for more than one AVI part too
+       {
+               SCR_CaptureVideo_RIFF_Push("idx1", NULL, format->riffindexbuffer.cursize);
+               SCR_CaptureVideo_RIFF_WriteBytes(format->riffindexbuffer.data, format->riffindexbuffer.cursize);
+               SCR_CaptureVideo_RIFF_Pop();
+       }
+       format->riffindexbuffer.cursize = 0;
+       // pop the RIFF chunk itself
+       while (format->riffstacklevel > 0)
+               SCR_CaptureVideo_RIFF_Pop();
+       SCR_CaptureVideo_RIFF_Flush();
+       if(format->videofile_firstchunkframes_offset)
+       {
+               Con_DPrintf("Finishing first chunk (%d frames)\n", cls.capturevideo.frame);
+               if(FS_Seek(cls.capturevideo.videofile, format->videofile_firstchunkframes_offset, SEEK_SET) >= 0)
+               {
+                       SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.frame);
+                       SCR_CaptureVideo_RIFF_FlushNoIncrease();
+               }
+               FS_Seek(cls.capturevideo.videofile, 0, SEEK_END);
+               format->videofile_firstchunkframes_offset = 0;
+       }
+       else
+               Con_DPrintf("Finishing another chunk (%d frames)\n", cls.capturevideo.frame);
+}
+
+static void SCR_CaptureVideo_RIFF_OverflowCheck(int framesize)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       fs_offset_t cursize;
+       //fs_offset_t curfilesize;
+       if (format->riffstacklevel != 2)
+               Sys_Error("SCR_CaptureVideo_RIFF_OverflowCheck: chunk stack leakage!\n");
+       
+       if(!format->canseek)
+               return;
+
+       // check where we are in the file
+       SCR_CaptureVideo_RIFF_Flush();
+       cursize = SCR_CaptureVideo_RIFF_GetPosition() - format->riffstackstartoffset[0];
+       //curfilesize = SCR_CaptureVideo_RIFF_GetPosition();
+
+       // if this would overflow the windows limit of 1GB per RIFF chunk, we need
+       // to close the current RIFF chunk and open another for future frames
+       if (8 + cursize + framesize + format->riffindexbuffer.cursize + 8 + format->riffindexbuffer.cursize + 64 > 1<<30) // note that the Ix buffer takes less space... I just don't dare to / 2 here now... sorry, maybe later
+       {
+               SCR_CaptureVideo_RIFF_Finish(false);
+               // begin a new 1GB extended section of the AVI
+               SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX", -1);
+               SCR_CaptureVideo_RIFF_Push("LIST", "movi", -1);
+               format->videofile_ix_movistart = format->riffstackstartoffset[1];
+       }
+}
+
+// converts from BGRA32 to I420 colorspace (identical to YV12 except chroma plane order is reversed), this colorspace is handled by the Intel(r) 4:2:0 codec on Windows
+static void SCR_CaptureVideo_ConvertFrame_BGRA_to_I420_flip(int width, int height, unsigned char *instart, unsigned char *outstart)
+{
+       int x, y;
+       int blockr, blockg, blockb;
+       int outoffset = (width/2)*(height/2);
+       unsigned char *b, *out;
+       // process one line at a time, and CbCr every other line at 2 pixel intervals
+       for (y = 0;y < height;y++)
+       {
+               // 1x1 Y
+               for (b = instart + (height-1-y)*width*4, out = outstart + y*width, x = 0;x < width;x++, b += 4, out++)
+               {
+                       blockr = b[2];
+                       blockg = b[1];
+                       blockb = b[0];
+                       *out = cls.capturevideo.yuvnormalizetable[0][cls.capturevideo.rgbtoyuvscaletable[0][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[0][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[0][2][blockb]];
+               }
+               if ((y & 1) == 0)
+               {
+                       // 2x2 Cr and Cb planes
+                       int inpitch = width*4;
+                       for (b = instart + (height-2-y)*width*4, out = outstart + width*height + (y/2)*(width/2), x = 0;x < width/2;x++, b += 8, out++)
+                       {
+                               blockr = (b[2] + b[6] + b[inpitch+2] + b[inpitch+6]) >> 2;
+                               blockg = (b[1] + b[5] + b[inpitch+1] + b[inpitch+5]) >> 2;
+                               blockb = (b[0] + b[4] + b[inpitch+0] + b[inpitch+4]) >> 2;
+                               // Cr
+                               out[0        ] = cls.capturevideo.yuvnormalizetable[1][cls.capturevideo.rgbtoyuvscaletable[1][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[1][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[1][2][blockb] + 128];
+                               // Cb
+                               out[outoffset] = cls.capturevideo.yuvnormalizetable[2][cls.capturevideo.rgbtoyuvscaletable[2][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[2][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[2][2][blockb] + 128];
+                       }
+               }
+       }
+}
+
+static void SCR_CaptureVideo_Avi_VideoFrames(int num)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       int x = 0, width = cls.capturevideo.width, height = cls.capturevideo.height;
+       unsigned char *in, *out;
+       // FIXME: width/height must be multiple of 2, enforce this?
+       in = cls.capturevideo.outbuffer;
+       out = cls.capturevideo.outbuffer + width*height*4;
+       SCR_CaptureVideo_ConvertFrame_BGRA_to_I420_flip(width, height, in, out);
+       x = width*height+(width/2)*(height/2)*2;
+       while(num-- > 0)
+       {
+               if(format->canseek)
+               {
+                       SCR_CaptureVideo_RIFF_OverflowCheck(8 + x);
+                       SCR_CaptureVideo_RIFF_IndexEntry("00dc", x, 0x10); // AVIIF_KEYFRAME
+               }
+
+               if(!format->canseek)
+               {
+                       SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX", 12+8+x);
+                       SCR_CaptureVideo_RIFF_Push("LIST", "movi", 8+x);
+               }
+               SCR_CaptureVideo_RIFF_Push("00dc", NULL, x);
+               SCR_CaptureVideo_RIFF_WriteBytes(out, x);
+               SCR_CaptureVideo_RIFF_Pop();
+               if(!format->canseek)
+               {
+                       SCR_CaptureVideo_RIFF_Pop();
+                       SCR_CaptureVideo_RIFF_Pop();
+               }
+       }
+}
+
+void SCR_CaptureVideo_Avi_EndVideo(void)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+
+       if(format->canseek)
+       {
+               // close any open chunks
+               SCR_CaptureVideo_RIFF_Finish(true);
+
+               // go back and fix the video frames and audio samples fields
+               if(format->videofile_totalframes_offset1)
+                       if(FS_Seek(cls.capturevideo.videofile, format->videofile_totalframes_offset1, SEEK_SET) >= 0)
+                       {
+                               SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.frame);
+                               SCR_CaptureVideo_RIFF_FlushNoIncrease();
+                       }
+               if(format->videofile_totalframes_offset2)
+                       if(FS_Seek(cls.capturevideo.videofile, format->videofile_totalframes_offset2, SEEK_SET) >= 0)
+                       {
+                               SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.frame);
+                               SCR_CaptureVideo_RIFF_FlushNoIncrease();
+                       }
+               if (cls.capturevideo.soundrate)
+               {
+                       if(format->videofile_totalsampleframes_offset)
+                               if(FS_Seek(cls.capturevideo.videofile, format->videofile_totalsampleframes_offset, SEEK_SET) >= 0)
+                               {
+                                       SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundsampleframe);
+                                       SCR_CaptureVideo_RIFF_FlushNoIncrease();
+                               }
+               }
+       }
+
+       if (format->riffindexbuffer.data)
+       {
+               Mem_Free(format->riffindexbuffer.data);
+               format->riffindexbuffer.data = NULL;
+       }
+
+       FS_Close(cls.capturevideo.videofile);
+       cls.capturevideo.videofile = NULL;
+
+       Mem_Free(format);
+}
+
+void SCR_CaptureVideo_Avi_SoundFrame(const portable_sampleframe_t *paintbuffer, size_t length)
+{
+       LOAD_FORMATSPECIFIC_AVI();
+       int x;
+       unsigned char bufstereo16le[PAINTBUFFER_SIZE * 4];
+       unsigned char* out_ptr;
+       size_t i;
+
+       // write the sound buffer as little endian 16bit interleaved stereo
+       for(i = 0, out_ptr = bufstereo16le; i < length; i++, out_ptr += 4)
+       {
+               int n0, n1;
+
+               n0 = paintbuffer[i].sample[0];
+               n0 = bound(-32768, n0, 32767);
+               out_ptr[0] = (unsigned char)n0;
+               out_ptr[1] = (unsigned char)(n0 >> 8);
+
+               n1 = paintbuffer[i].sample[1];
+               n1 = bound(-32768, n1, 32767);
+               out_ptr[2] = (unsigned char)n1;
+               out_ptr[3] = (unsigned char)(n1 >> 8);
+       }
+
+       x = length*4;
+       if(format->canseek)
+       {
+               SCR_CaptureVideo_RIFF_OverflowCheck(8 + x);
+               SCR_CaptureVideo_RIFF_IndexEntry("01wb", x, 0x10); // AVIIF_KEYFRAME
+       }
+
+       if(!format->canseek)
+       {
+               SCR_CaptureVideo_RIFF_Push("RIFF", "AVIX", 12+8+x);
+               SCR_CaptureVideo_RIFF_Push("LIST", "movi", 8+x);
+       }
+       SCR_CaptureVideo_RIFF_Push("01wb", NULL, x);
+       SCR_CaptureVideo_RIFF_WriteBytes(bufstereo16le, x);
+       SCR_CaptureVideo_RIFF_Pop();
+       if(!format->canseek)
+       {
+               SCR_CaptureVideo_RIFF_Pop();
+               SCR_CaptureVideo_RIFF_Pop();
+       }
+}
+
+void SCR_CaptureVideo_Avi_BeginVideo(void)
+{
+       int width = cls.capturevideo.width;
+       int height = cls.capturevideo.height;
+       int n, d;
+       unsigned int i;
+       double aspect;
+
+       aspect = vid.width / (vid.height * vid_pixelheight.value);
+
+       cls.capturevideo.format = CAPTUREVIDEOFORMAT_AVI_I420;
+       cls.capturevideo.formatextension = "avi";
+       cls.capturevideo.videofile = FS_OpenRealFile(va("%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension), "wb", false);
+       cls.capturevideo.endvideo = SCR_CaptureVideo_Avi_EndVideo;
+       cls.capturevideo.videoframes = SCR_CaptureVideo_Avi_VideoFrames;
+       cls.capturevideo.soundframe = SCR_CaptureVideo_Avi_SoundFrame;
+       cls.capturevideo.formatspecific = Mem_Alloc(tempmempool, sizeof(capturevideostate_avi_formatspecific_t));
+       {
+               LOAD_FORMATSPECIFIC_AVI();
+               format->canseek = (FS_Seek(cls.capturevideo.videofile, 0, SEEK_SET) == 0);
+               SCR_CaptureVideo_RIFF_Start();
+               // enclosing RIFF chunk (there can be multiple of these in >1GB files, the later ones are "AVIX" instead of "AVI " and have no header/stream info)
+               SCR_CaptureVideo_RIFF_Push("RIFF", "AVI ", format->canseek ? -1 : 12+(8+56+12+(12+52+8+40+8+68)+(cls.capturevideo.soundrate?(12+12+52+8+18):0)+12+(8+4))+12+(8+(((int) strlen(engineversion) | 1) + 1))+12);
+               // AVI main header
+               SCR_CaptureVideo_RIFF_Push("LIST", "hdrl", format->canseek ? -1 : 8+56+12+(12+52+8+40+8+68)+(cls.capturevideo.soundrate?(12+12+52+8+18):0)+12+(8+4));
+               SCR_CaptureVideo_RIFF_Push("avih", NULL, 56);
+               SCR_CaptureVideo_RIFF_Write32((int)(1000000.0 / (cls.capturevideo.framerate / cls.capturevideo.framestep))); // microseconds per frame
+               SCR_CaptureVideo_RIFF_Write32(0); // max bytes per second
+               SCR_CaptureVideo_RIFF_Write32(0); // padding granularity
+               SCR_CaptureVideo_RIFF_Write32(0x910); // flags (AVIF_HASINDEX | AVIF_ISINTERLEAVED | AVIF_TRUSTCKTYPE)
+               format->videofile_firstchunkframes_offset = SCR_CaptureVideo_RIFF_GetPosition();
+               SCR_CaptureVideo_RIFF_Write32(0); // total frames
+               SCR_CaptureVideo_RIFF_Write32(0); // initial frames
+               if (cls.capturevideo.soundrate)
+                       SCR_CaptureVideo_RIFF_Write32(2); // number of streams
+               else
+                       SCR_CaptureVideo_RIFF_Write32(1); // number of streams
+               SCR_CaptureVideo_RIFF_Write32(0); // suggested buffer size
+               SCR_CaptureVideo_RIFF_Write32(width); // width
+               SCR_CaptureVideo_RIFF_Write32(height); // height
+               SCR_CaptureVideo_RIFF_Write32(0); // reserved[0]
+               SCR_CaptureVideo_RIFF_Write32(0); // reserved[1]
+               SCR_CaptureVideo_RIFF_Write32(0); // reserved[2]
+               SCR_CaptureVideo_RIFF_Write32(0); // reserved[3]
+               SCR_CaptureVideo_RIFF_Pop();
+               // video stream info
+               SCR_CaptureVideo_RIFF_Push("LIST", "strl", format->canseek ? -1 : 12+52+8+40+8+68);
+               SCR_CaptureVideo_RIFF_Push("strh", "vids", 52);
+               SCR_CaptureVideo_RIFF_WriteFourCC("I420"); // stream fourcc (I420 colorspace, uncompressed)
+               SCR_CaptureVideo_RIFF_Write32(0); // flags
+               SCR_CaptureVideo_RIFF_Write16(0); // priority
+               SCR_CaptureVideo_RIFF_Write16(0); // language
+               SCR_CaptureVideo_RIFF_Write32(0); // initial frames
+               // find an ideal divisor for the framerate
+               FindFraction(cls.capturevideo.framerate / cls.capturevideo.framestep, &n, &d, 1000);
+               SCR_CaptureVideo_RIFF_Write32(d); // samples/second divisor
+               SCR_CaptureVideo_RIFF_Write32(n); // samples/second multiplied by divisor
+               SCR_CaptureVideo_RIFF_Write32(0); // start
+               format->videofile_totalframes_offset1 = SCR_CaptureVideo_RIFF_GetPosition();
+               SCR_CaptureVideo_RIFF_Write32(0xFFFFFFFF); // length
+               SCR_CaptureVideo_RIFF_Write32(width*height+(width/2)*(height/2)*2); // suggested buffer size
+               SCR_CaptureVideo_RIFF_Write32(0); // quality
+               SCR_CaptureVideo_RIFF_Write32(0); // sample size
+               SCR_CaptureVideo_RIFF_Write16(0); // frame left
+               SCR_CaptureVideo_RIFF_Write16(0); // frame top
+               SCR_CaptureVideo_RIFF_Write16(width); // frame right
+               SCR_CaptureVideo_RIFF_Write16(height); // frame bottom
+               SCR_CaptureVideo_RIFF_Pop();
+               // video stream format
+               SCR_CaptureVideo_RIFF_Push("strf", NULL, 40);
+               SCR_CaptureVideo_RIFF_Write32(40); // BITMAPINFO struct size
+               SCR_CaptureVideo_RIFF_Write32(width); // width
+               SCR_CaptureVideo_RIFF_Write32(height); // height
+               SCR_CaptureVideo_RIFF_Write16(3); // planes
+               SCR_CaptureVideo_RIFF_Write16(12); // bitcount
+               SCR_CaptureVideo_RIFF_WriteFourCC("I420"); // compression
+               SCR_CaptureVideo_RIFF_Write32(width*height+(width/2)*(height/2)*2); // size of image
+               SCR_CaptureVideo_RIFF_Write32(0); // x pixels per meter
+               SCR_CaptureVideo_RIFF_Write32(0); // y pixels per meter
+               SCR_CaptureVideo_RIFF_Write32(0); // color used
+               SCR_CaptureVideo_RIFF_Write32(0); // color important
+               SCR_CaptureVideo_RIFF_Pop();
+               // master index
+               if(format->canseek)
+               {
+                       SCR_CaptureVideo_RIFF_Push("indx", NULL, -1);
+                       SCR_CaptureVideo_RIFF_Write16(4); // wLongsPerEntry
+                       SCR_CaptureVideo_RIFF_Write16(0); // bIndexSubType=0, bIndexType=0
+                       format->videofile_ix_master_video_inuse_offset = SCR_CaptureVideo_RIFF_GetPosition();
+                       SCR_CaptureVideo_RIFF_Write32(0); // nEntriesInUse
+                       SCR_CaptureVideo_RIFF_WriteFourCC("00dc"); // dwChunkId
+                       SCR_CaptureVideo_RIFF_Write32(0); // dwReserved1
+                       SCR_CaptureVideo_RIFF_Write32(0); // dwReserved2
+                       SCR_CaptureVideo_RIFF_Write32(0); // dwReserved3
+                       format->videofile_ix_master_video_start_offset = SCR_CaptureVideo_RIFF_GetPosition();
+                       for(i = 0; i < AVI_MASTER_INDEX_SIZE * 4; ++i)
+                               SCR_CaptureVideo_RIFF_Write32(0); // fill up later
+                       SCR_CaptureVideo_RIFF_Pop();
+               }
+               // extended format (aspect!)
+               SCR_CaptureVideo_RIFF_Push("vprp", NULL, 68);
+               SCR_CaptureVideo_RIFF_Write32(0); // VideoFormatToken
+               SCR_CaptureVideo_RIFF_Write32(0); // VideoStandard
+               SCR_CaptureVideo_RIFF_Write32((int)(cls.capturevideo.framerate / cls.capturevideo.framestep)); // dwVerticalRefreshRate (bogus)
+               SCR_CaptureVideo_RIFF_Write32(width); // dwHTotalInT
+               SCR_CaptureVideo_RIFF_Write32(height); // dwVTotalInLines
+               FindFraction(aspect, &n, &d, 1000);
+               SCR_CaptureVideo_RIFF_Write32((n << 16) | d); // dwFrameAspectRatio // TODO a word
+               SCR_CaptureVideo_RIFF_Write32(width); // dwFrameWidthInPixels
+               SCR_CaptureVideo_RIFF_Write32(height); // dwFrameHeightInLines
+               SCR_CaptureVideo_RIFF_Write32(1); // nFieldPerFrame
+               SCR_CaptureVideo_RIFF_Write32(width); // CompressedBMWidth
+               SCR_CaptureVideo_RIFF_Write32(height); // CompressedBMHeight
+               SCR_CaptureVideo_RIFF_Write32(width); // ValidBMHeight
+               SCR_CaptureVideo_RIFF_Write32(height); // ValidBMWidth
+               SCR_CaptureVideo_RIFF_Write32(0); // ValidBMXOffset
+               SCR_CaptureVideo_RIFF_Write32(0); // ValidBMYOffset
+               SCR_CaptureVideo_RIFF_Write32(0); // ValidBMXOffsetInT
+               SCR_CaptureVideo_RIFF_Write32(0); // ValidBMYValidStartLine
+               SCR_CaptureVideo_RIFF_Pop();
+               SCR_CaptureVideo_RIFF_Pop();
+               if (cls.capturevideo.soundrate)
+               {
+                       // audio stream info
+                       SCR_CaptureVideo_RIFF_Push("LIST", "strl", format->canseek ? -1 : 12+52+8+18);
+                       SCR_CaptureVideo_RIFF_Push("strh", "auds", 52);
+                       SCR_CaptureVideo_RIFF_Write32(1); // stream fourcc (PCM audio, uncompressed)
+                       SCR_CaptureVideo_RIFF_Write32(0); // flags
+                       SCR_CaptureVideo_RIFF_Write16(0); // priority
+                       SCR_CaptureVideo_RIFF_Write16(0); // language
+                       SCR_CaptureVideo_RIFF_Write32(0); // initial frames
+                       SCR_CaptureVideo_RIFF_Write32(1); // samples/second divisor
+                       SCR_CaptureVideo_RIFF_Write32((int)(cls.capturevideo.soundrate)); // samples/second multiplied by divisor
+                       SCR_CaptureVideo_RIFF_Write32(0); // start
+                       format->videofile_totalsampleframes_offset = SCR_CaptureVideo_RIFF_GetPosition();
+                       SCR_CaptureVideo_RIFF_Write32(0xFFFFFFFF); // length
+                       SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundrate * 2); // suggested buffer size (this is a half second)
+                       SCR_CaptureVideo_RIFF_Write32(0); // quality
+                       SCR_CaptureVideo_RIFF_Write32(4); // sample size
+                       SCR_CaptureVideo_RIFF_Write16(0); // frame left
+                       SCR_CaptureVideo_RIFF_Write16(0); // frame top
+                       SCR_CaptureVideo_RIFF_Write16(0); // frame right
+                       SCR_CaptureVideo_RIFF_Write16(0); // frame bottom
+                       SCR_CaptureVideo_RIFF_Pop();
+                       // audio stream format
+                       SCR_CaptureVideo_RIFF_Push("strf", NULL, 18);
+                       SCR_CaptureVideo_RIFF_Write16(1); // format (uncompressed PCM?)
+                       SCR_CaptureVideo_RIFF_Write16(2); // channels (stereo)
+                       SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundrate); // sampleframes per second
+                       SCR_CaptureVideo_RIFF_Write32(cls.capturevideo.soundrate * 4); // average bytes per second
+                       SCR_CaptureVideo_RIFF_Write16(4); // block align
+                       SCR_CaptureVideo_RIFF_Write16(16); // bits per sample
+                       SCR_CaptureVideo_RIFF_Write16(0); // size
+                       SCR_CaptureVideo_RIFF_Pop();
+                       // master index
+                       if(format->canseek)
+                       {
+                               SCR_CaptureVideo_RIFF_Push("indx", NULL, -1);
+                               SCR_CaptureVideo_RIFF_Write16(4); // wLongsPerEntry
+                               SCR_CaptureVideo_RIFF_Write16(0); // bIndexSubType=0, bIndexType=0
+                               format->videofile_ix_master_audio_inuse_offset = SCR_CaptureVideo_RIFF_GetPosition();
+                               SCR_CaptureVideo_RIFF_Write32(0); // nEntriesInUse
+                               SCR_CaptureVideo_RIFF_WriteFourCC("01wb"); // dwChunkId
+                               SCR_CaptureVideo_RIFF_Write32(0); // dwReserved1
+                               SCR_CaptureVideo_RIFF_Write32(0); // dwReserved2
+                               SCR_CaptureVideo_RIFF_Write32(0); // dwReserved3
+                               format->videofile_ix_master_audio_start_offset = SCR_CaptureVideo_RIFF_GetPosition();
+                               for(i = 0; i < AVI_MASTER_INDEX_SIZE * 4; ++i)
+                                       SCR_CaptureVideo_RIFF_Write32(0); // fill up later
+                               SCR_CaptureVideo_RIFF_Pop();
+                       }
+                       SCR_CaptureVideo_RIFF_Pop();
+               }
+
+               format->videofile_ix_master_audio_inuse = format->videofile_ix_master_video_inuse = 0;
+
+               // extended header (for total #frames)
+               SCR_CaptureVideo_RIFF_Push("LIST", "odml", 8+4);
+               SCR_CaptureVideo_RIFF_Push("dmlh", NULL, 4);
+               format->videofile_totalframes_offset2 = SCR_CaptureVideo_RIFF_GetPosition();
+               SCR_CaptureVideo_RIFF_Write32(0xFFFFFFFF);
+               SCR_CaptureVideo_RIFF_Pop();
+               SCR_CaptureVideo_RIFF_Pop();
+
+               // close the AVI header list
+               SCR_CaptureVideo_RIFF_Pop();
+               // software that produced this AVI video file
+               SCR_CaptureVideo_RIFF_Push("LIST", "INFO", 8+((strlen(engineversion) | 1) + 1));
+               SCR_CaptureVideo_RIFF_Push("ISFT", NULL, strlen(engineversion) + 1);
+               SCR_CaptureVideo_RIFF_WriteTerminatedString(engineversion);
+               SCR_CaptureVideo_RIFF_Pop();
+               // enable this junk filler if you like the LIST movi to always begin at 4KB in the file (why?)
+#if 0
+               SCR_CaptureVideo_RIFF_Push("JUNK", NULL);
+               x = 4096 - SCR_CaptureVideo_RIFF_GetPosition();
+               while (x > 0)
+               {
+                       const char *junkfiller = "[ DarkPlaces junk data ]";
+                       int i = min(x, (int)strlen(junkfiller));
+                       SCR_CaptureVideo_RIFF_WriteBytes((const unsigned char *)junkfiller, i);
+                       x -= i;
+               }
+               SCR_CaptureVideo_RIFF_Pop();
+#endif
+               SCR_CaptureVideo_RIFF_Pop();
+               // begin the actual video section now
+               SCR_CaptureVideo_RIFF_Push("LIST", "movi", format->canseek ? -1 : 0);
+               format->videofile_ix_movistart = format->riffstackstartoffset[1];
+               // we're done with the headers now...
+               SCR_CaptureVideo_RIFF_Flush();
+               if (format->riffstacklevel != 2)
+                       Sys_Error("SCR_CaptureVideo_BeginVideo: broken AVI writing code (stack level is %i (should be 2) at end of headers)\n", format->riffstacklevel);
+
+               if(!format->canseek)
+               {
+                       // close the movi immediately
+                       SCR_CaptureVideo_RIFF_Pop();
+                       // close the AVI immediately (we'll put all frames into AVIX)
+                       SCR_CaptureVideo_RIFF_Pop();
+               }
+       }
+}
diff --git a/misc/source/darkplaces-src/cap_avi.h b/misc/source/darkplaces-src/cap_avi.h
new file mode 100644 (file)
index 0000000..2cf15d6
--- /dev/null
@@ -0,0 +1 @@
+void SCR_CaptureVideo_Avi_BeginVideo(void);
diff --git a/misc/source/darkplaces-src/cap_ogg.c b/misc/source/darkplaces-src/cap_ogg.c
new file mode 100644 (file)
index 0000000..eef3f90
--- /dev/null
@@ -0,0 +1,1120 @@
+#ifndef _MSC_VER
+#include <stdint.h>
+#endif
+#include <sys/types.h>
+
+#include "quakedef.h"
+#include "client.h"
+#include "cap_ogg.h"
+
+// video capture cvars
+static cvar_t cl_capturevideo_ogg_theora_vp3compat = {CVAR_SAVE, "cl_capturevideo_ogg_theora_vp3compat", "1", "make VP3 compatible theora streams"};
+static cvar_t cl_capturevideo_ogg_theora_quality = {CVAR_SAVE, "cl_capturevideo_ogg_theora_quality", "48", "video quality factor (0 to 63), or -1 to use bitrate only; higher is better; setting both to -1 achieves unlimited quality"};
+static cvar_t cl_capturevideo_ogg_theora_bitrate = {CVAR_SAVE, "cl_capturevideo_ogg_theora_bitrate", "-1", "video bitrate (45 to 2000 kbps), or -1 to use quality only; higher is better; setting both to -1 achieves unlimited quality"};
+static cvar_t cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier = {CVAR_SAVE, "cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier", "1.5", "how much more bit rate to use for keyframes, specified as a factor of at least 1"};
+static cvar_t cl_capturevideo_ogg_theora_keyframe_maxinterval = {CVAR_SAVE, "cl_capturevideo_ogg_theora_keyframe_maxinterval", "64", "maximum keyframe interval (1 to 1000)"};
+static cvar_t cl_capturevideo_ogg_theora_keyframe_mininterval = {CVAR_SAVE, "cl_capturevideo_ogg_theora_keyframe_mininterval", "8", "minimum keyframe interval (1 to 1000)"};
+static cvar_t cl_capturevideo_ogg_theora_keyframe_auto_threshold = {CVAR_SAVE, "cl_capturevideo_ogg_theora_keyframe_auto_threshold", "80", "threshold for key frame decision (0 to 100)"};
+static cvar_t cl_capturevideo_ogg_theora_noise_sensitivity = {CVAR_SAVE, "cl_capturevideo_ogg_theora_noise_sensitivity", "1", "video noise sensitivity (0 to 6); lower is better"};
+static cvar_t cl_capturevideo_ogg_theora_sharpness = {CVAR_SAVE, "cl_capturevideo_ogg_theora_sharpness", "0", "sharpness (0 to 2); lower is sharper"};
+static cvar_t cl_capturevideo_ogg_vorbis_quality = {CVAR_SAVE, "cl_capturevideo_ogg_vorbis_quality", "3", "audio quality (-1 to 10); higher is better"};
+
+// ogg.h stuff
+#ifdef _MSC_VER
+typedef __int16 ogg_int16_t;
+typedef unsigned __int16 ogg_uint16_t;
+typedef __int32 ogg_int32_t;
+typedef unsigned __int32 ogg_uint32_t;
+typedef __int64 ogg_int64_t;
+#else
+typedef int16_t ogg_int16_t;
+typedef uint16_t ogg_uint16_t;
+typedef int32_t ogg_int32_t;
+typedef uint32_t ogg_uint32_t;
+typedef int64_t ogg_int64_t;
+#endif
+
+typedef struct {
+  long endbyte;
+  int  endbit;
+
+  unsigned char *buffer;
+  unsigned char *ptr;
+  long storage;
+} oggpack_buffer;
+
+/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
+
+typedef struct {
+  unsigned char *header;
+  long header_len;
+  unsigned char *body;
+  long body_len;
+} ogg_page;
+
+/* ogg_stream_state contains the current encode/decode state of a logical
+   Ogg bitstream **********************************************************/
+
+typedef struct {
+  unsigned char   *body_data;    /* bytes from packet bodies */
+  long    body_storage;          /* storage elements allocated */
+  long    body_fill;             /* elements stored; fill mark */
+  long    body_returned;         /* elements of fill returned */
+
+
+  int     *lacing_vals;      /* The values that will go to the segment table */
+  ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
+                               this way, but it is simple coupled to the
+                               lacing fifo */
+  long    lacing_storage;
+  long    lacing_fill;
+  long    lacing_packet;
+  long    lacing_returned;
+
+  unsigned char    header[282];      /* working space for header encode */
+  int              header_fill;
+
+  int     e_o_s;          /* set when we have buffered the last packet in the
+                             logical bitstream */
+  int     b_o_s;          /* set after we've written the initial page
+                             of a logical bitstream */
+  long    serialno;
+  long    pageno;
+  ogg_int64_t  packetno;      /* sequence number for decode; the framing
+                             knows where there's a hole in the data,
+                             but we need coupling so that the codec
+                             (which is in a seperate abstraction
+                             layer) also knows about the gap */
+  ogg_int64_t   granulepos;
+
+} ogg_stream_state;
+
+/* ogg_packet is used to encapsulate the data and metadata belonging
+   to a single raw Ogg/Vorbis packet *************************************/
+
+typedef struct {
+  unsigned char *packet;
+  long  bytes;
+  long  b_o_s;
+  long  e_o_s;
+
+  ogg_int64_t  granulepos;
+  
+  ogg_int64_t  packetno;     /* sequence number for decode; the framing
+                               knows where there's a hole in the data,
+                               but we need coupling so that the codec
+                               (which is in a seperate abstraction
+                               layer) also knows about the gap */
+} ogg_packet;
+
+typedef struct {
+  unsigned char *data;
+  int storage;
+  int fill;
+  int returned;
+
+  int unsynced;
+  int headerbytes;
+  int bodybytes;
+} ogg_sync_state;
+
+/* Ogg BITSTREAM PRIMITIVES: encoding **************************/
+
+static int      (*qogg_stream_packetin) (ogg_stream_state *os, ogg_packet *op);
+static int      (*qogg_stream_pageout) (ogg_stream_state *os, ogg_page *og);
+static int      (*qogg_stream_flush) (ogg_stream_state *os, ogg_page *og);
+
+/* Ogg BITSTREAM PRIMITIVES: general ***************************/
+
+static int      (*qogg_stream_init) (ogg_stream_state *os,int serialno);
+static int      (*qogg_stream_clear) (ogg_stream_state *os);
+static ogg_int64_t  (*qogg_page_granulepos) (ogg_page *og);
+
+// end of ogg.h stuff
+
+// vorbis/codec.h stuff
+typedef struct vorbis_info{
+  int version;
+  int channels;
+  long rate;
+
+  /* The below bitrate declarations are *hints*.
+     Combinations of the three values carry the following implications:
+
+     all three set to the same value:
+       implies a fixed rate bitstream
+     only nominal set:
+       implies a VBR stream that averages the nominal bitrate.  No hard
+       upper/lower limit
+     upper and or lower set:
+       implies a VBR bitstream that obeys the bitrate limits. nominal
+       may also be set to give a nominal rate.
+     none set:
+       the coder does not care to speculate.
+  */
+
+  long bitrate_upper;
+  long bitrate_nominal;
+  long bitrate_lower;
+  long bitrate_window;
+
+  void *codec_setup;
+} vorbis_info;
+
+/* vorbis_dsp_state buffers the current vorbis audio
+   analysis/synthesis state.  The DSP state belongs to a specific
+   logical bitstream ****************************************************/
+typedef struct vorbis_dsp_state{
+  int analysisp;
+  vorbis_info *vi;
+
+  float **pcm;
+  float **pcmret;
+  int      pcm_storage;
+  int      pcm_current;
+  int      pcm_returned;
+
+  int  preextrapolate;
+  int  eofflag;
+
+  long lW;
+  long W;
+  long nW;
+  long centerW;
+
+  ogg_int64_t granulepos;
+  ogg_int64_t sequence;
+
+  ogg_int64_t glue_bits;
+  ogg_int64_t time_bits;
+  ogg_int64_t floor_bits;
+  ogg_int64_t res_bits;
+
+  void       *backend_state;
+} vorbis_dsp_state;
+
+typedef struct vorbis_block{
+  /* necessary stream state for linking to the framing abstraction */
+  float  **pcm;       /* this is a pointer into local storage */
+  oggpack_buffer opb;
+
+  long  lW;
+  long  W;
+  long  nW;
+  int   pcmend;
+  int   mode;
+
+  int         eofflag;
+  ogg_int64_t granulepos;
+  ogg_int64_t sequence;
+  vorbis_dsp_state *vd; /* For read-only access of configuration */
+
+  /* local storage to avoid remallocing; it's up to the mapping to
+     structure it */
+  void               *localstore;
+  long                localtop;
+  long                localalloc;
+  long                totaluse;
+  struct alloc_chain *reap;
+
+  /* bitmetrics for the frame */
+  long glue_bits;
+  long time_bits;
+  long floor_bits;
+  long res_bits;
+
+  void *internal;
+
+} vorbis_block;
+
+/* vorbis_block is a single block of data to be processed as part of
+the analysis/synthesis stream; it belongs to a specific logical
+bitstream, but is independant from other vorbis_blocks belonging to
+that logical bitstream. *************************************************/
+
+struct alloc_chain{
+  void *ptr;
+  struct alloc_chain *next;
+};
+
+/* vorbis_info contains all the setup information specific to the
+   specific compression/decompression mode in progress (eg,
+   psychoacoustic settings, channel setup, options, codebook
+   etc). vorbis_info and substructures are in backends.h.
+*********************************************************************/
+
+/* the comments are not part of vorbis_info so that vorbis_info can be
+   static storage */
+typedef struct vorbis_comment{
+  /* unlimited user comment fields.  libvorbis writes 'libvorbis'
+     whatever vendor is set to in encode */
+  char **user_comments;
+  int   *comment_lengths;
+  int    comments;
+  char  *vendor;
+
+} vorbis_comment;
+
+
+/* libvorbis encodes in two abstraction layers; first we perform DSP
+   and produce a packet (see docs/analysis.txt).  The packet is then
+   coded into a framed OggSquish bitstream by the second layer (see
+   docs/framing.txt).  Decode is the reverse process; we sync/frame
+   the bitstream and extract individual packets, then decode the
+   packet back into PCM audio.
+
+   The extra framing/packetizing is used in streaming formats, such as
+   files.  Over the net (such as with UDP), the framing and
+   packetization aren't necessary as they're provided by the transport
+   and the streaming layer is not used */
+
+/* Vorbis PRIMITIVES: general ***************************************/
+
+static void     (*qvorbis_info_init) (vorbis_info *vi);
+static void     (*qvorbis_info_clear) (vorbis_info *vi);
+static void     (*qvorbis_comment_init) (vorbis_comment *vc);
+static void     (*qvorbis_comment_clear) (vorbis_comment *vc);
+
+static int      (*qvorbis_block_init) (vorbis_dsp_state *v, vorbis_block *vb);
+static int      (*qvorbis_block_clear) (vorbis_block *vb);
+static void     (*qvorbis_dsp_clear) (vorbis_dsp_state *v);
+static double   (*qvorbis_granule_time) (vorbis_dsp_state *v,
+                                   ogg_int64_t granulepos);
+
+/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
+
+static int      (*qvorbis_analysis_init) (vorbis_dsp_state *v,vorbis_info *vi);
+static int      (*qvorbis_commentheader_out) (vorbis_comment *vc, ogg_packet *op);
+static int      (*qvorbis_analysis_headerout) (vorbis_dsp_state *v,
+                                         vorbis_comment *vc,
+                                         ogg_packet *op,
+                                         ogg_packet *op_comm,
+                                         ogg_packet *op_code);
+static float ** (*qvorbis_analysis_buffer) (vorbis_dsp_state *v,int vals);
+static int      (*qvorbis_analysis_wrote) (vorbis_dsp_state *v,int vals);
+static int      (*qvorbis_analysis_blockout) (vorbis_dsp_state *v,vorbis_block *vb);
+static int      (*qvorbis_analysis) (vorbis_block *vb,ogg_packet *op);
+
+static int      (*qvorbis_bitrate_addblock) (vorbis_block *vb);
+static int      (*qvorbis_bitrate_flushpacket) (vorbis_dsp_state *vd,
+                                          ogg_packet *op);
+
+// end of vorbis/codec.h stuff
+
+// vorbisenc.h stuff
+static int (*qvorbis_encode_init_vbr) (vorbis_info *vi,
+                                 long channels,
+                                 long rate,
+
+                                 float base_quality /* quality level from 0. (lo) to 1. (hi) */
+                                 );
+// end of vorbisenc.h stuff
+
+// theora.h stuff
+
+#define TH_ENCCTL_SET_VP3_COMPATIBLE (10)
+
+typedef struct {
+    int   y_width;      /**< Width of the Y' luminance plane */
+    int   y_height;     /**< Height of the luminance plane */
+    int   y_stride;     /**< Offset in bytes between successive rows */
+
+    int   uv_width;     /**< Width of the Cb and Cr chroma planes */
+    int   uv_height;    /**< Height of the chroma planes */
+    int   uv_stride;    /**< Offset between successive chroma rows */
+    unsigned char *y;   /**< Pointer to start of luminance data */
+    unsigned char *u;   /**< Pointer to start of Cb data */
+    unsigned char *v;   /**< Pointer to start of Cr data */
+
+} yuv_buffer;
+
+/**
+ * A Colorspace.
+ */
+typedef enum {
+  OC_CS_UNSPECIFIED,    /**< The colorspace is unknown or unspecified */
+  OC_CS_ITU_REC_470M,   /**< This is the best option for 'NTSC' content */
+  OC_CS_ITU_REC_470BG,  /**< This is the best option for 'PAL' content */
+  OC_CS_NSPACES         /**< This marks the end of the defined colorspaces */
+} theora_colorspace;
+
+/**
+ * A Chroma subsampling
+ *
+ * These enumerate the available chroma subsampling options supported
+ * by the theora format. See Section 4.4 of the specification for
+ * exact definitions.
+ */
+typedef enum {
+  OC_PF_420,    /**< Chroma subsampling by 2 in each direction (4:2:0) */
+  OC_PF_RSVD,   /**< Reserved value */
+  OC_PF_422,    /**< Horizonatal chroma subsampling by 2 (4:2:2) */
+  OC_PF_444     /**< No chroma subsampling at all (4:4:4) */
+} theora_pixelformat;
+/**
+ * Theora bitstream info.
+ * Contains the basic playback parameters for a stream,
+ * corresponding to the initial 'info' header packet.
+ * 
+ * Encoded theora frames must be a multiple of 16 in width and height.
+ * To handle other frame sizes, a crop rectangle is specified in
+ * frame_height and frame_width, offset_x and * offset_y. The offset
+ * and size should still be a multiple of 2 to avoid chroma sampling
+ * shifts. Offset values in this structure are measured from the
+ * upper left of the image.
+ *
+ * Frame rate, in frames per second, is stored as a rational
+ * fraction. Aspect ratio is also stored as a rational fraction, and
+ * refers to the aspect ratio of the frame pixels, not of the
+ * overall frame itself.
+ * 
+ * See <a href="http://svn.xiph.org/trunk/theora/examples/encoder_example.c">
+ * examples/encoder_example.c</a> for usage examples of the
+ * other paramters and good default settings for the encoder parameters.
+ */
+typedef struct {
+  ogg_uint32_t  width;      /**< encoded frame width  */
+  ogg_uint32_t  height;     /**< encoded frame height */
+  ogg_uint32_t  frame_width;    /**< display frame width  */
+  ogg_uint32_t  frame_height;   /**< display frame height */
+  ogg_uint32_t  offset_x;   /**< horizontal offset of the displayed frame */
+  ogg_uint32_t  offset_y;   /**< vertical offset of the displayed frame */
+  ogg_uint32_t  fps_numerator;      /**< frame rate numerator **/
+  ogg_uint32_t  fps_denominator;    /**< frame rate denominator **/
+  ogg_uint32_t  aspect_numerator;   /**< pixel aspect ratio numerator */
+  ogg_uint32_t  aspect_denominator; /**< pixel aspect ratio denominator */
+  theora_colorspace colorspace;     /**< colorspace */
+  int           target_bitrate;     /**< nominal bitrate in bits per second */
+  int           quality;  /**< Nominal quality setting, 0-63 */
+  int           quick_p;  /**< Quick encode/decode */
+
+  /* decode only */
+  unsigned char version_major;
+  unsigned char version_minor;
+  unsigned char version_subminor;
+
+  void *codec_setup;
+
+  /* encode only */
+  int           dropframes_p;
+  int           keyframe_auto_p;
+  ogg_uint32_t  keyframe_frequency;
+  ogg_uint32_t  keyframe_frequency_force;  /* also used for decode init to
+                                              get granpos shift correct */
+  ogg_uint32_t  keyframe_data_target_bitrate;
+  ogg_int32_t   keyframe_auto_threshold;
+  ogg_uint32_t  keyframe_mindistance;
+  ogg_int32_t   noise_sensitivity;
+  ogg_int32_t   sharpness;
+
+  theora_pixelformat pixelformat;   /**< chroma subsampling mode to expect */
+
+} theora_info;
+
+/** Codec internal state and context.
+ */
+typedef struct{
+  theora_info *i;
+  ogg_int64_t granulepos;
+
+  void *internal_encode;
+  void *internal_decode;
+
+} theora_state;
+
+/** 
+ * Comment header metadata.
+ *
+ * This structure holds the in-stream metadata corresponding to
+ * the 'comment' header packet.
+ *
+ * Meta data is stored as a series of (tag, value) pairs, in
+ * length-encoded string vectors. The first occurence of the 
+ * '=' character delimits the tag and value. A particular tag
+ * may occur more than once. The character set encoding for
+ * the strings is always UTF-8, but the tag names are limited
+ * to case-insensitive ASCII. See the spec for details.
+ *
+ * In filling in this structure, qtheora_decode_header() will
+ * null-terminate the user_comment strings for safety. However,
+ * the bitstream format itself treats them as 8-bit clean,
+ * and so the length array should be treated as authoritative
+ * for their length.
+ */
+typedef struct theora_comment{
+  char **user_comments;         /**< An array of comment string vectors */
+  int   *comment_lengths;       /**< An array of corresponding string vector lengths in bytes */
+  int    comments;              /**< The total number of comment string vectors */
+  char  *vendor;                /**< The vendor string identifying the encoder, null terminated */
+
+} theora_comment;
+static int (*qtheora_encode_init) (theora_state *th, theora_info *ti);
+static int (*qtheora_encode_YUVin) (theora_state *t, yuv_buffer *yuv);
+static int (*qtheora_encode_packetout) ( theora_state *t, int last_p,
+                                    ogg_packet *op);
+static int (*qtheora_encode_header) (theora_state *t, ogg_packet *op);
+static int (*qtheora_encode_comment) (theora_comment *tc, ogg_packet *op);
+static int (*qtheora_encode_tables) (theora_state *t, ogg_packet *op);
+static void (*qtheora_info_init) (theora_info *c);
+static void (*qtheora_info_clear) (theora_info *c);
+static void (*qtheora_clear) (theora_state *t);
+static void (*qtheora_comment_init) (theora_comment *tc);
+static void  (*qtheora_comment_clear) (theora_comment *tc);
+static double (*qtheora_granule_time) (theora_state *th,ogg_int64_t granulepos);
+static int (*qtheora_control) (theora_state *th,int req,void *buf,size_t buf_sz);
+// end of theora.h stuff
+
+static dllfunction_t oggfuncs[] =
+{
+       {"ogg_stream_packetin", (void **) &qogg_stream_packetin},
+       {"ogg_stream_pageout", (void **) &qogg_stream_pageout},
+       {"ogg_stream_flush", (void **) &qogg_stream_flush},
+       {"ogg_stream_init", (void **) &qogg_stream_init},
+       {"ogg_stream_clear", (void **) &qogg_stream_clear},
+       {"ogg_page_granulepos", (void **) &qogg_page_granulepos},
+       {NULL, NULL}
+};
+
+static dllfunction_t vorbisencfuncs[] =
+{
+       {"vorbis_encode_init_vbr", (void **) &qvorbis_encode_init_vbr},
+       {NULL, NULL}
+};
+
+static dllfunction_t vorbisfuncs[] =
+{
+       {"vorbis_info_init", (void **) &qvorbis_info_init},
+       {"vorbis_info_clear", (void **) &qvorbis_info_clear},
+       {"vorbis_comment_init", (void **) &qvorbis_comment_init},
+       {"vorbis_comment_clear", (void **) &qvorbis_comment_clear},
+       {"vorbis_block_init", (void **) &qvorbis_block_init},
+       {"vorbis_block_clear", (void **) &qvorbis_block_clear},
+       {"vorbis_dsp_clear", (void **) &qvorbis_dsp_clear},
+       {"vorbis_analysis_init", (void **) &qvorbis_analysis_init},
+       {"vorbis_commentheader_out", (void **) &qvorbis_commentheader_out},
+       {"vorbis_analysis_headerout", (void **) &qvorbis_analysis_headerout},
+       {"vorbis_analysis_buffer", (void **) &qvorbis_analysis_buffer},
+       {"vorbis_analysis_wrote", (void **) &qvorbis_analysis_wrote},
+       {"vorbis_analysis_blockout", (void **) &qvorbis_analysis_blockout},
+       {"vorbis_analysis", (void **) &qvorbis_analysis},
+       {"vorbis_bitrate_addblock", (void **) &qvorbis_bitrate_addblock},
+       {"vorbis_bitrate_flushpacket", (void **) &qvorbis_bitrate_flushpacket},
+       {"vorbis_granule_time", (void **) &qvorbis_granule_time},
+       {NULL, NULL}
+};
+
+static dllfunction_t theorafuncs[] =
+{
+       {"theora_info_init", (void **) &qtheora_info_init},
+       {"theora_info_clear", (void **) &qtheora_info_clear},
+       {"theora_comment_init", (void **) &qtheora_comment_init},
+       {"theora_comment_clear", (void **) &qtheora_comment_clear},
+       {"theora_encode_init", (void **) &qtheora_encode_init},
+       {"theora_encode_YUVin", (void **) &qtheora_encode_YUVin},
+       {"theora_encode_packetout", (void **) &qtheora_encode_packetout},
+       {"theora_encode_header", (void **) &qtheora_encode_header},
+       {"theora_encode_comment", (void **) &qtheora_encode_comment},
+       {"theora_encode_tables", (void **) &qtheora_encode_tables},
+       {"theora_clear", (void **) &qtheora_clear},
+       {"theora_granule_time", (void **) &qtheora_granule_time},
+       {"theora_control", (void **) &qtheora_control},
+       {NULL, NULL}
+};
+
+static dllhandle_t og_dll = NULL, vo_dll = NULL, ve_dll = NULL, th_dll = NULL;
+
+qboolean SCR_CaptureVideo_Ogg_OpenLibrary(void)
+{
+       const char* dllnames_og [] =
+       {
+#if defined(WIN32)
+               "libogg-0.dll",
+               "libogg.dll",
+               "ogg.dll",
+#elif defined(MACOSX)
+               "libogg.dylib",
+#else
+               "libogg.so.0",
+               "libogg.so",
+#endif
+               NULL
+       };
+       const char* dllnames_vo [] =
+       {
+#if defined(WIN32)
+               "libvorbis-0.dll",
+               "libvorbis.dll",
+               "vorbis.dll",
+#elif defined(MACOSX)
+               "libvorbis.dylib",
+#else
+               "libvorbis.so.0",
+               "libvorbis.so",
+#endif
+               NULL
+       };
+       const char* dllnames_ve [] =
+       {
+#if defined(WIN32)
+               "libvorbisenc-2.dll",
+               "libvorbisenc.dll",
+               "vorbisenc.dll",
+#elif defined(MACOSX)
+               "libvorbisenc.dylib",
+#else
+               "libvorbisenc.so.2",
+               "libvorbisenc.so",
+#endif
+               NULL
+       };
+       const char* dllnames_th [] =
+       {
+#if defined(WIN32)
+               "libtheora-0.dll",
+               "libtheora.dll",
+               "theora.dll",
+#elif defined(MACOSX)
+               "libtheora.dylib",
+#else
+               "libtheora.so.0",
+               "libtheora.so",
+#endif
+               NULL
+       };
+
+       return
+               Sys_LoadLibrary (dllnames_og, &og_dll, oggfuncs)
+               &&
+               Sys_LoadLibrary (dllnames_th, &th_dll, theorafuncs)
+               &&
+               Sys_LoadLibrary (dllnames_vo, &vo_dll, vorbisfuncs)
+               &&
+               Sys_LoadLibrary (dllnames_ve, &ve_dll, vorbisencfuncs);
+}
+
+void SCR_CaptureVideo_Ogg_Init(void)
+{
+       SCR_CaptureVideo_Ogg_OpenLibrary();
+
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_vp3compat);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_quality);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_bitrate);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_maxinterval);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_mininterval);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_auto_threshold);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_noise_sensitivity);
+       Cvar_RegisterVariable(&cl_capturevideo_ogg_vorbis_quality);
+}
+
+qboolean SCR_CaptureVideo_Ogg_Available(void)
+{
+       return og_dll && th_dll && vo_dll && ve_dll;
+}
+
+void SCR_CaptureVideo_Ogg_CloseDLL(void)
+{
+       Sys_UnloadLibrary (&ve_dll);
+       Sys_UnloadLibrary (&vo_dll);
+       Sys_UnloadLibrary (&th_dll);
+       Sys_UnloadLibrary (&og_dll);
+}
+
+// this struct should not be needed
+// however, libogg appears to pull the ogg_page's data element away from our
+// feet before we get to write the data due to interleaving
+// so this struct is used to keep the page data around until it actually gets
+// written
+typedef struct allocatedoggpage_s
+{
+       size_t len;
+       double time;
+       unsigned char data[65307];
+       // this number is from RFC 3533. In case libogg writes more, we'll have to increase this
+       // but we'll get a Host_Error in this case so we can track it down
+}
+allocatedoggpage_t;
+
+typedef struct capturevideostate_ogg_formatspecific_s
+{
+       ogg_stream_state to, vo;
+       int serial1, serial2;
+       theora_state ts;
+       vorbis_dsp_state vd;
+       vorbis_block vb;
+       vorbis_info vi;
+       yuv_buffer yuv[2];
+       int yuvi;
+       int lastnum;
+       int channels;
+
+       allocatedoggpage_t videopage, audiopage;
+}
+capturevideostate_ogg_formatspecific_t;
+#define LOAD_FORMATSPECIFIC_OGG() capturevideostate_ogg_formatspecific_t *format = (capturevideostate_ogg_formatspecific_t *) cls.capturevideo.formatspecific
+
+static void SCR_CaptureVideo_Ogg_Interleave(void)
+{
+       LOAD_FORMATSPECIFIC_OGG();
+       ogg_page pg;
+
+       if(!cls.capturevideo.soundrate)
+       {
+               while(qogg_stream_pageout(&format->to, &pg) > 0)
+               {
+                       FS_Write(cls.capturevideo.videofile, pg.header, pg.header_len);
+                       FS_Write(cls.capturevideo.videofile, pg.body, pg.body_len);
+               }
+               return;
+       }
+
+       for(;;)
+       {
+               // first: make sure we have a page of both types
+               if(!format->videopage.len)
+                       if(qogg_stream_pageout(&format->to, &pg) > 0)
+                       {
+                               format->videopage.len = pg.header_len + pg.body_len;
+                               format->videopage.time = qtheora_granule_time(&format->ts, qogg_page_granulepos(&pg));
+                               if(format->videopage.len > sizeof(format->videopage.data))
+                                       Host_Error("video page too long");
+                               memcpy(format->videopage.data, pg.header, pg.header_len);
+                               memcpy(format->videopage.data + pg.header_len, pg.body, pg.body_len);
+                       }
+               if(!format->audiopage.len)
+                       if(qogg_stream_pageout(&format->vo, &pg) > 0)
+                       {
+                               format->audiopage.len = pg.header_len + pg.body_len;
+                               format->audiopage.time = qvorbis_granule_time(&format->vd, qogg_page_granulepos(&pg));
+                               if(format->audiopage.len > sizeof(format->audiopage.data))
+                                       Host_Error("audio page too long");
+                               memcpy(format->audiopage.data, pg.header, pg.header_len);
+                               memcpy(format->audiopage.data + pg.header_len, pg.body, pg.body_len);
+                       }
+
+               if(format->videopage.len && format->audiopage.len)
+               {
+                       // output the page that ends first
+                       if(format->videopage.time < format->audiopage.time)
+                       {
+                               FS_Write(cls.capturevideo.videofile, format->videopage.data, format->videopage.len);
+                               format->videopage.len = 0;
+                       }
+                       else
+                       {
+                               FS_Write(cls.capturevideo.videofile, format->audiopage.data, format->audiopage.len);
+                               format->audiopage.len = 0;
+                       }
+               }
+               else
+                       break;
+       }
+}
+
+static void SCR_CaptureVideo_Ogg_FlushInterleaving(void)
+{
+       LOAD_FORMATSPECIFIC_OGG();
+
+       if(cls.capturevideo.soundrate)
+       if(format->audiopage.len)
+       {
+               FS_Write(cls.capturevideo.videofile, format->audiopage.data, format->audiopage.len);
+               format->audiopage.len = 0;
+       }
+
+       if(format->videopage.len)
+       {
+               FS_Write(cls.capturevideo.videofile, format->videopage.data, format->videopage.len);
+               format->videopage.len = 0;
+       }
+}
+
+static void SCR_CaptureVideo_Ogg_EndVideo(void)
+{
+       LOAD_FORMATSPECIFIC_OGG();
+       ogg_page pg;
+       ogg_packet pt;
+
+       if(format->yuvi >= 0)
+       {
+               // send the previous (and last) frame
+               while(format->lastnum-- > 0)
+               {
+                       qtheora_encode_YUVin(&format->ts, &format->yuv[format->yuvi]);
+
+                       while(qtheora_encode_packetout(&format->ts, !format->lastnum, &pt))
+                               qogg_stream_packetin(&format->to, &pt);
+
+                       SCR_CaptureVideo_Ogg_Interleave();
+               }
+       }
+
+       if(cls.capturevideo.soundrate)
+       {
+               qvorbis_analysis_wrote(&format->vd, 0);
+               while(qvorbis_analysis_blockout(&format->vd, &format->vb) == 1)
+               {
+                       qvorbis_analysis(&format->vb, NULL);
+                       qvorbis_bitrate_addblock(&format->vb);
+                       while(qvorbis_bitrate_flushpacket(&format->vd, &pt))
+                               qogg_stream_packetin(&format->vo, &pt);
+                       SCR_CaptureVideo_Ogg_Interleave();
+               }
+       }
+
+       SCR_CaptureVideo_Ogg_FlushInterleaving();
+
+       while(qogg_stream_pageout(&format->to, &pg) > 0)
+       {
+               FS_Write(cls.capturevideo.videofile, pg.header, pg.header_len);
+               FS_Write(cls.capturevideo.videofile, pg.body, pg.body_len);
+       }
+
+       if(cls.capturevideo.soundrate)
+       {
+               while(qogg_stream_pageout(&format->vo, &pg) > 0)
+               {
+                       FS_Write(cls.capturevideo.videofile, pg.header, pg.header_len);
+                       FS_Write(cls.capturevideo.videofile, pg.body, pg.body_len);
+               }
+       }
+               
+       while (1) {
+               int result = qogg_stream_flush (&format->to, &pg);
+               if (result < 0)
+                       fprintf (stderr, "Internal Ogg library error.\n"); // TODO Host_Error
+               if (result <= 0)
+                       break;
+               FS_Write(cls.capturevideo.videofile, pg.header, pg.header_len);
+               FS_Write(cls.capturevideo.videofile, pg.body, pg.body_len);
+       }
+
+       if(cls.capturevideo.soundrate)
+       {
+               while (1) {
+                       int result = qogg_stream_flush (&format->vo, &pg);
+                       if (result < 0)
+                               fprintf (stderr, "Internal Ogg library error.\n"); // TODO Host_Error
+                       if (result <= 0)
+                               break;
+                       FS_Write(cls.capturevideo.videofile, pg.header, pg.header_len);
+                       FS_Write(cls.capturevideo.videofile, pg.body, pg.body_len);
+               }
+
+               qogg_stream_clear(&format->vo);
+               qvorbis_block_clear(&format->vb);
+               qvorbis_dsp_clear(&format->vd);
+       }
+
+       qogg_stream_clear(&format->to);
+       qtheora_clear(&format->ts);
+       qvorbis_info_clear(&format->vi);
+
+       Mem_Free(format->yuv[0].y);
+       Mem_Free(format->yuv[0].u);
+       Mem_Free(format->yuv[0].v);
+       Mem_Free(format->yuv[1].y);
+       Mem_Free(format->yuv[1].u);
+       Mem_Free(format->yuv[1].v);
+       Mem_Free(format);
+
+       FS_Close(cls.capturevideo.videofile);
+       cls.capturevideo.videofile = NULL;
+}
+
+static void SCR_CaptureVideo_Ogg_ConvertFrame_BGRA_to_YUV(void)
+{
+       LOAD_FORMATSPECIFIC_OGG();
+       yuv_buffer *yuv;
+       int x, y;
+       int blockr, blockg, blockb;
+       unsigned char *b = cls.capturevideo.outbuffer;
+       int w = cls.capturevideo.width;
+       int h = cls.capturevideo.height;
+       int inpitch = w*4;
+
+       yuv = &format->yuv[format->yuvi];
+
+       for(y = 0; y < h; ++y)
+       {
+               for(b = cls.capturevideo.outbuffer + (h-1-y)*w*4, x = 0; x < w; ++x)
+               {
+                       blockr = b[2];
+                       blockg = b[1];
+                       blockb = b[0];
+                       yuv->y[x + yuv->y_stride * y] =
+                               cls.capturevideo.yuvnormalizetable[0][cls.capturevideo.rgbtoyuvscaletable[0][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[0][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[0][2][blockb]];
+                       b += 4;
+               }
+
+               if((y & 1) == 0)
+               {
+                       for(b = cls.capturevideo.outbuffer + (h-2-y)*w*4, x = 0; x < w/2; ++x)
+                       {
+                               blockr = (b[2] + b[6] + b[inpitch+2] + b[inpitch+6]) >> 2;
+                               blockg = (b[1] + b[5] + b[inpitch+1] + b[inpitch+5]) >> 2;
+                               blockb = (b[0] + b[4] + b[inpitch+0] + b[inpitch+4]) >> 2;
+                               yuv->u[x + yuv->uv_stride * (y/2)] =
+                                       cls.capturevideo.yuvnormalizetable[1][cls.capturevideo.rgbtoyuvscaletable[1][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[1][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[1][2][blockb] + 128];
+                               yuv->v[x + yuv->uv_stride * (y/2)] =
+                                       cls.capturevideo.yuvnormalizetable[2][cls.capturevideo.rgbtoyuvscaletable[2][0][blockr] + cls.capturevideo.rgbtoyuvscaletable[2][1][blockg] + cls.capturevideo.rgbtoyuvscaletable[2][2][blockb] + 128];
+                               b += 8;
+                       }
+               }
+       }
+}
+
+static void SCR_CaptureVideo_Ogg_VideoFrames(int num)
+{
+       LOAD_FORMATSPECIFIC_OGG();
+       ogg_packet pt;
+
+       // data is in cls.capturevideo.outbuffer as BGRA and has size width*height
+
+       if(format->yuvi >= 0)
+       {
+               // send the previous frame
+               while(format->lastnum-- > 0)
+               {
+                       qtheora_encode_YUVin(&format->ts, &format->yuv[format->yuvi]);
+
+                       while(qtheora_encode_packetout(&format->ts, false, &pt))
+                               qogg_stream_packetin(&format->to, &pt);
+
+                       SCR_CaptureVideo_Ogg_Interleave();
+               }
+       }
+
+       format->yuvi = (format->yuvi + 1) % 2;
+       SCR_CaptureVideo_Ogg_ConvertFrame_BGRA_to_YUV();
+       format->lastnum = num;
+
+       // TODO maybe send num-1 frames from here already
+}
+
+typedef int channelmapping_t[8];
+channelmapping_t mapping[8] =
+{
+       { 0, -1, -1, -1, -1, -1, -1, -1 }, // mono
+       { 0, 1, -1, -1, -1, -1, -1, -1 }, // stereo
+       { 0, 1, 2, -1, -1, -1, -1, -1 }, // L C R
+       { 0, 1, 2, 3, -1, -1, -1, -1 }, // surround40
+       { 0, 2, 3, 4, 1, -1, -1, -1 }, // FL FC FR RL RR
+       { 0, 2, 3, 4, 1, 5, -1, -1 }, // surround51
+       { 0, 2, 3, 4, 1, 5, 6, -1 }, // (not defined by vorbis spec)
+       { 0, 2, 3, 4, 1, 5, 6, 7 } // surround71 (not defined by vorbis spec)
+};
+
+static void SCR_CaptureVideo_Ogg_SoundFrame(const portable_sampleframe_t *paintbuffer, size_t length)
+{
+       LOAD_FORMATSPECIFIC_OGG();
+       float **vorbis_buffer;
+       size_t i;
+       int j;
+       ogg_packet pt;
+       int *map = mapping[bound(1, cls.capturevideo.soundchannels, 8) - 1];
+
+       vorbis_buffer = qvorbis_analysis_buffer(&format->vd, length);
+       for(j = 0; j < cls.capturevideo.soundchannels; ++j)
+       {
+               float *b = vorbis_buffer[map[j]];
+               for(i = 0; i < length; ++i)
+                       b[i] = paintbuffer[i].sample[j] / 32768.0f;
+       }
+       qvorbis_analysis_wrote(&format->vd, length);
+
+       while(qvorbis_analysis_blockout(&format->vd, &format->vb) == 1)
+       {
+               qvorbis_analysis(&format->vb, NULL);
+               qvorbis_bitrate_addblock(&format->vb);
+
+               while(qvorbis_bitrate_flushpacket(&format->vd, &pt))
+                       qogg_stream_packetin(&format->vo, &pt);
+       }
+
+       SCR_CaptureVideo_Ogg_Interleave();
+}
+
+void SCR_CaptureVideo_Ogg_BeginVideo(void)
+{
+       cls.capturevideo.format = CAPTUREVIDEOFORMAT_OGG_VORBIS_THEORA;
+       cls.capturevideo.formatextension = "ogv";
+       cls.capturevideo.videofile = FS_OpenRealFile(va("%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension), "wb", false);
+       cls.capturevideo.endvideo = SCR_CaptureVideo_Ogg_EndVideo;
+       cls.capturevideo.videoframes = SCR_CaptureVideo_Ogg_VideoFrames;
+       cls.capturevideo.soundframe = SCR_CaptureVideo_Ogg_SoundFrame;
+       cls.capturevideo.formatspecific = Mem_Alloc(tempmempool, sizeof(capturevideostate_ogg_formatspecific_t));
+       {
+               LOAD_FORMATSPECIFIC_OGG();
+               int num, denom, i;
+               ogg_page pg;
+               ogg_packet pt, pt2, pt3;
+               theora_comment tc;
+               vorbis_comment vc;
+               theora_info ti;
+               int vp3compat;
+
+               format->serial1 = rand();
+               qogg_stream_init(&format->to, format->serial1);
+
+               if(cls.capturevideo.soundrate)
+               {
+                       do
+                       {
+                               format->serial2 = rand();
+                       }
+                       while(format->serial1 == format->serial2);
+                       qogg_stream_init(&format->vo, format->serial2);
+               }
+
+               format->videopage.len = format->audiopage.len = 0;
+
+               qtheora_info_init(&ti);
+               ti.frame_width = cls.capturevideo.width;
+               ti.frame_height = cls.capturevideo.height;
+               ti.width = (ti.frame_width + 15) & ~15;
+               ti.height = (ti.frame_height + 15) & ~15;
+               //ti.offset_x = ((ti.width - ti.frame_width) / 2) & ~1;
+               //ti.offset_y = ((ti.height - ti.frame_height) / 2) & ~1;
+
+               for(i = 0; i < 2; ++i)
+               {
+                       format->yuv[i].y_width = ti.width;
+                       format->yuv[i].y_height = ti.height;
+                       format->yuv[i].y_stride = ti.width;
+                       format->yuv[i].uv_width = ti.width / 2;
+                       format->yuv[i].uv_height = ti.height / 2;
+                       format->yuv[i].uv_stride = ti.width / 2;
+                       format->yuv[i].y = (unsigned char *) Mem_Alloc(tempmempool, format->yuv[i].y_stride * format->yuv[i].y_height);
+                       format->yuv[i].u = (unsigned char *) Mem_Alloc(tempmempool, format->yuv[i].uv_stride * format->yuv[i].uv_height);
+                       format->yuv[i].v = (unsigned char *) Mem_Alloc(tempmempool, format->yuv[i].uv_stride * format->yuv[i].uv_height);
+               }
+               format->yuvi = -1; // -1: no frame valid yet, write into 0
+
+               FindFraction(cls.capturevideo.framerate / cls.capturevideo.framestep, &num, &denom, 1001);
+               ti.fps_numerator = num;
+               ti.fps_denominator = denom;
+
+               FindFraction(1 / vid_pixelheight.value, &num, &denom, 1000);
+               ti.aspect_numerator = num;
+               ti.aspect_denominator = denom;
+
+               ti.colorspace = OC_CS_UNSPECIFIED;
+               ti.pixelformat = OC_PF_420;
+
+               ti.quick_p = true; // http://mlblog.osdir.com/multimedia.ogg.theora.general/2004-07/index.shtml
+               ti.dropframes_p = false;
+
+               ti.target_bitrate = cl_capturevideo_ogg_theora_bitrate.integer * 1000;
+               ti.quality = cl_capturevideo_ogg_theora_quality.integer;
+
+               if(ti.target_bitrate <= 0)
+               {
+                       ti.target_bitrate = -1;
+                       ti.keyframe_data_target_bitrate = (unsigned int)-1;
+               }
+               else
+               {
+                       ti.keyframe_data_target_bitrate = (int) (ti.target_bitrate * max(1, cl_capturevideo_ogg_theora_keyframe_bitrate_multiplier.value));
+
+                       if(ti.target_bitrate < 45000 || ti.target_bitrate >&