├── .svnignore ├── NOTTODO-ioq3 ├── misc ├── msvc │ ├── cgame.def │ ├── game.def │ ├── q3_ui.def │ └── ui.def ├── 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 ├── 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 ├── msvc10 │ ├── ui.vcxproj.user │ ├── cgame.vcxproj.user │ ├── game.vcxproj.user │ └── q3_ui.vcxproj.user ├── ReadMe-OSX.rtf └── nsis │ └── Makefile ├── TODO-ioq3 ├── .gitignore ├── code ├── sys │ ├── con_tty.c │ ├── con_passive.c │ ├── win_resource.h │ ├── win_resource.rc │ ├── sys_loadlib.h │ └── sys_local.h ├── libs │ ├── win32 │ │ ├── SDL.lib │ │ ├── libcurl.a │ │ ├── SDLmain.lib │ │ ├── libSDL.dll.a │ │ ├── libSDLmain.a │ │ └── libSDL.la │ ├── win64 │ │ ├── SDL.lib │ │ ├── libcurl.a │ │ ├── SDLmain.lib │ │ ├── libSDL64.dll.a │ │ └── libSDLmain.a │ └── macosx │ │ ├── libSDLmain.a │ │ └── libSDL-1.2.0.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 │ │ │ ├── hideset.c │ │ │ └── nlist.c │ │ ├── etc │ │ │ └── bytecode.c │ │ └── lburg │ │ │ └── lburg.h │ └── asm │ │ ├── notes.txt │ │ ├── lib.txt │ │ ├── README.Id │ │ └── ops.txt ├── 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 │ │ ├── SDL_config_amiga.h │ │ └── SDL_cpuinfo.h ├── zlib │ ├── inffast.h │ └── inftrees.h ├── jpeg-8c │ ├── jversion.h │ ├── jconfig.h │ └── jcinit.c ├── libspeex │ ├── include │ │ └── speex │ │ │ ├── speex_config_types.h │ │ │ └── speex_buffer.h │ ├── config.h │ ├── testdenoise.c │ ├── kiss_fftr.h │ ├── testecho.c │ ├── smallft.h │ ├── lpc.h │ ├── exc_10_16_table.c │ ├── echo_diagnostic.m │ ├── misc_bfin.h │ ├── gain_table_lbr.c │ ├── fftwrap.h │ ├── filterbank.h │ └── vbr.h ├── AL │ └── VERSION ├── botlib │ ├── lcc.mak │ ├── 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 │ ├── linux-i386.mak │ ├── be_interface.h │ ├── be_ai_char.h │ ├── be_aas_main.h │ ├── be_ea.h │ └── be_aas_debug.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 │ ├── ftola.asm │ └── ftola.c ├── libcurl │ └── curl │ │ └── stdcheaders.h ├── game │ ├── syn.h │ ├── ai_cmd.h │ ├── ai_vcmd.h │ ├── ai_team.h │ ├── g_mem.c │ ├── ai_chat.h │ ├── bg_local.h │ └── ai_dmnet.h ├── client │ ├── libmumblelink.h │ └── keys.h ├── renderer │ └── tr_subs.c └── q3_ui │ └── ui_sparena.c ├── BUGS-ioq3 ├── ui ├── hud.txt ├── hud2.txt ├── ingame.txt └── menus.txt ├── cross-make-mingw.sh ├── cross-make-mingw64.sh ├── history.txt ├── LICENCE-libcurl └── README.md /.svnignore: -------------------------------------------------------------------------------- 1 | build 2 | Makefile.local 3 | -------------------------------------------------------------------------------- /NOTTODO-ioq3: -------------------------------------------------------------------------------- 1 | http://wiki.ioquake3.org/NotToDo 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 -------------------------------------------------------------------------------- /TODO-ioq3: -------------------------------------------------------------------------------- 1 | http://wiki.ioquake3.org/Ioquake3_Road_Map 2 | -------------------------------------------------------------------------------- /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/runaos/iodfe/HEAD/misc/quake3.ico -------------------------------------------------------------------------------- /misc/quake3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/quake3.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | Makefile.local 3 | *.sdf 4 | *.suo 5 | *.opensdf 6 | *.ipch -------------------------------------------------------------------------------- /misc/quake3.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/quake3.icns -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /code/sys/con_tty.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/sys/con_tty.c -------------------------------------------------------------------------------- /misc/quake3-tango.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/quake3-tango.png -------------------------------------------------------------------------------- /misc/quake3-tango.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/quake3-tango.xcf -------------------------------------------------------------------------------- /code/libs/win32/SDL.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win32/SDL.lib -------------------------------------------------------------------------------- /code/libs/win32/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win32/libcurl.a -------------------------------------------------------------------------------- /code/libs/win64/SDL.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win64/SDL.lib -------------------------------------------------------------------------------- /code/libs/win64/libcurl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win64/libcurl.a -------------------------------------------------------------------------------- /misc/ioquake3-folder.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/ioquake3-folder.icns -------------------------------------------------------------------------------- /code/libs/win32/SDLmain.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win32/SDLmain.lib -------------------------------------------------------------------------------- /code/libs/win64/SDLmain.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win64/SDLmain.lib -------------------------------------------------------------------------------- /code/tools/lcc/doc/lcc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/tools/lcc/doc/lcc.pdf -------------------------------------------------------------------------------- /code/libs/macosx/libSDLmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/macosx/libSDLmain.a -------------------------------------------------------------------------------- /code/libs/win32/libSDL.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win32/libSDL.dll.a -------------------------------------------------------------------------------- /code/libs/win32/libSDLmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win32/libSDLmain.a -------------------------------------------------------------------------------- /code/libs/win64/libSDL64.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win64/libSDL64.dll.a -------------------------------------------------------------------------------- /code/libs/win64/libSDLmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/win64/libSDLmain.a -------------------------------------------------------------------------------- /code/tools/lcc/doc/bprint.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/tools/lcc/doc/bprint.pdf -------------------------------------------------------------------------------- /code/libs/macosx/libSDL-1.2.0.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/code/libs/macosx/libSDL-1.2.0.dylib -------------------------------------------------------------------------------- /misc/osxfe/ioquake3fe/ioquake3.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/osxfe/ioquake3fe/ioquake3.icns -------------------------------------------------------------------------------- /BUGS-ioq3: -------------------------------------------------------------------------------- 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/runaos/iodfe/HEAD/misc/osxfe/ioquake3fe/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /misc/osxfe/ioquake3fe/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/osxfe/ioquake3fe/English.lproj/Localizable.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/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/osxfe/ioquake3fe/ioquake3fe.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runaos/iodfe/HEAD/misc/osxfe/ioquake3fe/ioquake3fe.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /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/msvc10/ui.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | SVN revision >= 402 6 | ------------------- 7 | Headers are from OpenAL CVS 6th August 2005: 8 | $ cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository 9 | login 10 | (use password "guest") 11 | $ cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository 12 | co -D "6 Aug 2005" openal 13 | 14 | SVN revision >= 374 15 | ------------------- 16 | Standard OpenAL 1.0 headers 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /cross-make-mingw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32"; 4 | 5 | if [ "X$CC" = "X" ]; then 6 | for check in $CMD_PREFIX; do 7 | full_check="${check}-gcc" 8 | if [ ! $(which "$full_check") = "" ]; then 9 | export CC="$full_check" 10 | fi 11 | done 12 | fi 13 | 14 | if [ "X$WINDRES" = "X" ]; then 15 | for check in $CMD_PREFIX; do 16 | full_check="${check}-windres" 17 | if [ ! $(which "$full_check") = "" ]; then 18 | export WINDRES="$full_check" 19 | fi 20 | done 21 | fi 22 | 23 | if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then 24 | echo "Error: Must define or find WINDRES and CC" 25 | exit 1 26 | fi 27 | 28 | export PLATFORM=mingw32 29 | export ARCH=x86 30 | 31 | exec make $* 32 | -------------------------------------------------------------------------------- /cross-make-mingw64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32"; 4 | 5 | if [ "X$CC" = "X" ]; then 6 | for check in $CMD_PREFIX; do 7 | full_check="${check}-gcc" 8 | if [ ! $(which "$full_check") = "" ]; then 9 | export CC="$full_check" 10 | fi 11 | done 12 | fi 13 | 14 | if [ "X$WINDRES" = "X" ]; then 15 | for check in $CMD_PREFIX; do 16 | full_check="${check}-windres" 17 | if [ ! $(which "$full_check") = "" ]; then 18 | export WINDRES="$full_check" 19 | fi 20 | done 21 | fi 22 | 23 | if [ "X$WINDRES" = "X" -o "X$CC" = "X" ]; then 24 | echo "Error: Must define or find WINDRES and CC" 25 | exit 1 26 | fi 27 | 28 | export PLATFORM=mingw32 29 | export ARCH=x64 30 | 31 | exec make $* 32 | -------------------------------------------------------------------------------- /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-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 | -------------------------------------------------------------------------------- /misc/osxfe/ioquake3fe/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ioquake3.icns 11 | CFBundleIdentifier 12 | org.icculus.quake3 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /history.txt: -------------------------------------------------------------------------------- 1 | ==================================== 2 | 1st post: 3 | 4 | con_filter[0-9] 5 | /download 6 | /cl_mapAutoDownload 7 | Drakkar's fast loading code 8 | con_height 9 | con_rgb 10 | con_opacity 11 | con_useshader 12 | 13 | iodfe_hud_snap_draw 1 14 | _snap_auto 15 | _snap_def 16 | _snap_speed 17 | _snap_rgba1 18 | _snap_rgba2 19 | _snap_y 20 | _snap_h 21 | 22 | iodfe_hud_pitch 23 | _pitch_rgba 24 | _pitch_thickness 25 | _pitch_width 26 | _pitch_x 27 | 28 | con_timestamp [0-1] 29 | con_timedisplay [0-3] 30 | 31 | con_drawversion [0-1] 32 | con_filter [0-1] 33 | con_completemapnames [0-1] 34 | 35 | ctrl+enter in console sends message with /team_say 36 | ctrl+shift+enter sends it with /tell to df_mp_trackplayernum 37 | 38 | in_numpadbug 39 | 40 | ==================================== 41 | 2nd post: 42 | 43 | + in_mouse 3 (raw input for windows) 44 | + r_xpos, r_ypos 45 | changed vars prefix from scr_hud to iodfe_hud 46 | + in_keyboardRepeatDelay, in_keyboardRepeatInterval 47 | + added some widescreen modes to /modelist 48 | + con_notifylines, con_notifykeep, con_notifyx, con_notifyy -------------------------------------------------------------------------------- /code/SDL12/include/SDL_getenv.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 | /** @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-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 | /** @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 | -------------------------------------------------------------------------------- /LICENCE-libcurl: -------------------------------------------------------------------------------- 1 | COPYRIGHT AND PERMISSION NOTICE 2 | 3 | Copyright (c) 1996 - 2009, Daniel Stenberg, . 4 | 5 | All rights reserved. 6 | 7 | Permission to use, copy, modify, and distribute this software for any purpose 8 | with or without fee is hereby granted, provided that the above copyright 9 | notice and this permission notice appear in all copies. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN 14 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 15 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 17 | OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | Except as contained in this notice, the name of a copyright holder shall not 20 | be used in advertising or otherwise to promote the sale, use or other dealings 21 | in this Software without prior written authorization of the copyright holder. 22 | -------------------------------------------------------------------------------- /code/SDL12/include/SDL_byteorder.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 | /** 24 | * @file SDL_byteorder.h 25 | * @deprecated Use SDL_endian.h instead 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_endian.h" 30 | -------------------------------------------------------------------------------- /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/botlib/lcc.mak: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Gladiator Bot library: gladiator.dll 3 | # Intended for LCC-Win32 4 | # 5 | 6 | CC=lcc 7 | CFLAGS=-DC_ONLY -o 8 | OBJS= be_aas_bspq2.obj \ 9 | be_aas_bsphl.obj \ 10 | be_aas_cluster.obj \ 11 | be_aas_debug.obj \ 12 | be_aas_entity.obj \ 13 | be_aas_file.obj \ 14 | be_aas_light.obj \ 15 | be_aas_main.obj \ 16 | be_aas_move.obj \ 17 | be_aas_optimize.obj \ 18 | be_aas_reach.obj \ 19 | be_aas_route.obj \ 20 | be_aas_routealt.obj \ 21 | be_aas_sample.obj \ 22 | be_aas_sound.obj \ 23 | be_ai2_dm.obj \ 24 | be_ai2_dmnet.obj \ 25 | be_ai2_main.obj \ 26 | be_ai_char.obj \ 27 | be_ai_chat.obj \ 28 | be_ai_goal.obj \ 29 | be_ai_load.obj \ 30 | be_ai_move.obj \ 31 | be_ai_weap.obj \ 32 | be_ai_weight.obj \ 33 | be_ea.obj \ 34 | be_interface.obj \ 35 | l_crc.obj \ 36 | l_libvar.obj \ 37 | l_log.obj \ 38 | l_memory.obj \ 39 | l_precomp.obj \ 40 | l_script.obj \ 41 | l_struct.obj \ 42 | l_utils.obj \ 43 | q_shared.obj 44 | 45 | all: gladiator.dll 46 | 47 | gladiator.dll: $(OBJS) 48 | lcclnk -dll -entry GetBotAPI *.obj botlib.def -o gladiator.dll 49 | 50 | clean: 51 | del *.obj gladiator.dll 52 | 53 | %.obj: %.c 54 | $(CC) $(CFLAGS) $< 55 | 56 | -------------------------------------------------------------------------------- /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 an 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 | -------------------------------------------------------------------------------- /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/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/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 - 2010, 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 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | size_t fread (void *, size_t, size_t, FILE *); 28 | size_t fwrite (const void *, size_t, size_t, FILE *); 29 | 30 | int strcasecmp(const char *, const char *); 31 | int strncasecmp(const char *, const char *, size_t); 32 | 33 | #endif /* __STDC_HEADERS_H */ 34 | -------------------------------------------------------------------------------- /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/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/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/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-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 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/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/renderer/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/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 "../renderer/tr_local.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/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/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\n", 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/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/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 | #ifdef DEDICATED 24 | # ifdef _WIN32 25 | # include 26 | # define Sys_LoadLibrary(f) (void*)LoadLibrary(f) 27 | # define Sys_UnloadLibrary(h) FreeLibrary((HMODULE)h) 28 | # define Sys_LoadFunction(h,fn) (void*)GetProcAddress((HMODULE)h,fn) 29 | # define Sys_LibraryError() "unknown" 30 | # else 31 | # include 32 | # define Sys_LoadLibrary(f) dlopen(f,RTLD_NOW) 33 | # define Sys_UnloadLibrary(h) dlclose(h) 34 | # define Sys_LoadFunction(h,fn) dlsym(h,fn) 35 | # define Sys_LibraryError() dlerror() 36 | # endif 37 | #else 38 | # ifdef USE_LOCAL_HEADERS 39 | # include "SDL.h" 40 | # include "SDL_loadso.h" 41 | # else 42 | # include 43 | # include 44 | # endif 45 | # define Sys_LoadLibrary(f) SDL_LoadObject(f) 46 | # define Sys_UnloadLibrary(h) SDL_UnloadObject(h) 47 | # define Sys_LoadFunction(h,fn) SDL_LoadFunction(h,fn) 48 | # define Sys_LibraryError() SDL_GetError() 49 | #endif 50 | 51 | void * QDECL Sys_LoadDll(const char *name, qboolean useSystemLib); 52 | -------------------------------------------------------------------------------- /code/botlib/linux-i386.mak: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Gladiator Bot library: gladiator.so 3 | # Intended for gcc/Linux 4 | # 5 | 6 | ARCH=i386 7 | CC=gcc 8 | BASE_CFLAGS=-Dstricmp=strcasecmp 9 | 10 | #use these cflags to optimize it 11 | CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \ 12 | -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ 13 | -malign-jumps=2 -malign-functions=2 14 | #use these when debugging 15 | #CFLAGS=$(BASE_CFLAGS) -g 16 | 17 | LDFLAGS=-ldl -lm 18 | SHLIBEXT=so 19 | SHLIBCFLAGS=-fPIC 20 | SHLIBLDFLAGS=-shared 21 | 22 | DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< 23 | 24 | ############################################################################# 25 | # SETUP AND BUILD 26 | # GLADIATOR BOT 27 | ############################################################################# 28 | 29 | .c.o: 30 | $(DO_CC) 31 | 32 | GAME_OBJS = \ 33 | be_aas_bsphl.o\ 34 | be_aas_bspq2.o\ 35 | be_aas_cluster.o\ 36 | be_aas_debug.o\ 37 | be_aas_entity.o\ 38 | be_aas_file.o\ 39 | be_aas_light.o\ 40 | be_aas_main.o\ 41 | be_aas_move.o\ 42 | be_aas_optimize.o\ 43 | be_aas_reach.o\ 44 | be_aas_route.o\ 45 | be_aas_routealt.o\ 46 | be_aas_sample.o\ 47 | be_aas_sound.o\ 48 | be_ai2_dmq2.o\ 49 | be_ai2_dmhl.o\ 50 | be_ai2_dmnet.o\ 51 | be_ai2_main.o\ 52 | be_ai_char.o\ 53 | be_ai_chat.o\ 54 | be_ai_goal.o\ 55 | be_ai_load.o\ 56 | be_ai_move.o\ 57 | be_ai_weap.o\ 58 | be_ai_weight.o\ 59 | be_ea.o\ 60 | be_interface.o\ 61 | l_crc.o\ 62 | l_libvar.o\ 63 | l_log.o\ 64 | l_memory.o\ 65 | l_precomp.o\ 66 | l_script.o\ 67 | l_struct.o\ 68 | l_utils.o\ 69 | q_shared.o 70 | 71 | glad$(ARCH).$(SHLIBEXT) : $(GAME_OBJS) 72 | $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS) 73 | 74 | 75 | ############################################################################# 76 | # MISC 77 | ############################################################################# 78 | 79 | clean: 80 | -rm -f $(GAME_OBJS) 81 | 82 | depend: 83 | gcc -MM $(GAME_OBJS:.o=.c) 84 | 85 | 86 | install: 87 | cp gladiator.so .. 88 | 89 | # 90 | # From "make depend" 91 | # 92 | 93 | -------------------------------------------------------------------------------- /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/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 | void CON_Shutdown( void ); 39 | void CON_Init( void ); 40 | char *CON_Input( void ); 41 | void CON_Print( const char *message ); 42 | 43 | unsigned int CON_LogSize( void ); 44 | unsigned int CON_LogWrite( const char *in ); 45 | unsigned int CON_LogRead( char *out, unsigned int outSize ); 46 | 47 | #ifdef MACOS_X 48 | char *Sys_StripAppBundle( char *pwd ); 49 | #endif 50 | 51 | void Sys_GLimpSafeInit( void ); 52 | void Sys_GLimpInit( void ); 53 | void Sys_PlatformInit( void ); 54 | void Sys_PlatformExit( void ); 55 | void Sys_SigHandler( int signal ) __attribute__ ((noreturn)); 56 | void Sys_ErrorDialog( const char *error ); 57 | void Sys_AnsiColorPrint( const char *msg ); 58 | 59 | int Sys_PID( void ); 60 | qboolean Sys_PIDIsRunning( int pid ); 61 | -------------------------------------------------------------------------------- /code/SDL12/include/SDL_error.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 | /** 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-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 | /** 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 | "fistps " src "\n" \ 59 | "filds " 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-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 | /** @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/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/SDL12/include/SDL_config_minimal.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_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 | 32 | typedef signed char int8_t; 33 | typedef unsigned char uint8_t; 34 | typedef signed short int16_t; 35 | typedef unsigned short uint16_t; 36 | typedef signed int int32_t; 37 | typedef unsigned int uint32_t; 38 | typedef unsigned int size_t; 39 | typedef unsigned long uintptr_t; 40 | 41 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ 42 | #define SDL_AUDIO_DRIVER_DUMMY 1 43 | 44 | /* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */ 45 | #define SDL_CDROM_DISABLED 1 46 | 47 | /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ 48 | #define SDL_JOYSTICK_DISABLED 1 49 | 50 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 51 | #define SDL_LOADSO_DISABLED 1 52 | 53 | /* Enable the stub thread support (src/thread/generic/\*.c) */ 54 | #define SDL_THREADS_DISABLED 1 55 | 56 | /* Enable the stub timer support (src/timer/dummy/\*.c) */ 57 | #define SDL_TIMERS_DISABLED 1 58 | 59 | /* Enable the dummy video driver (src/video/dummy/\*.c) */ 60 | #define SDL_VIDEO_DRIVER_DUMMY 1 61 | 62 | #endif /* _SDL_config_minimal_h */ 63 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | IFNDEF idx64 25 | .model flat, c 26 | ENDIF 27 | 28 | .data 29 | 30 | ifndef idx64 31 | fpucw WORD 0F7Fh 32 | endif 33 | 34 | .code 35 | 36 | IFDEF idx64 37 | ; qftol using SSE 38 | 39 | qftolsse PROC 40 | cvttss2si eax, xmm0 41 | ret 42 | qftolsse ENDP 43 | 44 | qvmftolsse PROC 45 | movss xmm0, dword ptr [rdi + rbx * 4] 46 | cvttss2si eax, xmm0 47 | ret 48 | qvmftolsse ENDP 49 | 50 | ELSE 51 | ; qftol using FPU 52 | 53 | qftolx87m macro src 54 | sub esp, 2 55 | fnstcw word ptr [esp] 56 | fldcw fpucw 57 | fld dword ptr src 58 | fistp dword ptr src 59 | fldcw [esp] 60 | mov eax, src 61 | add esp, 2 62 | ret 63 | endm 64 | 65 | qftolx87 PROC 66 | qftolx87m [esp + 6] 67 | qftolx87 ENDP 68 | 69 | qvmftolx87 PROC 70 | qftolx87m [edi + ebx * 4] 71 | qvmftolx87 ENDP 72 | 73 | ; qftol using SSE 74 | qftolsse PROC 75 | movss xmm0, dword ptr [esp + 4] 76 | cvttss2si eax, xmm0 77 | ret 78 | qftolsse ENDP 79 | 80 | qvmftolsse PROC 81 | movss xmm0, dword ptr [edi + ebx * 4] 82 | cvttss2si eax, xmm0 83 | ret 84 | qvmftolsse ENDP 85 | ENDIF 86 | 87 | end 88 | -------------------------------------------------------------------------------- /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 model name from the given index 55 | char *AAS_ModelFromIndex(int index); 56 | //returns the index from the given model name 57 | int AAS_IndexFromModel(char *modelname); 58 | //returns the current time 59 | float AAS_Time(void); 60 | // 61 | void AAS_ProjectPointOntoVector( vec3_t point, vec3_t vStart, vec3_t vEnd, vec3_t vProj ); 62 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻 2 | 3 | This is old and bad, use this instead: 4 | 5 | https://github.com/JBustos22/oDFe + https://github.com/Jelvan1/cgame_proxymod 6 | 7 | 🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺 8 | 9 | iodfengine is a defrag-oriented engine, a fork of ioquake3 with some dfengine features and some new things. 10 | 11 | source: https://github.com/runaos/iodfe 12 | 13 | ioq3 - http://ioquake3.org/ 14 | dfengine - http://cggdev.org/, http://q3defrag.org/files/dfengine/ (source mirror: https://github.com/cliffrowley/dfengine) 15 | 16 | Features from dfengine: 17 | 18 | in_mouse 3 - raw input for Windows, an alternative to sometimes buggy SDL input (in_mouse 1) 19 | con_filter[0-9] 20 | /download 21 | /cl_mapAutoDownload 22 | Drakkar's fast loading code 23 | See README-DFEngine for detailed info 24 | 25 | Other features: 26 | 27 | iodfe_hud_snap_draw 1 - snapping hud, shows zones of possible acceleration (for 8 ms frametime) 28 | _snap_auto - auto-shifting angle of the hud for different strafe styles 29 | _snap_def - offset with no keys pressed or with scr_hud_snap_auto 0 30 | _snap_speed - calculate zones for the stated speed instead 31 | colors and position settings: 32 | _snap_rgba1 33 | _snap_rgba2 34 | _snap_y 35 | _snap_h 36 | 37 | iodfe_hud_pitch - angle marks, setting it to "-15 70" for example will put two marks at -15 and 70 degrees of pitch 38 | colors and position settings: 39 | _pitch_rgba 40 | _pitch_thickness 41 | _pitch_width 42 | _pitch_x 43 | 44 | con_timestamp [0-1] - adds a timestamp at each message in console 45 | con_timedisplay [0-3] - displays time at input line (1), at right bottom console corner (2) or at both places (3) 46 | 47 | con_drawversion - toggles version at right bottom console corner 48 | con_filter - toggles filtering with con_filter[0-9] vars 49 | con_completemapnames - toggles /map and /devmap autocompletion 50 | 51 | con_notifylines - number of lines shown in chat notify display 52 | con_notifykeep - keeps it not erased after opening console 53 | con_notifyx - x pos 54 | con_notifyy - y pos 55 | 56 | ctrl+enter in console sends message with /team_say 57 | ctrl+shift+enter sends it with /tell to df_mp_trackplayernum 58 | 59 | in_keyboardRepeatDelay [ms] 60 | in_keyboardRepeatInterval [ms] 61 | in_numpadbug [0-1] - fixes non-working numpad on Windows 62 | 63 | r_xpos, r_ypos - game window position 64 | -------------------------------------------------------------------------------- /code/libspeex/misc_bfin.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Analog Devices */ 2 | /** 3 | @file misc_bfin.h 4 | @author Jean-Marc Valin 5 | @brief Various compatibility routines for Speex (Blackfin version) 6 | */ 7 | /* 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | - Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | 15 | - Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions and the following disclaimer in the 17 | documentation and/or other materials provided with the distribution. 18 | 19 | - Neither the name of the Xiph.org Foundation nor the names of its 20 | contributors may be used to endorse or promote products derived from 21 | this software without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | 36 | #define OVERRIDE_SPEEX_MOVE 37 | void *speex_move (void *dest, void *src, int n) 38 | { 39 | __asm__ __volatile__ 40 | ( 41 | "L0 = 0;\n\t" 42 | "I0 = %0;\n\t" 43 | "R0 = [I0++];\n\t" 44 | "LOOP move%= LC0 = %2;\n\t" 45 | "LOOP_BEGIN move%=;\n\t" 46 | "[%1++] = R0 || R0 = [I0++];\n\t" 47 | "LOOP_END move%=;\n\t" 48 | "[%1++] = R0;\n\t" 49 | : "=a" (src), "=a" (dest) 50 | : "a" ((n>>2)-1), "0" (src), "1" (dest) 51 | : "R0", "I0", "L0", "memory" 52 | ); 53 | return dest; 54 | } 55 | -------------------------------------------------------------------------------- /code/libspeex/gain_table_lbr.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin 2 | File: gain_table_lbr.c 3 | Codebook for 3-tap pitch prediction gain (32 entries) 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | 12 | 2. 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 | 3. The name of the author may not be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 23 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | const signed char gain_cdbk_lbr[128] = { 33 | -32, -32, -32, 0, 34 | -31, -58, -16, 22, 35 | -41, -24, -43, 14, 36 | -56, -22, -55, 29, 37 | -13, 33, -41, 47, 38 | -4, -39, -9, 29, 39 | -41, 15, -12, 38, 40 | -8, -15, -12, 31, 41 | 1, 2, -44, 40, 42 | -22, -66, -42, 27, 43 | -38, 28, -23, 38, 44 | -21, 14, -37, 31, 45 | 0, 21, -50, 52, 46 | -53, -71, -27, 33, 47 | -37, -1, -19, 25, 48 | -19, -5, -28, 22, 49 | 6, 65, -44, 74, 50 | -33, -48, -33, 9, 51 | -40, 57, -14, 58, 52 | -17, 4, -45, 32, 53 | -31, 38, -33, 36, 54 | -23, 28, -40, 39, 55 | -43, 29, -12, 46, 56 | -34, 13, -23, 28, 57 | -16, 15, -27, 34, 58 | -14, -82, -15, 43, 59 | -31, 25, -32, 29, 60 | -21, 5, -5, 38, 61 | -47, -63, -51, 33, 62 | -46, 12, 3, 47, 63 | -28, -17, -29, 11, 64 | -10, 14, -40, 38}; 65 | -------------------------------------------------------------------------------- /code/jpeg-8c/jcinit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcinit.c 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 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 initialization logic for the JPEG compressor. 9 | * This routine is in charge of selecting the modules to be executed and 10 | * making an initialization call to each one. 11 | * 12 | * Logically, this code belongs in jcmaster.c. It's split out because 13 | * linking this routine implies linking the entire compression library. 14 | * For a transcoding-only application, we want to be able to use jcmaster.c 15 | * without linking in the whole library. 16 | */ 17 | 18 | #define JPEG_INTERNALS 19 | #include "jinclude.h" 20 | #include "jpeglib.h" 21 | 22 | 23 | /* 24 | * Master selection of compression modules. 25 | * This is done once at the start of processing an image. We determine 26 | * which modules will be used and give them appropriate initialization calls. 27 | */ 28 | 29 | GLOBAL(void) 30 | jinit_compress_master (j_compress_ptr cinfo) 31 | { 32 | /* Initialize master control (includes parameter checking/processing) */ 33 | jinit_c_master_control(cinfo, FALSE /* full compression */); 34 | 35 | /* Preprocessing */ 36 | if (! cinfo->raw_data_in) { 37 | jinit_color_converter(cinfo); 38 | jinit_downsampler(cinfo); 39 | jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); 40 | } 41 | /* Forward DCT */ 42 | jinit_forward_dct(cinfo); 43 | /* Entropy encoding: either Huffman or arithmetic coding. */ 44 | if (cinfo->arith_code) 45 | jinit_arith_encoder(cinfo); 46 | else { 47 | jinit_huff_encoder(cinfo); 48 | } 49 | 50 | /* Need a full-image coefficient buffer in any multi-pass mode. */ 51 | jinit_c_coef_controller(cinfo, 52 | (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); 53 | jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); 54 | 55 | jinit_marker_writer(cinfo); 56 | 57 | /* We can now tell the memory manager to allocate virtual arrays. */ 58 | (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); 59 | 60 | /* Write the datastream header (SOI) immediately. 61 | * Frame and scan headers are postponed till later. 62 | * This lets application insert special markers after the SOI. 63 | */ 64 | (*cinfo->marker->write_file_header) (cinfo); 65 | } 66 | -------------------------------------------------------------------------------- /code/libspeex/include/speex/speex_buffer.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007 Jean-Marc Valin 2 | 3 | File: speex_buffer.h 4 | This is a very simple ring buffer implementation. It is not thread-safe 5 | so you need to do your own locking. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are 9 | met: 10 | 11 | 1. Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. 13 | 14 | 2. 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 | 3. The name of the author may not be used to endorse or promote products 19 | derived from this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | */ 33 | 34 | #ifndef SPEEX_BUFFER_H 35 | #define SPEEX_BUFFER_H 36 | 37 | #include "speex/speex_types.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | struct SpeexBuffer_; 44 | typedef struct SpeexBuffer_ SpeexBuffer; 45 | 46 | SpeexBuffer *speex_buffer_init(int size); 47 | 48 | void speex_buffer_destroy(SpeexBuffer *st); 49 | 50 | int speex_buffer_write(SpeexBuffer *st, void *data, int len); 51 | 52 | int speex_buffer_writezeros(SpeexBuffer *st, int len); 53 | 54 | int speex_buffer_read(SpeexBuffer *st, void *data, int len); 55 | 56 | int speex_buffer_get_available(SpeexBuffer *st); 57 | 58 | int speex_buffer_resize(SpeexBuffer *st, int len); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /code/libspeex/fftwrap.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Jean-Marc Valin 2 | File: fftwrap.h 3 | 4 | Wrapper for various FFTs 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 | - Neither the name of the Xiph.org Foundation nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 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 FOUNDATION OR 25 | 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 | 35 | #ifndef FFTWRAP_H 36 | #define FFTWRAP_H 37 | 38 | #include "arch.h" 39 | 40 | /** Compute tables for an FFT */ 41 | void *spx_fft_init(int size); 42 | 43 | /** Destroy tables for an FFT */ 44 | void spx_fft_destroy(void *table); 45 | 46 | /** Forward (real to half-complex) transform */ 47 | void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out); 48 | 49 | /** Backward (half-complex to real) transform */ 50 | void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out); 51 | 52 | /** Forward (real to half-complex) transform of float data */ 53 | void spx_fft_float(void *table, float *in, float *out); 54 | 55 | /** Backward (half-complex to real) transform of float data */ 56 | void spx_ifft_float(void *table, float *in, float *out); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /code/SDL12/include/SDL_config_amiga.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL - Simple DirectMedia Layer 3 | Copyright (C) 1997-2006 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_amiga_h 24 | #define _SDL_config_amiga_h 25 | 26 | #include "SDL_platform.h" 27 | 28 | /* This is a set of defines to configure the SDL features */ 29 | 30 | #define SDL_HAS_64BIT_TYPE 1 31 | 32 | /* Useful headers */ 33 | #define HAVE_SYS_TYPES_H 1 34 | #define HAVE_STDIO_H 1 35 | #define STDC_HEADERS 1 36 | #define HAVE_STRING_H 1 37 | #define HAVE_INTTYPES_H 1 38 | #define HAVE_SIGNAL_H 1 39 | 40 | /* C library functions */ 41 | #define HAVE_MALLOC 1 42 | #define HAVE_CALLOC 1 43 | #define HAVE_REALLOC 1 44 | #define HAVE_FREE 1 45 | #define HAVE_ALLOCA 1 46 | #define HAVE_GETENV 1 47 | #define HAVE_PUTENV 1 48 | #define HAVE_MEMSET 1 49 | #define HAVE_MEMCPY 1 50 | #define HAVE_MEMMOVE 1 51 | #define HAVE_MEMCMP 1 52 | 53 | /* Enable various audio drivers */ 54 | #define SDL_AUDIO_DRIVER_AHI 1 55 | #define SDL_AUDIO_DRIVER_DISK 1 56 | #define SDL_AUDIO_DRIVER_DUMMY 1 57 | 58 | /* Enable various cdrom drivers */ 59 | #define SDL_CDROM_DUMMY 1 60 | 61 | /* Enable various input drivers */ 62 | #define SDL_JOYSTICK_AMIGA 1 63 | 64 | /* Enable various shared object loading systems */ 65 | #define SDL_LOADSO_DUMMY 1 66 | 67 | /* Enable various threading systems */ 68 | #define SDL_THREAD_AMIGA 1 69 | 70 | /* Enable various timer systems */ 71 | #define SDL_TIMER_AMIGA 1 72 | 73 | /* Enable various video drivers */ 74 | #define SDL_VIDEO_DRIVER_CYBERGRAPHICS 1 75 | #define SDL_VIDEO_DRIVER_DUMMY 1 76 | 77 | /* Enable OpenGL support */ 78 | #define SDL_VIDEO_OPENGL 1 79 | 80 | #endif /* _SDL_config_amiga_h */ 81 | -------------------------------------------------------------------------------- /code/SDL12/include/SDL_cpuinfo.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 | /** 24 | * @file SDL_cpuinfo.h 25 | * CPU feature detection for SDL 26 | */ 27 | 28 | #ifndef _SDL_cpuinfo_h 29 | #define _SDL_cpuinfo_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 | /** This function returns true if the CPU has the RDTSC instruction */ 40 | extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); 41 | 42 | /** This function returns true if the CPU has MMX features */ 43 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); 44 | 45 | /** This function returns true if the CPU has MMX Ext. features */ 46 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void); 47 | 48 | /** This function returns true if the CPU has 3DNow features */ 49 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); 50 | 51 | /** This function returns true if the CPU has 3DNow! Ext. features */ 52 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void); 53 | 54 | /** This function returns true if the CPU has SSE features */ 55 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); 56 | 57 | /** This function returns true if the CPU has SSE2 features */ 58 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); 59 | 60 | /** This function returns true if the CPU has AltiVec features */ 61 | extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_cpuinfo_h */ 70 | -------------------------------------------------------------------------------- /code/libspeex/filterbank.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Jean-Marc Valin */ 2 | /** 3 | @file filterbank.h 4 | @brief Converting between psd and filterbank 5 | */ 6 | /* 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are 9 | met: 10 | 11 | 1. Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. 13 | 14 | 2. 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 | 3. The name of the author may not be used to endorse or promote products 19 | derived from this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | */ 33 | 34 | #ifndef FILTERBANK_H 35 | #define FILTERBANK_H 36 | 37 | #include "arch.h" 38 | 39 | typedef struct { 40 | int *bank_left; 41 | int *bank_right; 42 | spx_word16_t *filter_left; 43 | spx_word16_t *filter_right; 44 | #ifndef FIXED_POINT 45 | float *scaling; 46 | #endif 47 | int nb_banks; 48 | int len; 49 | } FilterBank; 50 | 51 | 52 | FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type); 53 | 54 | void filterbank_destroy(FilterBank *bank); 55 | 56 | void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel); 57 | 58 | void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd); 59 | 60 | #ifndef FIXED_POINT 61 | void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel); 62 | void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd); 63 | #endif 64 | 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /code/botlib/be_ea.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_ea.h 26 | * 27 | * desc: elementary actions 28 | * 29 | * $Archive: /source/code/botlib/be_ea.h $ 30 | * 31 | *****************************************************************************/ 32 | 33 | //ClientCommand elementary actions 34 | void EA_Say(int client, char *str); 35 | void EA_SayTeam(int client, char *str); 36 | void EA_Command(int client, char *command ); 37 | 38 | void EA_Action(int client, int action); 39 | void EA_Crouch(int client); 40 | void EA_Walk(int client); 41 | void EA_MoveUp(int client); 42 | void EA_MoveDown(int client); 43 | void EA_MoveForward(int client); 44 | void EA_MoveBack(int client); 45 | void EA_MoveLeft(int client); 46 | void EA_MoveRight(int client); 47 | void EA_Attack(int client); 48 | void EA_Respawn(int client); 49 | void EA_Talk(int client); 50 | void EA_Gesture(int client); 51 | void EA_Use(int client); 52 | 53 | //regular elementary actions 54 | void EA_SelectWeapon(int client, int weapon); 55 | void EA_Jump(int client); 56 | void EA_DelayedJump(int client); 57 | void EA_Move(int client, vec3_t dir, float speed); 58 | void EA_View(int client, vec3_t viewangles); 59 | 60 | //send regular input to the server 61 | void EA_EndRegular(int client, float thinktime); 62 | void EA_GetInput(int client, float thinktime, bot_input_t *input); 63 | void EA_ResetInput(int client); 64 | //setup and shutdown routines 65 | int EA_Setup(void); 66 | void EA_Shutdown(void); 67 | -------------------------------------------------------------------------------- /code/zlib/inftrees.h: -------------------------------------------------------------------------------- 1 | /* inftrees.h -- header to use inftrees.c 2 | * Copyright (C) 1995-2005 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 | /* Structure for decoding tables. Each entry provides either the 12 | information needed to do the operation requested by the code that 13 | indexed that table entry, or it provides a pointer to another 14 | table that indexes more bits of the code. op indicates whether 15 | the entry is a pointer to another table, a literal, a length or 16 | distance, an end-of-block, or an invalid code. For a table 17 | pointer, the low four bits of op is the number of index bits of 18 | that table. For a length or distance, the low four bits of op 19 | is the number of extra bits to get after the code. bits is 20 | the number of bits in this code or part of the code to drop off 21 | of the bit buffer. val is the actual byte to output in the case 22 | of a literal, the base length or distance, or the offset from 23 | the current table to the next table. Each entry is four bytes. */ 24 | typedef struct { 25 | unsigned char op; /* operation, extra bits, table bits */ 26 | unsigned char bits; /* bits in this part of the code */ 27 | unsigned short val; /* offset in table or code value */ 28 | } code; 29 | 30 | /* op values as set by inflate_table(): 31 | 00000000 - literal 32 | 0000tttt - table link, tttt != 0 is the number of table index bits 33 | 0001eeee - length or distance, eeee is the number of extra bits 34 | 01100000 - end of block 35 | 01000000 - invalid code 36 | */ 37 | 38 | /* Maximum size of dynamic tree. The maximum found in a long but non- 39 | exhaustive search was 1444 code structures (852 for length/literals 40 | and 592 for distances, the latter actually the result of an 41 | exhaustive search). The true maximum is not known, but the value 42 | below is more than safe. */ 43 | #define ENOUGH 2048 44 | #define MAXD 592 45 | 46 | /* Type of code to build for inftable() */ 47 | typedef enum { 48 | CODES, 49 | LENS, 50 | DISTS 51 | } codetype; 52 | 53 | extern int inflate_table OF((codetype type, unsigned short FAR *lens, 54 | unsigned codes, code FAR * FAR *table, 55 | unsigned FAR *bits, unsigned short FAR *work)); 56 | -------------------------------------------------------------------------------- /code/asm/ftola.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 | 25 | static const unsigned short fpucw = 0x0C7F; 26 | 27 | /* 28 | * GNU inline asm ftol conversion functions using SSE or FPU 29 | */ 30 | 31 | long qftolsse(float f) 32 | { 33 | long retval; 34 | 35 | __asm__ volatile 36 | ( 37 | "cvttss2si %1, %0\n" 38 | : "=r" (retval) 39 | : "x" (f) 40 | ); 41 | 42 | return retval; 43 | } 44 | 45 | int qvmftolsse(void) 46 | { 47 | int retval; 48 | 49 | __asm__ volatile 50 | ( 51 | "movss (" EDI ", " EBX ", 4), %%xmm0\n" 52 | "cvttss2si %%xmm0, %0\n" 53 | : "=r" (retval) 54 | : 55 | : "%xmm0" 56 | ); 57 | 58 | return retval; 59 | } 60 | 61 | long qftolx87(float f) 62 | { 63 | long retval; 64 | unsigned short oldcw; 65 | 66 | __asm__ volatile 67 | ( 68 | "fnstcw %2\n" 69 | "fldcw %3\n" 70 | "flds %1\n" 71 | "fistpl %1\n" 72 | "fldcw %2\n" 73 | "mov %1, %0\n" 74 | : "=r" (retval) 75 | : "m" (f), "m" (oldcw), "m" (fpucw) 76 | ); 77 | 78 | return retval; 79 | } 80 | 81 | int qvmftolx87(void) 82 | { 83 | int retval; 84 | unsigned short oldcw; 85 | 86 | __asm__ volatile 87 | ( 88 | "fnstcw %1\n" 89 | "fldcw %2\n" 90 | "flds (" EDI ", " EBX ", 4)\n" 91 | "fistpl (" EDI ", " EBX ", 4)\n" 92 | "fldcw %1\n" 93 | "mov (" EDI ", " EBX ", 4), %0\n" 94 | : "=r" (retval) 95 | : "m" (oldcw), "m" (fpucw) 96 | ); 97 | 98 | return retval; 99 | } 100 | -------------------------------------------------------------------------------- /code/game/bg_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 | // bg_local.h -- local definitions for the bg (both games) files 24 | 25 | #define MIN_WALK_NORMAL 0.7f // can't walk on very steep slopes 26 | 27 | #define STEPSIZE 18 28 | 29 | #define JUMP_VELOCITY 270 30 | 31 | #define TIMER_LAND 130 32 | #define TIMER_GESTURE (34*66+50) 33 | 34 | #define OVERCLIP 1.001f 35 | 36 | // all of the locals will be zeroed before each 37 | // pmove, just to make damn sure we don't have 38 | // any differences when running on client or server 39 | typedef struct { 40 | vec3_t forward, right, up; 41 | float frametime; 42 | 43 | int msec; 44 | 45 | qboolean walking; 46 | qboolean groundPlane; 47 | trace_t groundTrace; 48 | 49 | float impactSpeed; 50 | 51 | vec3_t previous_origin; 52 | vec3_t previous_velocity; 53 | int previous_waterlevel; 54 | } pml_t; 55 | 56 | extern pmove_t *pm; 57 | extern pml_t pml; 58 | 59 | // movement parameters 60 | extern float pm_stopspeed; 61 | extern float pm_duckScale; 62 | extern float pm_swimScale; 63 | 64 | extern float pm_accelerate; 65 | extern float pm_airaccelerate; 66 | extern float pm_wateraccelerate; 67 | extern float pm_flyaccelerate; 68 | 69 | extern float pm_friction; 70 | extern float pm_waterfriction; 71 | extern float pm_flightfriction; 72 | 73 | extern int c_pmove; 74 | 75 | void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ); 76 | void PM_AddTouchEnt( int entityNum ); 77 | void PM_AddEvent( int newEvent ); 78 | 79 | qboolean PM_SlideMove( qboolean gravity ); 80 | void PM_StepSlideMove( qboolean gravity ); 81 | 82 | 83 | -------------------------------------------------------------------------------- /code/tools/lcc/cpp/hideset.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "cpp.h" 5 | 6 | /* 7 | * A hideset is a null-terminated array of Nlist pointers. 8 | * They are referred to by indices in the hidesets array. 9 | * Hideset 0 is empty. 10 | */ 11 | 12 | #define HSSIZ 32 13 | typedef Nlist **Hideset; 14 | Hideset *hidesets; 15 | int nhidesets = 0; 16 | int maxhidesets = 3; 17 | int inserths(Hideset, Hideset, Nlist *); 18 | 19 | /* 20 | * Test for membership in a hideset 21 | */ 22 | int 23 | checkhideset(int hs, Nlist *np) 24 | { 25 | Hideset hsp; 26 | 27 | if (hs>=nhidesets) 28 | abort(); 29 | for (hsp = hidesets[hs]; *hsp; hsp++) { 30 | if (*hsp == np) 31 | return 1; 32 | } 33 | return 0; 34 | } 35 | 36 | /* 37 | * Return the (possibly new) hideset obtained by adding np to hs. 38 | */ 39 | int 40 | newhideset(int hs, Nlist *np) 41 | { 42 | int i, len; 43 | Nlist *nhs[HSSIZ+3]; 44 | Hideset hs1, hs2; 45 | 46 | len = inserths(nhs, hidesets[hs], np); 47 | for (i=0; i=HSSIZ) 53 | return hs; 54 | if (nhidesets >= maxhidesets) { 55 | maxhidesets = 3*maxhidesets/2+1; 56 | hidesets = (Hideset *)realloc(hidesets, (sizeof (Hideset *))*maxhidesets); 57 | if (hidesets == NULL) 58 | error(FATAL, "Out of memory from realloc"); 59 | } 60 | hs1 = (Hideset)domalloc(len*sizeof(Hideset)); 61 | memmove(hs1, nhs, len*sizeof(Hideset)); 62 | hidesets[nhidesets] = hs1; 63 | return nhidesets++; 64 | } 65 | 66 | int 67 | inserths(Hideset dhs, Hideset shs, Nlist *np) 68 | { 69 | Hideset odhs = dhs; 70 | 71 | while (*shs && *shs < np) 72 | *dhs++ = *shs++; 73 | if (*shs != np) 74 | *dhs++ = np; 75 | do { 76 | *dhs++ = *shs; 77 | } while (*shs++); 78 | return dhs - odhs; 79 | } 80 | 81 | /* 82 | * Hideset union 83 | */ 84 | int 85 | unionhideset(int hs1, int hs2) 86 | { 87 | Hideset hp; 88 | 89 | for (hp = hidesets[hs2]; *hp; hp++) 90 | hs1 = newhideset(hs1, *hp); 91 | return hs1; 92 | } 93 | 94 | void 95 | iniths(void) 96 | { 97 | hidesets = (Hideset *)domalloc(maxhidesets*sizeof(Hideset *)); 98 | hidesets[0] = (Hideset)domalloc(sizeof(Hideset)); 99 | *hidesets[0] = NULL; 100 | nhidesets++; 101 | } 102 | 103 | void 104 | prhideset(int hs) 105 | { 106 | Hideset np; 107 | 108 | for (np = hidesets[hs]; *np; np++) { 109 | fprintf(stderr, (char*)(*np)->name, (*np)->len); 110 | fprintf(stderr, " "); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /code/tools/lcc/cpp/nlist.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "cpp.h" 5 | 6 | extern char *optarg; 7 | extern int optind; 8 | extern int verbose; 9 | extern int Cplusplus; 10 | Nlist *kwdefined; 11 | char wd[128]; 12 | 13 | #define NLSIZE 128 14 | 15 | static Nlist *nlist[NLSIZE]; 16 | 17 | struct kwtab { 18 | char *kw; 19 | int val; 20 | int flag; 21 | } kwtab[] = { 22 | {"if", KIF, ISKW}, 23 | {"ifdef", KIFDEF, ISKW}, 24 | {"ifndef", KIFNDEF, ISKW}, 25 | {"elif", KELIF, ISKW}, 26 | {"else", KELSE, ISKW}, 27 | {"endif", KENDIF, ISKW}, 28 | {"include", KINCLUDE, ISKW}, 29 | {"define", KDEFINE, ISKW}, 30 | {"undef", KUNDEF, ISKW}, 31 | {"line", KLINE, ISKW}, 32 | {"warning", KWARNING, ISKW}, 33 | {"error", KERROR, ISKW}, 34 | {"pragma", KPRAGMA, ISKW}, 35 | {"eval", KEVAL, ISKW}, 36 | {"defined", KDEFINED, ISDEFINED+ISUNCHANGE}, 37 | {"__LINE__", KLINENO, ISMAC+ISUNCHANGE}, 38 | {"__FILE__", KFILE, ISMAC+ISUNCHANGE}, 39 | {"__DATE__", KDATE, ISMAC+ISUNCHANGE}, 40 | {"__TIME__", KTIME, ISMAC+ISUNCHANGE}, 41 | {"__STDC__", KSTDC, ISUNCHANGE}, 42 | {NULL} 43 | }; 44 | 45 | unsigned long namebit[077+1]; 46 | Nlist *np; 47 | 48 | void 49 | setup_kwtab(void) 50 | { 51 | struct kwtab *kp; 52 | Nlist *np; 53 | Token t; 54 | static Token deftoken[1] = {{ NAME, 0, 0, 0, 7, (uchar*)"defined" }}; 55 | static Tokenrow deftr = { deftoken, deftoken, deftoken+1, 1 }; 56 | 57 | for (kp=kwtab; kp->kw; kp++) { 58 | t.t = (uchar*)kp->kw; 59 | t.len = strlen(kp->kw); 60 | np = lookup(&t, 1); 61 | np->flag = kp->flag; 62 | np->val = kp->val; 63 | if (np->val == KDEFINED) { 64 | kwdefined = np; 65 | np->val = NAME; 66 | np->vp = &deftr; 67 | np->ap = 0; 68 | } 69 | } 70 | } 71 | 72 | Nlist * 73 | lookup(Token *tp, int install) 74 | { 75 | unsigned int h; 76 | Nlist *np; 77 | uchar *cp, *cpe; 78 | 79 | h = 0; 80 | for (cp=tp->t, cpe=cp+tp->len; cpt==*np->name && tp->len==np->len 86 | && strncmp((char*)tp->t, (char*)np->name, tp->len)==0) 87 | return np; 88 | np = np->next; 89 | } 90 | if (install) { 91 | np = new(Nlist); 92 | np->vp = NULL; 93 | np->ap = NULL; 94 | np->flag = 0; 95 | np->val = 0; 96 | np->len = tp->len; 97 | np->name = newstring(tp->t, tp->len, 0); 98 | np->next = nlist[h]; 99 | nlist[h] = np; 100 | quickset(tp->t[0], tp->len>1? tp->t[1]:0); 101 | return np; 102 | } 103 | return NULL; 104 | } 105 | -------------------------------------------------------------------------------- /code/libspeex/vbr.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Jean-Marc Valin */ 2 | /** 3 | @file vbr.h 4 | @brief Variable Bit-Rate (VBR) related routines 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 | 36 | 37 | #ifndef VBR_H 38 | #define VBR_H 39 | 40 | #include "arch.h" 41 | 42 | #define VBR_MEMORY_SIZE 5 43 | 44 | extern const float vbr_nb_thresh[9][11]; 45 | extern const float vbr_hb_thresh[5][11]; 46 | extern const float vbr_uhb_thresh[2][11]; 47 | 48 | /** VBR state. */ 49 | typedef struct VBRState { 50 | float energy_alpha; 51 | float average_energy; 52 | float last_energy; 53 | float last_log_energy[VBR_MEMORY_SIZE]; 54 | float accum_sum; 55 | float last_pitch_coef; 56 | float soft_pitch; 57 | float last_quality; 58 | float noise_level; 59 | float noise_accum; 60 | float noise_accum_count; 61 | int consec_noise; 62 | } VBRState; 63 | 64 | void vbr_init(VBRState *vbr); 65 | 66 | float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef); 67 | 68 | void vbr_destroy(VBRState *vbr); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /code/game/ai_dmnet.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_dmnet.h 26 | * 27 | * desc: Quake3 bot AI 28 | * 29 | * $Archive: /source/code/botai/ai_chat.c $ 30 | * 31 | *****************************************************************************/ 32 | 33 | #define MAX_NODESWITCHES 50 34 | 35 | void AIEnter_Intermission(bot_state_t *bs, char *s); 36 | void AIEnter_Observer(bot_state_t *bs, char *s); 37 | void AIEnter_Respawn(bot_state_t *bs, char *s); 38 | void AIEnter_Stand(bot_state_t *bs, char *s); 39 | void AIEnter_Seek_ActivateEntity(bot_state_t *bs, char *s); 40 | void AIEnter_Seek_NBG(bot_state_t *bs, char *s); 41 | void AIEnter_Seek_LTG(bot_state_t *bs, char *s); 42 | void AIEnter_Seek_Camp(bot_state_t *bs, char *s); 43 | void AIEnter_Battle_Fight(bot_state_t *bs, char *s); 44 | void AIEnter_Battle_Chase(bot_state_t *bs, char *s); 45 | void AIEnter_Battle_Retreat(bot_state_t *bs, char *s); 46 | void AIEnter_Battle_NBG(bot_state_t *bs, char *s); 47 | int AINode_Intermission(bot_state_t *bs); 48 | int AINode_Observer(bot_state_t *bs); 49 | int AINode_Respawn(bot_state_t *bs); 50 | int AINode_Stand(bot_state_t *bs); 51 | int AINode_Seek_ActivateEntity(bot_state_t *bs); 52 | int AINode_Seek_NBG(bot_state_t *bs); 53 | int AINode_Seek_LTG(bot_state_t *bs); 54 | int AINode_Battle_Fight(bot_state_t *bs); 55 | int AINode_Battle_Chase(bot_state_t *bs); 56 | int AINode_Battle_Retreat(bot_state_t *bs); 57 | int AINode_Battle_NBG(bot_state_t *bs); 58 | 59 | void BotResetNodeSwitches(void); 60 | void BotDumpNodeSwitches(bot_state_t *bs); 61 | 62 | -------------------------------------------------------------------------------- /code/botlib/be_aas_debug.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_debug.h 25 | * 26 | * desc: AAS 27 | * 28 | * $Archive: /source/code/botlib/be_aas_debug.h $ 29 | * 30 | *****************************************************************************/ 31 | 32 | //clear the shown debug lines 33 | void AAS_ClearShownDebugLines(void); 34 | // 35 | void AAS_ClearShownPolygons(void); 36 | //show a debug line 37 | void AAS_DebugLine(vec3_t start, vec3_t end, int color); 38 | //show a permenent line 39 | void AAS_PermanentLine(vec3_t start, vec3_t end, int color); 40 | //show a permanent cross 41 | void AAS_DrawPermanentCross(vec3_t origin, float size, int color); 42 | //draw a cross in the plane 43 | void AAS_DrawPlaneCross(vec3_t point, vec3_t normal, float dist, int type, int color); 44 | //show a bounding box 45 | void AAS_ShowBoundingBox(vec3_t origin, vec3_t mins, vec3_t maxs); 46 | //show a face 47 | void AAS_ShowFace(int facenum); 48 | //show an area 49 | void AAS_ShowArea(int areanum, int groundfacesonly); 50 | // 51 | void AAS_ShowAreaPolygons(int areanum, int color, int groundfacesonly); 52 | //draw a cros 53 | void AAS_DrawCross(vec3_t origin, float size, int color); 54 | //print the travel type 55 | void AAS_PrintTravelType(int traveltype); 56 | //draw an arrow 57 | void AAS_DrawArrow(vec3_t start, vec3_t end, int linecolor, int arrowcolor); 58 | //visualize the given reachability 59 | void AAS_ShowReachability(struct aas_reachability_s *reach); 60 | //show the reachable areas from the given area 61 | void AAS_ShowReachableAreas(int areanum); 62 | 63 | --------------------------------------------------------------------------------