├── NOTTODO
├── code
├── libcurl
│ └── curl
│ │ ├── types.h
│ │ └── stdcheaders.h
├── libs
│ ├── win32
│ │ ├── SDL.lib
│ │ ├── libcurl.a
│ │ ├── SDLmain.lib
│ │ ├── libSDL.dll.a
│ │ ├── libSDLmain.a
│ │ └── libSDL.la
│ ├── win64
│ │ ├── SDL.lib
│ │ ├── libcurl.a
│ │ ├── SDLmain.lib
│ │ ├── libSDLmain.a
│ │ └── libSDL64.dll.a
│ └── macosx
│ │ ├── libSDLmain.a
│ │ ├── libSDL-1.2.0.dylib
│ │ └── libhumblenet.dylib
├── tools
│ ├── lcc
│ │ ├── doc
│ │ │ ├── lcc.pdf
│ │ │ ├── bprint.pdf
│ │ │ └── bprint.1
│ │ ├── README.id
│ │ ├── src
│ │ │ ├── bind.c
│ │ │ ├── inits.c
│ │ │ ├── event.c
│ │ │ ├── list.c
│ │ │ ├── null.c
│ │ │ └── alloc.c
│ │ ├── README
│ │ ├── cpp
│ │ │ └── getopt.c
│ │ ├── etc
│ │ │ └── bytecode.c
│ │ └── lburg
│ │ │ └── lburg.h
│ └── asm
│ │ ├── notes.txt
│ │ ├── lib.txt
│ │ ├── README.Id
│ │ └── ops.txt
├── AL
│ ├── efx-creative.h
│ └── VERSION
├── renderergl2
│ ├── glsl
│ │ ├── fogpass_fp.glsl
│ │ ├── texturecolor_fp.glsl
│ │ ├── dlight_fp.glsl
│ │ ├── bokeh_vp.glsl
│ │ ├── texturecolor_vp.glsl
│ │ ├── down4x_vp.glsl
│ │ ├── tonemap_vp.glsl
│ │ ├── calclevels4x_vp.glsl
│ │ ├── ssao_vp.glsl
│ │ ├── depthblur_vp.glsl
│ │ ├── pshadow_vp.glsl
│ │ ├── shadowmask_vp.glsl
│ │ ├── shadowfill_fp.glsl
│ │ ├── generic_fp.glsl
│ │ ├── tonemap_fp.glsl
│ │ ├── down4x_fp.glsl
│ │ ├── calclevels4x_fp.glsl
│ │ └── depthblur_fp.glsl
│ ├── tr_postprocess.h
│ ├── tr_extratypes.h
│ ├── tr_subs.c
│ └── tr_fbo.h
├── qcommon
│ ├── vm_none.c
│ ├── vm_sparc.h
│ └── puff.h
├── SDL12
│ └── include
│ │ ├── SDL_name.h
│ │ ├── SDL_copying.h
│ │ ├── SDL_getenv.h
│ │ ├── SDL_types.h
│ │ ├── SDL_byteorder.h
│ │ ├── SDL_config.h
│ │ ├── close_code.h
│ │ ├── SDL_error.h
│ │ ├── SDL_active.h
│ │ ├── SDL_quit.h
│ │ └── SDL_config_minimal.h
├── zlib
│ └── inffast.h
├── jpeg-8c
│ ├── jversion.h
│ └── jconfig.h
├── libspeex
│ ├── include
│ │ └── speex
│ │ │ └── speex_config_types.h
│ ├── config.h
│ ├── testdenoise.c
│ ├── kiss_fftr.h
│ ├── testecho.c
│ ├── smallft.h
│ ├── lpc.h
│ ├── exc_10_16_table.c
│ └── echo_diagnostic.m
├── libogg-1.3.0
│ └── include
│ │ └── ogg
│ │ └── config_types.h
├── null
│ ├── null_input.c
│ ├── null_net.c
│ ├── mac_net.c
│ ├── null_snddma.c
│ └── null_glimp.c
├── asm
│ ├── qasm.h
│ ├── qasm-inline.h
│ ├── matha.s
│ ├── snapvector.c
│ ├── vm_x86_64.asm
│ └── ftola.asm
├── botlib
│ ├── be_aas_optimize.h
│ ├── l_crc.h
│ ├── be_ai_gen.h
│ ├── be_aas_cluster.h
│ ├── l_utils.h
│ ├── be_aas_file.h
│ ├── be_aas_routealt.h
│ ├── be_aas_funcs.h
│ ├── l_log.h
│ ├── be_interface.h
│ ├── be_ai_char.h
│ └── be_aas_main.h
├── game
│ ├── syn.h
│ ├── ai_cmd.h
│ ├── ai_vcmd.h
│ ├── ai_team.h
│ ├── g_mem.c
│ └── ai_chat.h
├── opusfile-0.2
│ └── src
│ │ └── internal.c
├── client
│ ├── libmumblelink.h
│ └── keys.h
├── renderergl1
│ └── tr_subs.c
├── sys
│ ├── con_passive.c
│ ├── win_resource.h
│ ├── win_resource.rc
│ ├── sys_local.h
│ └── sys_loadlib.h
├── q3_ui
│ └── ui_sparena.c
└── opus-1.0.2
│ ├── src
│ └── opus.c
│ └── celt
│ ├── cwrs.h
│ ├── pitch.h
│ ├── celt_lpc.h
│ └── laplace.h
├── TODO
├── misc
├── msvc
│ ├── cgame.def
│ ├── game.def
│ ├── q3_ui.def
│ ├── ui.def
│ └── glsl_stringify.vbs
├── setup
│ ├── pkg
│ │ ├── ioquake3
│ │ │ ├── space
│ │ │ ├── depend
│ │ │ ├── prototype.template
│ │ │ ├── preremove
│ │ │ ├── preinstall
│ │ │ ├── pkginfo.template
│ │ │ ├── postremove
│ │ │ └── postinstall
│ │ ├── ioquake3d
│ │ │ ├── space
│ │ │ ├── depend
│ │ │ ├── prototype.template
│ │ │ ├── preremove
│ │ │ ├── postinstall
│ │ │ ├── postremove
│ │ │ ├── preinstall
│ │ │ └── pkginfo.template
│ │ ├── ioquake3m
│ │ │ ├── space
│ │ │ ├── depend
│ │ │ ├── prototype.template
│ │ │ ├── preremove
│ │ │ ├── postinstall
│ │ │ ├── postremove
│ │ │ ├── preinstall
│ │ │ └── pkginfo.template
│ │ ├── ioq3ded.sh
│ │ └── ioquake3.sh
│ ├── ioquake3.desktop
│ ├── Makefile
│ ├── preuninstall.sh
│ ├── install-desktop-files.sh
│ ├── slack-desc
│ ├── setup.xml.mod
│ ├── ioquake3.sh
│ ├── ioq3demo.sh
│ ├── ioquake3.SlackBuild
│ └── MacOSX
│ │ └── SLA-dmg.sh
├── quake3.ico
├── quake3.png
├── quake3.icns
├── quake3-tango.png
├── quake3-tango.xcf
├── quake3_flat.icns
├── ioquake3-folder.icns
├── osxfe
│ └── ioquake3fe
│ │ ├── ioquake3.icns
│ │ ├── English.lproj
│ │ ├── InfoPlist.strings
│ │ └── Localizable.strings
│ │ ├── ioquake3fe.xcodeproj
│ │ └── TemplateIcon.icns
│ │ ├── ioquake3fe_Prefix.pch
│ │ ├── ErrorWindow.h
│ │ ├── main.m
│ │ ├── ErrorWindowController.h
│ │ ├── ErrorWindowController.m
│ │ ├── Controller.h
│ │ ├── ErrorWindow.m
│ │ └── Info.plist
├── quake3_flat.iconset
│ ├── icon_16x16.png
│ ├── icon_32x32.png
│ ├── icon_128x128.png
│ ├── icon_16x16@2x.png
│ ├── icon_256x256.png
│ ├── icon_32x32@2x.png
│ ├── icon_512x512.png
│ ├── icon_128x128@2x.png
│ ├── icon_256x256@2x.png
│ └── icon_512x512@2x.png
├── msvc10
│ ├── cgame.vcxproj.user
│ ├── game.vcxproj.user
│ ├── q3_ui.vcxproj.user
│ └── ui.vcxproj.user
├── xcode
│ ├── ioquake3-Prefix.pch
│ ├── ioquake3.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── ioquake3-Info.plist
│ └── xcode-readme.txt
├── ReadMe-OSX.rtf
└── nsis
│ └── Makefile
├── BUGS
├── ui
├── hud.txt
├── hud2.txt
├── ingame.txt
└── menus.txt
├── .travis.yml
├── .gitignore
├── travis-ci-build.sh
├── jenkins-ci-build.sh
└── make-macosx.sh
/NOTTODO:
--------------------------------------------------------------------------------
1 | http://wiki.ioquake3.org/NotToDo
2 |
--------------------------------------------------------------------------------
/code/libcurl/curl/types.h:
--------------------------------------------------------------------------------
1 | /* not used */
2 |
--------------------------------------------------------------------------------
/TODO:
--------------------------------------------------------------------------------
1 | http://wiki.ioquake3.org/Ioquake3_Road_Map
2 |
--------------------------------------------------------------------------------
/misc/msvc/cgame.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | vmMain
3 | dllEntry
--------------------------------------------------------------------------------
/misc/msvc/game.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | dllEntry
3 | vmMain
--------------------------------------------------------------------------------
/misc/msvc/q3_ui.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | vmMain
3 | dllEntry
--------------------------------------------------------------------------------
/misc/msvc/ui.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | vmMain
3 | dllEntry
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/space:
--------------------------------------------------------------------------------
1 | /usr/local/share 20000 15
2 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/space:
--------------------------------------------------------------------------------
1 | /usr/local/share 50000 100
2 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/space:
--------------------------------------------------------------------------------
1 | /usr/local/share 50000 100
2 |
--------------------------------------------------------------------------------
/misc/quake3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3.ico
--------------------------------------------------------------------------------
/misc/quake3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3.png
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/depend:
--------------------------------------------------------------------------------
1 | P SUNWxwplt X Window System platform software
2 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/depend:
--------------------------------------------------------------------------------
1 | P SUNWxwplt X Window System platform software
2 |
--------------------------------------------------------------------------------
/misc/quake3.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3.icns
--------------------------------------------------------------------------------
/code/libs/win32/SDL.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win32/SDL.lib
--------------------------------------------------------------------------------
/code/libs/win64/SDL.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win64/SDL.lib
--------------------------------------------------------------------------------
/misc/quake3-tango.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3-tango.png
--------------------------------------------------------------------------------
/misc/quake3-tango.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3-tango.xcf
--------------------------------------------------------------------------------
/misc/quake3_flat.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.icns
--------------------------------------------------------------------------------
/code/libs/win32/libcurl.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win32/libcurl.a
--------------------------------------------------------------------------------
/code/libs/win64/libcurl.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win64/libcurl.a
--------------------------------------------------------------------------------
/misc/ioquake3-folder.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/ioquake3-folder.icns
--------------------------------------------------------------------------------
/code/libs/win32/SDLmain.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win32/SDLmain.lib
--------------------------------------------------------------------------------
/code/libs/win32/libSDL.dll.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win32/libSDL.dll.a
--------------------------------------------------------------------------------
/code/libs/win32/libSDLmain.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win32/libSDLmain.a
--------------------------------------------------------------------------------
/code/libs/win64/SDLmain.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win64/SDLmain.lib
--------------------------------------------------------------------------------
/code/libs/win64/libSDLmain.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win64/libSDLmain.a
--------------------------------------------------------------------------------
/code/tools/lcc/doc/lcc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/tools/lcc/doc/lcc.pdf
--------------------------------------------------------------------------------
/code/libs/macosx/libSDLmain.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/macosx/libSDLmain.a
--------------------------------------------------------------------------------
/code/libs/win64/libSDL64.dll.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/win64/libSDL64.dll.a
--------------------------------------------------------------------------------
/code/tools/lcc/doc/bprint.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/tools/lcc/doc/bprint.pdf
--------------------------------------------------------------------------------
/code/libs/macosx/libSDL-1.2.0.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/macosx/libSDL-1.2.0.dylib
--------------------------------------------------------------------------------
/code/libs/macosx/libhumblenet.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/code/libs/macosx/libhumblenet.dylib
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ioquake3.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/osxfe/ioquake3fe/ioquake3.icns
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_16x16.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_32x32.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_128x128.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_16x16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_16x16@2x.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_256x256.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_32x32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_32x32@2x.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_512x512.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_128x128@2x.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_256x256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_256x256@2x.png
--------------------------------------------------------------------------------
/misc/quake3_flat.iconset/icon_512x512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/quake3_flat.iconset/icon_512x512@2x.png
--------------------------------------------------------------------------------
/BUGS:
--------------------------------------------------------------------------------
1 | - On Solaris/SPARC gcc optimizations higher than -O0 currently lead
2 | to a segfault
3 |
4 | https://bugzilla.icculus.org/ for more.
5 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/English.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/osxfe/ioquake3fe/English.lproj/InfoPlist.strings
--------------------------------------------------------------------------------
/ui/hud.txt:
--------------------------------------------------------------------------------
1 | // hud menu defs
2 | //
3 | {
4 | loadMenu { "ui/hud.menu" }
5 | loadMenu { "ui/score.menu" }
6 | loadMenu { "ui/teamscore.menu" }
7 | }
8 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/English.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/osxfe/ioquake3fe/English.lproj/Localizable.strings
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/depend:
--------------------------------------------------------------------------------
1 | P SUNWxwplt X Window System platform software
2 | P ioquake3d Icculus.Org Quake3 patch data files for Solaris 10 (X11,GLX,SDL)
3 |
--------------------------------------------------------------------------------
/ui/hud2.txt:
--------------------------------------------------------------------------------
1 | // hud menu defs
2 | //
3 | {
4 | loadMenu { "ui/min_hud.menu" }
5 | loadMenu { "ui/score.menu" }
6 | loadMenu { "ui/teamscore.menu" }
7 | }
8 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/prototype.template:
--------------------------------------------------------------------------------
1 | !default 0755 root bin
2 | i pkginfo
3 | i depend
4 | i postinstall
5 | i postremove
6 | i preinstall
7 | i preremove
8 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/prototype.template:
--------------------------------------------------------------------------------
1 | !default 0755 root bin
2 | i pkginfo
3 | i depend
4 | i postinstall
5 | i postremove
6 | i preinstall
7 | i preremove
8 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/TemplateIcon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HumbleNet/quake3/HEAD/misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/TemplateIcon.icns
--------------------------------------------------------------------------------
/misc/msvc10/cgame.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/misc/msvc10/game.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/misc/msvc10/q3_ui.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/misc/msvc10/ui.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/prototype.template:
--------------------------------------------------------------------------------
1 | !default 0755 root bin
2 | i pkginfo
3 | i copyright
4 | i depend
5 | i postinstall
6 | i postremove
7 | i preinstall
8 | i preremove
9 |
--------------------------------------------------------------------------------
/code/tools/lcc/README.id:
--------------------------------------------------------------------------------
1 | 2001-10-31 Timothee Besset
2 | updated from the $/source/lcc code
3 | modified for portability and use with >= 1.31 mod source release
4 |
--------------------------------------------------------------------------------
/misc/xcode/ioquake3-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'quake3' target in the 'quake3' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/code/AL/efx-creative.h:
--------------------------------------------------------------------------------
1 | /* The tokens that would be defined here are already defined in efx.h. This
2 | * empty file is here to provide compatibility with Windows-based projects
3 | * that would include it. */
4 |
--------------------------------------------------------------------------------
/code/AL/VERSION:
--------------------------------------------------------------------------------
1 | This file identifies the version of the AL headers in this directory. If you
2 | change or update the AL headers in any way, please make sure you also update
3 | this file.
4 |
5 | openal-soft-1.15.1
6 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ioquake3fe_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'ioquake3fe' target in the 'ioquake3fe' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/fogpass_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform vec4 u_Color;
2 |
3 | varying float var_Scale;
4 |
5 | void main()
6 | {
7 | gl_FragColor = u_Color;
8 | gl_FragColor.a = sqrt(clamp(var_Scale, 0.0, 1.0));
9 | }
10 |
--------------------------------------------------------------------------------
/misc/setup/ioquake3.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=ioquake3
3 | Exec=ioquake3
4 | Icon=quake3
5 | Type=Application
6 | Terminal=false
7 | Encoding=UTF-8
8 | Categories=Game;ActionGame;
9 | X-SuSE-translate=false
10 |
--------------------------------------------------------------------------------
/code/qcommon/vm_none.c:
--------------------------------------------------------------------------------
1 | #include "vm_local.h"
2 |
3 | int VM_CallCompiled( vm_t *vm, int *args ) {
4 | exit(99);
5 | return 0;
6 | }
7 |
8 | void VM_Compile( vm_t *vm, vmHeader_t *header ) {
9 | exit(99);
10 | }
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/preremove:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: preremove,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/preremove:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: preremove,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/preremove:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: preremove,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/preinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: preinstall,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/postinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: postinstall,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/postremove:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: postremove,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/preinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: preinstall,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/postinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: postinstall,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/postremove:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: postremove,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/preinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: preinstall,v 1.2 2006/01/25 13:22:56 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 |
9 | exit 0
10 |
11 |
--------------------------------------------------------------------------------
/code/tools/lcc/src/bind.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 | extern Interface nullIR;
3 | extern Interface bytecodeIR;
4 | Binding bindings[] = {
5 | { "null", &nullIR },
6 | { "bytecode", &bytecodeIR },
7 | { NULL, NULL },
8 | };
9 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ErrorWindow.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface ErrorWindow : NSObject {
4 | IBOutlet id errorWindow;
5 | IBOutlet id errorTextField;
6 | }
7 |
8 | - (void)bitch:(NSString *)errorlog;
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/texturecolor_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_DiffuseMap;
2 | uniform vec4 u_Color;
3 |
4 | varying vec2 var_Tex1;
5 |
6 |
7 | void main()
8 | {
9 | gl_FragColor = texture2D(u_DiffuseMap, var_Tex1) * u_Color;
10 | }
11 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_name.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _SDLname_h_
3 | #define _SDLname_h_
4 |
5 | #if defined(__STDC__) || defined(__cplusplus)
6 | #define NeedFunctionPrototypes 1
7 | #endif
8 |
9 | #define SDL_NAME(X) SDL_##X
10 |
11 | #endif /* _SDLname_h_ */
12 |
--------------------------------------------------------------------------------
/code/tools/asm/notes.txt:
--------------------------------------------------------------------------------
1 |
2 | don't do any paramter conversion (double to float, etc)
3 |
4 |
5 |
6 | Why?
7 |
8 | Security.
9 | Portability.
10 |
11 | It may be more aproachable.
12 |
13 | can still use regular dlls for development purposes
14 |
15 | lcc
16 | q3asm
17 |
--------------------------------------------------------------------------------
/misc/setup/Makefile:
--------------------------------------------------------------------------------
1 | VERSION=1.36
2 | RELEASE=svn
3 |
4 | all:
5 | VERSION=$(VERSION) RELEASE=$(RELEASE) ./doit
6 |
7 | sign:
8 | for i in *.run; do \
9 | gpg -bao $$i.asc $$i; \
10 | done
11 |
12 | clean:
13 | rm -rf *.run image defines.m4
14 |
15 | .PHONY: all sign clean
16 |
--------------------------------------------------------------------------------
/code/tools/asm/lib.txt:
--------------------------------------------------------------------------------
1 |
2 | strlen
3 | strcasecmp
4 | tolower
5 | strcat
6 | strncpy
7 | strcmp
8 | strcpy
9 | strchr
10 |
11 | vsprintf
12 |
13 | memcpy
14 | memset
15 | rand
16 |
17 | atoi
18 | atof
19 |
20 | abs
21 |
22 | floor
23 | fabs
24 | tan
25 | atan
26 | sqrt
27 | log
28 | cos
29 | sin
30 | atan2
31 |
32 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ioquake3fe
4 | //
5 | // Created by Ben Wilber on 3/11/09.
6 | // Copyright __MyCompanyName__ 2009. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, char *argv[])
12 | {
13 | return NSApplicationMain(argc, (const char **) argv);
14 | }
15 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/dlight_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_DiffuseMap;
2 |
3 | varying vec2 var_Tex1;
4 | varying vec4 var_Color;
5 |
6 |
7 | void main()
8 | {
9 | vec4 color = texture2D(u_DiffuseMap, var_Tex1);
10 |
11 | gl_FragColor = color * var_Color;
12 |
13 | if (gl_FragColor.a == 0.0) {
14 | discard;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/bokeh_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | uniform mat4 u_ModelViewProjectionMatrix;
5 |
6 | varying vec2 var_TexCoords;
7 |
8 |
9 | void main()
10 | {
11 | gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
12 | var_TexCoords = attr_TexCoord0.st;
13 | }
14 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/texturecolor_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | uniform mat4 u_ModelViewProjectionMatrix;
5 |
6 | varying vec2 var_Tex1;
7 |
8 |
9 | void main()
10 | {
11 | gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
12 | var_Tex1 = attr_TexCoord0.st;
13 | }
14 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/down4x_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | uniform mat4 u_ModelViewProjectionMatrix;
5 |
6 | varying vec2 var_TexCoords;
7 |
8 |
9 | void main()
10 | {
11 | gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
12 | var_TexCoords = attr_TexCoord0.st;
13 | }
14 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/tonemap_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | uniform mat4 u_ModelViewProjectionMatrix;
5 |
6 | varying vec2 var_TexCoords;
7 |
8 |
9 | void main()
10 | {
11 | gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
12 | var_TexCoords = attr_TexCoord0.st;
13 | }
14 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ErrorWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ErrorWindowController.h
3 | // ioquake3fe
4 | //
5 | // Created by Ben Wilber on 3/11/09.
6 | // Copyright 2009 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface ErrorWindowController : NSWindowController {
13 |
14 | }
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/calclevels4x_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | uniform mat4 u_ModelViewProjectionMatrix;
5 |
6 | varying vec2 var_TexCoords;
7 |
8 |
9 | void main()
10 | {
11 | gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
12 | var_TexCoords = attr_TexCoord0.st;
13 | }
14 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/ssao_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec4 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | varying vec2 var_ScreenTex;
5 |
6 | void main()
7 | {
8 | gl_Position = attr_Position;
9 | var_ScreenTex = attr_TexCoord0.xy;
10 | //vec2 screenCoords = gl_Position.xy / gl_Position.w;
11 | //var_ScreenTex = screenCoords * 0.5 + 0.5;
12 | }
13 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/depthblur_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec4 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | varying vec2 var_ScreenTex;
5 |
6 | void main()
7 | {
8 | gl_Position = attr_Position;
9 | var_ScreenTex = attr_TexCoord0.xy;
10 | //vec2 screenCoords = gl_Position.xy / gl_Position.w;
11 | //var_ScreenTex = screenCoords * 0.5 + 0.5;
12 | }
13 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: c
2 | compiler:
3 | - gcc
4 | - clang
5 | - i686-w64-mingw32-gcc
6 |
7 | script: ./travis-ci-build.sh
8 |
9 | before_install:
10 | - sudo apt-get update -qq
11 | - sudo apt-get remove -qq -y mingw32
12 | - sudo apt-get install -q -y libgl1-mesa-dev libsdl1.2-dev libvorbis-dev libfreetype6-dev mingw-w64
13 |
14 | notifications:
15 | email: false
16 |
--------------------------------------------------------------------------------
/code/tools/lcc/src/inits.c:
--------------------------------------------------------------------------------
1 | void init(int argc, char *argv[]) {
2 | {extern void input_init(int, char *[]); input_init(argc, argv);}
3 | {extern void main_init(int, char *[]); main_init(argc, argv);}
4 | {extern void prof_init(int, char *[]); prof_init(argc, argv);}
5 | {extern void trace_init(int, char *[]); trace_init(argc, argv);}
6 | {extern void type_init(int, char *[]); type_init(argc, argv);}
7 | }
8 |
--------------------------------------------------------------------------------
/misc/setup/preuninstall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rmdir --ignore-fail-on-non-empty demoq3 missionpack >& /dev/null
3 | if test -e "$SETUP_INSTALLPATH"/ioquake3.desktop.in; then
4 | xdg_desktop_menu=`which xdg-desktop-menu 2>/dev/null`
5 | if test "x$xdg_desktop_menu" = x; then
6 | xdg_desktop_menu=./xdg-desktop-menu
7 | fi
8 | $xdg_desktop_menu uninstall --novendor ioquake3.desktop
9 | rm ioquake3.desktop
10 | fi
11 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/pshadow_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec3 attr_Position;
2 | attribute vec3 attr_Normal;
3 |
4 | uniform mat4 u_ModelViewProjectionMatrix;
5 | varying vec3 var_Position;
6 | varying vec3 var_Normal;
7 |
8 |
9 | void main()
10 | {
11 | gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
12 |
13 | var_Position = attr_Position;
14 | var_Normal = attr_Normal * 2.0 - vec3(1.0);
15 | }
16 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/pkginfo.template:
--------------------------------------------------------------------------------
1 | CLASSES=none
2 | BASEDIR=/usr/local/share/games
3 | TZ=PST
4 | PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
5 | PKG=ioquake3
6 | NAME=ioquake3 for Solaris 10 (X11,GLX,SDL)
7 | VERSION=
8 | CATEGORY=application,graphics,opengl
9 | DESC=Icculus.Org Quake3 for Solaris 10 (http://www.ioquake3.org/)
10 | VENDOR=http://www.ioquake3.org/
11 | EMAIL=quake@cojot.name
12 | PKGSAV=/var/sadm/pkg/ioquake3/save
13 |
--------------------------------------------------------------------------------
/code/zlib/inffast.h:
--------------------------------------------------------------------------------
1 | /* inffast.h -- header to use inffast.c
2 | * Copyright (C) 1995-2003 Mark Adler
3 | * For conditions of distribution and use, see copyright notice in zlib.h
4 | */
5 |
6 | /* WARNING: this file should *not* be used by applications. It is
7 | part of the implementation of the compression library and is
8 | subject to change. Applications should only use zlib.h.
9 | */
10 |
11 | void inflate_fast OF((z_streamp strm, unsigned start));
12 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3m/pkginfo.template:
--------------------------------------------------------------------------------
1 | CLASSES=none
2 | BASEDIR=/usr/local/share/games
3 | TZ=PST
4 | PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
5 | PKG=ioquake3m
6 | NAME=ioquake3 demo data files for Solaris 10 (X11,GLX,SDL)
7 | VERSION=
8 | CATEGORY=application,graphics,opengl
9 | DESC=ioquake3 demo data files for Solaris 10 (http://www.ioquake3.org/)
10 | VENDOR=http://www.ioquake3.org/
11 | EMAIL=quake@cojot.name
12 | PKGSAV=/var/sadm/pkg/ioquake3m/save
13 |
--------------------------------------------------------------------------------
/code/jpeg-8c/jversion.h:
--------------------------------------------------------------------------------
1 | /*
2 | * jversion.h
3 | *
4 | * Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
5 | * This file is part of the Independent JPEG Group's software.
6 | * For conditions of distribution and use, see the accompanying README file.
7 | *
8 | * This file contains software version identification.
9 | */
10 |
11 |
12 | #define JVERSION "8c 16-Jan-2011"
13 |
14 | #define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding"
15 |
--------------------------------------------------------------------------------
/code/tools/asm/README.Id:
--------------------------------------------------------------------------------
1 | 2002-10-25 Timothee Besset
2 | If you are looking for a faster version of the q3asm tool, try:
3 | http://www.icculus.org/~phaethon/q3/q3asm-turbo/q3asm-turbo.html
4 |
5 | 2001-10-31 Timothee Besset
6 | updated from the $/source/q3asm code
7 | modified for portability and use with >= 1.31 mod source release
8 |
9 | the cmdlib.c cmdlib.h mathlib.h qfiles.h have been copied from
10 | $/source/common
11 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3d/pkginfo.template:
--------------------------------------------------------------------------------
1 | CLASSES=none
2 | BASEDIR=/usr/local/share/games
3 | TZ=PST
4 | PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
5 | PKG=ioquake3d
6 | NAME=ioquake3 patch data files for Solaris 10 (X11,GLX,SDL)
7 | VERSION=
8 | CATEGORY=application,graphics,opengl
9 | DESC=ioquake3 patch data files for Solaris 10 (http://www.ioquake3.org/)
10 | VENDOR=http://www.ioquake3.org/
11 | EMAIL=quake@cojot.name
12 | PKGSAV=/var/sadm/pkg/ioquake3d/save
13 |
--------------------------------------------------------------------------------
/code/libspeex/include/speex/speex_config_types.h:
--------------------------------------------------------------------------------
1 | #ifndef __SPEEX_TYPES_H__
2 | #define __SPEEX_TYPES_H__
3 |
4 | #ifdef _MSC_VER
5 | typedef __int16 spx_int16_t;
6 | typedef __int32 spx_int32_t;
7 | typedef unsigned __int16 spx_uint16_t;
8 | typedef unsigned __int32 spx_uint32_t;
9 | #else
10 | #include
11 | typedef int16_t spx_int16_t;
12 | typedef int32_t spx_int32_t;
13 | typedef uint16_t spx_uint16_t;
14 | typedef uint32_t spx_uint32_t;
15 | #endif
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ErrorWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ErrorWindowController.m
3 | // ioquake3fe
4 | //
5 | // Created by Ben Wilber on 3/11/09.
6 | // Copyright 2009 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "ErrorWindowController.h"
10 |
11 | @implementation ErrorWindowController
12 |
13 | // yes, a whole class just so the fucking app will quit
14 |
15 | - (BOOL)windowShouldClose:(id)sender {
16 | [NSApp terminate:self];
17 | return YES;
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/postremove:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postremove $Id: postremove,v 1.3 2006/01/21 12:54:52 coyote Exp $
4 | #
5 | # postremove script for quake3
6 |
7 | quake3_dir=$BASEDIR
8 | dest_dir=${PKG_INSTALL_ROOT}/usr/local/bin
9 |
10 | if [ -d ${dest_dir} ]; then
11 | for inst_script in ioq3ded.sh ioquake3.sh
12 | do
13 | dest_script=${dest_dir}/${inst_script}
14 | if [ -h ${dest_script} ]; then
15 | rm -f ${dest_script}
16 | fi
17 | done
18 | fi
19 |
20 | exit 0
21 |
22 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3/postinstall:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # @(#)postinstall $Id: postinstall,v 1.3 2006/01/21 12:54:52 coyote Exp $
4 | #
5 | # postinstall script for quake3
6 |
7 | quake3_dir=$BASEDIR/quake3
8 | dest_dir=${PKG_INSTALL_ROOT}/usr/local/bin
9 |
10 | if [ -d ${dest_dir} ]; then
11 | for inst_script in ioq3ded.sh ioquake3.sh
12 | do
13 | dest_script=${dest_dir}/${inst_script}
14 | if [ ! -h ${dest_script} ]; then
15 | ln -s ${quake3_dir}/${inst_script} ${dest_script}
16 | fi
17 | done
18 | fi
19 |
20 | exit 0
21 |
22 |
--------------------------------------------------------------------------------
/ui/ingame.txt:
--------------------------------------------------------------------------------
1 | // menu defs
2 | //
3 | {
4 | loadMenu { "ui/ingame.menu" }
5 | loadMenu { "ui/ingame_vote.menu" }
6 | loadMenu { "ui/ingame_about.menu" }
7 | loadMenu { "ui/ingame_controls.menu" }
8 | loadMenu { "ui/ingame_join.menu" }
9 | loadMenu { "ui/ingame_options.menu" }
10 | loadMenu { "ui/ingame_system.menu" }
11 | loadMenu { "ui/ingame_leave.menu" }
12 | loadMenu { "ui/ingame_player.menu" }
13 | loadMenu { "ui/ingame_addbot.menu" }
14 | loadMenu { "ui/ingame_callvote.menu" }
15 | loadMenu { "ui/ingame_orders.menu" }
16 | }
17 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/Controller.h:
--------------------------------------------------------------------------------
1 | //
2 | // Controller.h
3 | // ioquake3fe
4 | //
5 | // Created by Ben Wilber on 3/11/09.
6 | // Copyright 2009 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Controller : NSObject {
12 | IBOutlet id argsTextField;
13 | NSTask *quakeTask;
14 | NSFileHandle *quakeOut;
15 | NSMutableData *quakeData;
16 | }
17 |
18 | - (IBAction)launch:(id)sender;
19 | - (void)readPipe:(NSNotification *)note;
20 | - (void)taskNote:(NSNotification *)note;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/code/tools/lcc/src/event.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 |
3 |
4 | struct entry {
5 | Apply func;
6 | void *cl;
7 | };
8 |
9 | Events events;
10 | void attach(Apply func, void *cl, List *list) {
11 | struct entry *p;
12 |
13 | NEW(p, PERM);
14 | p->func = func;
15 | p->cl = cl;
16 | *list = append(p, *list);
17 | }
18 | void apply(List event, void *arg1, void *arg2) {
19 | if (event) {
20 | List lp = event;
21 | do {
22 | struct entry *p = lp->x;
23 | (*p->func)(p->cl, arg1, arg2);
24 | lp = lp->link;
25 | } while (lp != event);
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/shadowmask_vp.glsl:
--------------------------------------------------------------------------------
1 | attribute vec4 attr_Position;
2 | attribute vec4 attr_TexCoord0;
3 |
4 | uniform vec3 u_ViewForward;
5 | uniform vec3 u_ViewLeft;
6 | uniform vec3 u_ViewUp;
7 | uniform vec4 u_ViewInfo; // zfar / znear
8 |
9 | varying vec2 var_DepthTex;
10 | varying vec3 var_ViewDir;
11 |
12 | void main()
13 | {
14 | gl_Position = attr_Position;
15 | vec2 screenCoords = gl_Position.xy / gl_Position.w;
16 | var_DepthTex = attr_TexCoord0.xy;
17 | var_ViewDir = u_ViewForward + u_ViewLeft * -screenCoords.x + u_ViewUp * screenCoords.y;
18 | }
19 |
--------------------------------------------------------------------------------
/misc/setup/install-desktop-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | if ! test -e "$SETUP_INSTALLPATH"/ioquake3.desktop.in; then
4 | exit 0
5 | fi
6 | xdg_desktop_menu=`which xdg-desktop-menu 2>/dev/null`
7 | if test "x$xdg_desktop_menu" = x; then
8 | xdg_desktop_menu=./xdg-desktop-menu
9 | fi
10 | sed -e "s#^Exec=.*#Exec=$SETUP_INSTALLPATH/ioquake3#" \
11 | -e "s#^Icon=.*#Icon=$SETUP_INSTALLPATH/quake3.png#" \
12 | < $SETUP_INSTALLPATH/ioquake3.desktop.in \
13 | > $SETUP_INSTALLPATH/ioquake3.desktop
14 | $xdg_desktop_menu install --novendor $SETUP_INSTALLPATH/ioquake3.desktop
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | Makefile.local
3 | *.swp
4 | *tags
5 |
6 | # OS X
7 | ####################
8 | .Spotlight-V100/
9 | .Trashes/
10 | ._*
11 | .AppleDouble
12 | .DS_Store
13 | .LSOverride
14 | Icon?
15 |
16 | # Xcode
17 | ####################
18 | *.mode1v3
19 | *.mode2v3
20 | *.pbxuser
21 | *.perspectivev3
22 | *.user
23 | *.xcuserstate
24 | *.moved-aside
25 | *~.nib
26 | .idea/
27 | DerivedData/
28 | project.xcworkspace/
29 | xcuserdata/
30 | profile
31 | !default.pbxuser
32 | !default.mode1v3
33 | !default.mode2v3
34 | !default.perspectivev3
35 |
36 | # emscripten
37 | ####################
38 | node_modules/
--------------------------------------------------------------------------------
/code/libogg-1.3.0/include/ogg/config_types.h:
--------------------------------------------------------------------------------
1 | #ifndef __CONFIG_TYPES_H__
2 | #define __CONFIG_TYPES_H__
3 |
4 | /* #define INCLUDE_INTTYPES_H 1 */
5 | #define INCLUDE_STDINT_H 1
6 | /* #define INCLUDE_SYS_TYPES_H 1 */
7 |
8 | #if INCLUDE_INTTYPES_H
9 | # include
10 | #endif
11 | #if INCLUDE_STDINT_H
12 | # include
13 | #endif
14 | #if INCLUDE_SYS_TYPES_H
15 | # include
16 | #endif
17 |
18 | typedef int16_t ogg_int16_t;
19 | typedef uint16_t ogg_uint16_t;
20 | typedef int32_t ogg_int32_t;
21 | typedef uint32_t ogg_uint32_t;
22 | typedef int64_t ogg_int64_t;
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/travis-ci-build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | failed=0;
4 |
5 | # check if testing mingw
6 | if [ "$CC" = "i686-w64-mingw32-gcc" ]; then
7 | export PLATFORM=mingw32
8 | export ARCH=x86
9 | export CC=
10 | haveExternalLibs=0
11 | else
12 | haveExternalLibs=1
13 | fi
14 |
15 | # Default Build
16 | (make clean release) || failed=1;
17 |
18 | # Test additional options
19 | if [ $haveExternalLibs -eq 1 ]; then
20 | (make clean release USE_CODEC_VORBIS=1 USE_FREETYPE=1) || failed=1;
21 | fi
22 |
23 | if [ $failed -eq 1 ]; then
24 | echo "Build failure.";
25 | else
26 | echo "All builds successful.";
27 | fi
28 |
29 | exit $failed;
30 |
31 |
--------------------------------------------------------------------------------
/misc/setup/slack-desc:
--------------------------------------------------------------------------------
1 | |-----handy-ruler------------------------------------------------------|
2 | ioquake3: ioquake 3 - An open source Quake 3 distribution
3 | ioquake3:
4 | ioquake3: ioquake3 aims to build upon id Software's Quake 3 source code release.
5 | ioquake3: The source code was released on August 20, 2005 under the GPL. Since
6 | ioquake3: then code has been cleaned up, bugs have been fixed and features been
7 | ioquake3: added.
8 | ioquake3: The permanent goal is to create THE open source Quake 3 distribution
9 | ioquake3: upon which people base their games and projects.
10 | ioquake3:
11 | ioquake3: http://ioquake3.org/
12 | ioquake3:
13 |
--------------------------------------------------------------------------------
/misc/msvc/glsl_stringify.vbs:
--------------------------------------------------------------------------------
1 | Dim fso, infile, outfile, line
2 | Set fso = CreateObject("Scripting.FileSystemObject")
3 | Set infile = fso.OpenTextFile(WScript.Arguments(0))
4 | Set outfile = fso.CreateTextFile(WScript.Arguments(1), True)
5 |
6 | outfile.WriteLine("const char *fallbackShader_" & fso.GetBaseName(WScript.Arguments(0)) & " =")
7 | While Not infile.AtEndOfStream
8 | line = infile.ReadLine
9 | line = Replace(line, "\", "\\")
10 | line = Replace(line, Chr(9), "\t")
11 | line = Replace(line, Chr(34), "\" & chr(34))
12 | line = Chr(34) & line & "\n" & Chr(34)
13 | outfile.WriteLine(line)
14 | Wend
15 | outfile.WriteLine(";")
16 |
17 | infile.Close
18 | outfile.Close
--------------------------------------------------------------------------------
/code/libspeex/config.h:
--------------------------------------------------------------------------------
1 | // Microsoft version of 'inline'
2 | #define inline __inline
3 |
4 | // Visual Studio support alloca(), but it always align variables to 16-bit
5 | // boundary, while SSE need 128-bit alignment. So we disable alloca() when
6 | // SSE is enabled.
7 | #ifndef _USE_SSE
8 | # define USE_ALLOCA
9 | # if defined(__sun) /* Solaris needs this for alloca(). */
10 | # define HAVE_ALLOCA_H
11 | # endif
12 | #endif
13 |
14 | /* Default to floating point */
15 | #ifndef FIXED_POINT
16 | # define FLOATING_POINT
17 | # define USE_SMALLFT
18 | #else
19 | # define USE_KISS_FFT
20 | #endif
21 |
22 | /* We don't support visibility on Win32 */
23 | #define EXPORT
24 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/ErrorWindow.m:
--------------------------------------------------------------------------------
1 | #import "ErrorWindow.h"
2 |
3 | @implementation ErrorWindow
4 |
5 | - (void)bitch:(NSString *)errorlog {
6 | NSLog(errorlog);
7 |
8 | NSNib *nib = [[NSNib alloc] initWithNibNamed:@"ErrorWindow.nib" bundle:[NSBundle mainBundle]];
9 | [nib instantiateNibWithOwner:self topLevelObjects:nil];
10 |
11 | [errorWindow makeKeyWindow];
12 | [errorTextField setFont:[NSFont userFixedPitchFontOfSize:12.0]];
13 | [errorTextField setString:@""];
14 | [[errorTextField textStorage] appendAttributedString:[[[NSAttributedString alloc] initWithString:errorlog] autorelease]];
15 | [errorTextField scrollRangeToVisible:NSMakeRange([[errorTextField string] length], 0)];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/jenkins-ci-build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | UNAME=`uname`
4 | MASTER_DIR=`dirname $0`
5 | BUILD_DEFAULT="release"
6 |
7 | cd ${MASTER_DIR}
8 |
9 | if [ "$OPTIONS" = "all_options" ];
10 | then
11 | export USE_CODEC_VORBIS=1
12 | export USE_FREETYPE=1
13 | fi
14 |
15 | if [ "$UNAME" == "Darwin" ]; then
16 | CORES=`sysctl -n hw.ncpu`
17 | elif [ "$UNAME" == "Linux" ]; then
18 | CORES=`awk '/^processor/ { N++} END { print N }' /proc/cpuinfo`
19 | fi
20 |
21 | echo "platform : ${UNAME}"
22 | echo "cores : ${CORES}"
23 | if [ "${BUILD_TYPE}" == "" ]; then
24 | BUILD_TYPE="${BUILD_DEFAULT}"
25 | echo "build type : defaulting to ${BUILD_TYPE}"
26 | else
27 | echo "build type : ${BUILD_TYPE}"
28 | fi
29 |
30 | make -j${CORES} distclean ${BUILD_TYPE}
31 |
32 | exit $?
33 |
--------------------------------------------------------------------------------
/misc/setup/setup.xml.mod:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
33 |
34 |
--------------------------------------------------------------------------------
/code/tools/lcc/README:
--------------------------------------------------------------------------------
1 | This hierarchy is the distribution for lcc version 4.1.
2 |
3 | lcc version 3.x is described in the book "A Retargetable C Compiler:
4 | Design and Implementation" (Addison-Wesley, 1995, ISBN 0-8053-1670-1).
5 | There are significant differences between 3.x and 4.x, most notably in
6 | the intermediate code. doc/4.html summarizes the differences.
7 |
8 | VERSION 4.1 IS INCOMPATIBLE WITH EARLIER VERSIONS OF LCC. DO NOT
9 | UNLOAD THIS DISTRIBUTION ON TOP OF A 3.X DISTRIBUTION.
10 |
11 | LOG describes the changes since the last release.
12 |
13 | CPYRIGHT describes the conditions under you can use, copy, modify, and
14 | distribute lcc or works derived from lcc.
15 |
16 | doc/install.html is an HTML file that gives a complete description of
17 | the distribution and installation instructions.
18 |
19 | Chris Fraser / cwfraser@microsoft.com
20 | David Hanson / drh@microsoft.com
21 | $Revision: 145 $ $Date: 2001-10-17 16:53:10 -0500 (Wed, 17 Oct 2001) $
22 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_copying.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 |
--------------------------------------------------------------------------------
/misc/xcode/ioquake3.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
12 |
13 |
15 |
16 |
18 |
19 |
21 |
22 |
24 |
25 |
27 |
28 |
30 |
31 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/misc/osxfe/ioquake3fe/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 | quake3_flat
11 | CFBundleIdentifier
12 | org.icculus.quake3
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | NSMainNibFile
26 | MainMenu
27 | NSPrincipalClass
28 | NSApplication
29 |
30 |
31 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_getenv.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /** @file SDL_getenv.h
24 | * @deprecated Use SDL_stdinc.h instead
25 | */
26 |
27 | /* DEPRECATED */
28 | #include "SDL_stdinc.h"
29 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /** @file SDL_types.h
24 | * @deprecated Use SDL_stdinc.h instead.
25 | */
26 |
27 | /* DEPRECATED */
28 | #include "SDL_stdinc.h"
29 |
--------------------------------------------------------------------------------
/misc/setup/ioquake3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | readlink() {
4 | local path=$1 ll
5 |
6 | if [ -L "$path" ]; then
7 | ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
8 | echo "${ll##* -> }"
9 | else
10 | return 1
11 | fi
12 | }
13 |
14 | script=$0
15 | count=0
16 | while [ -L "$script" ]
17 | do
18 | script=$(readlink "$script")
19 | count=`expr $count + 1`
20 | if [ $count -gt 100 ]
21 | then
22 | echo "Too many symbolic links"
23 | exit 1
24 | fi
25 | done
26 | cd "`dirname $script`"
27 |
28 |
29 | lib=lib
30 | test -e lib64 && lib=lib64
31 |
32 | if test "x$LD_LIBRARY_PATH" = x; then
33 | LD_LIBRARY_PATH="`pwd`/$lib"
34 | else
35 | LD_LIBRARY_PATH="`pwd`/$lib:$LD_LIBRARY_PATH"
36 | fi
37 | export LD_LIBRARY_PATH
38 |
39 | archs=`uname -m`
40 | case "$archs" in
41 | i?86) archs=i386 ;;
42 | x86_64) archs="x86_64 i386" ;;
43 | ppc64) archs="ppc64 ppc" ;;
44 | esac
45 |
46 | for arch in $archs; do
47 | test -x ./ioquake3.$arch || continue
48 | exec ./ioquake3.$arch "$@"
49 | done
50 | echo "could not execute ioquake3" >&2
51 |
--------------------------------------------------------------------------------
/code/libs/win32/libSDL.la:
--------------------------------------------------------------------------------
1 | # libSDL.la - a libtool library file
2 | # Generated by ltmain.sh (GNU libtool) 2.2.6
3 | #
4 | # Please DO NOT delete this file!
5 | # It is necessary for linking the library.
6 |
7 | # The name that we can dlopen(3).
8 | dlname='../bin/SDL.dll'
9 |
10 | # Names of this library.
11 | library_names='libSDL.dll.a'
12 |
13 | # The name of the static archive.
14 | old_library='libSDL.a'
15 |
16 | # Linker flags that can not go in dependency_libs.
17 | inherited_linker_flags=''
18 |
19 | # Libraries that this one depends upon.
20 | dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid'
21 |
22 | # Names of additional weak libraries provided by this library
23 | weak_library_names=''
24 |
25 | # Version information for libSDL.
26 | current=11
27 | age=11
28 | revision=3
29 |
30 | # Is this an already installed library?
31 | installed=yes
32 |
33 | # Should we warn about portability when linking against -modules?
34 | shouldnotlink=no
35 |
36 | # Files to dlopen/dlpreopen
37 | dlopen=''
38 | dlpreopen=''
39 |
40 | # Directory that this library needs to be installed in:
41 | libdir='/usr/local/lib'
42 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_byteorder.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /**
24 | * @file SDL_byteorder.h
25 | * @deprecated Use SDL_endian.h instead
26 | */
27 |
28 | /* DEPRECATED */
29 | #include "SDL_endian.h"
30 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/shadowfill_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform vec4 u_LightOrigin;
2 | uniform float u_LightRadius;
3 |
4 | varying vec3 var_Position;
5 |
6 | void main()
7 | {
8 | #if defined(USE_DEPTH)
9 | float depth = length(u_LightOrigin.xyz - var_Position) / u_LightRadius;
10 | #if 0
11 | // 32 bit precision
12 | const vec4 bitSh = vec4( 256 * 256 * 256, 256 * 256, 256, 1);
13 | const vec4 bitMsk = vec4( 0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
14 |
15 | vec4 comp;
16 | comp = depth * bitSh;
17 | comp.xyz = fract(comp.xyz);
18 | comp -= comp.xxyz * bitMsk;
19 | gl_FragColor = comp;
20 | #endif
21 |
22 | #if 1
23 | // 24 bit precision
24 | const vec3 bitSh = vec3( 256 * 256, 256, 1);
25 | const vec3 bitMsk = vec3( 0, 1.0 / 256.0, 1.0 / 256.0);
26 |
27 | vec3 comp;
28 | comp = depth * bitSh;
29 | comp.xy = fract(comp.xy);
30 | comp -= comp.xxy * bitMsk;
31 | gl_FragColor = vec4(comp, 1.0);
32 | #endif
33 |
34 | #if 0
35 | // 8 bit precision
36 | gl_FragColor = vec4(depth, depth, depth, 1);
37 | #endif
38 | #else
39 | gl_FragColor = vec4(0, 0, 0, 1);
40 | #endif
41 | }
42 |
--------------------------------------------------------------------------------
/misc/setup/ioq3demo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | readlink() {
4 | local path=$1 ll
5 |
6 | if [ -L "$path" ]; then
7 | ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
8 | echo "${ll/* -> }"
9 | else
10 | return 1
11 | fi
12 | }
13 |
14 | script=$0
15 | count=0
16 | while [ -L "$script" ]
17 | do
18 | script=$(readlink "$script")
19 | count=`expr $count + 1`
20 | if [ $count -gt 100 ]
21 | then
22 | echo "Too many symbolic links"
23 | exit 1
24 | fi
25 | done
26 | cd "`dirname $script`"
27 |
28 |
29 | lib=lib
30 | test -e lib64 && lib=lib64
31 |
32 | if test "x$LD_LIBRARY_PATH" = x; then
33 | LD_LIBRARY_PATH="`pwd`/$lib"
34 | else
35 | LD_LIBRARY_PATH="`pwd`/$lib:$LD_LIBRARY_PATH"
36 | fi
37 | export LD_LIBRARY_PATH
38 |
39 | archs=`uname -m`
40 | case "$archs" in
41 | i?86) archs=i386 ;;
42 | x86_64) archs="x86_64 i386" ;;
43 | ppc64) archs="ppc64 ppc" ;;
44 | esac
45 |
46 | for arch in $archs; do
47 | test -x ./ioquake3.$arch || continue
48 | exec ./ioquake3.$arch +set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0 +set fs_game demoq3 "$@"
49 | done
50 | echo "could not execute ioquake3" >&2
51 |
--------------------------------------------------------------------------------
/code/libspeex/testdenoise.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include
6 | #include
7 |
8 | #define NN 160
9 |
10 | int main()
11 | {
12 | short in[NN];
13 | int i;
14 | SpeexPreprocessState *st;
15 | int count=0;
16 | float f;
17 |
18 | st = speex_preprocess_state_init(NN, 8000);
19 | i=1;
20 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
21 | i=0;
22 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
23 | f=8000;
24 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &f);
25 | i=0;
26 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
27 | f=.0;
28 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
29 | f=.0;
30 | speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
31 | while (1)
32 | {
33 | int vad;
34 | fread(in, sizeof(short), NN, stdin);
35 | if (feof(stdin))
36 | break;
37 | vad = speex_preprocess_run(st, in);
38 | /*fprintf (stderr, "%d\n", vad);*/
39 | fwrite(in, sizeof(short), NN, stdout);
40 | count++;
41 | }
42 | speex_preprocess_state_destroy(st);
43 | return 0;
44 | }
45 |
--------------------------------------------------------------------------------
/code/tools/lcc/src/list.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 |
3 |
4 | static List freenodes; /* free list nodes */
5 |
6 | /* append - append x to list, return new list */
7 | List append(void *x, List list) {
8 | List new;
9 |
10 | if ((new = freenodes) != NULL)
11 | freenodes = freenodes->link;
12 | else
13 | NEW(new, PERM);
14 | if (list) {
15 | new->link = list->link;
16 | list->link = new;
17 | } else
18 | new->link = new;
19 | new->x = x;
20 | return new;
21 | }
22 |
23 | /* length - # elements in list */
24 | int length(List list) {
25 | int n = 0;
26 |
27 | if (list) {
28 | List lp = list;
29 | do
30 | n++;
31 | while ((lp = lp->link) != list);
32 | }
33 | return n;
34 | }
35 |
36 | /* ltov - convert list to a NULL-terminated vector allocated in arena */
37 | void *ltov(List *list, unsigned arena) {
38 | int i = 0;
39 | void **array = newarray(length(*list) + 1, sizeof array[0], arena);
40 |
41 | if (*list) {
42 | List lp = *list;
43 | do {
44 | lp = lp->link;
45 | array[i++] = lp->x;
46 | } while (lp != *list);
47 | #ifndef PURIFY
48 | lp = (*list)->link;
49 | (*list)->link = freenodes;
50 | freenodes = lp;
51 | #endif
52 | }
53 | *list = NULL;
54 | array[i] = NULL;
55 | return array;
56 | }
57 |
--------------------------------------------------------------------------------
/code/null/null_input.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | void IN_Init( void ) {
24 | }
25 |
26 | void IN_Frame (void) {
27 | }
28 |
29 | void IN_Shutdown( void ) {
30 | }
31 |
32 | void IN_Restart( void ) {
33 | }
34 |
35 | void Sys_SendKeyEvents (void) {
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/code/libspeex/kiss_fftr.h:
--------------------------------------------------------------------------------
1 | #ifndef KISS_FTR_H
2 | #define KISS_FTR_H
3 |
4 | #include "kiss_fft.h"
5 | #ifdef __cplusplus
6 | extern "C" {
7 | #endif
8 |
9 |
10 | /*
11 |
12 | Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
13 |
14 |
15 |
16 | */
17 |
18 | typedef struct kiss_fftr_state *kiss_fftr_cfg;
19 |
20 |
21 | kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
22 | /*
23 | nfft must be even
24 |
25 | If you don't care to allocate space, use mem = lenmem = NULL
26 | */
27 |
28 |
29 | void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
30 | /*
31 | input timedata has nfft scalar points
32 | output freqdata has nfft/2+1 complex points
33 | */
34 |
35 | void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
36 |
37 | void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
38 |
39 | void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
40 |
41 | /*
42 | input freqdata has nfft/2+1 complex points
43 | output timedata has nfft scalar points
44 | */
45 |
46 | #define kiss_fftr_free speex_free
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 | #endif
52 |
--------------------------------------------------------------------------------
/code/tools/lcc/cpp/getopt.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #define EPR fprintf(stderr,
4 | #define ERR(str, chr) if(opterr){EPR "%s%c\n", str, chr);}
5 | int opterr = 1;
6 | int optind = 1;
7 | int optopt;
8 | char *optarg;
9 |
10 | int
11 | lcc_getopt (int argc, char *const argv[], const char *opts)
12 | {
13 | static int sp = 1;
14 | int c;
15 | char *cp;
16 |
17 | if (sp == 1) {
18 | if (optind >= argc ||
19 | argv[optind][0] != '-' || argv[optind][1] == '\0')
20 | return -1;
21 | else if (strcmp(argv[optind], "--") == 0) {
22 | optind++;
23 | return -1;
24 | }
25 | }
26 | optopt = c = argv[optind][sp];
27 | if (c == ':' || (cp=strchr(opts, c)) == 0) {
28 | ERR (": illegal option -- ", c);
29 | if (argv[optind][++sp] == '\0') {
30 | optind++;
31 | sp = 1;
32 | }
33 | return '?';
34 | }
35 | if (*++cp == ':') {
36 | if (argv[optind][sp+1] != '\0')
37 | optarg = &argv[optind++][sp+1];
38 | else if (++optind >= argc) {
39 | ERR (": option requires an argument -- ", c);
40 | sp = 1;
41 | return '?';
42 | } else
43 | optarg = argv[optind++];
44 | sp = 1;
45 | } else {
46 | if (argv[optind][++sp] == '\0') {
47 | sp = 1;
48 | optind++;
49 | }
50 | optarg = 0;
51 | }
52 | return c;
53 | }
54 |
--------------------------------------------------------------------------------
/misc/xcode/ioquake3-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 | quake3_flat
11 | CFBundleIdentifier
12 | org.ioquake3.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.36
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 3cd8b49-2013-07-17
25 | CGDisableCoalescedUpdates
26 |
27 | LSMinimumSystemVersion
28 | ${MACOSX_DEPLOYMENT_TARGET}
29 | NSHumanReadableCopyright
30 | QUAKE III ARENA Copyright © 1999-2000 id Software, Inc. All rights reserved.
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ui/menus.txt:
--------------------------------------------------------------------------------
1 | // menu defs
2 | //
3 | {
4 | loadMenu { "ui/main.menu" }
5 | loadMenu { "ui/joinserver.menu" }
6 | loadMenu { "ui/filter.menu" }
7 | loadMenu { "ui/punkbuster.menu" }
8 | loadMenu { "ui/player.menu" }
9 | loadMenu { "ui/setup.menu" }
10 | loadMenu { "ui/fight.menu" }
11 | loadMenu { "ui/skirmish.menu" }
12 | loadMenu { "ui/createserver.menu" }
13 | loadMenu { "ui/controls.menu" }
14 | loadMenu { "ui/cdkey.menu" }
15 | loadMenu { "ui/system.menu" }
16 | loadMenu { "ui/options.menu" }
17 | loadMenu { "ui/help.menu" }
18 | loadMenu { "ui/ordershelp.menu" }
19 | loadMenu { "ui/mod.menu" }
20 | loadMenu { "ui/demo.menu" }
21 | loadMenu { "ui/cinematicmenu.menu" }
22 | loadMenu { "ui/credit.menu" }
23 | loadMenu { "ui/demo_quit.menu" }
24 | loadMenu { "ui/connect.menu" }
25 | loadMenu { "ui/powerup.menu" }
26 | loadMenu { "ui/password.menu" }
27 | loadMenu { "ui/quake3.menu" }
28 | loadMenu { "ui/quit.menu" }
29 | loadMenu { "ui/vid_restart.menu" }
30 | loadMenu { "ui/default.menu" }
31 | loadMenu { "ui/addfilter.menu" }
32 | loadMenu { "ui/error.menu" }
33 | loadMenu { "ui/serverinfo.menu" }
34 | loadMenu { "ui/findplayer.menu" }
35 | loadMenu { "ui/endofgame.menu" }
36 | loadMenu { "ui/quitcredit.menu" }
37 | loadMenu { "ui/resetscore.menu" }
38 | loadMenu { "ui/createfavorite.menu" }
39 | }
40 |
--------------------------------------------------------------------------------
/misc/ReadMe-OSX.rtf:
--------------------------------------------------------------------------------
1 | {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
2 | {\fonttbl\f0\fswiss\fcharset0 ArialMT;}
3 | {\colortbl;\red255\green255\blue255;}
4 | \paperw11905\paperh16837\margl1440\margr1440\vieww11380\viewh12260\viewkind0
5 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
6 |
7 | \f0\b\fs24 \cf0 Welcome to ioquake3.\
8 | \
9 | You can find us on the web at:\
10 | http://www.ioquake3.org/\
11 | This is the 1.36 release for Mac OS X.\
12 | If you run into any issues, please check out our website's discussion page for a place to talk about them and get help.\
13 | http://ioquake3.org/discussion/\
14 | \
15 | To install, simply copy the ioquake3 folder to your applications directory, then copy the pak0.pk3 file\
16 | from your legal Quake 3 Arena CDROM into the baseq3 sub-folder.\
17 | You can also copy it over from a boot camp'd steam install or whatever. \
18 | Just make sure to get your cd key as well.\
19 | \
20 | If you don't have Quake 3, check out some of the excellent games made with ioquake3:\
21 | http://ioquake3.org/extras/derivative-games/\
22 | \
23 | On ioquake3.org you can also find links to the latest source for this release, packages for other platforms, and more.\
24 | I hope to see you on server.ioquake3.org soon!\
25 | -\
26 | Thanks,\
27 | Zachary Slater\
28 | zachary@ioquake.org\
29 | }
--------------------------------------------------------------------------------
/misc/setup/pkg/ioq3ded.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Rev: $Id: ioq3ded.sh,v 1.9 2006/01/18 13:47:42 raistlin Exp raistlin $
3 | # Needed to make symlinks/shortcuts work.
4 | # the binaries must run with correct working directory
5 |
6 | IOQ3_DIR=/usr/local/share/games/quake3
7 |
8 | if [ "x${LD_LIBRARY_PATH}" = "x" ]; then
9 | LD_LIBRARY_PATH="${IOQ3_DIR}/lib"
10 | else
11 | LD_LIBRARY_PATH="${IOQ3_DIR}/lib:${LD_LIBRARY_PATH}"
12 | fi
13 | export LD_LIBRARY_PATH
14 |
15 | COMPILE_PLATFORM=`uname|sed -e 's/_.*//'|tr '[:upper:]' '[:lower:]'`
16 | COMPILE_ARCH=`uname -p | sed -e 's/i.86/i386/'`
17 |
18 | EXEC_REL=release
19 |
20 | # EXEC_BIN=ioquake3.${COMPILE_ARCH}
21 | # EXEC_BIN=ioquake3-smp.${COMPILE_ARCH}
22 | EXEC_BIN=ioq3ded.${COMPILE_ARCH}
23 |
24 | EXEC_FLAGS="+set fs_basepath ${IOQ3_DIR} +set vm_game 1 +set vm_cgame 1 +set vm_ui 1 +set sv_pure 1 +set ttycon 0 +set com_ansiColor 0"
25 |
26 | EXEC_DIR_LIST="${IOQ3_DIR}"
27 |
28 | for d in ${EXEC_DIR_LIST}
29 | do
30 | if [ -d $d ]; then
31 | EXEC_DIR=${d}
32 | break
33 | fi
34 | done
35 |
36 | if [ "X${EXEC_DIR}" != "X" ]; then
37 | if [ ! -x ${EXEC_DIR}/${EXEC_BIN} ]; then
38 | echo "Executable ${EXEC_DIR}/${EXEC_BIN} not found!" ; exit 1
39 | fi
40 | cd ${IOQ3_DIR} && \
41 | ${EXEC_DIR}/${EXEC_BIN} ${EXEC_FLAGS} $*
42 | exit $?
43 | else
44 | echo "No ioq3 binaries found!"
45 | exit 1
46 | fi
47 |
48 |
49 |
--------------------------------------------------------------------------------
/misc/setup/pkg/ioquake3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Rev: $Id: ioquake3.sh,v 1.11 2006/01/18 13:47:42 raistlin Exp raistlin $
3 | # Needed to make symlinks/shortcuts work.
4 | # the binaries must run with correct working directory
5 |
6 | IOQ3_DIR=/usr/local/share/games/quake3
7 |
8 | if [ "x${LD_LIBRARY_PATH}" = "x" ]; then
9 | LD_LIBRARY_PATH="${IOQ3_DIR}/lib"
10 | else
11 | LD_LIBRARY_PATH="${IOQ3_DIR}/lib:${LD_LIBRARY_PATH}"
12 | fi
13 | export LD_LIBRARY_PATH
14 |
15 | COMPILE_PLATFORM=`uname|sed -e 's/_.*//'|tr '[:upper:]' '[:lower:]'`
16 | COMPILE_ARCH=`uname -p | sed -e 's/i.86/i386/'`
17 |
18 | EXEC_REL=release
19 |
20 | EXEC_BIN=ioquake3.${COMPILE_ARCH}
21 | # EXEC_BIN=ioquake3-smp.${COMPILE_ARCH}
22 | # EXEC_BIN=ioq3ded.${COMPILE_ARCH}
23 |
24 | EXEC_FLAGS="+set fs_basepath ${IOQ3_DIR} +set vm_game 1 +set vm_cgame 1 +set vm_ui 1 +set sv_pure 1 +set ttycon 0 +set com_ansiColor 0"
25 |
26 | EXEC_DIR_LIST="${IOQ3_DIR}"
27 |
28 | for d in ${EXEC_DIR_LIST}
29 | do
30 | if [ -d $d ]; then
31 | EXEC_DIR=${d}
32 | break
33 | fi
34 | done
35 |
36 | if [ "X${EXEC_DIR}" != "X" ]; then
37 | if [ ! -x ${EXEC_DIR}/${EXEC_BIN} ]; then
38 | echo "Executable ${EXEC_DIR}/${EXEC_BIN} not found!" ; exit 1
39 | fi
40 | cd ${IOQ3_DIR} && \
41 | ${EXEC_DIR}/${EXEC_BIN} ${EXEC_FLAGS} $*
42 | exit $?
43 | else
44 | echo "No ioq3 binaries found!"
45 | exit 1
46 | fi
47 |
48 |
49 |
--------------------------------------------------------------------------------
/code/asm/qasm.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | #ifndef __ASM_I386__
23 | #define __ASM_I386__
24 |
25 | #include "../qcommon/q_platform.h"
26 |
27 | #ifdef __ELF__
28 | .section .note.GNU-stack,"",@progbits
29 | #endif
30 |
31 | #if defined(__ELF__) || defined(__WIN64__)
32 | #define C(label) label
33 | #else
34 | #define C(label) _##label
35 | #endif
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/code/botlib/be_aas_optimize.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_aas_optimize.h
25 | *
26 | * desc: AAS
27 | *
28 | * $Archive: /source/code/botlib/be_aas_optimize.h $
29 | *
30 | *****************************************************************************/
31 |
32 | void AAS_Optimize(void);
33 |
34 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/generic_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_DiffuseMap;
2 |
3 | #if defined(USE_LIGHTMAP)
4 | uniform sampler2D u_LightMap;
5 |
6 | uniform int u_Texture1Env;
7 | #endif
8 |
9 | #if defined(USE_RGBAGEN)
10 | uniform int u_AlphaTest;
11 | #endif
12 |
13 | varying vec2 var_DiffuseTex;
14 |
15 | #if defined(USE_LIGHTMAP)
16 | varying vec2 var_LightTex;
17 | #endif
18 |
19 | varying vec4 var_Color;
20 |
21 |
22 | void main()
23 | {
24 | vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
25 | #if defined(USE_LIGHTMAP)
26 | vec4 color2 = texture2D(u_LightMap, var_LightTex);
27 | #if defined(RGBM_LIGHTMAP)
28 | color2.rgb *= 32.0 * color2.a;
29 | color2.a = 1.0;
30 | #endif
31 |
32 | if (u_Texture1Env == TEXENV_MODULATE)
33 | {
34 | color *= color2;
35 | }
36 | else if (u_Texture1Env == TEXENV_ADD)
37 | {
38 | color += color2;
39 | }
40 | else if (u_Texture1Env == TEXENV_REPLACE)
41 | {
42 | color = color2;
43 | }
44 |
45 | //color = color * (u_Texture1Env.xxxx + color2 * u_Texture1Env.z) + color2 * u_Texture1Env.y;
46 | #endif
47 |
48 | gl_FragColor = color * var_Color;
49 |
50 | #if defined(USE_RGBAGEN)
51 | if ((u_AlphaTest == ATEST_GT_0 && gl_FragColor.a <= 0.0) ||
52 | (u_AlphaTest == ATEST_LT_80 && gl_FragColor.a >= 0.5) ||
53 | (u_AlphaTest == ATEST_GE_80 && gl_FragColor.a < 0.5))
54 | {
55 | discard;
56 | }
57 | #endif
58 | }
59 |
--------------------------------------------------------------------------------
/code/tools/asm/ops.txt:
--------------------------------------------------------------------------------
1 | CNSTF,
2 | CNSTI,
3 | CNSTP,
4 | CNSTU,
5 |
6 | ARGB,
7 | ARGF,
8 | ARGI,
9 | ARGP,
10 | ARGU,
11 |
12 | ASGNB,
13 | ASGNF,
14 | ASGNI,
15 | ASGNP,
16 | ASGNU,
17 |
18 | INDIRB,
19 | INDIRF,
20 | INDIRI,
21 | INDIRP,
22 | INDIRU,
23 |
24 | CVFF,
25 | CVFI,
26 |
27 | CVIF,
28 | CVII,
29 | CVIU,
30 |
31 | CVPU,
32 |
33 | CVUI,
34 | CVUP,
35 | CVUU,
36 |
37 | NEGF,
38 | NEGI,
39 |
40 | CALLB,
41 | CALLF,
42 | CALLI,
43 | CALLP,
44 | CALLU,
45 | CALLV,
46 |
47 | RETF,
48 | RETI,
49 | RETP,
50 | RETU,
51 | RETV,
52 |
53 | ADDRGP,
54 |
55 | ADDRFP,
56 |
57 | ADDRLP,
58 |
59 | ADDF,
60 | ADDI,
61 | ADDP,
62 | ADDU,
63 |
64 | SUBF,
65 | SUBI,
66 | SUBP,
67 | SUBU,
68 |
69 | LSHI,
70 | LSHU,
71 |
72 | MODI,
73 | MODU,
74 |
75 | RSHI,
76 | RSHU,
77 |
78 | BANDI,
79 | BANDU,
80 |
81 | BCOMI,
82 | BCOMU,
83 |
84 | BORI,
85 | BORU,
86 |
87 | BXORI,
88 | BXORU,
89 |
90 | DIVF,
91 | DIVI,
92 | DIVU,
93 |
94 | MULF,
95 | MULI,
96 | MULU,
97 |
98 | EQF,
99 | EQI,
100 | EQU,
101 |
102 | GEF,
103 | GEI,
104 | GEU,
105 |
106 | GTF,
107 | GTI,
108 | GTU,
109 |
110 | LEF,
111 | LEI,
112 | LEU,
113 |
114 | LTF,
115 | LTI,
116 | LTU,
117 |
118 | NEF,
119 | NEI,
120 | NEU,
121 |
122 | JUMPV,
123 |
124 | LABELV,
125 |
126 | LOADB,
127 | LOADF,
128 | LOADI,
129 | LOADP,
130 | LOADU,
131 |
132 |
133 |
--------------------------------------------------------------------------------
/code/botlib/l_crc.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | typedef unsigned short crc_t;
24 |
25 | void CRC_Init(unsigned short *crcvalue);
26 | void CRC_ProcessByte(unsigned short *crcvalue, byte data);
27 | unsigned short CRC_Value(unsigned short crcvalue);
28 | unsigned short CRC_ProcessString(unsigned char *data, int length);
29 | void CRC_ContinueProcessString(unsigned short *crc, char *data, int length);
30 |
--------------------------------------------------------------------------------
/code/asm/qasm-inline.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | #ifndef __ASM_INLINE_I386__
23 | #define __ASM_INLINE_I386__
24 |
25 | #include "../qcommon/q_platform.h"
26 |
27 | #if idx64
28 | #define EAX "%%rax"
29 | #define EBX "%%rbx"
30 | #define ESP "%%rsp"
31 | #define EDI "%%rdi"
32 | #else
33 | #define EAX "%%eax"
34 | #define EBX "%%ebx"
35 | #define ESP "%%esp"
36 | #define EDI "%%edi"
37 | #endif
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/code/qcommon/vm_sparc.h:
--------------------------------------------------------------------------------
1 | #ifndef VM_SPARC_H
2 | #define VM_SPARC_H
3 |
4 | /* integer regs */
5 | #define G0 0
6 | #define G1 1
7 | #define G2 2
8 | #define G3 3
9 | #define G4 4
10 | #define G5 5
11 | #define G6 6
12 | #define G7 7
13 | #define O0 8
14 | #define O1 9
15 | #define O2 10
16 | #define O3 11
17 | #define O4 12
18 | #define O5 13
19 | #define O6 14
20 | #define O7 15
21 | #define L0 16
22 | #define L1 17
23 | #define L2 18
24 | #define L3 19
25 | #define L4 20
26 | #define L5 21
27 | #define L6 22
28 | #define L7 23
29 | #define I0 24
30 | #define I1 25
31 | #define I2 26
32 | #define I3 27
33 | #define I4 28
34 | #define I5 29
35 | #define I6 30
36 | #define I7 31
37 |
38 | /* float regs */
39 | #define F0 0
40 | #define F1 1
41 | #define F2 2
42 | #define F3 3
43 | #define F4 4
44 | #define F5 5
45 | #define F6 6
46 | #define F7 7
47 | #define F8 8
48 | #define F9 9
49 | #define F10 10
50 | #define F11 11
51 | #define F12 12
52 | #define F13 13
53 | #define F14 14
54 | #define F15 15
55 | #define F16 16
56 | #define F17 17
57 | #define F18 18
58 | #define F19 19
59 | #define F20 20
60 | #define F21 21
61 | #define F22 22
62 | #define F23 23
63 | #define F24 24
64 | #define F25 25
65 | #define F26 26
66 | #define F27 27
67 | #define F28 28
68 | #define F29 29
69 | #define F30 30
70 | #define F31 31
71 |
72 | /* state registers */
73 | #define Y_REG 0
74 | #define CCR_REG 2
75 | #define ASI_REG 3
76 | #define FPRS_REG 6
77 |
78 | #endif
79 |
--------------------------------------------------------------------------------
/code/game/syn.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #define CONTEXT_ALL 0xFFFFFFFF
24 | #define CONTEXT_NORMAL 1
25 | #define CONTEXT_NEARBYITEM 2
26 | #define CONTEXT_CTFREDTEAM 4
27 | #define CONTEXT_CTFBLUETEAM 8
28 | #define CONTEXT_REPLY 16
29 | #define CONTEXT_OBELISKREDTEAM 32
30 | #define CONTEXT_OBELISKBLUETEAM 64
31 | #define CONTEXT_HARVESTERREDTEAM 128
32 | #define CONTEXT_HARVESTERBLUETEAM 256
33 |
34 | #define CONTEXT_NAMES 1024
35 |
--------------------------------------------------------------------------------
/code/botlib/be_ai_gen.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 |
24 | /*****************************************************************************
25 | * name: be_ai_gen.h
26 | *
27 | * desc: genetic selection
28 | *
29 | * $Archive: /source/code/botlib/be_ai_gen.h $
30 | *
31 | *****************************************************************************/
32 |
33 | int GeneticParentsAndChildSelection(int numranks, float *ranks, int *parent1, int *parent2, int *child);
34 |
--------------------------------------------------------------------------------
/code/renderergl2/tr_postprocess.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 2011 Andrei Drexler, Richard Allen, James Canete
4 |
5 | This file is part of Reaction source code.
6 |
7 | Reaction source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Reaction source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Reaction source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #ifndef TR_POSTPROCESS_H
24 | #define TR_POSTPROCESS_H
25 |
26 | #include "tr_fbo.h"
27 |
28 | void RB_ToneMap(FBO_t *hdrFbo, ivec4_t hdrBox, FBO_t *ldrFbo, ivec4_t ldrBox, int autoExposure);
29 | void RB_BokehBlur(FBO_t *src, ivec4_t srcBox, FBO_t *dst, ivec4_t dstBox, float blur);
30 | void RB_SunRays(FBO_t *srcFbo, ivec4_t srcBox, FBO_t *dstFbo, ivec4_t dstBox);
31 | void RB_GaussianBlur(float blur);
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/code/game/ai_cmd.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 |
24 | /*****************************************************************************
25 | * name: ai_cmd.h
26 | *
27 | * desc: Quake3 bot AI
28 | *
29 | * $Archive: /source/code/botai/ai_chat.c $
30 | *
31 | *****************************************************************************/
32 |
33 | extern int notleader[MAX_CLIENTS];
34 |
35 | int BotMatchMessage(bot_state_t *bs, char *message);
36 | void BotPrintTeamGoal(bot_state_t *bs);
37 |
38 |
--------------------------------------------------------------------------------
/code/game/ai_vcmd.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 |
24 | /*****************************************************************************
25 | * name: ai_vcmd.h
26 | *
27 | * desc: Quake3 bot AI
28 | *
29 | * $Archive: /source/code/botai/ai_vcmd.c $
30 | *
31 | *****************************************************************************/
32 |
33 | int BotVoiceChatCommand(bot_state_t *bs, int mode, char *voicechat);
34 | void BotVoiceChat_Defend(bot_state_t *bs, int client, int mode);
35 |
36 |
37 |
--------------------------------------------------------------------------------
/code/libcurl/curl/stdcheaders.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDC_HEADERS_H
2 | #define __STDC_HEADERS_H
3 | /***************************************************************************
4 | * _ _ ____ _
5 | * Project ___| | | | _ \| |
6 | * / __| | | | |_) | |
7 | * | (__| |_| | _ <| |___
8 | * \___|\___/|_| \_\_____|
9 | *
10 | * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al.
11 | *
12 | * This software is licensed as described in the file COPYING, which
13 | * you should have received as part of this distribution. The terms
14 | * are also available at http://curl.haxx.se/docs/copyright.html.
15 | *
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 | * copies of the Software, and permit persons to whom the Software is
18 | * furnished to do so, under the terms of the COPYING file.
19 | *
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 | * KIND, either express or implied.
22 | *
23 | * $Id: stdcheaders.h,v 1.8 2004/01/07 09:19:34 bagder Exp $
24 | ***************************************************************************/
25 |
26 | #include
27 |
28 | size_t fread (void *, size_t, size_t, FILE *);
29 | size_t fwrite (const void *, size_t, size_t, FILE *);
30 |
31 | int strcasecmp(const char *, const char *);
32 | int strncasecmp(const char *, const char *, size_t);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/code/opusfile-0.2/src/internal.c:
--------------------------------------------------------------------------------
1 | /********************************************************************
2 | * *
3 | * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 | * *
8 | * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 *
9 | * by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
10 | * *
11 | ********************************************************************/
12 | #include "internal.h"
13 |
14 | #if defined(OP_ENABLE_ASSERTIONS)
15 | void op_fatal_impl(const char *_str,const char *_file,int _line){
16 | fprintf(stderr,"Fatal (internal) error in %s, line %i: %s\n",
17 | _file,_line,_str);
18 | abort();
19 | }
20 | #endif
21 |
22 | /*A version of strncasecmp() that is guaranteed to only ignore the case of
23 | ASCII characters.*/
24 | int op_strncasecmp(const char *_a,const char *_b,int _n){
25 | int i;
26 | for(i=0;i<_n;i++){
27 | int a;
28 | int b;
29 | int d;
30 | a=_a[i];
31 | b=_b[i];
32 | if(a>='a'&&a<='z')a-='a'-'A';
33 | if(b>='a'&&b<='z')b-='a'-'A';
34 | d=a-b;
35 | if(d)return d;
36 | }
37 | return 0;
38 | }
39 |
--------------------------------------------------------------------------------
/code/botlib/be_aas_cluster.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_aas_cluster.h
25 | *
26 | * desc: AAS
27 | *
28 | * $Archive: /source/code/botlib/be_aas_cluster.h $
29 | *
30 | *****************************************************************************/
31 |
32 | #ifdef AASINTERN
33 | //initialize the AAS clustering
34 | void AAS_InitClustering(void);
35 | //
36 | void AAS_SetViewPortalsAsClusterPortals(void);
37 | #endif //AASINTERN
38 |
39 |
--------------------------------------------------------------------------------
/code/botlib/l_utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: l_util.h
25 | *
26 | * desc: utils
27 | *
28 | * $Archive: /source/code/botlib/l_util.h $
29 | *
30 | *****************************************************************************/
31 |
32 | #define Vector2Angles(v,a) vectoangles(v,a)
33 | #ifndef MAX_PATH
34 | #define MAX_PATH MAX_QPATH
35 | #endif
36 | #define Maximum(x,y) (x > y ? x : y)
37 | #define Minimum(x,y) (x < y ? x : y)
38 |
--------------------------------------------------------------------------------
/code/libspeex/testecho.c:
--------------------------------------------------------------------------------
1 | #ifdef HAVE_CONFIG_H
2 | #include "config.h"
3 | #endif
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include "speex/speex_echo.h"
11 | #include "speex/speex_preprocess.h"
12 |
13 |
14 | #define NN 128
15 | #define TAIL 1024
16 |
17 | int main(int argc, char **argv)
18 | {
19 | FILE *echo_fd, *ref_fd, *e_fd;
20 | short echo_buf[NN], ref_buf[NN], e_buf[NN];
21 | SpeexEchoState *st;
22 | SpeexPreprocessState *den;
23 | int sampleRate = 8000;
24 |
25 | if (argc != 4)
26 | {
27 | fprintf(stderr, "testecho mic_signal.sw speaker_signal.sw output.sw\n");
28 | exit(1);
29 | }
30 | echo_fd = fopen(argv[2], "rb");
31 | ref_fd = fopen(argv[1], "rb");
32 | e_fd = fopen(argv[3], "wb");
33 |
34 | st = speex_echo_state_init(NN, TAIL);
35 | den = speex_preprocess_state_init(NN, sampleRate);
36 | speex_echo_ctl(st, SPEEX_ECHO_SET_SAMPLING_RATE, &sampleRate);
37 | speex_preprocess_ctl(den, SPEEX_PREPROCESS_SET_ECHO_STATE, st);
38 |
39 | while (!feof(ref_fd) && !feof(echo_fd))
40 | {
41 | fread(ref_buf, sizeof(short), NN, ref_fd);
42 | fread(echo_buf, sizeof(short), NN, echo_fd);
43 | speex_echo_cancellation(st, ref_buf, echo_buf, e_buf);
44 | speex_preprocess_run(den, e_buf);
45 | fwrite(e_buf, sizeof(short), NN, e_fd);
46 | }
47 | speex_echo_state_destroy(st);
48 | speex_preprocess_state_destroy(den);
49 | fclose(e_fd);
50 | fclose(echo_fd);
51 | fclose(ref_fd);
52 | return 0;
53 | }
54 |
--------------------------------------------------------------------------------
/code/asm/matha.s:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 | // math.s
24 | // x86 assembly-language math routines.
25 |
26 | #include "qasm.h"
27 |
28 |
29 | #if id386
30 |
31 | .text
32 |
33 | // TODO: rounding needed?
34 | // stack parameter offset
35 | #define val 4
36 |
37 | .globl C(Invert24To16)
38 | C(Invert24To16):
39 |
40 | movl val(%esp),%ecx
41 | movl $0x100,%edx // 0x10000000000 as dividend
42 | cmpl %edx,%ecx
43 | jle LOutOfRange
44 |
45 | subl %eax,%eax
46 | divl %ecx
47 |
48 | ret
49 |
50 | LOutOfRange:
51 | movl $0xFFFFFFFF,%eax
52 | ret
53 |
54 | #endif // id386
55 |
--------------------------------------------------------------------------------
/code/null/null_net.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #include "../qcommon/qcommon.h"
24 |
25 | /*
26 | =============
27 | NET_StringToAdr
28 |
29 | localhost
30 | idnewt
31 | idnewt:28000
32 | 192.246.40.70
33 | 192.246.40.70:28000
34 | =============
35 | */
36 | qboolean NET_StringToAdr (char *s, netadr_t *a)
37 | {
38 | if (!strcmp (s, "localhost")) {
39 | memset (a, 0, sizeof(*a));
40 | a->type = NA_LOOPBACK;
41 | return true;
42 | }
43 |
44 | return false;
45 | }
46 |
47 | /*
48 | ==================
49 | Sys_SendPacket
50 | ==================
51 | */
52 | void Sys_SendPacket( int length, void *data, netadr_t to ) {
53 | }
54 |
--------------------------------------------------------------------------------
/misc/nsis/Makefile:
--------------------------------------------------------------------------------
1 | ifndef VERSION
2 | VERSION=1.36_SVN
3 | endif
4 | ifndef RELEASE
5 | RELEASE=0
6 | endif
7 | ifndef ARCH
8 | ARCH=x86
9 | endif
10 | ifndef INSTALLDIR
11 | INSTALLDIR=.
12 | endif
13 | ifndef USE_RENDERER_DLOPEN
14 | USE_RENDERER_DLOPEN=1
15 | endif
16 | ifndef USE_OPENAL_DLOPEN
17 | USE_OPENAL_DLOPEN=1
18 | endif
19 | ifndef USE_CURL_DLOPEN
20 | USE_CURL_DLOPEN=0
21 | endif
22 | ifndef USE_INTERNAL_SPEEX
23 | USE_INTERNAL_SPEEX=1
24 | endif
25 | ifndef USE_INTERNAL_ZLIB
26 | USE_INTERNAL_ZLIB=1
27 | endif
28 | ifndef USE_INTERNAL_JPEG
29 | USE_INTERNAL_JPEG=1
30 | endif
31 |
32 | SDLDLL=SDL.dll
33 |
34 | DEFINES=
35 | ifeq ($(USE_RENDERER_DLOPEN),1)
36 | DEFINES+= -DUSE_RENDERER_DLOPEN
37 | endif
38 | ifeq ($(USE_OPENAL_DLOPEN),1)
39 | DEFINES+= -DUSE_OPENAL_DLOPEN
40 | endif
41 | ifeq ($(USE_CURL_DLOPEN),1)
42 | DEFINES+= -DUSE_CURL_DLOPEN
43 | endif
44 | ifeq ($(USE_INTERNAL_SPEEX),1)
45 | DEFINES+= -DUSE_INTERNAL_SPEEX
46 | endif
47 | ifeq ($(USE_INTERNAL_ZLIB),1)
48 | DEFINES+= -DUSE_INTERNAL_ZLIB
49 | endif
50 | ifeq ($(USE_INTERNAL_JPEG),1)
51 | DEFINES+= -DUSE_INTERNAL_JPEG
52 | endif
53 |
54 |
55 | all: ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe
56 |
57 | ioquake3.$(ARCH).nsi: ioquake3.nsi.in
58 | sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/x86/$(ARCH)/g;s/SDL.dll/$(SDLDLL)/' < $< > $@
59 |
60 | ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe: ioquake3.$(ARCH).nsi
61 | makensis $(DEFINES) ioquake3.$(ARCH).nsi
62 |
63 | clean:
64 | rm -rf *.exe ioquake3.$(ARCH).nsi
65 |
66 | install:
67 | mkdir -p $(INSTALLDIR)
68 | mv ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe $(INSTALLDIR)
69 |
70 | .PHONY: all clean
71 |
72 |
--------------------------------------------------------------------------------
/code/client/libmumblelink.h:
--------------------------------------------------------------------------------
1 | /* libmumblelink.h -- mumble link interface
2 |
3 | Copyright (C) 2008 Ludwig Nussel
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 |
21 | */
22 |
23 | int mumble_link(const char* name);
24 | int mumble_islinked(void);
25 | void mumble_update_coordinates(float fPosition[3], float fFront[3], float fTop[3]);
26 |
27 | /* new for mumble 1.2: also set camera position */
28 | void mumble_update_coordinates2(float fAvatarPosition[3], float fAvatarFront[3], float fAvatarTop[3],
29 | float fCameraPosition[3], float fCameraFront[3], float fCameraTop[3]);
30 |
31 | void mumble_set_description(const char* description);
32 | void mumble_set_context(const unsigned char* context, size_t len);
33 | void mumble_set_identity(const char* identity);
34 |
35 | void mumble_unlink(void);
36 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_config.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2009 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | #ifndef _SDL_config_h
24 | #define _SDL_config_h
25 |
26 | #include "SDL_platform.h"
27 |
28 | /* Add any platform that doesn't build using the configure system */
29 | #if defined(__DREAMCAST__)
30 | #include "SDL_config_dreamcast.h"
31 | #elif defined(__MACOS__)
32 | #include "SDL_config_macos.h"
33 | #elif defined(__MACOSX__)
34 | #include "SDL_config_macosx.h"
35 | #elif defined(__SYMBIAN32__)
36 | #include "SDL_config_symbian.h" /* must be before win32! */
37 | #elif defined(__WIN32__)
38 | #include "SDL_config_win32.h"
39 | #elif defined(__OS2__)
40 | #include "SDL_config_os2.h"
41 | #else
42 | #include "SDL_config_minimal.h"
43 | #endif /* platform config */
44 |
45 | #endif /* _SDL_config_h */
46 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/tonemap_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_TextureMap;
2 | uniform sampler2D u_LevelsMap;
3 |
4 | uniform vec4 u_Color;
5 |
6 | uniform vec2 u_AutoExposureMinMax;
7 | uniform vec3 u_ToneMinAvgMaxLinear;
8 |
9 | varying vec2 var_TexCoords;
10 |
11 | const vec3 LUMINANCE_VECTOR = vec3(0.2125, 0.7154, 0.0721); //vec3(0.299, 0.587, 0.114);
12 |
13 | vec3 FilmicTonemap(vec3 x)
14 | {
15 | const float SS = 0.22; // Shoulder Strength
16 | const float LS = 0.30; // Linear Strength
17 | const float LA = 0.10; // Linear Angle
18 | const float TS = 0.20; // Toe Strength
19 | const float TAN = 0.01; // Toe Angle Numerator
20 | const float TAD = 0.30; // Toe Angle Denominator
21 |
22 | vec3 SSxx = SS * x * x;
23 | vec3 LSx = LS * x;
24 | vec3 LALSx = LSx * LA;
25 |
26 | return ((SSxx + LALSx + TS * TAN) / (SSxx + LSx + TS * TAD)) - TAN / TAD;
27 |
28 | //return ((x*(SS*x+LA*LS)+TS*TAN)/(x*(SS*x+LS)+TS*TAD)) - TAN/TAD;
29 |
30 | }
31 |
32 | void main()
33 | {
34 | vec4 color = texture2D(u_TextureMap, var_TexCoords) * u_Color;
35 | vec3 minAvgMax = texture2D(u_LevelsMap, var_TexCoords).rgb;
36 | vec3 logMinAvgMaxLum = clamp(minAvgMax * 20.0 - 10.0, -u_AutoExposureMinMax.y, -u_AutoExposureMinMax.x);
37 |
38 | float avgLum = exp2(logMinAvgMaxLum.y);
39 | //float maxLum = exp2(logMinAvgMaxLum.z);
40 |
41 | color.rgb *= u_ToneMinAvgMaxLinear.y / avgLum;
42 | color.rgb = max(vec3(0.0), color.rgb - vec3(u_ToneMinAvgMaxLinear.x));
43 |
44 | vec3 fWhite = 1.0 / FilmicTonemap(vec3(u_ToneMinAvgMaxLinear.z - u_ToneMinAvgMaxLinear.x));
45 | color.rgb = FilmicTonemap(color.rgb) * fWhite;
46 |
47 | gl_FragColor = clamp(color, 0.0, 1.0);
48 | }
49 |
--------------------------------------------------------------------------------
/code/null/mac_net.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #include "../qcommon/q_shared.h"
24 | #include "../qcommon/qcommon.h"
25 |
26 | /*
27 | =============
28 | NET_StringToAdr
29 |
30 | localhost
31 | idnewt
32 | idnewt:28000
33 | 192.246.40.70
34 | 192.246.40.70:28000
35 | =============
36 | */
37 | qboolean NET_StringToAdr (char *s, netadr_t *a)
38 | {
39 | if (!strcmp (s, "localhost")) {
40 | memset (a, 0, sizeof(*a));
41 | a->type = NA_LOOPBACK;
42 | return true;
43 | }
44 |
45 | return false;
46 | }
47 |
48 | /*
49 | ==================
50 | Sys_SendPacket
51 | ==================
52 | */
53 | void Sys_SendPacket( int length, void *data, netadr_t to ) {
54 | }
55 |
--------------------------------------------------------------------------------
/code/SDL12/include/close_code.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Library General Public
7 | License as published by the Free Software Foundation; either
8 | version 2 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Library General Public License for more details.
14 |
15 | You should have received a copy of the GNU Library General Public
16 | License along with this library; if not, write to the Free
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /**
24 | * @file close_code.h
25 | * This file reverses the effects of begin_code.h and should be included
26 | * after you finish any function and structure declarations in your headers
27 | */
28 |
29 | #undef _begin_code_h
30 |
31 | /**
32 | * @file close_code.h
33 | * Reset structure packing at previous byte alignment
34 | */
35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__)
36 | #ifdef __BORLANDC__
37 | #pragma nopackwarning
38 | #endif
39 | #if (defined(__MWERKS__) && defined(__MACOS__))
40 | #pragma options align=reset
41 | #pragma enumsalwaysint reset
42 | #else
43 | #pragma pack(pop)
44 | #endif
45 | #endif /* Compiler needs structure packing set */
46 |
47 |
--------------------------------------------------------------------------------
/code/libspeex/smallft.h:
--------------------------------------------------------------------------------
1 | /********************************************************************
2 | * *
3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 | * *
8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
9 | * by the XIPHOPHORUS Company http://www.xiph.org/ *
10 | * *
11 | ********************************************************************
12 |
13 | function: fft transform
14 | last mod: $Id: smallft.h,v 1.3 2003/09/16 18:35:45 jm Exp $
15 |
16 | ********************************************************************/
17 | /**
18 | @file smallft.h
19 | @brief Discrete Rotational Fourier Transform (DRFT)
20 | */
21 |
22 | #ifndef _V_SMFT_H_
23 | #define _V_SMFT_H_
24 |
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /** Discrete Rotational Fourier Transform lookup */
31 | struct drft_lookup{
32 | int n;
33 | float *trigcache;
34 | int *splitcache;
35 | };
36 |
37 | extern void spx_drft_forward(struct drft_lookup *l,float *data);
38 | extern void spx_drft_backward(struct drft_lookup *l,float *data);
39 | extern void spx_drft_init(struct drft_lookup *l,int n);
40 | extern void spx_drft_clear(struct drft_lookup *l);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/code/game/ai_team.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 |
24 | /*****************************************************************************
25 | * name: ai_team.h
26 | *
27 | * desc: Quake3 bot AI
28 | *
29 | * $Archive: /source/code/botai/ai_chat.c $
30 | *
31 | *****************************************************************************/
32 |
33 | void BotTeamAI(bot_state_t *bs);
34 | int BotGetTeamMateTaskPreference(bot_state_t *bs, int teammate);
35 | void BotSetTeamMateTaskPreference(bot_state_t *bs, int teammate, int preference);
36 | void BotVoiceChat(bot_state_t *bs, int toclient, char *voicechat);
37 | void BotVoiceChatOnly(bot_state_t *bs, int toclient, char *voicechat);
38 |
39 |
40 |
--------------------------------------------------------------------------------
/code/botlib/be_aas_file.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_aas_file.h
25 | *
26 | * desc: AAS
27 | *
28 | * $Archive: /source/code/botlib/be_aas_file.h $
29 | *
30 | *****************************************************************************/
31 |
32 | #ifdef AASINTERN
33 | //loads the AAS file with the given name
34 | int AAS_LoadAASFile(char *filename);
35 | //writes an AAS file with the given name
36 | qboolean AAS_WriteAASFile(char *filename);
37 | //dumps the loaded AAS data
38 | void AAS_DumpAASData(void);
39 | //print AAS file information
40 | void AAS_FileInfo(void);
41 | #endif //AASINTERN
42 |
43 |
--------------------------------------------------------------------------------
/code/botlib/be_aas_routealt.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_aas_routealt.h
25 | *
26 | * desc: AAS
27 | *
28 | * $Archive: /source/code/botlib/be_aas_routealt.h $
29 | *
30 | *****************************************************************************/
31 |
32 | #ifdef AASINTERN
33 | void AAS_InitAlternativeRouting(void);
34 | void AAS_ShutdownAlternativeRouting(void);
35 | #endif //AASINTERN
36 |
37 |
38 | int AAS_AlternativeRouteGoals(vec3_t start, int startareanum, vec3_t goal, int goalareanum, int travelflags,
39 | aas_altroutegoal_t *altroutegoals, int maxaltroutegoals,
40 | int type);
41 |
--------------------------------------------------------------------------------
/code/renderergl2/tr_extratypes.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 2009-2011 Andrei Drexler, Richard Allen, James Canete
4 |
5 | This file is part of Reaction source code.
6 |
7 | Reaction source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Reaction source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Reaction source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #ifndef __TR_EXTRATYPES_H__
24 | #define __TR_EXTRATYPES_H__
25 |
26 | // tr_extratypes.h, for mods that want to extend tr_types.h without losing compatibility with original VMs
27 |
28 | // extra refdef flags start at 0x0008
29 | #define RDF_NOFOG 0x0008 // don't apply fog to polys added using RE_AddPolyToScene
30 | #define RDF_EXTRA 0x0010 // Makro - refdefex_t to follow after refdef_t
31 | #define RDF_SUNLIGHT 0x0020 // SmileTheory - render sunlight and shadows
32 |
33 | typedef struct {
34 | float blurFactor;
35 | float sunDir[3];
36 | float sunCol[3];
37 | float sunAmbCol[3];
38 | } refdefex_t;
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/code/null/null_snddma.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | // snddma_null.c
24 | // all other sound mixing is portable
25 |
26 | #include "../qcommon/q_shared.h"
27 | #include "../qcommon/qcommon.h"
28 |
29 | qboolean SNDDMA_Init(void)
30 | {
31 | return qfalse;
32 | }
33 |
34 | int SNDDMA_GetDMAPos(void)
35 | {
36 | return 0;
37 | }
38 |
39 | void SNDDMA_Shutdown(void)
40 | {
41 | }
42 |
43 | void SNDDMA_BeginPainting (void)
44 | {
45 | }
46 |
47 | void SNDDMA_Submit(void)
48 | {
49 | }
50 |
51 | sfxHandle_t S_RegisterSound( const char *name, qboolean compressed )
52 | {
53 | return 0;
54 | }
55 |
56 | void S_StartLocalSound( sfxHandle_t sfxHandle, int channelNum ) {
57 | }
58 |
59 | void S_ClearSoundBuffer( void ) {
60 | }
61 |
--------------------------------------------------------------------------------
/code/qcommon/puff.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a modified version of Mark Adlers work,
3 | * see below for the original copyright.
4 | * 2006 - Joerg Dietrich
5 | */
6 |
7 | /* puff.h
8 | Copyright (C) 2002, 2003 Mark Adler, all rights reserved
9 | version 1.7, 3 Mar 2002
10 |
11 | This software is provided 'as-is', without any express or implied
12 | warranty. In no event will the author be held liable for any damages
13 | arising from the use of this software.
14 |
15 | Permission is granted to anyone to use this software for any purpose,
16 | including commercial applications, and to alter it and redistribute it
17 | freely, subject to the following restrictions:
18 |
19 | 1. The origin of this software must not be misrepresented; you must not
20 | claim that you wrote the original software. If you use this software
21 | in a product, an acknowledgment in the product documentation would be
22 | appreciated but is not required.
23 | 2. Altered source versions must be plainly marked as such, and must not be
24 | misrepresented as being the original software.
25 | 3. This notice may not be removed or altered from any source distribution.
26 |
27 | Mark Adler madler@alumni.caltech.edu
28 | */
29 |
30 | #ifndef __PUFF_H
31 | #define __PUFF_H
32 |
33 | #include "q_shared.h" /* for definitions of the types */
34 |
35 | /*
36 | * See puff.c for purpose and usage.
37 | */
38 | int32_t puff(uint8_t *dest, /* pointer to destination pointer */
39 | uint32_t *destlen, /* amount of output space */
40 | uint8_t *source, /* pointer to source data pointer */
41 | uint32_t *sourcelen); /* amount of input available */
42 |
43 | #endif // __PUFF_H
44 |
--------------------------------------------------------------------------------
/code/renderergl1/tr_subs.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 2010 James Canete (use.less01@gmail.com)
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | // tr_subs.c - common function replacements for modular renderer
23 |
24 | #include "tr_local.h"
25 |
26 | void QDECL Com_Printf( const char *msg, ... )
27 | {
28 | va_list argptr;
29 | char text[1024];
30 |
31 | va_start(argptr, msg);
32 | Q_vsnprintf(text, sizeof(text), msg, argptr);
33 | va_end(argptr);
34 |
35 | ri.Printf(PRINT_ALL, "%s", text);
36 | }
37 |
38 | void QDECL Com_Error( int level, const char *error, ... )
39 | {
40 | va_list argptr;
41 | char text[1024];
42 |
43 | va_start(argptr, error);
44 | Q_vsnprintf(text, sizeof(text), error, argptr);
45 | va_end(argptr);
46 |
47 | ri.Error(level, "%s", text);
48 | }
49 |
--------------------------------------------------------------------------------
/code/renderergl2/tr_subs.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 2010 James Canete (use.less01@gmail.com)
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | // tr_subs.c - common function replacements for modular renderer
23 |
24 | #include "tr_local.h"
25 |
26 | void QDECL Com_Printf( const char *msg, ... )
27 | {
28 | va_list argptr;
29 | char text[1024];
30 |
31 | va_start(argptr, msg);
32 | Q_vsnprintf(text, sizeof(text), msg, argptr);
33 | va_end(argptr);
34 |
35 | ri.Printf(PRINT_ALL, "%s", text);
36 | }
37 |
38 | void QDECL Com_Error( int level, const char *error, ... )
39 | {
40 | va_list argptr;
41 | char text[1024];
42 |
43 | va_start(argptr, error);
44 | Q_vsnprintf(text, sizeof(text), error, argptr);
45 | va_end(argptr);
46 |
47 | ri.Error(level, "%s", text);
48 | }
49 |
--------------------------------------------------------------------------------
/code/botlib/be_aas_funcs.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_aas_funcs.h
25 | *
26 | * desc: AAS
27 | *
28 | * $Archive: /source/code/botlib/be_aas_funcs.h $
29 | *
30 | *****************************************************************************/
31 |
32 | #ifndef BSPCINCLUDE
33 |
34 | #include "be_aas_main.h"
35 | #include "be_aas_entity.h"
36 | #include "be_aas_sample.h"
37 | #include "be_aas_cluster.h"
38 | #include "be_aas_reach.h"
39 | #include "be_aas_route.h"
40 | #include "be_aas_routealt.h"
41 | #include "be_aas_debug.h"
42 | #include "be_aas_file.h"
43 | #include "be_aas_optimize.h"
44 | #include "be_aas_bsp.h"
45 | #include "be_aas_move.h"
46 |
47 | #endif //BSPCINCLUDE
48 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/down4x_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_TextureMap;
2 |
3 | uniform vec2 u_InvTexRes;
4 | varying vec2 var_TexCoords;
5 |
6 | void main()
7 | {
8 | vec4 color;
9 | vec2 tc;
10 |
11 | tc = var_TexCoords + u_InvTexRes * vec2(-1.5, -1.5); color = texture2D(u_TextureMap, tc);
12 | tc = var_TexCoords + u_InvTexRes * vec2(-0.5, -1.5); color += texture2D(u_TextureMap, tc);
13 | tc = var_TexCoords + u_InvTexRes * vec2( 0.5, -1.5); color += texture2D(u_TextureMap, tc);
14 | tc = var_TexCoords + u_InvTexRes * vec2( 1.5, -1.5); color += texture2D(u_TextureMap, tc);
15 |
16 | tc = var_TexCoords + u_InvTexRes * vec2(-1.5, -0.5); color += texture2D(u_TextureMap, tc);
17 | tc = var_TexCoords + u_InvTexRes * vec2(-0.5, -0.5); color += texture2D(u_TextureMap, tc);
18 | tc = var_TexCoords + u_InvTexRes * vec2( 0.5, -0.5); color += texture2D(u_TextureMap, tc);
19 | tc = var_TexCoords + u_InvTexRes * vec2( 1.5, -0.5); color += texture2D(u_TextureMap, tc);
20 |
21 | tc = var_TexCoords + u_InvTexRes * vec2(-1.5, 0.5); color += texture2D(u_TextureMap, tc);
22 | tc = var_TexCoords + u_InvTexRes * vec2(-0.5, 0.5); color += texture2D(u_TextureMap, tc);
23 | tc = var_TexCoords + u_InvTexRes * vec2( 0.5, 0.5); color += texture2D(u_TextureMap, tc);
24 | tc = var_TexCoords + u_InvTexRes * vec2( 1.5, 0.5); color += texture2D(u_TextureMap, tc);
25 |
26 | tc = var_TexCoords + u_InvTexRes * vec2(-1.5, 1.5); color += texture2D(u_TextureMap, tc);
27 | tc = var_TexCoords + u_InvTexRes * vec2(-0.5, 1.5); color += texture2D(u_TextureMap, tc);
28 | tc = var_TexCoords + u_InvTexRes * vec2( 0.5, 1.5); color += texture2D(u_TextureMap, tc);
29 | tc = var_TexCoords + u_InvTexRes * vec2( 1.5, 1.5); color += texture2D(u_TextureMap, tc);
30 |
31 | color *= 0.0625;
32 |
33 | gl_FragColor = color;
34 | }
35 |
--------------------------------------------------------------------------------
/code/null/null_glimp.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | #include "tr_common.h"
23 |
24 |
25 | qboolean ( * qwglSwapIntervalEXT)( int interval );
26 | void ( * qglMultiTexCoord2fARB )( GLenum texture, float s, float t );
27 | void ( * qglActiveTextureARB )( GLenum texture );
28 | void ( * qglClientActiveTextureARB )( GLenum texture );
29 |
30 |
31 | void ( * qglLockArraysEXT)( int, int);
32 | void ( * qglUnlockArraysEXT) ( void );
33 |
34 |
35 | void GLimp_EndFrame( void ) {
36 | }
37 |
38 | int GLimp_Init( void )
39 | {
40 | }
41 |
42 | void GLimp_Shutdown( void ) {
43 | }
44 |
45 | void GLimp_EnableLogging( qboolean enable ) {
46 | }
47 |
48 | void GLimp_LogComment( char *comment ) {
49 | }
50 |
51 | qboolean QGL_Init( const char *dllname ) {
52 | return qtrue;
53 | }
54 |
55 | void QGL_Shutdown( void ) {
56 | }
57 |
--------------------------------------------------------------------------------
/code/sys/con_passive.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #include "../qcommon/q_shared.h"
24 | #include "../qcommon/qcommon.h"
25 | #include "sys_local.h"
26 |
27 | #include
28 |
29 | /*
30 | ==================
31 | CON_Shutdown
32 | ==================
33 | */
34 | void CON_Shutdown( void )
35 | {
36 | }
37 |
38 | /*
39 | ==================
40 | CON_Init
41 | ==================
42 | */
43 | void CON_Init( void )
44 | {
45 | }
46 |
47 | /*
48 | ==================
49 | CON_Input
50 | ==================
51 | */
52 | char *CON_Input( void )
53 | {
54 | return NULL;
55 | }
56 |
57 | /*
58 | ==================
59 | CON_Print
60 | ==================
61 | */
62 | void CON_Print( const char *msg )
63 | {
64 | if( com_ansiColor && com_ansiColor->integer )
65 | Sys_AnsiColorPrint( msg );
66 | else
67 | fputs( msg, stderr );
68 | }
69 |
--------------------------------------------------------------------------------
/code/q3_ui/ui_sparena.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 | #include "ui_local.h"
24 |
25 | void UI_SPArena_Start( const char *arenaInfo ) {
26 | char *map;
27 | int level;
28 | int n;
29 | char *txt;
30 |
31 | n = (int)trap_Cvar_VariableValue( "sv_maxclients" );
32 | if ( n < 8 ) {
33 | trap_Cvar_SetValue( "sv_maxclients", 8 );
34 | }
35 |
36 | level = atoi( Info_ValueForKey( arenaInfo, "num" ) );
37 | txt = Info_ValueForKey( arenaInfo, "special" );
38 | if( txt[0] ) {
39 | if( Q_stricmp( txt, "training" ) == 0 ) {
40 | level = -4;
41 | }
42 | else if( Q_stricmp( txt, "final" ) == 0 ) {
43 | level = UI_GetNumSPTiers() * ARENAS_PER_TIER;
44 | }
45 | }
46 | trap_Cvar_SetValue( "ui_spSelection", level );
47 |
48 | map = Info_ValueForKey( arenaInfo, "map" );
49 | trap_Cmd_ExecuteText( EXEC_APPEND, va( "spmap %s\n", map ) );
50 | }
51 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/calclevels4x_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_TextureMap;
2 |
3 | uniform vec4 u_Color;
4 |
5 | uniform vec2 u_InvTexRes;
6 | varying vec2 var_TexCoords;
7 |
8 | const vec3 LUMINANCE_VECTOR = vec3(0.2125, 0.7154, 0.0721); //vec3(0.299, 0.587, 0.114);
9 |
10 | vec3 GetValues(vec2 offset, vec3 current)
11 | {
12 | vec3 minAvgMax;
13 | vec2 tc = var_TexCoords + u_InvTexRes * offset; minAvgMax = texture2D(u_TextureMap, tc).rgb;
14 |
15 | #ifdef FIRST_PASS
16 | float lumi = max(dot(LUMINANCE_VECTOR, minAvgMax), 0.000001);
17 | float loglumi = clamp(log2(lumi), -10.0, 10.0);
18 | minAvgMax = vec3(loglumi * 0.05 + 0.5);
19 | #endif
20 |
21 | return vec3(min(current.x, minAvgMax.x), current.y + minAvgMax.y, max(current.z, minAvgMax.z));
22 | }
23 |
24 | void main()
25 | {
26 | vec3 current = vec3(1.0, 0.0, 0.0);
27 |
28 | #ifdef FIRST_PASS
29 | current = GetValues(vec2( 0.0, 0.0), current);
30 | #else
31 | current = GetValues(vec2(-1.5, -1.5), current);
32 | current = GetValues(vec2(-0.5, -1.5), current);
33 | current = GetValues(vec2( 0.5, -1.5), current);
34 | current = GetValues(vec2( 1.5, -1.5), current);
35 |
36 | current = GetValues(vec2(-1.5, -0.5), current);
37 | current = GetValues(vec2(-0.5, -0.5), current);
38 | current = GetValues(vec2( 0.5, -0.5), current);
39 | current = GetValues(vec2( 1.5, -0.5), current);
40 |
41 | current = GetValues(vec2(-1.5, 0.5), current);
42 | current = GetValues(vec2(-0.5, 0.5), current);
43 | current = GetValues(vec2( 0.5, 0.5), current);
44 | current = GetValues(vec2( 1.5, 0.5), current);
45 |
46 | current = GetValues(vec2(-1.5, 1.5), current);
47 | current = GetValues(vec2(-0.5, 1.5), current);
48 | current = GetValues(vec2( 0.5, 1.5), current);
49 | current = GetValues(vec2( 1.5, 1.5), current);
50 |
51 | current.y *= 0.0625;
52 | #endif
53 |
54 | gl_FragColor = vec4(current, 1.0f);
55 | }
56 |
--------------------------------------------------------------------------------
/code/sys/win_resource.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //{{NO_DEPENDENCIES}}
23 | // Microsoft Developer Studio generated include file.
24 | // Used by winquake.rc
25 | //
26 | #define IDS_STRING1 1
27 | #define IDI_ICON1 1
28 | #define IDB_BITMAP1 1
29 | #define IDB_BITMAP2 128
30 | #define IDC_CURSOR1 129
31 | #define IDC_CURSOR2 130
32 | #define IDC_CURSOR3 131
33 |
34 | // Next default values for new objects
35 | //
36 | #ifdef APSTUDIO_INVOKED
37 | #ifndef APSTUDIO_READONLY_SYMBOLS
38 | #define _APS_NO_MFC 1
39 | #define _APS_NEXT_RESOURCE_VALUE 132
40 | #define _APS_NEXT_COMMAND_VALUE 40001
41 | #define _APS_NEXT_CONTROL_VALUE 1005
42 | #define _APS_NEXT_SYMED_VALUE 101
43 | #endif
44 | #endif
45 |
--------------------------------------------------------------------------------
/code/opus-1.0.2/src/opus.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011 Xiph.Org Foundation, Skype Limited
2 | Written by Jean-Marc Valin and Koen Vos */
3 | /*
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions
6 | are met:
7 |
8 | - Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | - Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #ifdef HAVE_CONFIG_H
29 | #include "config.h"
30 | #endif
31 |
32 | #include "opus.h"
33 | #include "opus_private.h"
34 |
35 | int encode_size(int size, unsigned char *data)
36 | {
37 | if (size < 252)
38 | {
39 | data[0] = size;
40 | return 1;
41 | } else {
42 | data[0] = 252+(size&0x3);
43 | data[1] = (size-(int)data[0])>>2;
44 | return 2;
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/code/game/g_mem.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 | //
24 | // g_mem.c
25 | //
26 |
27 |
28 | #include "g_local.h"
29 |
30 |
31 | #define POOLSIZE (256 * 1024)
32 |
33 | static char memoryPool[POOLSIZE];
34 | static int allocPoint;
35 |
36 | void *G_Alloc( int size ) {
37 | char *p;
38 |
39 | if ( g_debugAlloc.integer ) {
40 | G_Printf( "G_Alloc of %i bytes (%i left)\n", size, POOLSIZE - allocPoint - ( ( size + 31 ) & ~31 ) );
41 | }
42 |
43 | if ( allocPoint + size > POOLSIZE ) {
44 | G_Error( "G_Alloc: failed on allocation of %i bytes", size );
45 | return NULL;
46 | }
47 |
48 | p = &memoryPool[allocPoint];
49 |
50 | allocPoint += ( size + 31 ) & ~31;
51 |
52 | return p;
53 | }
54 |
55 | void G_InitMemory( void ) {
56 | allocPoint = 0;
57 | }
58 |
59 | void Svcmd_GameMem_f( void ) {
60 | G_Printf( "Game memory status: %i out of %i bytes allocated\n", allocPoint, POOLSIZE );
61 | }
62 |
--------------------------------------------------------------------------------
/code/botlib/l_log.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: l_log.h
25 | *
26 | * desc: log file
27 | *
28 | * $Archive: /source/code/botlib/l_log.h $
29 | *
30 | *****************************************************************************/
31 |
32 | //open a log file
33 | void Log_Open(char *filename);
34 | //close the current log file
35 | void Log_Close(void);
36 | //close log file if present
37 | void Log_Shutdown(void);
38 | //write to the current opened log file
39 | void QDECL Log_Write(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
40 | //write to the current opened log file with a time stamp
41 | void QDECL Log_WriteTimeStamped(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
42 | //returns a pointer to the log file
43 | FILE *Log_FilePointer(void);
44 | //flush log file
45 | void Log_Flush(void);
46 |
47 |
--------------------------------------------------------------------------------
/code/jpeg-8c/jconfig.h:
--------------------------------------------------------------------------------
1 | /* jconfig.h. Generated from jconfig.cfg by configure. */
2 | /* jconfig.cfg --- source file edited by configure script */
3 | /* see jconfig.txt for explanations */
4 |
5 | /* Define this if you get warnings about undefined structures. */
6 | /* #undef INCOMPLETE_TYPES_BROKEN */
7 |
8 | #define HAVE_PROTOTYPES 1
9 | #define HAVE_UNSIGNED_CHAR 1
10 | #define HAVE_UNSIGNED_SHORT 1
11 | /* #undef void */
12 | /* #undef const */
13 | /* #undef CHAR_IS_UNSIGNED */
14 |
15 | #ifdef JPEG_INTERNALS
16 |
17 | #define HAVE_STDDEF_H 1
18 | #define HAVE_STDLIB_H 1
19 | #define HAVE_LOCALE_H 1
20 | /* #undef NEED_BSD_STRINGS */
21 | /* #undef NEED_SYS_TYPES_H */
22 | /* #undef NEED_FAR_POINTERS */
23 | /* #undef NEED_SHORT_EXTERNAL_NAMES */
24 |
25 | /* Define "boolean" as unsigned char, not int, on Windows systems. */
26 | #ifdef _WIN32
27 | #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
28 | typedef unsigned char boolean;
29 | #endif
30 | #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
31 | #endif
32 |
33 | /* #undef RIGHT_SHIFT_IS_UNSIGNED */
34 | #ifdef _MSC_VER
35 | #define INLINE __inline
36 | #else
37 | #define INLINE __inline__
38 | #endif
39 | /* These are for configuring the JPEG memory manager. */
40 | /* #undef DEFAULT_MAX_MEM */
41 | /* #undef NO_MKTEMP */
42 |
43 | #endif /* JPEG_INTERNALS */
44 |
45 | #ifdef JPEG_CJPEG_DJPEG
46 |
47 | #define BMP_SUPPORTED /* BMP image file format */
48 | #define GIF_SUPPORTED /* GIF image file format */
49 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
50 | /* #undef RLE_SUPPORTED */
51 | #define TARGA_SUPPORTED /* Targa image file format */
52 |
53 | /* #undef TWO_FILE_COMMANDLINE */
54 | /* #undef NEED_SIGNAL_CATCHER */
55 | /* #undef DONT_USE_B_MODE */
56 |
57 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */
58 | /* #undef PROGRESS_REPORT */
59 |
60 | #endif /* JPEG_CJPEG_DJPEG */
61 |
--------------------------------------------------------------------------------
/code/tools/lcc/etc/bytecode.c:
--------------------------------------------------------------------------------
1 | /* quake3 bytecode target */
2 |
3 | #include
4 | #include
5 | #include "../../../qcommon/q_platform.h"
6 |
7 | #ifdef _WIN32
8 | #define BINEXT ".exe"
9 | #else
10 | #define BINEXT ""
11 | #endif
12 |
13 | char *suffixes[] = { ".c", ".i", ".asm", ".o", ".out", 0 };
14 | char inputs[256] = "";
15 | char *cpp[] = { "q3cpp" BINEXT,
16 | "-D__STDC__=1", "-D__STRICT_ANSI__", "-D__signed__=signed", "-DQ3_VM",
17 | "$1", "$2", "$3", 0 };
18 | char *include[] = { 0 };
19 | char *com[] = { "q3rcc" BINEXT, "-target=bytecode", "$1", "$2", "$3", 0 };
20 | char *ld[] = { 0 };
21 | char *as[] = { 0 };
22 |
23 | extern char *concat(char *, char *);
24 |
25 | /*
26 | ===============
27 | UpdatePaths
28 |
29 | Updates the paths to q3cpp and q3rcc based on
30 | the directory that contains q3lcc
31 | ===============
32 | */
33 | void UpdatePaths( const char *lccBinary )
34 | {
35 | char basepath[ 1024 ];
36 | char *p;
37 |
38 | strncpy( basepath, lccBinary, 1024 );
39 | p = strrchr( basepath, PATH_SEP );
40 |
41 | if( p )
42 | {
43 | *( p + 1 ) = '\0';
44 |
45 | cpp[ 0 ] = concat( basepath, "q3cpp" BINEXT );
46 | com[ 0 ] = concat( basepath, "q3rcc" BINEXT );
47 | }
48 | }
49 |
50 | int option(char *arg) {
51 | if (strncmp(arg, "-lccdir=", 8) == 0) {
52 | cpp[0] = concat(&arg[8], "/q3cpp" BINEXT);
53 | include[0] = concat("-I", concat(&arg[8], "/include"));
54 | com[0] = concat(&arg[8], "/q3rcc" BINEXT);
55 | } else if (strcmp(arg, "-p") == 0 || strcmp(arg, "-pg") == 0) {
56 | fprintf( stderr, "no profiling supported, %s ignored.\n", arg);
57 | } else if (strcmp(arg, "-b") == 0)
58 | ;
59 | else if (strcmp(arg, "-g") == 0)
60 | fprintf( stderr, "no debugging supported, %s ignored.\n", arg);
61 | else if (strncmp(arg, "-ld=", 4) == 0 || strcmp(arg, "-static") == 0) {
62 | fprintf( stderr, "no linking supported, %s ignored.\n", arg);
63 | } else
64 | return 0;
65 | return 1;
66 | }
67 |
--------------------------------------------------------------------------------
/code/renderergl2/glsl/depthblur_fp.glsl:
--------------------------------------------------------------------------------
1 | uniform sampler2D u_ScreenImageMap;
2 | uniform sampler2D u_ScreenDepthMap;
3 |
4 | uniform vec4 u_ViewInfo; // zfar / znear, zfar
5 | varying vec2 var_ScreenTex;
6 |
7 | //float gauss[5] = float[5](0.30, 0.23, 0.097, 0.024, 0.0033);
8 | float gauss[4] = float[4](0.40, 0.24, 0.054, 0.0044);
9 | //float gauss[3] = float[3](0.60, 0.19, 0.0066);
10 | #define GAUSS_SIZE 4
11 |
12 | float getLinearDepth(sampler2D depthMap, const vec2 tex, const float zFarDivZNear)
13 | {
14 | float sampleZDivW = texture2D(depthMap, tex).r;
15 | return 1.0 / mix(zFarDivZNear, 1.0, sampleZDivW);
16 | }
17 |
18 | vec4 depthGaussian1D(sampler2D imageMap, sampler2D depthMap, vec2 tex, float zFarDivZNear, float zFar)
19 | {
20 | float scale = 1.0 / 256.0;
21 |
22 | #if defined(USE_HORIZONTAL_BLUR)
23 | vec2 direction = vec2(1.0, 0.0) * scale;
24 | #else // if defined(USE_VERTICAL_BLUR)
25 | vec2 direction = vec2(0.0, 1.0) * scale;
26 | #endif
27 |
28 | float depthCenter = zFar * getLinearDepth(depthMap, tex, zFarDivZNear);
29 | vec2 centerSlope = vec2(dFdx(depthCenter), dFdy(depthCenter)) / vec2(dFdx(tex.x), dFdy(tex.y));
30 |
31 | vec4 result = texture2D(imageMap, tex) * gauss[0];
32 | float total = gauss[0];
33 |
34 | int i, j;
35 | for (i = 0; i < 2; i++)
36 | {
37 | for (j = 1; j < GAUSS_SIZE; j++)
38 | {
39 | vec2 offset = direction * j;
40 | float depthSample = zFar * getLinearDepth(depthMap, tex + offset, zFarDivZNear);
41 | float depthExpected = depthCenter + dot(centerSlope, offset);
42 | if(abs(depthSample - depthExpected) < 5.0)
43 | {
44 | result += texture2D(imageMap, tex + offset) * gauss[j];
45 | total += gauss[j];
46 | }
47 | }
48 |
49 | direction = -direction;
50 | }
51 |
52 | return result / total;
53 | }
54 |
55 | void main()
56 | {
57 | gl_FragColor = depthGaussian1D(u_ScreenImageMap, u_ScreenDepthMap, var_ScreenTex, u_ViewInfo.x, u_ViewInfo.y);
58 | }
59 |
--------------------------------------------------------------------------------
/misc/xcode/xcode-readme.txt:
--------------------------------------------------------------------------------
1 | ioquake3 Xcode Projects
2 | Created & Maintained by Jeremiah Sypult & Contributors
3 | Updated: 2013/07/13
4 |
5 |
6 | GENERAL:
7 | From the ioquake3 root, navigate to misc/xcode and open the ioquake3.xcworkspace. The workspace embeds all the projects and currently builds universal (fat) binaries supporting i386 and x86_64.
8 |
9 | An older version of Xcode may be able to add support for PowerPC, but it is not currently supported in the Xcode version I produced these projects with (4.6.3).
10 |
11 | Hopefully people working with ioquake3 on OS X will benefit from using Xcodes IDE for building, hacking and debugging.
12 |
13 |
14 | LIBRARIES:
15 | - Game libraries (cgame, game, ui) compile to universal binary dylib for native (versus qvm bytecode/interpreted).
16 | - Renderer libraries also compile to universal binary dylib. The OpenGL 2 renderer project will normally show missing .c files in code/renderergl2/glsl. This is normal, as these .c files are automatically generated during the build process and deleted when building completes. This step is required in order for the renderer to link due to symbol dependencies in tr_glsl.c for fallback shaders.
17 | - ioquake3 searches for game & renderer libraries with an abbreviated architecture suffix in the filename. Xcode scripts handle symlink creation for the appropriate architectures at build time in order to support universal (fat) binaries.
18 | - Static libraries are used for botlib, jpeg and speex.
19 | - Currently links OS X system libcurl.dylib and libz.dylib.
20 | - SDL binary dylib is included.
21 |
22 |
23 | TODO:
24 | - dedicated support
25 | - missionpack support
26 | - curl.xcodeproj
27 | - ogg.xcodeproj (ogg vorbis support)
28 | - opusfile.xcodeproj
29 | - zlib.xcodeproj
30 | - q3asm.xcodeproj
31 | - q3cpp.xcodeproj
32 | - q3lcc.xcodeproj
33 | - q3rcc.xcodeproj
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | NO CARRIER
51 |
52 |
--------------------------------------------------------------------------------
/code/sys/win_resource.rc:
--------------------------------------------------------------------------------
1 | //Microsoft Developer Studio generated resource script.
2 | //
3 | #include "win_resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 | #ifdef APSTUDIO_INVOKED
25 | /////////////////////////////////////////////////////////////////////////////
26 | //
27 | // TEXTINCLUDE
28 | //
29 |
30 | 1 TEXTINCLUDE DISCARDABLE
31 | BEGIN
32 | "resource.h\0"
33 | END
34 |
35 | 2 TEXTINCLUDE DISCARDABLE
36 | BEGIN
37 | "#include ""winres.h""\r\n"
38 | "\0"
39 | END
40 |
41 | 3 TEXTINCLUDE DISCARDABLE
42 | BEGIN
43 | "\0"
44 | END
45 |
46 | #endif // APSTUDIO_INVOKED
47 |
48 |
49 | /////////////////////////////////////////////////////////////////////////////
50 | //
51 | // Icon
52 | //
53 |
54 | // Icon with lowest ID value placed first to ensure application icon
55 | // remains consistent on all systems.
56 | #ifndef __MINGW32__
57 | IDI_ICON1 ICON DISCARDABLE "../quake3.ico"
58 | #else
59 | IDI_ICON1 ICON DISCARDABLE "misc/quake3.ico"
60 | #endif
61 |
62 |
63 | /////////////////////////////////////////////////////////////////////////////
64 | //
65 | // String Table
66 | //
67 |
68 | STRINGTABLE DISCARDABLE
69 | BEGIN
70 | IDS_STRING1 "Quake3"
71 | END
72 |
73 | #endif // English (U.S.) resources
74 | /////////////////////////////////////////////////////////////////////////////
75 |
76 |
77 |
--------------------------------------------------------------------------------
/misc/setup/ioquake3.SlackBuild:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | CWD=`pwd`
4 | BASE=$CWD/../..
5 | if [ "$TMP" = "" ]; then
6 | TMP=/tmp
7 | fi
8 |
9 | # clean, update
10 | make -C $BASE clean || exit 1
11 | svn up $BASE || exit 1
12 |
13 | # extract version info
14 | VERSION=`grep "\#define *PRODUCT_VERSION" $BASE/code/qcommon/q_shared.h | \
15 | sed -e 's/[^"]*"\(.*\)"/\1/'`
16 |
17 | SVN_REV=`LANG=C svnversion $BASE`
18 | if [ ! "$SVN_REV" = "" ]; then
19 | VERSION=${VERSION}_SVN${SVN_REV}
20 | fi
21 |
22 | PKG_VERSION=$VERSION
23 |
24 | ARCH=${ARCH:-i586}
25 |
26 | if [ "$ARCH" = "i?86" ]; then
27 | ARCHSUFFIX="i386"
28 | elif [ "$ARCH" = "x86_64" ]; then
29 | ARCHSUFFIX="64"
30 | fi
31 |
32 | BUILD=${BUILD:-1_io}
33 |
34 | APP=ioquake3
35 |
36 | PKG=$TMP/package-$APP
37 |
38 | rm -rf $PKG
39 | mkdir -p $PKG
40 |
41 | # build
42 | make -C $BASE release copyfiles COPYDIR="$PKG"/usr/games/$APP|| exit 1
43 |
44 | # copy additional files
45 | cp $BASE/BUGS $BASE/COPYING.txt $BASE/ChangeLog $BASE/README $PKG/usr/games/$APP/
46 | cat $CWD/$APP.SlackBuild > $PKG/usr/games/$APP/$APP.SlackBuild
47 |
48 | mkdir -p $PKG/usr/share/$APP/icons
49 | cp $BASE/misc/quake3.png $PKG/usr/share/$APP/icons/ioquake3.png
50 |
51 | mkdir -p $PKG/usr/bin
52 | cat >> $PKG/usr/bin/ioquake3 << EOF
53 | #!/bin/sh
54 | cd /usr/games/$APP/
55 | ./ioquake3.${ARCHSUFFIX} \$*
56 | exit \$?
57 | EOF
58 | chmod 754 $PKG/usr/bin/ioquake3
59 |
60 | mkdir -p $PKG/usr/bin
61 | cat >> $PKG/usr/bin/ioq3ded << EOF
62 | #!/bin/sh
63 | cd /usr/games/$APP/
64 | ./ioq3ded.${ARCHSUFFIX} \$*
65 | exit \$?
66 | EOF
67 | chmod 754 $PKG/usr/bin/ioq3ded
68 |
69 | mkdir -p $PKG/install
70 | cat $CWD/slack-desc > $PKG/install/slack-desc
71 |
72 | cat >> $PKG/install/doinst.sh << EOF
73 | chmod 754 /usr/games/$APP/*.${ARCHSUFFIX}
74 | chmod 754 /usr/bin/ioquake3 /usr/bin/ioq3ded
75 | EOF
76 | chmod +x $PKG/install/doinst.sh
77 |
78 | pushd $PKG
79 | chown -R root:root install/ || exit 1
80 | chown -R root:games usr/ || exit 1
81 | /sbin/makepkg -l y -c n $TMP/$APP-$VERSION-$ARCH-$BUILD.tgz
82 | popd
83 |
84 |
--------------------------------------------------------------------------------
/code/opus-1.0.2/celt/cwrs.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2007-2008 CSIRO
2 | Copyright (c) 2007-2009 Xiph.Org Foundation
3 | Copyright (c) 2007-2009 Timothy B. Terriberry
4 | Written by Timothy B. Terriberry and Jean-Marc Valin */
5 | /*
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions
8 | are met:
9 |
10 | - Redistributions of source code must retain the above copyright
11 | notice, this list of conditions and the following disclaimer.
12 |
13 | - Redistributions in binary form must reproduce the above copyright
14 | notice, this list of conditions and the following disclaimer in the
15 | documentation and/or other materials provided with the distribution.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
21 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | #ifndef CWRS_H
31 | #define CWRS_H
32 |
33 | #include "arch.h"
34 | #include "stack_alloc.h"
35 | #include "entenc.h"
36 | #include "entdec.h"
37 |
38 | #ifdef CUSTOM_MODES
39 | int log2_frac(opus_uint32 val, int frac);
40 | #endif
41 |
42 | void get_required_bits(opus_int16 *bits, int N, int K, int frac);
43 |
44 | void encode_pulses(const int *_y, int N, int K, ec_enc *enc);
45 |
46 | void decode_pulses(int *_y, int N, int K, ec_dec *dec);
47 |
48 | #endif /* CWRS_H */
49 |
--------------------------------------------------------------------------------
/code/opus-1.0.2/celt/pitch.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2007-2008 CSIRO
2 | Copyright (c) 2007-2009 Xiph.Org Foundation
3 | Written by Jean-Marc Valin */
4 | /**
5 | @file pitch.h
6 | @brief Pitch analysis
7 | */
8 |
9 | /*
10 | Redistribution and use in source and binary forms, with or without
11 | modification, are permitted provided that the following conditions
12 | are met:
13 |
14 | - Redistributions of source code must retain the above copyright
15 | notice, this list of conditions and the following disclaimer.
16 |
17 | - Redistributions in binary form must reproduce the above copyright
18 | notice, this list of conditions and the following disclaimer in the
19 | documentation and/or other materials provided with the distribution.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | */
33 |
34 | #ifndef PITCH_H
35 | #define PITCH_H
36 |
37 | #include "modes.h"
38 |
39 | void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp,
40 | int len, int C);
41 |
42 | void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y,
43 | int len, int max_pitch, int *pitch);
44 |
45 | opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
46 | int N, int *T0, int prev_period, opus_val16 prev_gain);
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/code/tools/lcc/doc/bprint.1:
--------------------------------------------------------------------------------
1 | .\" $Id: bprint.1 145 2001-10-17 21:53:10Z timo $
2 | .TH BPRINT 1 "local \- $Date: 2001-10-17 16:53:10 -0500 (Wed, 17 Oct 2001) $"
3 | .SH NAME
4 | bprint \- expression profiler
5 | .SH SYNOPSIS
6 | .B bprint
7 | [
8 | .I option ...
9 | ]
10 | [
11 | .I file ...
12 | ]
13 | .SH DESCRIPTION
14 | .I bprint
15 | produces on the standard output a listing of the programs compiled by
16 | .I lcc
17 | with the
18 | .B \-b
19 | option.
20 | Executing an
21 | .B a.out
22 | so compiled appends profiling data to
23 | .BR prof.out .
24 | The first token of each expression in the listing is preceded
25 | by the number of times it was executed
26 | enclosed in angle brackets as determined from the data in
27 | .BR prof.out .
28 | .I bprint
29 | interprets the following options.
30 | .TP
31 | .B \-c
32 | Compress the
33 | .B prof.out
34 | file, which otherwise grows with every execution of
35 | .BR a.out .
36 | .TP
37 | .B \-b
38 | Print an annotated listing as described above.
39 | .TP
40 | .B \-n
41 | Include line numbers in the listing.
42 | .TP
43 | .B \-f
44 | Print only the number of invocations of each function.
45 | A second
46 | .B \-f
47 | summarizes call sites instead of callers.
48 | .TP
49 | .BI \-I \*Sdir
50 | specifies additional directories in which to seek
51 | files given in
52 | .B prof.out
53 | that do not begin with `/'.
54 | .PP
55 | If any file names are given, only the requested data for those files are printed
56 | in the order presented.
57 | If no options are given,
58 | .B \-b
59 | is assumed.
60 | .SH FILES
61 | .PP
62 | .ta \w'$LCCDIR/liblcc.{a,lib}XX'u
63 | .nf
64 | prof.out profiling data
65 | $LCCDIR/liblcc.{a,lib} \fIlcc\fP-specific library
66 | .SH "SEE ALSO"
67 | .IR lcc (1),
68 | .IR prof (1)
69 | .SH BUGS
70 | Macros and comments can confuse
71 | .I bprint
72 | because it uses post-expansion source coordinates
73 | to annotate pre-expansion source files.
74 | If
75 | .I bprint
76 | sees that it's about to print a statement count
77 | .I inside
78 | a number or identifier, it moves the count to just
79 | .I before
80 | the token.
81 | .PP
82 | Can't cope with an ill-formed
83 | .BR prof.out .
84 |
--------------------------------------------------------------------------------
/code/botlib/be_interface.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_interface.h
25 | *
26 | * desc: botlib interface
27 | *
28 | * $Archive: /source/code/botlib/be_interface.h $
29 | *
30 | *****************************************************************************/
31 |
32 | //#define DEBUG //debug code
33 | #define RANDOMIZE //randomize bot behaviour
34 |
35 | //FIXME: get rid of this global structure
36 | typedef struct botlib_globals_s
37 | {
38 | int botlibsetup; //true when the bot library has been setup
39 | int maxentities; //maximum number of entities
40 | int maxclients; //maximum number of clients
41 | float time; //the global time
42 | #ifdef DEBUG
43 | qboolean debug; //true if debug is on
44 | int goalareanum;
45 | vec3_t goalorigin;
46 | int runai;
47 | #endif
48 | } botlib_globals_t;
49 |
50 |
51 | extern botlib_globals_t botlibglobals;
52 | extern botlib_import_t botimport;
53 | extern int botDeveloper; //true if developer is on
54 |
55 | //
56 | int Sys_MilliSeconds(void);
57 |
58 |
--------------------------------------------------------------------------------
/code/botlib/be_ai_char.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 |
24 | /*****************************************************************************
25 | * name: be_ai_char.h
26 | *
27 | * desc: bot characters
28 | *
29 | * $Archive: /source/code/botlib/be_ai_char.h $
30 | *
31 | *****************************************************************************/
32 |
33 | //loads a bot character from a file
34 | int BotLoadCharacter(char *charfile, float skill);
35 | //frees a bot character
36 | void BotFreeCharacter(int character);
37 | //returns a float characteristic
38 | float Characteristic_Float(int character, int index);
39 | //returns a bounded float characteristic
40 | float Characteristic_BFloat(int character, int index, float min, float max);
41 | //returns an integer characteristic
42 | int Characteristic_Integer(int character, int index);
43 | //returns a bounded integer characteristic
44 | int Characteristic_BInteger(int character, int index, int min, int max);
45 | //returns a string characteristic
46 | void Characteristic_String(int character, int index, char *buf, int size);
47 | //free cached bot characters
48 | void BotShutdownCharacters(void);
49 |
--------------------------------------------------------------------------------
/code/opus-1.0.2/celt/celt_lpc.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2009-2010 Xiph.Org Foundation
2 | Written by Jean-Marc Valin */
3 | /*
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions
6 | are met:
7 |
8 | - Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | - Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in the
13 | documentation and/or other materials provided with the distribution.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
19 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #ifndef PLC_H
29 | #define PLC_H
30 |
31 | #include "arch.h"
32 |
33 | #define LPC_ORDER 24
34 |
35 | void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p);
36 |
37 | void celt_fir(const opus_val16 *x,
38 | const opus_val16 *num,
39 | opus_val16 *y,
40 | int N,
41 | int ord,
42 | opus_val16 *mem);
43 |
44 | void celt_iir(const opus_val32 *x,
45 | const opus_val16 *den,
46 | opus_val32 *y,
47 | int N,
48 | int ord,
49 | opus_val16 *mem);
50 |
51 | void _celt_autocorr(const opus_val16 *x, opus_val32 *ac, const opus_val16 *window, int overlap, int lag, int n);
52 |
53 | #endif /* PLC_H */
54 |
--------------------------------------------------------------------------------
/code/botlib/be_aas_main.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | /*****************************************************************************
24 | * name: be_aas_main.h
25 | *
26 | * desc: AAS
27 | *
28 | * $Archive: /source/code/botlib/be_aas_main.h $
29 | *
30 | *****************************************************************************/
31 |
32 | #ifdef AASINTERN
33 |
34 | extern aas_t aasworld;
35 |
36 | //AAS error message
37 | void QDECL AAS_Error(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
38 | //set AAS initialized
39 | void AAS_SetInitialized(void);
40 | //setup AAS with the given number of entities and clients
41 | int AAS_Setup(void);
42 | //shutdown AAS
43 | void AAS_Shutdown(void);
44 | //start a new map
45 | int AAS_LoadMap(const char *mapname);
46 | //start a new time frame
47 | int AAS_StartFrame(float time);
48 | #endif //AASINTERN
49 |
50 | //returns true if AAS is initialized
51 | int AAS_Initialized(void);
52 | //returns true if the AAS file is loaded
53 | int AAS_Loaded(void);
54 | //returns the current time
55 | float AAS_Time(void);
56 | //
57 | void AAS_ProjectPointOntoVector( vec3_t point, vec3_t vStart, vec3_t vEnd, vec3_t vProj );
58 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_error.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /**
24 | * @file SDL_error.h
25 | * Simple error message routines for SDL
26 | */
27 |
28 | #ifndef _SDL_error_h
29 | #define _SDL_error_h
30 |
31 | #include "SDL_stdinc.h"
32 |
33 | #include "begin_code.h"
34 | /* Set up for C function definitions, even when using C++ */
35 | #ifdef __cplusplus
36 | extern "C" {
37 | #endif
38 |
39 | /**
40 | * @name Public functions
41 | */
42 | /*@{*/
43 | extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
44 | extern DECLSPEC char * SDLCALL SDL_GetError(void);
45 | extern DECLSPEC void SDLCALL SDL_ClearError(void);
46 | /*@}*/
47 |
48 | /**
49 | * @name Private functions
50 | * @internal Private error message function - used internally
51 | */
52 | /*@{*/
53 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
54 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
55 | typedef enum {
56 | SDL_ENOMEM,
57 | SDL_EFREAD,
58 | SDL_EFWRITE,
59 | SDL_EFSEEK,
60 | SDL_UNSUPPORTED,
61 | SDL_LASTERROR
62 | } SDL_errorcode;
63 | extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
64 | /*@}*/
65 |
66 | /* Ends C function definitions when using C++ */
67 | #ifdef __cplusplus
68 | }
69 | #endif
70 | #include "close_code.h"
71 |
72 | #endif /* _SDL_error_h */
73 |
--------------------------------------------------------------------------------
/code/game/ai_chat.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | //
23 |
24 | /*****************************************************************************
25 | * name: ai_chat.h
26 | *
27 | * desc: Quake3 bot AI
28 | *
29 | * $Archive: /source/code/botai/ai_chat.c $
30 | *
31 | *****************************************************************************/
32 |
33 | //
34 | int BotChat_EnterGame(bot_state_t *bs);
35 | //
36 | int BotChat_ExitGame(bot_state_t *bs);
37 | //
38 | int BotChat_StartLevel(bot_state_t *bs);
39 | //
40 | int BotChat_EndLevel(bot_state_t *bs);
41 | //
42 | int BotChat_HitTalking(bot_state_t *bs);
43 | //
44 | int BotChat_HitNoDeath(bot_state_t *bs);
45 | //
46 | int BotChat_HitNoKill(bot_state_t *bs);
47 | //
48 | int BotChat_Death(bot_state_t *bs);
49 | //
50 | int BotChat_Kill(bot_state_t *bs);
51 | //
52 | int BotChat_EnemySuicide(bot_state_t *bs);
53 | //
54 | int BotChat_Random(bot_state_t *bs);
55 | // time the selected chat takes to type in
56 | float BotChatTime(bot_state_t *bs);
57 | // returns true if the bot can chat at the current position
58 | int BotValidChatPosition(bot_state_t *bs);
59 | // test the initial bot chats
60 | void BotChatTest(bot_state_t *bs);
61 |
62 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_active.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /**
24 | * @file SDL_active.h
25 | * Include file for SDL application focus event handling
26 | */
27 |
28 | #ifndef _SDL_active_h
29 | #define _SDL_active_h
30 |
31 | #include "SDL_stdinc.h"
32 | #include "SDL_error.h"
33 |
34 | #include "begin_code.h"
35 | /* Set up for C function definitions, even when using C++ */
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @name The available application states */
41 | /*@{*/
42 | #define SDL_APPMOUSEFOCUS 0x01 /**< The app has mouse coverage */
43 | #define SDL_APPINPUTFOCUS 0x02 /**< The app has input focus */
44 | #define SDL_APPACTIVE 0x04 /**< The application is active */
45 | /*@}*/
46 |
47 | /* Function prototypes */
48 | /**
49 | * This function returns the current state of the application, which is a
50 | * bitwise combination of SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS, and
51 | * SDL_APPACTIVE. If SDL_APPACTIVE is set, then the user is able to
52 | * see your application, otherwise it has been iconified or disabled.
53 | */
54 | extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
55 |
56 |
57 | /* Ends C function definitions when using C++ */
58 | #ifdef __cplusplus
59 | }
60 | #endif
61 | #include "close_code.h"
62 |
63 | #endif /* _SDL_active_h */
64 |
--------------------------------------------------------------------------------
/code/asm/snapvector.c:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 2011 Thilo Schulz
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #include "qasm-inline.h"
24 | #include "../qcommon/q_shared.h"
25 |
26 | /*
27 | * GNU inline asm version of qsnapvector
28 | * See MASM snapvector.asm for commentary
29 | */
30 |
31 | static unsigned char ssemask[16] __attribute__((aligned(16))) =
32 | {
33 | "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
34 | };
35 |
36 | void qsnapvectorsse(vec3_t vec)
37 | {
38 | __asm__ volatile
39 | (
40 | "movaps (%0), %%xmm1\n"
41 | "movups (%1), %%xmm0\n"
42 | "movaps %%xmm0, %%xmm2\n"
43 | "andps %%xmm1, %%xmm0\n"
44 | "andnps %%xmm2, %%xmm1\n"
45 | "cvtps2dq %%xmm0, %%xmm0\n"
46 | "cvtdq2ps %%xmm0, %%xmm0\n"
47 | "orps %%xmm1, %%xmm0\n"
48 | "movups %%xmm0, (%1)\n"
49 | :
50 | : "r" (ssemask), "r" (vec)
51 | : "memory", "%xmm0", "%xmm1", "%xmm2"
52 | );
53 |
54 | }
55 |
56 | #define QROUNDX87(src) \
57 | "flds " src "\n" \
58 | "fistpl " src "\n" \
59 | "fildl " src "\n" \
60 | "fstps " src "\n"
61 |
62 | void qsnapvectorx87(vec3_t vec)
63 | {
64 | __asm__ volatile
65 | (
66 | QROUNDX87("(%0)")
67 | QROUNDX87("4(%0)")
68 | QROUNDX87("8(%0)")
69 | :
70 | : "r" (vec)
71 | : "memory"
72 | );
73 | }
74 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_quit.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | /** @file SDL_quit.h
24 | * Include file for SDL quit event handling
25 | */
26 |
27 | #ifndef _SDL_quit_h
28 | #define _SDL_quit_h
29 |
30 | #include "SDL_stdinc.h"
31 | #include "SDL_error.h"
32 |
33 | /** @file SDL_quit.h
34 | * An SDL_QUITEVENT is generated when the user tries to close the application
35 | * window. If it is ignored or filtered out, the window will remain open.
36 | * If it is not ignored or filtered, it is queued normally and the window
37 | * is allowed to close. When the window is closed, screen updates will
38 | * complete, but have no effect.
39 | *
40 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
41 | * and SIGTERM (system termination request), if handlers do not already
42 | * exist, that generate SDL_QUITEVENT events as well. There is no way
43 | * to determine the cause of an SDL_QUITEVENT, but setting a signal
44 | * handler in your application will override the default generation of
45 | * quit events for that signal.
46 | */
47 |
48 | /** @file SDL_quit.h
49 | * There are no functions directly affecting the quit event
50 | */
51 |
52 | #define SDL_QuitRequested() \
53 | (SDL_PumpEvents(), SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUITMASK))
54 |
55 | #endif /* _SDL_quit_h */
56 |
--------------------------------------------------------------------------------
/code/sys/sys_local.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #include "../qcommon/q_shared.h"
24 | #include "../qcommon/qcommon.h"
25 |
26 | // Require a minimum version of SDL
27 | #define MINSDL_MAJOR 1
28 | #define MINSDL_MINOR 2
29 | #define MINSDL_PATCH 10
30 |
31 | // Input subsystem
32 | void IN_Init( void );
33 | void IN_Frame( void );
34 | void IN_Shutdown( void );
35 | void IN_Restart( void );
36 |
37 | // Console
38 | qboolean CON_IsTTY( void );
39 | void CON_SetIsTTY( qboolean isTTY );
40 | void CON_Shutdown( void );
41 | void CON_Init( void );
42 | char *CON_Input( void );
43 | void CON_Print( const char *message );
44 |
45 | unsigned int CON_LogSize( void );
46 | unsigned int CON_LogWrite( const char *in );
47 | unsigned int CON_LogRead( char *out, unsigned int outSize );
48 |
49 | #ifdef MACOS_X
50 | char *Sys_StripAppBundle( char *pwd );
51 | #endif
52 |
53 | void Sys_GLimpSafeInit( void );
54 | void Sys_GLimpInit( void );
55 | void Sys_PlatformInit( void );
56 | void Sys_PlatformExit( void );
57 | void Sys_SigHandler( int signal ) __attribute__ ((noreturn));
58 | void Sys_ErrorDialog( const char *error );
59 | void Sys_AnsiColorPrint( const char *msg );
60 |
61 | int Sys_PID( void );
62 | qboolean Sys_PIDIsRunning( int pid );
63 |
--------------------------------------------------------------------------------
/code/tools/lcc/src/null.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 | #define I(f) null_##f
3 |
4 | static Node I(gen)(Node p) { return p; }
5 | static void I(address)(Symbol q, Symbol p, long n) {}
6 | static void I(blockbeg)(Env *e) {}
7 | static void I(blockend)(Env *e) {}
8 | static void I(defaddress)(Symbol p) {}
9 | static void I(defconst)(int suffix, int size, Value v) {}
10 | static void I(defstring)(int len, char *s) {}
11 | static void I(defsymbol)(Symbol p) {}
12 | static void I(emit)(Node p) {}
13 | static void I(export)(Symbol p) {}
14 | static void I(function)(Symbol f, Symbol caller[], Symbol callee[], int ncalls) {}
15 | static void I(global)(Symbol p) {}
16 | static void I(import)(Symbol p) {}
17 | static void I(local)(Symbol p) {}
18 | static void I(progbeg)(int argc, char *argv[]) {}
19 | static void I(progend)(void) {}
20 | static void I(segment)(int s) {}
21 | static void I(space)(int n) {}
22 | static void I(stabblock)(int brace, int lev, Symbol *p) {}
23 | static void I(stabend)(Coordinate *cp, Symbol p, Coordinate **cpp, Symbol *sp, Symbol *stab) {}
24 | static void I(stabfend)(Symbol p, int lineno) {}
25 | static void I(stabinit)(char *file, int argc, char *argv[]) {}
26 | static void I(stabline)(Coordinate *cp) {}
27 | static void I(stabsym)(Symbol p) {}
28 | static void I(stabtype)(Symbol p) {}
29 |
30 |
31 | Interface nullIR = {
32 | {1, 1, 0}, /* char */
33 | {2, 2, 0}, /* short */
34 | {4, 4, 0}, /* int */
35 | {8, 8, 1}, /* long */
36 | {8 ,8, 1}, /* long long */
37 | {4, 4, 1}, /* float */
38 | {8, 8, 1}, /* double */
39 | {16,16,1}, /* long double */
40 | {4, 4, 0}, /* T* */
41 | {0, 4, 0}, /* struct */
42 | 1, /* little_endian */
43 | 0, /* mulops_calls */
44 | 0, /* wants_callb */
45 | 0, /* wants_argb */
46 | 1, /* left_to_right */
47 | 0, /* wants_dag */
48 | 0, /* unsigned_char */
49 | I(address),
50 | I(blockbeg),
51 | I(blockend),
52 | I(defaddress),
53 | I(defconst),
54 | I(defstring),
55 | I(defsymbol),
56 | I(emit),
57 | I(export),
58 | I(function),
59 | I(gen),
60 | I(global),
61 | I(import),
62 | I(local),
63 | I(progbeg),
64 | I(progend),
65 | I(segment),
66 | I(space),
67 | I(stabblock),
68 | I(stabend),
69 | I(stabfend),
70 | I(stabinit),
71 | I(stabline),
72 | I(stabsym),
73 | I(stabtype)
74 | };
75 |
--------------------------------------------------------------------------------
/code/asm/vm_x86_64.asm:
--------------------------------------------------------------------------------
1 | ; ===========================================================================
2 | ; Copyright (C) 2011 Thilo Schulz
3 | ;
4 | ; This file is part of Quake III Arena source code.
5 | ;
6 | ; Quake III Arena source code is free software; you can redistribute it
7 | ; and/or modify it under the terms of the GNU General Public License as
8 | ; published by the Free Software Foundation; either version 2 of the License,
9 | ; or (at your option) any later version.
10 | ;
11 | ; Quake III Arena source code is distributed in the hope that it will be
12 | ; useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ; GNU General Public License for more details.
15 | ;
16 | ; You should have received a copy of the GNU General Public License
17 | ; along with Quake III Arena source code; if not, write to the Free Software
18 | ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | ; ===========================================================================
20 |
21 | ; Call wrapper for vm_x86 when built with MSVC in 64 bit mode,
22 | ; since MSVC does not support inline x64 assembler code anymore.
23 | ;
24 | ; assumes __fastcall calling convention
25 |
26 | .code
27 |
28 | ; Call to compiled code after setting up the register environment for the VM
29 | ; prototype:
30 | ; uint8_t qvmcall64(int *programStack, int *opStack, intptr_t *instructionPointers, byte *dataBase);
31 |
32 | qvmcall64 PROC
33 | push rsi ; push non-volatile registers to stack
34 | push rdi
35 | push rbx
36 | ; need to save pointer in rcx so we can write back the programData value to caller
37 | push rcx
38 |
39 | ; registers r8 and r9 have correct value already thanx to __fastcall
40 | xor rbx, rbx ; opStackOfs starts out being 0
41 | mov rdi, rdx ; opStack
42 | mov esi, dword ptr [rcx] ; programStack
43 |
44 | call qword ptr [r8] ; instructionPointers[0] is also the entry point
45 |
46 | pop rcx
47 |
48 | mov dword ptr [rcx], esi ; write back the programStack value
49 | mov al, bl ; return opStack offset
50 |
51 | pop rbx
52 | pop rdi
53 | pop rsi
54 |
55 | ret
56 | qvmcall64 ENDP
57 |
58 | end
59 |
--------------------------------------------------------------------------------
/code/tools/lcc/src/alloc.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 | struct block {
3 | struct block *next;
4 | char *limit;
5 | char *avail;
6 | };
7 | union align {
8 | long l;
9 | char *p;
10 | double d;
11 | int (*f)(void);
12 | };
13 | union header {
14 | struct block b;
15 | union align a;
16 | };
17 | #ifdef PURIFY
18 | union header *arena[3];
19 |
20 | void *allocate(unsigned long n, unsigned a) {
21 | union header *new = malloc(sizeof *new + n);
22 |
23 | assert(a < NELEMS(arena));
24 | if (new == NULL) {
25 | error("insufficient memory\n");
26 | exit(1);
27 | }
28 | new->b.next = (void *)arena[a];
29 | arena[a] = new;
30 | return new + 1;
31 | }
32 |
33 | void deallocate(unsigned a) {
34 | union header *p, *q;
35 |
36 | assert(a < NELEMS(arena));
37 | for (p = arena[a]; p; p = q) {
38 | q = (void *)p->b.next;
39 | free(p);
40 | }
41 | arena[a] = NULL;
42 | }
43 |
44 | void *newarray(unsigned long m, unsigned long n, unsigned a) {
45 | return allocate(m*n, a);
46 | }
47 | #else
48 | static struct block
49 | first[] = { { NULL }, { NULL }, { NULL } },
50 | *arena[] = { &first[0], &first[1], &first[2] };
51 | static struct block *freeblocks;
52 |
53 | void *allocate(unsigned long n, unsigned a) {
54 | struct block *ap;
55 |
56 | assert(a < NELEMS(arena));
57 | assert(n > 0);
58 | ap = arena[a];
59 | n = roundup(n, sizeof (union align));
60 | while (n > ap->limit - ap->avail) {
61 | if ((ap->next = freeblocks) != NULL) {
62 | freeblocks = freeblocks->next;
63 | ap = ap->next;
64 | } else
65 | {
66 | unsigned m = sizeof (union header) + n + roundup(10*1024, sizeof (union align));
67 | ap->next = malloc(m);
68 | ap = ap->next;
69 | if (ap == NULL) {
70 | error("insufficient memory\n");
71 | exit(1);
72 | }
73 | ap->limit = (char *)ap + m;
74 | }
75 | ap->avail = (char *)((union header *)ap + 1);
76 | ap->next = NULL;
77 | arena[a] = ap;
78 |
79 | }
80 | ap->avail += n;
81 | return ap->avail - n;
82 | }
83 |
84 | void *newarray(unsigned long m, unsigned long n, unsigned a) {
85 | return allocate(m*n, a);
86 | }
87 | void deallocate(unsigned a) {
88 | assert(a < NELEMS(arena));
89 | arena[a]->next = freeblocks;
90 | freeblocks = first[a].next;
91 | first[a].next = NULL;
92 | arena[a] = &first[a];
93 | }
94 | #endif
95 |
--------------------------------------------------------------------------------
/code/tools/lcc/lburg/lburg.h:
--------------------------------------------------------------------------------
1 | #ifndef BURG_INCLUDED
2 | #define BURG_INCLUDED
3 |
4 | /* iburg.c: */
5 | extern void *alloc(int nbytes);
6 |
7 | typedef enum { TERM=1, NONTERM } Kind;
8 | typedef struct rule *Rule;
9 | typedef struct term *Term;
10 | struct term { /* terminals: */
11 | char *name; /* terminal name */
12 | Kind kind; /* TERM */
13 | int esn; /* external symbol number */
14 | int arity; /* operator arity */
15 | Term link; /* next terminal in esn order */
16 | Rule rules; /* rules whose pattern starts with term */
17 | };
18 |
19 | typedef struct nonterm *Nonterm;
20 | struct nonterm { /* nonterminals: */
21 | char *name; /* nonterminal name */
22 | Kind kind; /* NONTERM */
23 | int number; /* identifying number */
24 | int lhscount; /* # times nt appears in a rule lhs */
25 | int reached; /* 1 iff reached from start nonterminal */
26 | Rule rules; /* rules w/nonterminal on lhs */
27 | Rule chain; /* chain rules w/nonterminal on rhs */
28 | Nonterm link; /* next terminal in number order */
29 | };
30 | extern Nonterm nonterm(char *id);
31 | extern Term term(char *id, int esn);
32 |
33 | typedef struct tree *Tree;
34 | struct tree { /* tree patterns: */
35 | void *op; /* a terminal or nonterminal */
36 | Tree left, right; /* operands */
37 | int nterms; /* number of terminal nodes in this tree */
38 | };
39 | extern Tree tree(char *op, Tree left, Tree right);
40 |
41 | struct rule { /* rules: */
42 | Nonterm lhs; /* lefthand side nonterminal */
43 | Tree pattern; /* rule pattern */
44 | int ern; /* external rule number */
45 | int packed; /* packed external rule number */
46 | int cost; /* cost, if a constant */
47 | char *code; /* cost, if an expression */
48 | char *template; /* assembler template */
49 | Rule link; /* next rule in ern order */
50 | Rule next; /* next rule with same pattern root */
51 | Rule chain; /* next chain rule with same rhs */
52 | Rule decode; /* next rule with same lhs */
53 | Rule kids; /* next rule with same _kids pattern */
54 | };
55 | extern Rule rule(char *id, Tree pattern, char *template, char *code);
56 |
57 | /* gram.y: */
58 | void yyerror(char *fmt, ...);
59 | int yyparse(void);
60 | void yywarn(char *fmt, ...);
61 | extern int errcnt;
62 | extern FILE *infp;
63 | extern FILE *outfp;
64 |
65 | #endif
66 |
--------------------------------------------------------------------------------
/code/sys/sys_loadlib.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 |
23 | #if EMSCRIPTEN
24 | # include
25 | # define Sys_LoadLibrary(f) dlopen(f,RTLD_NOW)
26 | # define Sys_UnloadLibrary(h) dlclose(h)
27 | # define Sys_LoadFunction(h,fn) dlsym(h,fn)
28 | # define Sys_LibraryError() dlerror()
29 | #else
30 | #ifdef DEDICATED
31 | # ifdef _WIN32
32 | # include
33 | # define Sys_LoadLibrary(f) (void*)LoadLibrary(f)
34 | # define Sys_UnloadLibrary(h) FreeLibrary((HMODULE)h)
35 | # define Sys_LoadFunction(h,fn) (void*)GetProcAddress((HMODULE)h,fn)
36 | # define Sys_LibraryError() "unknown"
37 | # else
38 | # include
39 | # define Sys_LoadLibrary(f) dlopen(f,RTLD_NOW)
40 | # define Sys_UnloadLibrary(h) dlclose(h)
41 | # define Sys_LoadFunction(h,fn) dlsym(h,fn)
42 | # define Sys_LibraryError() dlerror()
43 | # endif
44 | #else
45 | # ifdef USE_LOCAL_HEADERS
46 | # include "SDL.h"
47 | # include "SDL_loadso.h"
48 | # else
49 | # include
50 | # include
51 | # endif
52 | # define Sys_LoadLibrary(f) SDL_LoadObject(f)
53 | # define Sys_UnloadLibrary(h) SDL_UnloadObject(h)
54 | # define Sys_LoadFunction(h,fn) SDL_LoadFunction(h,fn)
55 | # define Sys_LibraryError() SDL_GetError()
56 | #endif
57 | #endif
58 |
59 | void * QDECL Sys_LoadDll(const char *name, qboolean useSystemLib);
60 |
--------------------------------------------------------------------------------
/code/SDL12/include/SDL_config_minimal.h:
--------------------------------------------------------------------------------
1 | /*
2 | SDL - Simple DirectMedia Layer
3 | Copyright (C) 1997-2012 Sam Lantinga
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 |
19 | Sam Lantinga
20 | slouken@libsdl.org
21 | */
22 |
23 | #ifndef _SDL_config_minimal_h
24 | #define _SDL_config_minimal_h
25 |
26 | #include "SDL_platform.h"
27 |
28 | /* This is the minimal configuration that can be used to build SDL */
29 |
30 | #include
31 | #include
32 | #include
33 |
34 | #if 0
35 | typedef signed char int8_t;
36 | typedef unsigned char uint8_t;
37 | typedef signed short int16_t;
38 | typedef unsigned short uint16_t;
39 | typedef signed int int32_t;
40 | typedef unsigned int uint32_t;
41 | typedef unsigned int size_t;
42 | typedef unsigned long uintptr_t;
43 | #endif
44 |
45 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
46 | #define SDL_AUDIO_DRIVER_DUMMY 1
47 |
48 | /* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
49 | #define SDL_CDROM_DISABLED 1
50 |
51 | /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
52 | #define SDL_JOYSTICK_DISABLED 1
53 |
54 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
55 | #define SDL_LOADSO_DISABLED 1
56 |
57 | /* Enable the stub thread support (src/thread/generic/\*.c) */
58 | #define SDL_THREADS_DISABLED 1
59 |
60 | /* Enable the stub timer support (src/timer/dummy/\*.c) */
61 | #define SDL_TIMERS_DISABLED 1
62 |
63 | /* Enable the dummy video driver (src/video/dummy/\*.c) */
64 | #define SDL_VIDEO_DRIVER_DUMMY 1
65 |
66 | #endif /* _SDL_config_minimal_h */
67 |
--------------------------------------------------------------------------------
/code/client/keys.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 1999-2005 Id Software, Inc.
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | #include "keycodes.h"
23 |
24 | typedef struct {
25 | qboolean down;
26 | int repeats; // if > 1, it is autorepeating
27 | char *binding;
28 | } qkey_t;
29 |
30 | extern qboolean key_overstrikeMode;
31 | extern qkey_t keys[MAX_KEYS];
32 |
33 | // NOTE TTimo the declaration of field_t and Field_Clear is now in qcommon/qcommon.h
34 | void Field_KeyDownEvent( field_t *edit, int key );
35 | void Field_CharEvent( field_t *edit, int ch );
36 | void Field_Draw( field_t *edit, int x, int y, int width, qboolean showCursor, qboolean noColorEscape );
37 | void Field_BigDraw( field_t *edit, int x, int y, int width, qboolean showCursor, qboolean noColorEscape );
38 |
39 | #define COMMAND_HISTORY 32
40 | extern field_t historyEditLines[COMMAND_HISTORY];
41 |
42 | extern field_t g_consoleField;
43 | extern field_t chatField;
44 | extern int anykeydown;
45 | extern qboolean chat_team;
46 | extern int chat_playerNum;
47 |
48 | void Key_WriteBindings( fileHandle_t f );
49 | void Key_SetBinding( int keynum, const char *binding );
50 | char *Key_GetBinding( int keynum );
51 | qboolean Key_IsDown( int keynum );
52 | qboolean Key_GetOverstrikeMode( void );
53 | void Key_SetOverstrikeMode( qboolean state );
54 | void Key_ClearStates( void );
55 | int Key_GetKey(const char *binding);
56 |
--------------------------------------------------------------------------------
/code/opus-1.0.2/celt/laplace.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2007 CSIRO
2 | Copyright (c) 2007-2009 Xiph.Org Foundation
3 | Written by Jean-Marc Valin */
4 | /*
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | - Redistributions of source code must retain the above copyright
10 | notice, this list of conditions and the following disclaimer.
11 |
12 | - Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in the
14 | documentation and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
20 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #include "entenc.h"
30 | #include "entdec.h"
31 |
32 | /** Encode a value that is assumed to be the realisation of a
33 | Laplace-distributed random process
34 | @param enc Entropy encoder state
35 | @param value Value to encode
36 | @param fs Probability of 0, multiplied by 32768
37 | @param decay Probability of the value +/- 1, multiplied by 16384
38 | */
39 | void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay);
40 |
41 | /** Decode a value that is assumed to be the realisation of a
42 | Laplace-distributed random process
43 | @param dec Entropy decoder state
44 | @param fs Probability of 0, multiplied by 32768
45 | @param decay Probability of the value +/- 1, multiplied by 16384
46 | @return Value decoded
47 | */
48 | int ec_laplace_decode(ec_dec *dec, unsigned fs, int decay);
49 |
--------------------------------------------------------------------------------
/code/libspeex/lpc.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin */
2 | /**
3 | @file lpc.h
4 | @brief Functions for LPC (Linear Prediction Coefficients) analysis
5 | */
6 | /*
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | - Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 |
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 |
18 | - Neither the name of the Xiph.org Foundation nor the names of its
19 | contributors may be used to endorse or promote products derived from
20 | this software without specific prior written permission.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 | */
34 |
35 | #ifndef LPC_H
36 | #define LPC_H
37 |
38 | #include "arch.h"
39 |
40 | void _spx_autocorr(
41 | const spx_word16_t * x, /* in: [0...n-1] samples x */
42 | spx_word16_t *ac, /* out: [0...lag-1] ac values */
43 | int lag, int n);
44 |
45 | spx_word32_t /* returns minimum mean square error */
46 | _spx_lpc(
47 | spx_coef_t * lpc, /* [0...p-1] LPC coefficients */
48 | const spx_word16_t * ac, /* in: [0...p] autocorrelation values */
49 | int p
50 | );
51 |
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/code/renderergl2/tr_fbo.h:
--------------------------------------------------------------------------------
1 | /*
2 | ===========================================================================
3 | Copyright (C) 2010 James Canete (use.less01@gmail.com)
4 |
5 | This file is part of Quake III Arena source code.
6 |
7 | Quake III Arena source code is free software; you can redistribute it
8 | and/or modify it under the terms of the GNU General Public License as
9 | published by the Free Software Foundation; either version 2 of the License,
10 | or (at your option) any later version.
11 |
12 | Quake III Arena source code is distributed in the hope that it will be
13 | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Quake III Arena source code; if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 | ===========================================================================
21 | */
22 | // tr_fbo.h
23 |
24 | #ifndef __TR_FBO_H__
25 | #define __TR_FBO_H__
26 |
27 | struct image_s;
28 | struct shaderProgram_s;
29 |
30 | typedef struct FBO_s
31 | {
32 | char name[MAX_QPATH];
33 |
34 | int index;
35 |
36 | uint32_t frameBuffer;
37 |
38 | uint32_t colorBuffers[16];
39 | int colorFormat;
40 | struct image_s *colorImage[16];
41 |
42 | uint32_t depthBuffer;
43 | int depthFormat;
44 |
45 | uint32_t stencilBuffer;
46 | int stencilFormat;
47 |
48 | uint32_t packedDepthStencilBuffer;
49 | int packedDepthStencilFormat;
50 |
51 | int width;
52 | int height;
53 | } FBO_t;
54 |
55 | void FBO_Bind(FBO_t *fbo);
56 | void FBO_Init(void);
57 | void FBO_Shutdown(void);
58 |
59 | void FBO_BlitFromTexture(struct image_s *src, ivec4_t srcBox, vec2_t srcTexScale, FBO_t *dst, ivec4_t dstBox, struct shaderProgram_s *shaderProgram, vec4_t color, int blend);
60 | void FBO_Blit(FBO_t *src, ivec4_t srcBox, vec2_t srcTexScale, FBO_t *dst, ivec4_t dstBox, struct shaderProgram_s *shaderProgram, vec4_t color, int blend);
61 | void FBO_FastBlit(FBO_t *src, ivec4_t srcBox, FBO_t *dst, ivec4_t dstBox, int buffers, int filter);
62 |
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/misc/setup/MacOSX/SLA-dmg.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # This script appends the text from Q3A_EULA.txt to a .dmg as a SLA resource
4 | #
5 | # usage is './SLA-dmg.sh /path/to/Q3A_EULA.txt /path/to/ioquake3.dmg'
6 | #
7 |
8 | if [ "x$1" = "x" ] || [ "x$2" = "x" ]; then
9 | echo "usage: ./SLA-dmg.sh /path/to/Q3A_EULA.txt /path/to/ioquake3.dmg"
10 | exit 1;
11 | fi
12 |
13 | if [ ! -r $1 ]; then
14 | echo "$1 is not a readable Q3A_EULA.txt file"
15 | exit 1;
16 | fi
17 | if [ ! -w $2 ]; then
18 | echo "$2 is not writable .dmg file"
19 | exit 1;
20 | fi
21 | touch tmp.r
22 | if [ ! -w tmp.r ]; then
23 | echo "Could not create temporary file tmp.r for writing"
24 | exit 1;
25 | fi
26 |
27 | echo "
28 | data 'LPic' (5000) {
29 | \$\"0002 0011 0003 0001 0000 0000 0002 0000\"
30 | \$\"0008 0003 0000 0001 0004 0000 0004 0005\"
31 | \$\"0000 000E 0006 0001 0005 0007 0000 0007\"
32 | \$\"0008 0000 0047 0009 0000 0034 000A 0001\"
33 | \$\"0035 000B 0001 0020 000C 0000 0011 000D\"
34 | \$\"0000 005B 0004 0000 0033 000F 0001 000C\"
35 | \$\"0010 0000 000B 000E 0000\"
36 | };
37 |
38 | data 'TEXT' (5002, \"English\") {
39 | " > tmp.r
40 |
41 | sed -e 's/"/\\"/g' -e 's/\(.*\)$/"\1\\n"/g' $1 >> tmp.r
42 |
43 | echo "
44 | };
45 |
46 | resource 'STR#' (5002, \"English\") {
47 | {
48 | \"English\",
49 | \"Agree\",
50 | \"Disagree\",
51 | \"Print\",
52 | \"Save...\",
53 | \"IMPORTANT - Read this License Agreement carefully before clicking on \"
54 | \"the \\\"Agree\\\" button. By clicking on the \\\"Agree\\\" button, you agree \"
55 | \"to be bound by the terms of the License Agreement.\",
56 | \"Software License Agreement\",
57 | \"This text cannot be saved. This disk may be full or locked, or the \"
58 | \"file may be locked.\",
59 | \"Unable to print. Make sure you have selected a printer.\"
60 | }
61 | };
62 | " >> tmp.r
63 |
64 | hdiutil convert -format UDCO -o tmp.dmg $2 || exit 1
65 | hdiutil unflatten tmp.dmg || exit 1
66 | /Developer/Tools/Rez /Developer/Headers/FlatCarbon/*.r tmp.r -a -o tmp.dmg \
67 | || exit 1
68 | hdiutil flatten tmp.dmg || exit 1
69 | hdiutil internet-enable -yes tmp.dmg || exit 1
70 | mv tmp.dmg $2 || (echo "Could not copy tmp.dmg to $2" && exit 1)
71 | rm tmp.dmg
72 | rm tmp.r
73 | echo "SLA $1 successfully added to $2"
74 |
--------------------------------------------------------------------------------
/make-macosx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 |
4 | # Let's make the user give us a target build system
5 |
6 | if [ $# -ne 1 ]; then
7 | echo "Usage: $0 target_architecture"
8 | echo "Example: $0 x86"
9 | echo "other valid options are x86_64 or ppc"
10 | echo
11 | echo "If you don't know or care about architectures please consider using make-macosx-ub.sh instead of this script."
12 | exit 1
13 | fi
14 |
15 | if [ "$1" == "x86" ]; then
16 | BUILDARCH=x86
17 | DARWIN_GCC_ARCH=i386
18 | elif [ "$1" == "x86_64" ]; then
19 | BUILDARCH=x86_64
20 | elif [ "$1" == "ppc" ]; then
21 | BUILDARCH=ppc
22 | else
23 | echo "Invalid architecture: $1"
24 | echo "Valid architectures are x86, x86_64 or ppc"
25 | exit 1
26 | fi
27 |
28 | if [ -z "$DARWIN_GCC_ARCH" ]; then
29 | DARWIN_GCC_ARCH=${BUILDARCH}
30 | fi
31 |
32 | CC=gcc-4.0
33 | DESTDIR=build/release-darwin-${BUILDARCH}
34 |
35 | cd `dirname $0`
36 | if [ ! -f Makefile ]; then
37 | echo "This script must be run from the ioquake3 build directory"
38 | exit 1
39 | fi
40 |
41 | # we want to use the oldest available SDK for max compatiblity. However 10.4 and older
42 | # can not build 64bit binaries, making 10.5 the minimum version. This has been tested
43 | # with xcode 3.1 (xcode31_2199_developerdvd.dmg). It contains the 10.5 SDK and a decent
44 | # enough gcc to actually compile ioquake3
45 | # For PPC macs, G4's or better are required to run ioquake3.
46 |
47 | unset ARCH_SDK
48 | unset ARCH_CFLAGS
49 | unset ARCH_LDFLAGS
50 |
51 | if [ -d /Developer/SDKs/MacOSX10.5.sdk ]; then
52 | ARCH_SDK=/Developer/SDKs/MacOSX10.5.sdk
53 | ARCH_CFLAGS="-arch ${DARWIN_GCC_ARCH} -isysroot /Developer/SDKs/MacOSX10.5.sdk \
54 | -DMAC_OS_X_VERSION_MIN_REQUIRED=1050"
55 | ARCH_LDFLAGS=" -mmacosx-version-min=10.5"
56 | fi
57 |
58 |
59 | echo "Building ${BUILDARCH} Client/Dedicated Server against \"$ARCH_SDK\""
60 | sleep 3
61 |
62 | if [ ! -d $DESTDIR ]; then
63 | mkdir -p $DESTDIR
64 | fi
65 |
66 | # For parallel make on multicore boxes...
67 | NCPU=`sysctl -n hw.ncpu`
68 |
69 |
70 | # intel client and server
71 | #if [ -d build/release-darwin-${BUILDARCH} ]; then
72 | # rm -r build/release-darwin-${BUILDARCH}
73 | #fi
74 | (ARCH=${BUILDARCH} CFLAGS=$ARCH_CFLAGS LDFLAGS=$ARCH_LDFLAGS make -j$NCPU) || exit 1;
75 |
76 | # use the following shell script to build an application bundle
77 | "./make-macosx-app.sh" release ${BUILDARCH}
78 |
--------------------------------------------------------------------------------
/code/libspeex/exc_10_16_table.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2002 Jean-Marc Valin
2 | File: exc_10_16_table.c
3 | Codebook for excitation in narrowband CELP mode (3200 bps)
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions
7 | are met:
8 |
9 | - Redistributions of source code must retain the above copyright
10 | notice, this list of conditions and the following disclaimer.
11 |
12 | - Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in the
14 | documentation and/or other materials provided with the distribution.
15 |
16 | - Neither the name of the Xiph.org Foundation nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 |
34 | const signed char exc_10_16_table[160] = {
35 | 22,39,14,44,11,35,-2,23,-4,6,
36 | 46,-28,13,-27,-23,12,4,20,-5,9,
37 | 37,-18,-23,23,0,9,-6,-20,4,-1,
38 | -17,-5,-4,17,0,1,9,-2,1,2,
39 | 2,-12,8,-25,39,15,9,16,-55,-11,
40 | 9,11,5,10,-2,-60,8,13,-6,11,
41 | -16,27,-47,-12,11,1,16,-7,9,-3,
42 | -29,9,-14,25,-19,34,36,12,40,-10,
43 | -3,-24,-14,-37,-21,-35,-2,-36,3,-6,
44 | 67,28,6,-17,-3,-12,-16,-15,-17,-7,
45 | -59,-36,-13,1,7,1,2,10,2,11,
46 | 13,10,8,-2,7,3,5,4,2,2,
47 | -3,-8,4,-5,6,7,-42,15,35,-2,
48 | -46,38,28,-20,-9,1,7,-3,0,-2,
49 | 0,0,0,0,0,0,0,0,0,0,
50 | -15,-28,52,32,5,-5,-17,-20,-10,-1};
51 |
--------------------------------------------------------------------------------
/code/asm/ftola.asm:
--------------------------------------------------------------------------------
1 | ; ===========================================================================
2 | ; Copyright (C) 2011 Thilo Schulz
3 | ;
4 | ; This file is part of Quake III Arena source code.
5 | ;
6 | ; Quake III Arena source code is free software; you can redistribute it
7 | ; and/or modify it under the terms of the GNU General Public License as
8 | ; published by the Free Software Foundation; either version 2 of the License,
9 | ; or (at your option) any later version.
10 | ;
11 | ; Quake III Arena source code is distributed in the hope that it will be
12 | ; useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ; GNU General Public License for more details.
15 | ;
16 | ; You should have received a copy of the GNU General Public License
17 | ; along with Quake III Arena source code; if not, write to the Free Software
18 | ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | ; ===========================================================================
20 |
21 | ; MASM ftol conversion functions using SSE or FPU
22 | ; assume __cdecl calling convention is being used for x86, __fastcall for x64
23 |
24 | .686p
25 | .xmm
26 |
27 | IFNDEF idx64
28 | .model flat, c
29 | ENDIF
30 |
31 | .data
32 |
33 | ifndef idx64
34 | fpucw WORD 0F7Fh
35 | endif
36 |
37 | .code
38 |
39 | IFDEF idx64
40 | ; qftol using SSE
41 |
42 | qftolsse PROC
43 | cvttss2si eax, xmm0
44 | ret
45 | qftolsse ENDP
46 |
47 | qvmftolsse PROC
48 | movss xmm0, dword ptr [rdi + rbx * 4]
49 | cvttss2si eax, xmm0
50 | ret
51 | qvmftolsse ENDP
52 |
53 | ELSE
54 | ; qftol using FPU
55 |
56 | qftolx87m macro src
57 | sub esp, 2
58 | fnstcw word ptr [esp]
59 | fldcw fpucw
60 | fld dword ptr src
61 | fistp dword ptr src
62 | fldcw [esp]
63 | mov eax, src
64 | add esp, 2
65 | ret
66 | endm
67 |
68 | qftolx87 PROC
69 | qftolx87m [esp + 6]
70 | qftolx87 ENDP
71 |
72 | qvmftolx87 PROC
73 | qftolx87m [edi + ebx * 4]
74 | qvmftolx87 ENDP
75 |
76 | ; qftol using SSE
77 | qftolsse PROC
78 | movss xmm0, dword ptr [esp + 4]
79 | cvttss2si eax, xmm0
80 | ret
81 | qftolsse ENDP
82 |
83 | qvmftolsse PROC
84 | movss xmm0, dword ptr [edi + ebx * 4]
85 | cvttss2si eax, xmm0
86 | ret
87 | qvmftolsse ENDP
88 | ENDIF
89 |
90 | end
91 |
--------------------------------------------------------------------------------
/code/libspeex/echo_diagnostic.m:
--------------------------------------------------------------------------------
1 | % Attempts to diagnose AEC problems from recorded samples
2 | %
3 | % out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
4 | %
5 | % Computes the full matrix inversion to cancel echo from the
6 | % recording 'rec_file' using the far end signal 'play_file' using
7 | % a filter length of 'tail_length'. The output is saved to 'out_file'.
8 | function out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
9 |
10 | F=fopen(rec_file,'rb');
11 | rec=fread(F,Inf,'short');
12 | fclose (F);
13 | F=fopen(play_file,'rb');
14 | play=fread(F,Inf,'short');
15 | fclose (F);
16 |
17 | rec = [rec; zeros(1024,1)];
18 | play = [play; zeros(1024,1)];
19 |
20 | N = length(rec);
21 | corr = real(ifft(fft(rec).*conj(fft(play))));
22 | acorr = real(ifft(fft(play).*conj(fft(play))));
23 |
24 | [a,b] = max(corr);
25 |
26 | if b > N/2
27 | b = b-N;
28 | end
29 | printf ("Far end to near end delay is %d samples\n", b);
30 | if (b > .3*tail_length)
31 | printf ('This is too much delay, try delaying the far-end signal a bit\n');
32 | else if (b < 0)
33 | printf ('You have a negative delay, the echo canceller has no chance to cancel anything!\n');
34 | else
35 | printf ('Delay looks OK.\n');
36 | end
37 | end
38 | end
39 | N2 = round(N/2);
40 | corr1 = real(ifft(fft(rec(1:N2)).*conj(fft(play(1:N2)))));
41 | corr2 = real(ifft(fft(rec(N2+1:end)).*conj(fft(play(N2+1:end)))));
42 |
43 | [a,b1] = max(corr1);
44 | if b1 > N2/2
45 | b1 = b1-N2;
46 | end
47 | [a,b2] = max(corr2);
48 | if b2 > N2/2
49 | b2 = b2-N2;
50 | end
51 | drift = (b1-b2)/N2;
52 | printf ('Drift estimate is %f%% (%d samples)\n', 100*drift, b1-b2);
53 | if abs(b1-b2) < 10
54 | printf ('A drift of a few (+-10) samples is normal.\n');
55 | else
56 | if abs(b1-b2) < 30
57 | printf ('There may be (not sure) excessive clock drift. Is the capture and playback done on the same soundcard?\n');
58 | else
59 | printf ('Your clock is drifting! No way the AEC will be able to do anything with that. Most likely, you''re doing capture and playback from two different cards.\n');
60 | end
61 | end
62 | end
63 | acorr(1) = .001+1.00001*acorr(1);
64 | AtA = toeplitz(acorr(1:tail_length));
65 | bb = corr(1:tail_length);
66 | h = AtA\bb;
67 |
68 | out = (rec - filter(h, 1, play));
69 |
70 | F=fopen(out_file,'w');
71 | fwrite(F,out,'short');
72 | fclose (F);
73 |
--------------------------------------------------------------------------------