├── WinQuake ├── net_wso.c ├── qe3.ico ├── q.bat ├── qb.bat ├── quake.gif ├── quake.ico ├── WinQuake.mdp ├── WinQuake.ncb ├── WinQuake.opt ├── cwsdpmi.exe ├── winquake.aps ├── wqreadme.txt ├── data │ └── ORDER.TXT ├── qa.bat ├── qt.bat ├── kit │ ├── GLQUAKE.EXE │ └── OPENGL32.DLL ├── gas2masm │ ├── gas2masm.mdp │ ├── gas2masm.dsw │ └── gas2masm.plg ├── quake-hipnotic.spec.sh ├── dxsdk │ └── SDK │ │ ├── LIB │ │ ├── DINPUT.LIB │ │ └── DXGUID.LIB │ │ └── INC │ │ ├── FASTFILE.H │ │ └── D3DRMWIN.H ├── scitech │ ├── LIB │ │ └── WIN32 │ │ │ └── VC │ │ │ └── MGLLT.LIB │ └── INCLUDE │ │ └── MGLDOS.H ├── makezip.bat ├── clean.bat ├── resource.h ├── progdefs.h ├── crc.h ├── WinQuake.dsw ├── docs │ └── INSTALL.Q2Mission ├── cdaudio.h ├── in_null.c ├── view.h ├── menu.h ├── conproc.h ├── input.h ├── cd_null.c ├── wq.bat ├── r_vars.c ├── net_none.c ├── net_loop.h ├── net_ser.h ├── sbar.h ├── d_zpoint.c ├── net_vcr.h ├── net_dgrm.h ├── dosasm.s ├── nonintel.c ├── sys_dosa.s ├── vregset.h ├── draw.h ├── snd_next.c ├── console.h ├── d_vars.c ├── quake-data.spec.sh ├── net_bw.h ├── net_ipx.h ├── net_udp.h ├── net_wins.h ├── net_wipx.h ├── net_mp.h ├── quake.spec.sh ├── screen.h ├── r_varsa.s ├── wad.h ├── vregset.c ├── quake-shareware.spec.sh ├── snd_null.c ├── sys.h ├── d_fill.c ├── net_bsd.c ├── vid_null.c ├── d_scana.s ├── 3dfx.txt ├── sys_wina.s ├── chase.c ├── asm_i386.h ├── world.h └── d_modech.c └── QW ├── qw.ncb ├── qw.opt ├── client ├── q.bat ├── md4.c ├── qe3.ico ├── qwcl.mdp ├── cl_main.c ├── qwcl2.ico ├── winquake.aps ├── quakeworld.bmp ├── cd_null.c ├── in_null.c ├── exitscrn.txt ├── qwcl.dsw ├── resource.h ├── crc.h ├── cdaudio.h ├── notes.txt ├── view.h ├── input.h ├── menu.h ├── r_vars.c ├── d_zpoint.c ├── sbar.h ├── nonintel.c ├── vid_null.c ├── sys_dosa.s ├── screen.h ├── d_vars.c ├── draw.h ├── r_varsa.s ├── console.h ├── wad.h ├── buildnum.c ├── makefile.svgalib ├── sys.h ├── d_fill.c ├── d_scana.s ├── sys_null.c ├── sys_wina.s ├── block8.h ├── block16.h ├── d_modech.c └── asm_i386.h ├── quake.gif ├── quakeworld.bmp ├── server ├── qwsv.mdp ├── notes.txt ├── move.txt ├── qwsv.dsw ├── quakeasm.h ├── sys.h ├── makefile ├── qwsvdef.h ├── newnet.txt ├── worlda.s └── asm_i386.h ├── progs ├── qwprogs.dat ├── progs.src ├── sprites.qc ├── spectate.qc └── server.qc ├── docs ├── qwcl-readme.txt └── readme.qwsv ├── gas2masm ├── gas2masm.mdp └── gas2masm.plg ├── dxsdk └── sdk │ ├── lib │ ├── dinput.lib │ └── dxguid.lib │ └── inc │ ├── fastfile.h │ └── d3drmwin.h ├── makezip ├── scitech ├── lib │ └── win32 │ │ └── vc │ │ └── mgllt.lib └── include │ └── mgldos.h ├── fixskins.sh ├── makezip.bat ├── glqwcl.3dfxgl ├── qwfwd ├── qwfwd.dsw └── qwfwd.plg ├── clean.bat ├── qwcl.x11.spec.sh ├── glqwcl.spec.sh ├── qw.dsw ├── release233_notes.txt ├── qwcl.spec.sh └── qwsv.spec.sh /WinQuake/net_wso.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /QW/qw.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/qw.ncb -------------------------------------------------------------------------------- /QW/qw.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/qw.opt -------------------------------------------------------------------------------- /QW/client/q.bat: -------------------------------------------------------------------------------- 1 | dos\quake -basedir \quake\v2 %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /QW/quake.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/quake.gif -------------------------------------------------------------------------------- /QW/client/md4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/md4.c -------------------------------------------------------------------------------- /WinQuake/qe3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/qe3.ico -------------------------------------------------------------------------------- /QW/client/qe3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/qe3.ico -------------------------------------------------------------------------------- /QW/client/qwcl.mdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/qwcl.mdp -------------------------------------------------------------------------------- /QW/quakeworld.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/quakeworld.bmp -------------------------------------------------------------------------------- /QW/server/qwsv.mdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/server/qwsv.mdp -------------------------------------------------------------------------------- /WinQuake/q.bat: -------------------------------------------------------------------------------- 1 | dos\quake -basedir /quake -game test_gjc %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /WinQuake/qb.bat: -------------------------------------------------------------------------------- 1 | dos\quake /quake/test_gjc;/quake/id1 %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /WinQuake/quake.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/quake.gif -------------------------------------------------------------------------------- /WinQuake/quake.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/quake.ico -------------------------------------------------------------------------------- /QW/client/cl_main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/cl_main.c -------------------------------------------------------------------------------- /QW/client/qwcl2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/qwcl2.ico -------------------------------------------------------------------------------- /QW/progs/qwprogs.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/progs/qwprogs.dat -------------------------------------------------------------------------------- /WinQuake/WinQuake.mdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/WinQuake.mdp -------------------------------------------------------------------------------- /WinQuake/WinQuake.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/WinQuake.ncb -------------------------------------------------------------------------------- /WinQuake/WinQuake.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/WinQuake.opt -------------------------------------------------------------------------------- /WinQuake/cwsdpmi.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/cwsdpmi.exe -------------------------------------------------------------------------------- /WinQuake/winquake.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/winquake.aps -------------------------------------------------------------------------------- /WinQuake/wqreadme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/wqreadme.txt -------------------------------------------------------------------------------- /QW/client/winquake.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/winquake.aps -------------------------------------------------------------------------------- /QW/docs/qwcl-readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/docs/qwcl-readme.txt -------------------------------------------------------------------------------- /WinQuake/data/ORDER.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/data/ORDER.TXT -------------------------------------------------------------------------------- /WinQuake/qa.bat: -------------------------------------------------------------------------------- 1 | dos\quake -nocdaudio -basedir /quake -game test_am %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /WinQuake/qt.bat: -------------------------------------------------------------------------------- 1 | dos\quake /quake/test_am;/quake/test_jc;/quake/id1 %1 %2 %3 %4 %5 %6 %7 %8 %9 2 | -------------------------------------------------------------------------------- /QW/client/quakeworld.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/client/quakeworld.bmp -------------------------------------------------------------------------------- /QW/gas2masm/gas2masm.mdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/gas2masm/gas2masm.mdp -------------------------------------------------------------------------------- /WinQuake/kit/GLQUAKE.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/kit/GLQUAKE.EXE -------------------------------------------------------------------------------- /WinQuake/kit/OPENGL32.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/kit/OPENGL32.DLL -------------------------------------------------------------------------------- /QW/dxsdk/sdk/lib/dinput.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/dxsdk/sdk/lib/dinput.lib -------------------------------------------------------------------------------- /QW/dxsdk/sdk/lib/dxguid.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/dxsdk/sdk/lib/dxguid.lib -------------------------------------------------------------------------------- /QW/makezip: -------------------------------------------------------------------------------- 1 | zip -9 -r qw client server progs gas2masm Make* [qQ]* scitech dxsdk *.txt *.bmp 2 | -------------------------------------------------------------------------------- /WinQuake/gas2masm/gas2masm.mdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/gas2masm/gas2masm.mdp -------------------------------------------------------------------------------- /WinQuake/quake-hipnotic.spec.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/quake-hipnotic.spec.sh -------------------------------------------------------------------------------- /QW/scitech/lib/win32/vc/mgllt.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/QW/scitech/lib/win32/vc/mgllt.lib -------------------------------------------------------------------------------- /WinQuake/dxsdk/SDK/LIB/DINPUT.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/dxsdk/SDK/LIB/DINPUT.LIB -------------------------------------------------------------------------------- /WinQuake/dxsdk/SDK/LIB/DXGUID.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/dxsdk/SDK/LIB/DXGUID.LIB -------------------------------------------------------------------------------- /WinQuake/scitech/LIB/WIN32/VC/MGLLT.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/quake/master/WinQuake/scitech/LIB/WIN32/VC/MGLLT.LIB -------------------------------------------------------------------------------- /QW/fixskins.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | for x in *; do 3 | y=`echo $x | tr '[A-Z]' '[a-z]'` 4 | if [ $x != $y ]; then 5 | mv $x $y 6 | fi 7 | done 8 | 9 | -------------------------------------------------------------------------------- /QW/makezip.bat: -------------------------------------------------------------------------------- 1 | zip -9 -r -D -X qw client server docs dxsdk gas2masm progs scitech -x *.obj *.sbr *.pch *.pdb *.idb *.bsc *.dll *.exp *.exe *.lib *.map *.ilk 2 | -------------------------------------------------------------------------------- /WinQuake/makezip.bat: -------------------------------------------------------------------------------- 1 | zip -9 -r code * -x *.obj -x *.sbr -x *.pch -x *.pdb -x *.o -x *.exe -x *.dll -x *.map -x *.bsc -x *.lib -x *.ilk -x *.exp -x *.idb -x *.zip 2 | -------------------------------------------------------------------------------- /QW/progs/progs.src: -------------------------------------------------------------------------------- 1 | ./qwprogs.dat 2 | 3 | defs.qc 4 | subs.qc 5 | combat.qc 6 | items.qc 7 | weapons.qc 8 | world.qc 9 | client.qc 10 | spectate.qc 11 | player.qc 12 | doors.qc 13 | buttons.qc 14 | triggers.qc 15 | plats.qc 16 | misc.qc 17 | 18 | server.qc 19 | -------------------------------------------------------------------------------- /QW/server/notes.txt: -------------------------------------------------------------------------------- 1 | 2 | new server auth design; 3 | - server includes 32bit random token S 4 | - master sees new server, request auth with MD5(M|S). m is 32bit master key 5 | - server sends register MD5( MD5(M|S) | S ) 6 | - master validates registration with server 7 | - M value changes for each server randomly 8 | -------------------------------------------------------------------------------- /QW/docs/readme.qwsv: -------------------------------------------------------------------------------- 1 | QWSV Notes (May.05.1998 Release) 2 | -------------------------------- 3 | 4 | Please refer to 5 | 6 | http://www.quakeworld.net/ 7 | 8 | for documentation. 9 | 10 | Server operators wishing to link to our master server at id, please use; 11 | 12 | qwsv +setmaster 192.246.40.37. 13 | 14 | -------------------------------------------------------------------------------- /QW/client/cd_null.c: -------------------------------------------------------------------------------- 1 | #include "quakedef.h" 2 | 3 | void CDAudio_Play(byte track, qboolean looping) 4 | { 5 | } 6 | 7 | 8 | void CDAudio_Stop(void) 9 | { 10 | } 11 | 12 | 13 | void CDAudio_Resume(void) 14 | { 15 | } 16 | 17 | 18 | void CDAudio_Update(void) 19 | { 20 | } 21 | 22 | 23 | int CDAudio_Init(void) 24 | { 25 | return 0; 26 | } 27 | 28 | 29 | void CDAudio_Shutdown(void) 30 | { 31 | } -------------------------------------------------------------------------------- /QW/client/in_null.c: -------------------------------------------------------------------------------- 1 | // in_null.c -- for systems without a mouse 2 | 3 | #include "quakedef.h" 4 | 5 | void IN_Init (void) 6 | { 7 | } 8 | 9 | void IN_Shutdown (void) 10 | { 11 | } 12 | 13 | void IN_Commands (void) 14 | { 15 | } 16 | 17 | void IN_Move (usercmd_t *cmd) 18 | { 19 | } 20 | 21 | /* 22 | =========== 23 | IN_ModeChanged 24 | =========== 25 | */ 26 | void IN_ModeChanged (void) 27 | { 28 | } 29 | 30 | -------------------------------------------------------------------------------- /QW/glqwcl.3dfxgl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script preloads the lib3dfxgl.so library which overrides the functions 4 | # present in libMesaGL.so. This allows glquake to run using 3DFX's miniport 5 | # and without Mesa 3-D. Glide and X11 libraries have to be installed tho, 6 | # even tho GLQuake doesn't use X11, it's linked against it because Mesa 3-D 7 | # requires them. 8 | 9 | LD_PRELOAD=./lib3dfxgl.so ./glqwcl $* 10 | -------------------------------------------------------------------------------- /WinQuake/clean.bat: -------------------------------------------------------------------------------- 1 | rmdir /s /q debug 2 | rmdir /s /q release 3 | rmdir /s /q debug_gl 4 | rmdir /s /q release_gl 5 | 6 | rmdir /s /q gas2masm\debug 7 | rmdir /s /q gas2masm\release 8 | 9 | del gas2masm\gas2masm.opt 10 | del gas2masm\gas2masm.plg 11 | del gas2masm\gas2masm.ncb 12 | del gas2masm\gas2masm.stt 13 | 14 | del WinQuake.opt 15 | del WinQuake.plg 16 | del WinQuake.ncb 17 | del WinQuake.stt 18 | 19 | -------------------------------------------------------------------------------- /QW/progs/sprites.qc: -------------------------------------------------------------------------------- 1 | 2 | // these are the only sprites still in the game... 3 | 4 | $spritename s_explod 5 | $type vp_parallel 6 | $load /raid/quake/id1/gfx/sprites/explod03.lbm 7 | $frame 24 24 56 56 8 | $frame 120 24 56 56 9 | $frame 216 24 56 56 10 | $frame 24 88 56 56 11 | $frame 120 88 56 56 12 | $frame 216 88 56 56 13 | 14 | 15 | $spritename s_bubble 16 | $type vp_parallel 17 | $load /raid/quake/id1/gfx/sprites/bubble.lbm 18 | $frame 16 16 16 16 19 | $frame 40 16 16 16 20 | 21 | 22 | $spritename s_light 23 | $type vp_parallel 24 | $load /raid/quake/id1/gfx/sprites/light.lbm 25 | $frame 104 32 32 32 26 | 27 | -------------------------------------------------------------------------------- /QW/server/move.txt: -------------------------------------------------------------------------------- 1 | 2 | dead state flag for no user input 3 | 4 | 5 | floor = under feet test 6 | onground? 7 | 8 | feet = wading test 9 | 10 | waist = swimming test 11 | 12 | head = submerged test 13 | 14 | 15 | if ( floor == solid) 16 | if (head == water) 17 | friction = 0.8; 18 | else if (waist == water) 19 | friction = 20 | else if (feet == water) 21 | friction = 22 | else 23 | friction = 24 | walk code 25 | return; 26 | 27 | if (floor == water) 28 | if (head == water) 29 | total underwater 30 | if (waist == water) 31 | treading water 32 | drifting down 33 | 34 | if (floor == air) 35 | falling 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /QW/client/exitscrn.txt: -------------------------------------------------------------------------------- 1 | QuakeWorld 2 | version 1.64 by id Software 3 | 4 | Programming 5 | John Carmack Michael Abrash 6 | John Cash Christian Antkow 7 | 8 | Additional Programming 9 | Dave 'Zoid' Kirsch 10 | Courtesy of ThreeWave Software 11 | Jack 'morbid' Mathews 12 | Courtesy of the QuakeSpy Team 13 | 14 | QuakeWorld is an unsupported 15 | product of id Software. 16 | 17 | Quake is a trademark of Id Software, 18 | inc., (c)1996, 1997 Id Software, inc. 19 | All rights reserved. NIN logo is a 20 | registered trademark licensed to 21 | Nothing Interactive, Inc. All rights 22 | reserved. Press y to exit 23 | -------------------------------------------------------------------------------- /QW/client/qwcl.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 5.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "qwcl"=.\qwcl.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /QW/qwfwd/qwfwd.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 5.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "QWFwd"=.\QWFwd.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /QW/server/qwsv.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 5.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "qwsv"=.\qwsv.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /WinQuake/gas2masm/gas2masm.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "gas2masm"=.\gas2masm.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /WinQuake/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by winquake.rc 4 | // 5 | #define IDS_STRING1 1 6 | #define IDI_ICON2 1 7 | #define IDD_DIALOG1 108 8 | #define IDD_PROGRESS 109 9 | #define IDC_PROGRESS 1000 10 | 11 | // Next default values for new objects 12 | // 13 | #ifdef APSTUDIO_INVOKED 14 | #ifndef APSTUDIO_READONLY_SYMBOLS 15 | #define _APS_NEXT_RESOURCE_VALUE 111 16 | #define _APS_NEXT_COMMAND_VALUE 40001 17 | #define _APS_NEXT_CONTROL_VALUE 1004 18 | #define _APS_NEXT_SYMED_VALUE 101 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /QW/client/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by winquake.rc 4 | // 5 | #define IDS_STRING1 1 6 | #define IDI_ICON2 1 7 | #define IDD_DIALOG1 108 8 | #define IDD_PROGRESS 109 9 | #define IDB_QWBITMAP 112 10 | #define IDC_PROGRESS 1000 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 115 17 | #define _APS_NEXT_COMMAND_VALUE 40001 18 | #define _APS_NEXT_CONTROL_VALUE 1001 19 | #define _APS_NEXT_SYMED_VALUE 101 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /QW/clean.bat: -------------------------------------------------------------------------------- 1 | rm -rf client\debug 2 | rm -rf client\release 3 | rm -rf client\gldebug 4 | rm -rf client\glrelease 5 | 6 | rm -f client\qwcl.ncb 7 | rm -f client\qwcl.opt 8 | rm -f client\qwcl.plg 9 | rm -f client\qwcl.stt 10 | 11 | rm -rf server\debug 12 | rm -rf server\release 13 | 14 | rm -f server\qwsv.ncb 15 | rm -f server\qwsv.opt 16 | rm -f server\qwsv.plg 17 | rm -f server\qwsv.stt 18 | 19 | rm -rf gas2masm\debug 20 | rm -rf gas2masm\release 21 | 22 | rm -f gas2masm\gas2masm.ncb 23 | rm -f gas2masm\gas2masm.opt 24 | rm -f gas2masm\gas2masm.plg 25 | rm -f gas2masm\gas2masm.stt 26 | 27 | rm -rf qwfwd\debug 28 | rm -rf qwfwd\release 29 | 30 | rm -f qwfwd\qwfwd.ncb 31 | rm -f qwfwd\qwfwd.opt 32 | rm -f qwfwd\qwfwd.plg 33 | rm -f qwfwd\qwfwd.stt 34 | 35 | rm -f qw.ncb 36 | rm -f qw.opt 37 | rm -f qw.plg 38 | rm -f qw.stt 39 | 40 | 41 | -------------------------------------------------------------------------------- /WinQuake/progdefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifdef QUAKE2 21 | #include "progdefs.q2" 22 | #else 23 | #include "progdefs.q1" 24 | #endif 25 | -------------------------------------------------------------------------------- /WinQuake/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /* crc.h */ 21 | 22 | void CRC_Init(unsigned short *crcvalue); 23 | void CRC_ProcessByte(unsigned short *crcvalue, byte data); 24 | unsigned short CRC_Value(unsigned short crcvalue); 25 | -------------------------------------------------------------------------------- /WinQuake/WinQuake.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "gas2masm"=.\gas2masm\gas2masm.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "winquake"=.\WinQuake.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | Begin Project Dependency 27 | Project_Dep_Name gas2masm 28 | End Project Dependency 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /QW/client/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /* crc.h */ 21 | 22 | void CRC_Init(unsigned short *crcvalue); 23 | void CRC_ProcessByte(unsigned short *crcvalue, byte data); 24 | unsigned short CRC_Value(unsigned short crcvalue); 25 | unsigned short CRC_Block (byte *start, int count); 26 | -------------------------------------------------------------------------------- /QW/client/cdaudio.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | int CDAudio_Init(void); 22 | void CDAudio_Play(byte track, qboolean looping); 23 | void CDAudio_Stop(void); 24 | void CDAudio_Pause(void); 25 | void CDAudio_Resume(void); 26 | void CDAudio_Shutdown(void); 27 | void CDAudio_Update(void); 28 | -------------------------------------------------------------------------------- /WinQuake/docs/INSTALL.Q2Mission: -------------------------------------------------------------------------------- 1 | INSTALL for Linux Quake2 Mission Packs 2 | -------------------------------------- 3 | 4 | Installation 5 | ------------ 6 | 7 | Mount the Quake2 Mission Pack CD as one would usually mount a CDROM, this can 8 | be accomplished by using the command: 9 | 10 | mount /dev/cdrom /mnt 11 | 12 | As root. Once the CD is mounted, run the setup script on the CD as root. 13 | 14 | $ su 15 | Password: 16 | # mount /dev/cdrom /mnt 17 | # /bin/sh /mnt/setup 18 | 19 | The script will ask some questions about what options you want to install 20 | and automatically install the software into /usr/local/games/quake2. 21 | 22 | After Installation 23 | ------------------ 24 | 25 | To run Quake2 Mission Pack #1: The Reckoning add the following option when 26 | executing Quake2: 27 | 28 | ./quake2 +set game xatrix 29 | 30 | To run Quake2 Mission Pack #2: Ground Zero add the following: 31 | 32 | ./quake2 +set game rogue 33 | 34 | Requirements 35 | ------------ 36 | 37 | The Quake2 Mission Packs require a previous installation of Quake2. 38 | 39 | 40 | -------------------------------------------------------------------------------- /QW/server/quakeasm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // quakeasm.h: general asm header file 22 | // 23 | 24 | #if __i386__ 25 | #define id386 1 26 | #else 27 | #define id386 0 28 | #endif 29 | 30 | // !!! must be kept the same as in d_iface.h !!! 31 | #define TRANSPARENT_COLOR 255 32 | 33 | -------------------------------------------------------------------------------- /WinQuake/cdaudio.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | int CDAudio_Init(void); 22 | void CDAudio_Play(byte track, qboolean looping); 23 | void CDAudio_Stop(void); 24 | void CDAudio_Pause(void); 25 | void CDAudio_Resume(void); 26 | void CDAudio_Shutdown(void); 27 | void CDAudio_Update(void); 28 | -------------------------------------------------------------------------------- /QW/client/notes.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | movecmd_t movecmd; 4 | 5 | 6 | input from 7 | 8 | packet sender 9 | wake up on alarms or input signal 10 | if on input signal, set skipnextalrm 11 | else 12 | if skipnextalarm 13 | skipnextalarm = false; 14 | continue; 15 | lock packet 16 | get current movecmd 17 | send message 18 | unlock packet 19 | 20 | packet receiver 21 | wake up only on packet arrival 22 | identify the packet source 23 | calculate exact latency 24 | save the packet off 25 | 26 | 27 | 28 | 29 | // cause timer messages to be issued 30 | SetTimer (mainwindow, 1, 50, NULL); 31 | 32 | // cause packet received messages to be issued 33 | WSAAsyncSelect ( net_socket, mainwindow, WM_USER, FD_READ ); 34 | 35 | if (!GetMessage (&msg, NULL, 0, 0)) 36 | { 37 | TranslateMessage (&msg); 38 | DispatchMessage (&msg); 39 | while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) 40 | { 41 | if (!GetMessage (&msg, NULL, 0, 0)) 42 | break; 43 | TranslateMessage (&msg); 44 | DispatchMessage (&msg); 45 | } 46 | PrepareToBlock (); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /QW/client/view.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // view.h 21 | 22 | extern cvar_t v_gamma; 23 | extern cvar_t lcd_x; 24 | #ifdef GLQUAKE 25 | extern float v_blend[4]; 26 | #endif 27 | 28 | void V_Init (void); 29 | void V_RenderView (void); 30 | float V_CalcRoll (vec3_t angles, vec3_t velocity); 31 | void V_UpdatePalette (void); 32 | 33 | -------------------------------------------------------------------------------- /QW/qwcl.x11.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate qwcl.x11.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: qwcl.x11-%{version}.tar.gz 18 | Group: Games 19 | Copyright: Restricted 20 | Icon: quake.gif 21 | BuildRoot: /var/tmp/%{name}-%{version} 22 | Summary: X11 QuakeWorld Client 23 | 24 | %description 25 | "Quake is the biggest, baddest, and bloodiest 3-D action game ever 26 | conceived" - PC GAMER 27 | 28 | "The most important PC game ever" - PC ZONE 29 | 30 | ""Quake": Bloody Amazing" - USA TODAY 31 | 32 | "The Vanguard of a terrifying new level of immersive interactivity" - 33 | COMPUTER GAMING WORLD 34 | 35 | %install 36 | 37 | %files 38 | %attr(644,root,root) ${3}/readme.qwcl.x11 39 | %attr(755,root,root) ${3}/qwcl.x11 40 | EOF 41 | 42 | 43 | -------------------------------------------------------------------------------- /WinQuake/in_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // in_null.c -- for systems without a mouse 21 | 22 | #include "quakedef.h" 23 | 24 | void IN_Init (void) 25 | { 26 | } 27 | 28 | void IN_Shutdown (void) 29 | { 30 | } 31 | 32 | void IN_Commands (void) 33 | { 34 | } 35 | 36 | void IN_Move (usercmd_t *cmd) 37 | { 38 | } 39 | 40 | -------------------------------------------------------------------------------- /QW/qwfwd/qwfwd.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: QWFwd - Win32 Release-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\TEMP\RSP775.tmp" with contents 10 | [ 11 | /nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/qwfwd.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c 12 | "D:\Work\quake source\QW\qwfwd\qwfwd.c" 13 | ] 14 | Creating command line "cl.exe @C:\TEMP\RSP775.tmp" 15 | Creating temporary file "C:\TEMP\RSP776.tmp" with contents 16 | [ 17 | wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"Release/qwfwd.pdb" /machine:I386 /out:"Release/qwfwd.exe" 18 | ".\Release\qwfwd.obj" 19 | ] 20 | Creating command line "link.exe @C:\TEMP\RSP776.tmp" 21 |

Output Window

22 | Compiling... 23 | qwfwd.c 24 | Linking... 25 | 26 | 27 | 28 |

Results

29 | qwfwd.exe - 0 error(s), 0 warning(s) 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /QW/gas2masm/gas2masm.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: gas2masm - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\TEMP\RSP712.tmp" with contents 10 | [ 11 | /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /Fp".\Debug/gas2masm.pch" /YX /Fo".\Debug/" /Fd".\Debug/" /FD /c 12 | "D:\Work\quake source\QW\gas2masm\gas2masm.c" 13 | ] 14 | Creating command line "cl.exe @C:\TEMP\RSP712.tmp" 15 | Creating temporary file "C:\TEMP\RSP713.tmp" with contents 16 | [ 17 | kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:".\Debug/gas2masm.pdb" /debug /machine:I386 /out:".\Debug/gas2masm.exe" 18 | ".\Debug\gas2masm.obj" 19 | ] 20 | Creating command line "link.exe @C:\TEMP\RSP713.tmp" 21 |

Output Window

22 | Compiling... 23 | gas2masm.c 24 | Linking... 25 | 26 | 27 | 28 |

Results

29 | gas2masm.exe - 0 error(s), 0 warning(s) 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /QW/dxsdk/sdk/inc/fastfile.h: -------------------------------------------------------------------------------- 1 | /*========================================================================== 2 | * 3 | * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: fastfile.h 6 | * Content: Definitions for fastfile access. 7 | * 8 | * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 9 | * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 10 | * WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 11 | * 12 | ***************************************************************************/ 13 | 14 | typedef LPVOID HFASTFILE; 15 | 16 | extern BOOL FastFileInit( LPSTR fname, int max_handles ); 17 | extern void FastFileFini( void ); 18 | extern HFASTFILE FastFileOpen( LPSTR name ); 19 | extern BOOL FastFileClose( HFASTFILE pfe ); 20 | extern BOOL FastFileRead( HFASTFILE pfh, LPVOID ptr, int size ); 21 | extern BOOL FastFileSeek( HFASTFILE pfe, int off, int how ); 22 | extern long FastFileTell( HFASTFILE pfe ); 23 | extern LPVOID FastFileLock( HFASTFILE pfe, int off, int len ); 24 | extern BOOL FastFileUnlock( HFASTFILE pfe, int off, int len ); 25 | -------------------------------------------------------------------------------- /WinQuake/gas2masm/gas2masm.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: gas2masm - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\TEMP\RSP730.tmp" with contents 10 | [ 11 | /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /Fp".\Debug/gas2masm.pch" /YX /Fo".\Debug/" /Fd".\Debug/" /FD /c 12 | "D:\Work\quake source\WinQuake\gas2masm\gas2masm.c" 13 | ] 14 | Creating command line "cl.exe @C:\TEMP\RSP730.tmp" 15 | Creating temporary file "C:\TEMP\RSP731.tmp" with contents 16 | [ 17 | kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:".\Debug/gas2masm.pdb" /debug /machine:I386 /out:".\Debug/gas2masm.exe" 18 | ".\Debug\gas2masm.obj" 19 | ] 20 | Creating command line "link.exe @C:\TEMP\RSP731.tmp" 21 |

Output Window

22 | Compiling... 23 | gas2masm.c 24 | Linking... 25 | 26 | 27 | 28 |

Results

29 | gas2masm.exe - 0 error(s), 0 warning(s) 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /WinQuake/dxsdk/SDK/INC/FASTFILE.H: -------------------------------------------------------------------------------- 1 | /*========================================================================== 2 | * 3 | * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: fastfile.h 6 | * Content: Definitions for fastfile access. 7 | * 8 | * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 9 | * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 10 | * WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 11 | * 12 | ***************************************************************************/ 13 | 14 | typedef LPVOID HFASTFILE; 15 | 16 | extern BOOL FastFileInit( LPSTR fname, int max_handles ); 17 | extern void FastFileFini( void ); 18 | extern HFASTFILE FastFileOpen( LPSTR name ); 19 | extern BOOL FastFileClose( HFASTFILE pfe ); 20 | extern BOOL FastFileRead( HFASTFILE pfh, LPVOID ptr, int size ); 21 | extern BOOL FastFileSeek( HFASTFILE pfe, int off, int how ); 22 | extern long FastFileTell( HFASTFILE pfe ); 23 | extern LPVOID FastFileLock( HFASTFILE pfe, int off, int len ); 24 | extern BOOL FastFileUnlock( HFASTFILE pfe, int off, int len ); 25 | -------------------------------------------------------------------------------- /WinQuake/view.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // view.h 21 | 22 | extern cvar_t v_gamma; 23 | 24 | extern byte gammatable[256]; // palette is sent through this 25 | extern byte ramps[3][256]; 26 | extern float v_blend[4]; 27 | 28 | extern cvar_t lcd_x; 29 | 30 | 31 | void V_Init (void); 32 | void V_RenderView (void); 33 | float V_CalcRoll (vec3_t angles, vec3_t velocity); 34 | void V_UpdatePalette (void); 35 | 36 | -------------------------------------------------------------------------------- /QW/server/sys.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // sys.h -- non-portable functions 21 | 22 | int Sys_FileTime (char *path); 23 | 24 | void Sys_mkdir (char *path); 25 | 26 | void Sys_Error (char *error, ...); 27 | // an error will cause the entire program to exit 28 | 29 | void Sys_Printf (char *fmt, ...); 30 | // send text to the console 31 | 32 | void Sys_Quit (void); 33 | double Sys_DoubleTime (void); 34 | char *Sys_ConsoleInput (void); 35 | void Sys_Init (void); 36 | -------------------------------------------------------------------------------- /QW/client/input.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // input.h -- external (non-keyboard) input devices 21 | 22 | void IN_Init (void); 23 | 24 | void IN_Shutdown (void); 25 | 26 | void IN_Commands (void); 27 | // oportunity for devices to stick commands on the script buffer 28 | 29 | void IN_Move (usercmd_t *cmd); 30 | // add additional movement on top of the keyboard move cmd 31 | 32 | void IN_ModeChanged (void); 33 | // called whenever screen dimensions change 34 | 35 | -------------------------------------------------------------------------------- /QW/glqwcl.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate qwcl.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: glqwcl-%{version}.tar.gz 18 | Group: Games 19 | Copyright: Restricted 20 | Icon: quake.gif 21 | BuildRoot: /var/tmp/%{name}-%{version} 22 | Summary: OpenGL QuakeWorld Client 23 | 24 | %description 25 | "Quake is the biggest, baddest, and bloodiest 3-D action game ever 26 | conceived" - PC GAMER 27 | 28 | "The most important PC game ever" - PC ZONE 29 | 30 | ""Quake": Bloody Amazing" - USA TODAY 31 | 32 | "The Vanguard of a terrifying new level of immersive interactivity" - 33 | COMPUTER GAMING WORLD 34 | 35 | %install 36 | 37 | %files 38 | %attr(644,root,root) ${3}/readme.glqwcl 39 | %attr(4755,root,root) ${3}/glqwcl 40 | %attr(4755,root,root) ${3}/glqwcl.glx 41 | %attr(755,root,root) ${3}/glqwcl.3dfxgl 42 | %attr(755,root,root) ${3}/lib3dfxgl.so 43 | EOF 44 | 45 | 46 | -------------------------------------------------------------------------------- /WinQuake/menu.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // 22 | // the net drivers should just set the apropriate bits in m_activenet, 23 | // instead of having the menu code look through their internal tables 24 | // 25 | #define MNET_IPX 1 26 | #define MNET_TCP 2 27 | 28 | extern int m_activenet; 29 | 30 | // 31 | // menus 32 | // 33 | void M_Init (void); 34 | void M_Keydown (int key); 35 | void M_Draw (void); 36 | void M_ToggleMenu_f (void); 37 | 38 | 39 | -------------------------------------------------------------------------------- /WinQuake/conproc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // conproc.h 21 | 22 | #define CCOM_WRITE_TEXT 0x2 23 | // Param1 : Text 24 | 25 | #define CCOM_GET_TEXT 0x3 26 | // Param1 : Begin line 27 | // Param2 : End line 28 | 29 | #define CCOM_GET_SCR_LINES 0x4 30 | // No params 31 | 32 | #define CCOM_SET_SCR_LINES 0x5 33 | // Param1 : Number of lines 34 | 35 | void InitConProc (HANDLE hFile, HANDLE heventParent, HANDLE heventChild); 36 | void DeinitConProc (void); 37 | 38 | -------------------------------------------------------------------------------- /WinQuake/input.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // input.h -- external (non-keyboard) input devices 21 | 22 | void IN_Init (void); 23 | 24 | void IN_Shutdown (void); 25 | 26 | void IN_Commands (void); 27 | // oportunity for devices to stick commands on the script buffer 28 | 29 | void IN_Move (usercmd_t *cmd); 30 | // add additional movement on top of the keyboard move cmd 31 | 32 | void IN_ClearStates (void); 33 | // restores all button and position states to defaults 34 | 35 | -------------------------------------------------------------------------------- /WinQuake/cd_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #include "quakedef.h" 21 | 22 | void CDAudio_Play(byte track, qboolean looping) 23 | { 24 | } 25 | 26 | 27 | void CDAudio_Stop(void) 28 | { 29 | } 30 | 31 | 32 | void CDAudio_Pause(void) 33 | { 34 | } 35 | 36 | 37 | void CDAudio_Resume(void) 38 | { 39 | } 40 | 41 | 42 | void CDAudio_Update(void) 43 | { 44 | } 45 | 46 | 47 | int CDAudio_Init(void) 48 | { 49 | return 0; 50 | } 51 | 52 | 53 | void CDAudio_Shutdown(void) 54 | { 55 | } -------------------------------------------------------------------------------- /QW/server/makefile: -------------------------------------------------------------------------------- 1 | 2 | #CFLAGS = -g -Wall -DDEBUG -I../client -I. -DSERVERONLY 3 | #CFLAGS = -mpentium -O6 -Wall -I../client -I. -DSERVERONLY -fomit-frame-pointer -fno-strength-reduce 4 | #CFLAGS = -mpentium -O2 -Wall -I../client -I. -DSERVERONLY -fomit-frame-pointer -fno-strength-reduce 5 | CFLAGS=-DSERVERONLY -I../client -V2.7.2.1 -bi486-linux/ -O6 -Wall -fomit-frame-pointer -fno-strength-reduce 6 | 7 | EXE = qwsv 8 | 9 | OFILES =\ 10 | pr_cmds.o \ 11 | pr_edict.o \ 12 | pr_exec.o \ 13 | sv_init.o \ 14 | sv_main.o \ 15 | sv_ents.o \ 16 | sv_send.o \ 17 | sv_move.o \ 18 | sv_phys.o \ 19 | sv_user.o \ 20 | sv_ccmds.o \ 21 | world.o \ 22 | sys_unix.o \ 23 | model.o \ 24 | cmd.o \ 25 | common.o \ 26 | crc.o \ 27 | cvar.o \ 28 | mathlib.o \ 29 | zone.o \ 30 | pmove.o \ 31 | pmovetst.o \ 32 | net_chan.o \ 33 | net_udp.o 34 | 35 | LDFLAGS = -lm 36 | 37 | $(EXE) : $(OFILES) 38 | cc $(CFLAGS) -o $(EXE) $(OFILES) $(LDFLAGS) 39 | 40 | clean: 41 | rm -f $(OFILES) $(EXE) 42 | 43 | app: 44 | make "CFLAGS = -O4 -g -Wall -I../client -DSERVERONLY" 45 | 46 | profile: 47 | make "CFLAGS = -g -pg -O -Wall -I../client -DPROFILE" 48 | cp $(EXE) /LocalApps 49 | 50 | .c.o: ; cc -c $(CFLAGS) -o $@ $*.c 51 | .s.o: ; cc -c $(CFLAGS) -o $@ $*.s 52 | 53 | -------------------------------------------------------------------------------- /QW/client/menu.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // 22 | // the net drivers should just set the apropriate bits in m_activenet, 23 | // instead of having the menu code look through their internal tables 24 | // 25 | #define MNET_IPX 1 26 | #define MNET_TCP 2 27 | 28 | extern int m_activenet; 29 | 30 | // 31 | // menus 32 | // 33 | void M_Init (void); 34 | void M_Keydown (int key); 35 | void M_Draw (void); 36 | void M_ToggleMenu_f (void); 37 | qpic_t *M_CachePic (char *path); 38 | void M_DrawTextBox (int x, int y, int width, int lines); 39 | void M_Menu_Quit_f (void); 40 | 41 | 42 | -------------------------------------------------------------------------------- /QW/client/r_vars.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // r_vars.c: global refresh variables 21 | 22 | #include "quakedef.h" 23 | 24 | #if !id386 25 | 26 | // all global and static refresh variables are collected in a contiguous block 27 | // to avoid cache conflicts. 28 | 29 | //------------------------------------------------------- 30 | // global refresh variables 31 | //------------------------------------------------------- 32 | 33 | // FIXME: make into one big structure, like cl or sv 34 | // FIXME: do separately for refresh engine and driver 35 | 36 | int r_bmodelactive; 37 | 38 | #endif // !id386 39 | 40 | -------------------------------------------------------------------------------- /QW/dxsdk/sdk/inc/d3drmwin.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: d3drm.h 6 | * Content: Direct3DRM include file 7 | * 8 | ***************************************************************************/ 9 | 10 | #ifndef __D3DRMWIN_H__ 11 | #define __D3DRMWIN_H__ 12 | 13 | #ifndef WIN32 14 | #define WIN32 15 | #endif 16 | 17 | #include "d3drm.h" 18 | #include "ddraw.h" 19 | #include "d3d.h" 20 | 21 | /* 22 | * GUIDS used by Direct3DRM Windows interface 23 | */ 24 | DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); 25 | 26 | WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE); 27 | 28 | #undef INTERFACE 29 | #define INTERFACE IDirect3DRMWinDevice 30 | 31 | DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject) 32 | { 33 | IUNKNOWN_METHODS(PURE); 34 | IDIRECT3DRMOBJECT_METHODS(PURE); 35 | 36 | /* 37 | * IDirect3DRMWinDevice methods 38 | */ 39 | 40 | /* Repaint the window with the last frame which was rendered. */ 41 | STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE; 42 | 43 | /* Respond to a WM_ACTIVATE message. */ 44 | STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE; 45 | }; 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /WinQuake/wq.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if x%1==xfast goto fast 3 | if x%1==xsafe goto safe 4 | if x%1==xverysafe goto verysafe 5 | if x%1==xfastvid goto fastvid 6 | if x%1==xfastsnd goto fastsnd 7 | if x%1==xmax goto max 8 | 9 | echo ------------------------------------------------------------------- 10 | echo Options for running WinQuake: 11 | echo wq max: all features on, but doesn't work on all systems 12 | echo wq fast: maximum speed, but doesn't work on all systems 13 | echo wq fastvid: maximum video speed, but safer, probably slower sound 14 | echo wq fastsnd: maximum sound speed, but safer, probably slower video 15 | echo wq safe: very likely to run, but may be slower 16 | echo wq verysafe: almost sure to run, but probably slower, and no sound 17 | echo ------------------------------------------------------------------- 18 | goto done 19 | 20 | :max 21 | winquake -dinput %2 %3 %4 %5 %6 %7 %8 %9 22 | goto done 23 | 24 | :fast 25 | winquake %2 %3 %4 %5 %6 %7 %8 %9 26 | goto done 27 | 28 | :fastvid 29 | winquake -wavonly %2 %3 %4 %5 %6 %7 %8 %9 30 | goto done 31 | 32 | :fastsnd 33 | winquake -nodirectdraw -nowindirect %2 %3 %4 %5 %6 %7 %8 %9 34 | goto done 35 | 36 | :safe 37 | winquake -nodirectdraw -nowindirect -wavonly %2 %3 %4 %5 %6 %7 %8 %9 38 | goto done 39 | 40 | :verysafe 41 | winquake -dibonly -nosound -nojoy %2 %3 %4 %5 %6 %7 %8 %9 42 | :done 43 | -------------------------------------------------------------------------------- /WinQuake/dxsdk/SDK/INC/D3DRMWIN.H: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: d3drm.h 6 | * Content: Direct3DRM include file 7 | * 8 | ***************************************************************************/ 9 | 10 | #ifndef __D3DRMWIN_H__ 11 | #define __D3DRMWIN_H__ 12 | 13 | #ifndef WIN32 14 | #define WIN32 15 | #endif 16 | 17 | #include "d3drm.h" 18 | #include "ddraw.h" 19 | #include "d3d.h" 20 | 21 | /* 22 | * GUIDS used by Direct3DRM Windows interface 23 | */ 24 | DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); 25 | 26 | WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE); 27 | 28 | #undef INTERFACE 29 | #define INTERFACE IDirect3DRMWinDevice 30 | 31 | DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject) 32 | { 33 | IUNKNOWN_METHODS(PURE); 34 | IDIRECT3DRMOBJECT_METHODS(PURE); 35 | 36 | /* 37 | * IDirect3DRMWinDevice methods 38 | */ 39 | 40 | /* Repaint the window with the last frame which was rendered. */ 41 | STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE; 42 | 43 | /* Respond to a WM_ACTIVATE message. */ 44 | STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE; 45 | }; 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /WinQuake/r_vars.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // r_vars.c: global refresh variables 21 | 22 | #include "quakedef.h" 23 | 24 | #if !id386 25 | 26 | // all global and static refresh variables are collected in a contiguous block 27 | // to avoid cache conflicts. 28 | 29 | //------------------------------------------------------- 30 | // global refresh variables 31 | //------------------------------------------------------- 32 | 33 | // FIXME: make into one big structure, like cl or sv 34 | // FIXME: do separately for refresh engine and driver 35 | 36 | int r_bmodelactive; 37 | 38 | #endif // !id386 39 | 40 | -------------------------------------------------------------------------------- /WinQuake/net_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #include "quakedef.h" 21 | 22 | #include "net_loop.h" 23 | 24 | net_driver_t net_drivers[MAX_NET_DRIVERS] = 25 | { 26 | { 27 | "Loopback", 28 | false, 29 | Loop_Init, 30 | Loop_Listen, 31 | Loop_SearchForHosts, 32 | Loop_Connect, 33 | Loop_CheckNewConnections, 34 | Loop_GetMessage, 35 | Loop_SendMessage, 36 | Loop_SendUnreliableMessage, 37 | Loop_CanSendMessage, 38 | Loop_CanSendUnreliableMessage, 39 | Loop_Close, 40 | Loop_Shutdown 41 | } 42 | }; 43 | int net_numdrivers = 1; 44 | 45 | net_landriver_t net_landrivers[MAX_NET_DRIVERS]; 46 | int net_numlandrivers = 0; 47 | -------------------------------------------------------------------------------- /WinQuake/net_loop.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_loop.h 21 | 22 | int Loop_Init (void); 23 | void Loop_Listen (qboolean state); 24 | void Loop_SearchForHosts (qboolean xmit); 25 | qsocket_t *Loop_Connect (char *host); 26 | qsocket_t *Loop_CheckNewConnections (void); 27 | int Loop_GetMessage (qsocket_t *sock); 28 | int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data); 29 | int Loop_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data); 30 | qboolean Loop_CanSendMessage (qsocket_t *sock); 31 | qboolean Loop_CanSendUnreliableMessage (qsocket_t *sock); 32 | void Loop_Close (qsocket_t *sock); 33 | void Loop_Shutdown (void); 34 | -------------------------------------------------------------------------------- /QW/client/d_zpoint.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // d_zpoint.c: software driver module for drawing z-buffered points 21 | 22 | #include "quakedef.h" 23 | #include "d_local.h" 24 | 25 | 26 | /* 27 | ===================== 28 | D_DrawZPoint 29 | ===================== 30 | */ 31 | void D_DrawZPoint (void) 32 | { 33 | byte *pdest; 34 | short *pz; 35 | int izi; 36 | 37 | pz = d_pzbuffer + (d_zwidth * r_zpointdesc.v) + r_zpointdesc.u; 38 | pdest = d_viewbuffer + d_scantable[r_zpointdesc.v] + r_zpointdesc.u; 39 | izi = (int)(r_zpointdesc.zi * 0x8000); 40 | 41 | if (*pz <= izi) 42 | { 43 | *pz = izi; 44 | *pdest = r_zpointdesc.color; 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /QW/client/sbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // the status bar is only redrawn if something has changed, but if anything 22 | // does, the entire thing will be redrawn for the next vid.numpages frames. 23 | 24 | #define SBAR_HEIGHT 24 25 | 26 | extern int sb_lines; // scan lines to draw 27 | 28 | void Sbar_Init (void); 29 | 30 | void Sbar_Changed (void); 31 | // call whenever any of the client stats represented on the sbar changes 32 | 33 | void Sbar_Draw (void); 34 | // called every frame by screen 35 | 36 | void Sbar_IntermissionOverlay (void); 37 | // called each frame after the level has been completed 38 | 39 | void Sbar_FinaleOverlay (void); 40 | -------------------------------------------------------------------------------- /WinQuake/net_ser.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_ser.h 21 | 22 | int Serial_Init (void); 23 | void Serial_Listen (qboolean state); 24 | void Serial_SearchForHosts (qboolean xmit); 25 | qsocket_t *Serial_Connect (char *host); 26 | qsocket_t *Serial_CheckNewConnections (void); 27 | int Serial_GetMessage (qsocket_t *sock); 28 | int Serial_SendMessage (qsocket_t *sock, sizebuf_t *data); 29 | int Serial_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data); 30 | qboolean Serial_CanSendMessage (qsocket_t *sock); 31 | qboolean Serial_CanSendUnreliableMessage (qsocket_t *sock); 32 | void Serial_Close (qsocket_t *sock); 33 | void Serial_Shutdown (void); 34 | -------------------------------------------------------------------------------- /WinQuake/sbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // the status bar is only redrawn if something has changed, but if anything 22 | // does, the entire thing will be redrawn for the next vid.numpages frames. 23 | 24 | #define SBAR_HEIGHT 24 25 | 26 | extern int sb_lines; // scan lines to draw 27 | 28 | void Sbar_Init (void); 29 | 30 | void Sbar_Changed (void); 31 | // call whenever any of the client stats represented on the sbar changes 32 | 33 | void Sbar_Draw (void); 34 | // called every frame by screen 35 | 36 | void Sbar_IntermissionOverlay (void); 37 | // called each frame after the level has been completed 38 | 39 | void Sbar_FinaleOverlay (void); 40 | -------------------------------------------------------------------------------- /WinQuake/d_zpoint.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // d_zpoint.c: software driver module for drawing z-buffered points 21 | 22 | #include "quakedef.h" 23 | #include "d_local.h" 24 | 25 | 26 | /* 27 | ===================== 28 | D_DrawZPoint 29 | ===================== 30 | */ 31 | void D_DrawZPoint (void) 32 | { 33 | byte *pdest; 34 | short *pz; 35 | int izi; 36 | 37 | pz = d_pzbuffer + (d_zwidth * r_zpointdesc.v) + r_zpointdesc.u; 38 | pdest = d_viewbuffer + d_scantable[r_zpointdesc.v] + r_zpointdesc.u; 39 | izi = (int)(r_zpointdesc.zi * 0x8000); 40 | 41 | if (*pz <= izi) 42 | { 43 | *pz = izi; 44 | *pdest = r_zpointdesc.color; 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /WinQuake/net_vcr.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_vcr.h 21 | 22 | #define VCR_OP_CONNECT 1 23 | #define VCR_OP_GETMESSAGE 2 24 | #define VCR_OP_SENDMESSAGE 3 25 | #define VCR_OP_CANSENDMESSAGE 4 26 | #define VCR_MAX_MESSAGE 4 27 | 28 | int VCR_Init (void); 29 | void VCR_Listen (qboolean state); 30 | void VCR_SearchForHosts (qboolean xmit); 31 | qsocket_t *VCR_Connect (char *host); 32 | qsocket_t *VCR_CheckNewConnections (void); 33 | int VCR_GetMessage (qsocket_t *sock); 34 | int VCR_SendMessage (qsocket_t *sock, sizebuf_t *data); 35 | qboolean VCR_CanSendMessage (qsocket_t *sock); 36 | void VCR_Close (qsocket_t *sock); 37 | void VCR_Shutdown (void); 38 | -------------------------------------------------------------------------------- /QW/client/nonintel.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // nonintel.c: code for non-Intel processors only 22 | // 23 | 24 | #include "quakedef.h" 25 | 26 | #if !id386 27 | 28 | /* 29 | ================ 30 | R_Surf8Patch 31 | ================ 32 | */ 33 | void R_Surf8Patch () 34 | { 35 | // we only patch code on Intel 36 | } 37 | 38 | 39 | /* 40 | ================ 41 | R_Surf16Patch 42 | ================ 43 | */ 44 | void R_Surf16Patch () 45 | { 46 | // we only patch code on Intel 47 | } 48 | 49 | 50 | /* 51 | ================ 52 | R_SurfacePatch 53 | ================ 54 | */ 55 | void R_SurfacePatch (void) 56 | { 57 | // we only patch code on Intel 58 | } 59 | 60 | 61 | #endif // !id386 62 | 63 | -------------------------------------------------------------------------------- /WinQuake/net_dgrm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_dgrm.h 21 | 22 | 23 | int Datagram_Init (void); 24 | void Datagram_Listen (qboolean state); 25 | void Datagram_SearchForHosts (qboolean xmit); 26 | qsocket_t *Datagram_Connect (char *host); 27 | qsocket_t *Datagram_CheckNewConnections (void); 28 | int Datagram_GetMessage (qsocket_t *sock); 29 | int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data); 30 | int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data); 31 | qboolean Datagram_CanSendMessage (qsocket_t *sock); 32 | qboolean Datagram_CanSendUnreliableMessage (qsocket_t *sock); 33 | void Datagram_Close (qsocket_t *sock); 34 | void Datagram_Shutdown (void); 35 | -------------------------------------------------------------------------------- /QW/qw.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "QWFwd"=.\qwfwd\qwfwd.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "gas2masm"=.\gas2masm\gas2masm.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "qwcl"=.\client\qwcl.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | Begin Project Dependency 39 | Project_Dep_Name gas2masm 40 | End Project Dependency 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | Project: "qwsv"=.\server\qwsv.dsp - Package Owner=<4> 46 | 47 | Package=<5> 48 | {{{ 49 | }}} 50 | 51 | Package=<4> 52 | {{{ 53 | }}} 54 | 55 | ############################################################################### 56 | 57 | Global: 58 | 59 | Package=<5> 60 | {{{ 61 | }}} 62 | 63 | Package=<3> 64 | {{{ 65 | }}} 66 | 67 | ############################################################################### 68 | 69 | -------------------------------------------------------------------------------- /WinQuake/dosasm.s: -------------------------------------------------------------------------------- 1 | #include "asm_i386.h" 2 | 3 | .data 4 | fpenv: .long 0, 0, 0, 0, 0, 0, 0, 0 5 | 6 | .text 7 | .globl C(StartMSRInterval) 8 | C(StartMSRInterval): 9 | movl $0x11,%ecx // read the CESR 10 | .byte 0x0F 11 | .byte 0x32 // RDMSR 12 | 13 | andl $0xFE3FFE3F,%eax // stop both counters 14 | .byte 0x0F 15 | .byte 0x30 // WRMSR 16 | 17 | movl 4(%esp),%eax // point counter 0 to desired event, with counters 18 | andl $0x3F,%eax // still stopped 19 | movl $0x11,%ecx 20 | .byte 0x0F 21 | .byte 0x30 // WRMSR 22 | 23 | movl $0x12,%ecx // set counter 0 to the value 0 24 | subl %eax,%eax 25 | subl %edx,%edx 26 | .byte 0x0F 27 | .byte 0x30 // WRMSR 28 | 29 | movl 4(%esp),%eax // restart counter 0 with selected event 30 | andl $0x3F,%eax 31 | subl %edx,%edx 32 | orl $0xC0,%eax 33 | movl $0x11,%ecx // control and event select 34 | .byte 0x0F 35 | .byte 0x30 // WRMSR 36 | 37 | ret 38 | 39 | .globl C(EndMSRInterval) 40 | C(EndMSRInterval): 41 | movl $0x12,%ecx // counter 0 42 | .byte 0x0F 43 | .byte 0x32 // RDMSR 44 | 45 | ret // lower 32 bits of count in %eax 46 | 47 | #if 0 48 | .data 49 | Lxxx: .long 0 50 | 51 | .text 52 | 53 | .globl C(setstackcheck) 54 | C(setstackcheck): 55 | 56 | movl %esp,%eax 57 | subl $0x38000,%eax 58 | movl $0x5A5A5A5A,(%eax) 59 | movl %eax,Lxxx 60 | 61 | ret 62 | 63 | 64 | .globl C(dostackcheck) 65 | C(dostackcheck): 66 | 67 | movl Lxxx,%edx 68 | movl $0,%eax 69 | 70 | cmpl $0x5A5A5A5A,(%edx) 71 | jz qqq 72 | incl %eax 73 | qqq: 74 | 75 | ret 76 | #endif 77 | 78 | -------------------------------------------------------------------------------- /QW/client/vid_null.c: -------------------------------------------------------------------------------- 1 | // vid_null.c -- null video driver to aid porting efforts 2 | 3 | #include "quakedef.h" 4 | #include "d_local.h" 5 | 6 | viddef_t vid; // global video state 7 | 8 | #define BASEWIDTH 320 9 | #define BASEHEIGHT 200 10 | 11 | byte vid_buffer[BASEWIDTH*BASEHEIGHT]; 12 | short zbuffer[BASEWIDTH*BASEHEIGHT]; 13 | byte surfcache[256*1024]; 14 | 15 | unsigned short d_8to16table[256]; 16 | unsigned d_8to24table[256]; 17 | 18 | void VID_SetPalette (unsigned char *palette) 19 | { 20 | } 21 | 22 | void VID_ShiftPalette (unsigned char *palette) 23 | { 24 | } 25 | 26 | void VID_Init (unsigned char *palette) 27 | { 28 | vid.maxwarpwidth = vid.width = vid.conwidth = BASEWIDTH; 29 | vid.maxwarpheight = vid.height = vid.conheight = BASEHEIGHT; 30 | vid.aspect = 1.0; 31 | vid.numpages = 1; 32 | vid.colormap = host_colormap; 33 | vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048)); 34 | vid.buffer = vid.conbuffer = vid_buffer; 35 | vid.rowbytes = vid.conrowbytes = BASEWIDTH; 36 | 37 | d_pzbuffer = zbuffer; 38 | D_InitCaches (surfcache, sizeof(surfcache)); 39 | } 40 | 41 | void VID_Shutdown (void) 42 | { 43 | } 44 | 45 | void VID_Update (vrect_t *rects) 46 | { 47 | } 48 | 49 | /* 50 | ================ 51 | D_BeginDirectRect 52 | ================ 53 | */ 54 | void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height) 55 | { 56 | } 57 | 58 | 59 | /* 60 | ================ 61 | D_EndDirectRect 62 | ================ 63 | */ 64 | void D_EndDirectRect (int x, int y, int width, int height) 65 | { 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /WinQuake/nonintel.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // nonintel.c: code for non-Intel processors only 22 | // 23 | 24 | #include "quakedef.h" 25 | #include "r_local.h" 26 | #include "d_local.h" 27 | 28 | #if !id386 29 | 30 | /* 31 | ================ 32 | R_Surf8Patch 33 | ================ 34 | */ 35 | void R_Surf8Patch () 36 | { 37 | // we only patch code on Intel 38 | } 39 | 40 | 41 | /* 42 | ================ 43 | R_Surf16Patch 44 | ================ 45 | */ 46 | void R_Surf16Patch () 47 | { 48 | // we only patch code on Intel 49 | } 50 | 51 | 52 | /* 53 | ================ 54 | R_SurfacePatch 55 | ================ 56 | */ 57 | void R_SurfacePatch (void) 58 | { 59 | // we only patch code on Intel 60 | } 61 | 62 | 63 | #endif // !id386 64 | 65 | -------------------------------------------------------------------------------- /QW/client/sys_dosa.s: -------------------------------------------------------------------------------- 1 | // 2 | // sys_dosa.s 3 | // x86 assembly-language DOS-dependent routines. 4 | 5 | #include "asm_i386.h" 6 | #include "quakeasm.h" 7 | 8 | 9 | .data 10 | 11 | .align 4 12 | fpenv: 13 | .long 0, 0, 0, 0, 0, 0, 0, 0 14 | 15 | .text 16 | 17 | .globl C(MaskExceptions) 18 | C(MaskExceptions): 19 | fnstenv fpenv 20 | orl $0x3F,fpenv 21 | fldenv fpenv 22 | 23 | ret 24 | 25 | #if 0 26 | .globl C(unmaskexceptions) 27 | C(unmaskexceptions): 28 | fnstenv fpenv 29 | andl $0xFFFFFFE0,fpenv 30 | fldenv fpenv 31 | 32 | ret 33 | #endif 34 | 35 | .data 36 | 37 | .align 4 38 | .globl ceil_cw, single_cw, full_cw, cw, pushed_cw 39 | ceil_cw: .long 0 40 | single_cw: .long 0 41 | full_cw: .long 0 42 | cw: .long 0 43 | pushed_cw: .long 0 44 | 45 | .text 46 | 47 | .globl C(Sys_LowFPPrecision) 48 | C(Sys_LowFPPrecision): 49 | fldcw single_cw 50 | 51 | ret 52 | 53 | .globl C(Sys_HighFPPrecision) 54 | C(Sys_HighFPPrecision): 55 | fldcw full_cw 56 | 57 | ret 58 | 59 | .globl C(Sys_PushFPCW_SetHigh) 60 | C(Sys_PushFPCW_SetHigh): 61 | fnstcw pushed_cw 62 | fldcw full_cw 63 | 64 | ret 65 | 66 | .globl C(Sys_PopFPCW) 67 | C(Sys_PopFPCW): 68 | fldcw pushed_cw 69 | 70 | ret 71 | 72 | .globl C(Sys_SetFPCW) 73 | C(Sys_SetFPCW): 74 | fnstcw cw 75 | movl cw,%eax 76 | #if id386 77 | andb $0xF0,%ah 78 | orb $0x03,%ah // round mode, 64-bit precision 79 | #endif 80 | movl %eax,full_cw 81 | 82 | #if id386 83 | andb $0xF0,%ah 84 | orb $0x0C,%ah // chop mode, single precision 85 | #endif 86 | movl %eax,single_cw 87 | 88 | #if id386 89 | andb $0xF0,%ah 90 | orb $0x08,%ah // ceil mode, single precision 91 | #endif 92 | movl %eax,ceil_cw 93 | 94 | ret 95 | 96 | -------------------------------------------------------------------------------- /WinQuake/sys_dosa.s: -------------------------------------------------------------------------------- 1 | // 2 | // sys_dosa.s 3 | // x86 assembly-language DOS-dependent routines. 4 | 5 | #include "asm_i386.h" 6 | #include "quakeasm.h" 7 | 8 | 9 | .data 10 | 11 | .align 4 12 | fpenv: 13 | .long 0, 0, 0, 0, 0, 0, 0, 0 14 | 15 | .text 16 | 17 | .globl C(MaskExceptions) 18 | C(MaskExceptions): 19 | fnstenv fpenv 20 | orl $0x3F,fpenv 21 | fldenv fpenv 22 | 23 | ret 24 | 25 | #if 0 26 | .globl C(unmaskexceptions) 27 | C(unmaskexceptions): 28 | fnstenv fpenv 29 | andl $0xFFFFFFE0,fpenv 30 | fldenv fpenv 31 | 32 | ret 33 | #endif 34 | 35 | .data 36 | 37 | .align 4 38 | .globl ceil_cw, single_cw, full_cw, cw, pushed_cw 39 | ceil_cw: .long 0 40 | single_cw: .long 0 41 | full_cw: .long 0 42 | cw: .long 0 43 | pushed_cw: .long 0 44 | 45 | .text 46 | 47 | .globl C(Sys_LowFPPrecision) 48 | C(Sys_LowFPPrecision): 49 | fldcw single_cw 50 | 51 | ret 52 | 53 | .globl C(Sys_HighFPPrecision) 54 | C(Sys_HighFPPrecision): 55 | fldcw full_cw 56 | 57 | ret 58 | 59 | .globl C(Sys_PushFPCW_SetHigh) 60 | C(Sys_PushFPCW_SetHigh): 61 | fnstcw pushed_cw 62 | fldcw full_cw 63 | 64 | ret 65 | 66 | .globl C(Sys_PopFPCW) 67 | C(Sys_PopFPCW): 68 | fldcw pushed_cw 69 | 70 | ret 71 | 72 | .globl C(Sys_SetFPCW) 73 | C(Sys_SetFPCW): 74 | fnstcw cw 75 | movl cw,%eax 76 | #if id386 77 | andb $0xF0,%ah 78 | orb $0x03,%ah // round mode, 64-bit precision 79 | #endif 80 | movl %eax,full_cw 81 | 82 | #if id386 83 | andb $0xF0,%ah 84 | orb $0x0C,%ah // chop mode, single precision 85 | #endif 86 | movl %eax,single_cw 87 | 88 | #if id386 89 | andb $0xF0,%ah 90 | orb $0x08,%ah // ceil mode, single precision 91 | #endif 92 | movl %eax,ceil_cw 93 | 94 | ret 95 | 96 | -------------------------------------------------------------------------------- /WinQuake/vregset.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // vregset.h: header file for video register-setting interpreter 22 | // 23 | 24 | // 25 | // registers & subregisters 26 | // 27 | #define MISC_OUTPUT 0x3C2 28 | 29 | #define SC_INDEX 0x3C4 30 | #define SC_DATA 0x3C5 31 | #define SYNC_RESET 0 32 | #define MAP_MASK 2 33 | #define MEMORY_MODE 4 34 | 35 | #define GC_INDEX 0x3CE 36 | #define GC_DATA 0x3CF 37 | #define READ_MAP 4 38 | #define GRAPHICS_MODE 5 39 | #define MISCELLANOUS 6 40 | 41 | #define CRTC_INDEX 0x3D4 42 | #define CRTC_DATA 0x3D5 43 | #define MAX_SCAN_LINE 9 44 | #define UNDERLINE 0x14 45 | #define MODE_CONTROL 0x17 46 | 47 | // 48 | // register-set commands 49 | // 50 | #define VRS_END 0 51 | #define VRS_BYTE_OUT 1 52 | #define VRS_BYTE_RMW 2 53 | #define VRS_WORD_OUT 3 54 | 55 | void VideoRegisterSet (int *pregset); 56 | 57 | -------------------------------------------------------------------------------- /WinQuake/draw.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // draw.h -- these are the only functions outside the refresh allowed 22 | // to touch the vid buffer 23 | 24 | extern qpic_t *draw_disc; // also used on sbar 25 | 26 | void Draw_Init (void); 27 | void Draw_Character (int x, int y, int num); 28 | void Draw_DebugChar (char num); 29 | void Draw_Pic (int x, int y, qpic_t *pic); 30 | void Draw_TransPic (int x, int y, qpic_t *pic); 31 | void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation); 32 | void Draw_ConsoleBackground (int lines); 33 | void Draw_BeginDisc (void); 34 | void Draw_EndDisc (void); 35 | void Draw_TileClear (int x, int y, int w, int h); 36 | void Draw_Fill (int x, int y, int w, int h, int c); 37 | void Draw_FadeScreen (void); 38 | void Draw_String (int x, int y, char *str); 39 | qpic_t *Draw_PicFromWad (char *name); 40 | qpic_t *Draw_CachePic (char *path); 41 | -------------------------------------------------------------------------------- /WinQuake/snd_next.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | #include "quakedef.h" 22 | 23 | extern int desired_speed; 24 | extern int desired_bits; 25 | 26 | qboolean SNDDMA_Init(void) 27 | { 28 | int size; 29 | 30 | size = 16384 + sizeof(dma_t); 31 | shm = malloc (size); 32 | memset((void*)shm, 0, size); 33 | 34 | shm->buffer = (char*)shm + sizeof(dma_t); 35 | shm->channels = 2; 36 | shm->speed = desired_speed; 37 | shm->samplebits = desired_bits; 38 | shm->samples = 16384 / (desired_bits / 8); 39 | shm->submission_chunk = 1; 40 | 41 | return true; 42 | } 43 | 44 | // return the current sample position (in mono samples read) 45 | // inside the recirculating dma buffer 46 | int SNDDMA_GetDMAPos(void) 47 | { 48 | shm->samplepos = (int)(realtime*shm->speed*shm->channels) & (shm->samples-1); 49 | 50 | return shm->samplepos; 51 | } 52 | 53 | void SNDDMA_Shutdown(void) 54 | { 55 | } 56 | -------------------------------------------------------------------------------- /WinQuake/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // 22 | // console 23 | // 24 | extern int con_totallines; 25 | extern int con_backscroll; 26 | extern qboolean con_forcedup; // because no entities to refresh 27 | extern qboolean con_initialized; 28 | extern byte *con_chars; 29 | extern int con_notifylines; // scan lines to clear for notify lines 30 | 31 | void Con_DrawCharacter (int cx, int line, int num); 32 | 33 | void Con_CheckResize (void); 34 | void Con_Init (void); 35 | void Con_DrawConsole (int lines, qboolean drawinput); 36 | void Con_Print (char *txt); 37 | void Con_Printf (char *fmt, ...); 38 | void Con_DPrintf (char *fmt, ...); 39 | void Con_SafePrintf (char *fmt, ...); 40 | void Con_Clear_f (void); 41 | void Con_DrawNotify (void); 42 | void Con_ClearNotify (void); 43 | void Con_ToggleConsole_f (void); 44 | 45 | void Con_NotifyBox (char *text); // during startup for sound / cd warnings 46 | 47 | -------------------------------------------------------------------------------- /QW/client/screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // screen.h 21 | 22 | void SCR_Init (void); 23 | 24 | void SCR_UpdateScreen (void); 25 | 26 | 27 | void SCR_SizeUp (void); 28 | void SCR_SizeDown (void); 29 | void SCR_BringDownConsole (void); 30 | void SCR_CenterPrint (char *str); 31 | 32 | int SCR_ModalMessage (char *text); 33 | 34 | extern float scr_con_current; 35 | extern float scr_conlines; // lines of console to display 36 | 37 | extern int scr_fullupdate; // set to 0 to force full redraw 38 | extern int sb_lines; 39 | 40 | extern int clearnotify; // set to 0 whenever notify text is drawn 41 | extern qboolean scr_disabled_for_loading; 42 | 43 | extern cvar_t scr_viewsize; 44 | 45 | extern cvar_t scr_viewsize; 46 | 47 | // only the refresh window will be updated unless these variables are flagged 48 | extern int scr_copytop; 49 | extern int scr_copyeverything; 50 | 51 | qboolean scr_skipupdate; 52 | 53 | qboolean block_drawing; 54 | -------------------------------------------------------------------------------- /QW/client/d_vars.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // r_vars.c: global refresh variables 21 | 22 | #if !id386 23 | 24 | #include "quakedef.h" 25 | 26 | // all global and static refresh variables are collected in a contiguous block 27 | // to avoid cache conflicts. 28 | 29 | //------------------------------------------------------- 30 | // global refresh variables 31 | //------------------------------------------------------- 32 | 33 | // FIXME: make into one big structure, like cl or sv 34 | // FIXME: do separately for refresh engine and driver 35 | 36 | float d_sdivzstepu, d_tdivzstepu, d_zistepu; 37 | float d_sdivzstepv, d_tdivzstepv, d_zistepv; 38 | float d_sdivzorigin, d_tdivzorigin, d_ziorigin; 39 | 40 | fixed16_t sadjust, tadjust, bbextents, bbextentt; 41 | 42 | pixel_t *cacheblock; 43 | int cachewidth; 44 | pixel_t *d_viewbuffer; 45 | short *d_pzbuffer; 46 | unsigned int d_zrowbytes; 47 | unsigned int d_zwidth; 48 | 49 | #endif // !id386 50 | 51 | -------------------------------------------------------------------------------- /WinQuake/d_vars.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // r_vars.c: global refresh variables 21 | 22 | #if !id386 23 | 24 | #include "quakedef.h" 25 | 26 | // all global and static refresh variables are collected in a contiguous block 27 | // to avoid cache conflicts. 28 | 29 | //------------------------------------------------------- 30 | // global refresh variables 31 | //------------------------------------------------------- 32 | 33 | // FIXME: make into one big structure, like cl or sv 34 | // FIXME: do separately for refresh engine and driver 35 | 36 | float d_sdivzstepu, d_tdivzstepu, d_zistepu; 37 | float d_sdivzstepv, d_tdivzstepv, d_zistepv; 38 | float d_sdivzorigin, d_tdivzorigin, d_ziorigin; 39 | 40 | fixed16_t sadjust, tadjust, bbextents, bbextentt; 41 | 42 | pixel_t *cacheblock; 43 | int cachewidth; 44 | pixel_t *d_viewbuffer; 45 | short *d_pzbuffer; 46 | unsigned int d_zrowbytes; 47 | unsigned int d_zwidth; 48 | 49 | #endif // !id386 50 | 51 | -------------------------------------------------------------------------------- /WinQuake/quake-data.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate quake-data.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: quake-data-%{version}.tar.gz 18 | BuildArchitectures: noarch 19 | Group: Games 20 | Copyright: Restricted 21 | Icon: quake.gif 22 | BuildRoot: /var/tmp/%{name}-%{version} 23 | Summary: Quake for Linux 24 | 25 | %description 26 | "Quake is the biggest, baddest, and bloodiest 3-D action game ever 27 | conceived" - PC GAMER 28 | 29 | "The most important PC game ever" - PC ZONE 30 | 31 | ""Quake": Bloody Amazing" - USA TODAY 32 | 33 | "The Vanguard of a terrifying new level of immersive interactivity" - 34 | COMPUTER GAMING WORLD 35 | 36 | From the creators of DOOM and DOOM II comes the most intense, technologically 37 | advanced 3-D experience ever captured on CD ROM. Features free and fluid 38 | motion, ambient sound and lighting, and unmatched multiplayer capabilities 39 | (play with up to 15 others). 40 | 41 | This package contians the Quake data files needed to play the game. 42 | 43 | %install 44 | 45 | %files 46 | %attr(644,root,root) $3/comexp.txt 47 | %attr(644,root,root) $3/help.txt 48 | %attr(644,root,root) $3/licinfo.txt 49 | %attr(644,root,root) $3/manual.txt 50 | %attr(644,root,root) $3/readme.txt 51 | %attr(644,root,root) $3/rlicnse.txt 52 | %attr(644,root,root) $3/techinfo.txt 53 | %attr(644,root,root) $3/id1/pak0.pak 54 | %attr(644,root,root) $3/id1/pak1.pak 55 | 56 | %post 57 | /sbin/ldconfig 58 | 59 | EOF 60 | 61 | -------------------------------------------------------------------------------- /WinQuake/net_bw.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_bw.h 21 | 22 | int BW_Init (void); 23 | void BW_Shutdown (void); 24 | void BW_Listen (qboolean state); 25 | int BW_OpenSocket (int port); 26 | int BW_CloseSocket (int socket); 27 | int BW_Connect (int socket, struct qsockaddr *addr); 28 | int BW_CheckNewConnections (void); 29 | int BW_Read (int socket, byte *buf, int len, struct qsockaddr *addr); 30 | int BW_Write (int socket, byte *buf, int len, struct qsockaddr *addr); 31 | int BW_Broadcast (int socket, byte *buf, int len); 32 | char *BW_AddrToString (struct qsockaddr *addr); 33 | int BW_StringToAddr (char *string, struct qsockaddr *addr); 34 | int BW_GetSocketAddr (int socket, struct qsockaddr *addr); 35 | int BW_GetNameFromAddr (struct qsockaddr *addr, char *name); 36 | int BW_GetAddrFromName (char *name, struct qsockaddr *addr); 37 | int BW_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 38 | int BW_GetSocketPort (struct qsockaddr *addr); 39 | int BW_SetSocketPort (struct qsockaddr *addr, int port); 40 | -------------------------------------------------------------------------------- /QW/client/draw.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // draw.h -- these are the only functions outside the refresh allowed 22 | // to touch the vid buffer 23 | 24 | extern qpic_t *draw_disc; // also used on sbar 25 | 26 | void Draw_Init (void); 27 | void Draw_Character (int x, int y, int num); 28 | void Draw_DebugChar (char num); 29 | void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height); 30 | void Draw_Pic (int x, int y, qpic_t *pic); 31 | void Draw_TransPic (int x, int y, qpic_t *pic); 32 | void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation); 33 | void Draw_ConsoleBackground (int lines); 34 | void Draw_BeginDisc (void); 35 | void Draw_EndDisc (void); 36 | void Draw_TileClear (int x, int y, int w, int h); 37 | void Draw_Fill (int x, int y, int w, int h, int c); 38 | void Draw_FadeScreen (void); 39 | void Draw_String (int x, int y, char *str); 40 | void Draw_Alt_String (int x, int y, char *str); 41 | qpic_t *Draw_PicFromWad (char *name); 42 | qpic_t *Draw_CachePic (char *path); 43 | void Draw_Crosshair(void); 44 | -------------------------------------------------------------------------------- /WinQuake/net_ipx.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_ipx.h 21 | 22 | int IPX_Init (void); 23 | void IPX_Shutdown (void); 24 | void IPX_Listen (qboolean state); 25 | int IPX_OpenSocket (int port); 26 | int IPX_CloseSocket (int socket); 27 | int IPX_Connect (int socket, struct qsockaddr *addr); 28 | int IPX_CheckNewConnections (void); 29 | int IPX_Read (int socket, byte *buf, int len, struct qsockaddr *addr); 30 | int IPX_Write (int socket, byte *buf, int len, struct qsockaddr *addr); 31 | int IPX_Broadcast (int socket, byte *buf, int len); 32 | char *IPX_AddrToString (struct qsockaddr *addr); 33 | int IPX_StringToAddr (char *string, struct qsockaddr *addr); 34 | int IPX_GetSocketAddr (int socket, struct qsockaddr *addr); 35 | int IPX_GetNameFromAddr (struct qsockaddr *addr, char *name); 36 | int IPX_GetAddrFromName (char *name, struct qsockaddr *addr); 37 | int IPX_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 38 | int IPX_GetSocketPort (struct qsockaddr *addr); 39 | int IPX_SetSocketPort (struct qsockaddr *addr, int port); 40 | -------------------------------------------------------------------------------- /WinQuake/net_udp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_udp.h 21 | 22 | int UDP_Init (void); 23 | void UDP_Shutdown (void); 24 | void UDP_Listen (qboolean state); 25 | int UDP_OpenSocket (int port); 26 | int UDP_CloseSocket (int socket); 27 | int UDP_Connect (int socket, struct qsockaddr *addr); 28 | int UDP_CheckNewConnections (void); 29 | int UDP_Read (int socket, byte *buf, int len, struct qsockaddr *addr); 30 | int UDP_Write (int socket, byte *buf, int len, struct qsockaddr *addr); 31 | int UDP_Broadcast (int socket, byte *buf, int len); 32 | char *UDP_AddrToString (struct qsockaddr *addr); 33 | int UDP_StringToAddr (char *string, struct qsockaddr *addr); 34 | int UDP_GetSocketAddr (int socket, struct qsockaddr *addr); 35 | int UDP_GetNameFromAddr (struct qsockaddr *addr, char *name); 36 | int UDP_GetAddrFromName (char *name, struct qsockaddr *addr); 37 | int UDP_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 38 | int UDP_GetSocketPort (struct qsockaddr *addr); 39 | int UDP_SetSocketPort (struct qsockaddr *addr, int port); 40 | -------------------------------------------------------------------------------- /WinQuake/net_wins.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_wins.h 21 | 22 | int WINS_Init (void); 23 | void WINS_Shutdown (void); 24 | void WINS_Listen (qboolean state); 25 | int WINS_OpenSocket (int port); 26 | int WINS_CloseSocket (int socket); 27 | int WINS_Connect (int socket, struct qsockaddr *addr); 28 | int WINS_CheckNewConnections (void); 29 | int WINS_Read (int socket, byte *buf, int len, struct qsockaddr *addr); 30 | int WINS_Write (int socket, byte *buf, int len, struct qsockaddr *addr); 31 | int WINS_Broadcast (int socket, byte *buf, int len); 32 | char *WINS_AddrToString (struct qsockaddr *addr); 33 | int WINS_StringToAddr (char *string, struct qsockaddr *addr); 34 | int WINS_GetSocketAddr (int socket, struct qsockaddr *addr); 35 | int WINS_GetNameFromAddr (struct qsockaddr *addr, char *name); 36 | int WINS_GetAddrFromName (char *name, struct qsockaddr *addr); 37 | int WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 38 | int WINS_GetSocketPort (struct qsockaddr *addr); 39 | int WINS_SetSocketPort (struct qsockaddr *addr, int port); 40 | -------------------------------------------------------------------------------- /WinQuake/net_wipx.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_wipx.h 21 | 22 | int WIPX_Init (void); 23 | void WIPX_Shutdown (void); 24 | void WIPX_Listen (qboolean state); 25 | int WIPX_OpenSocket (int port); 26 | int WIPX_CloseSocket (int socket); 27 | int WIPX_Connect (int socket, struct qsockaddr *addr); 28 | int WIPX_CheckNewConnections (void); 29 | int WIPX_Read (int socket, byte *buf, int len, struct qsockaddr *addr); 30 | int WIPX_Write (int socket, byte *buf, int len, struct qsockaddr *addr); 31 | int WIPX_Broadcast (int socket, byte *buf, int len); 32 | char *WIPX_AddrToString (struct qsockaddr *addr); 33 | int WIPX_StringToAddr (char *string, struct qsockaddr *addr); 34 | int WIPX_GetSocketAddr (int socket, struct qsockaddr *addr); 35 | int WIPX_GetNameFromAddr (struct qsockaddr *addr, char *name); 36 | int WIPX_GetAddrFromName (char *name, struct qsockaddr *addr); 37 | int WIPX_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 38 | int WIPX_GetSocketPort (struct qsockaddr *addr); 39 | int WIPX_SetSocketPort (struct qsockaddr *addr, int port); 40 | -------------------------------------------------------------------------------- /WinQuake/net_mp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // net_mpath.h 21 | 22 | int MPATH_Init (void); 23 | void MPATH_Shutdown (void); 24 | void MPATH_Listen (qboolean state); 25 | int MPATH_OpenSocket (int port); 26 | int MPATH_CloseSocket (int socket); 27 | int MPATH_Connect (int socket, struct qsockaddr *addr); 28 | int MPATH_CheckNewConnections (void); 29 | int MPATH_Read (int socket, byte *buf, int len, struct qsockaddr *addr); 30 | int MPATH_Write (int socket, byte *buf, int len, struct qsockaddr *addr); 31 | int MPATH_Broadcast (int socket, byte *buf, int len); 32 | char *MPATH_AddrToString (struct qsockaddr *addr); 33 | int MPATH_StringToAddr (char *string, struct qsockaddr *addr); 34 | int MPATH_GetSocketAddr (int socket, struct qsockaddr *addr); 35 | int MPATH_GetNameFromAddr (struct qsockaddr *addr, char *name); 36 | int MPATH_GetAddrFromName (char *name, struct qsockaddr *addr); 37 | int MPATH_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2); 38 | int MPATH_GetSocketPort (struct qsockaddr *addr); 39 | int MPATH_SetSocketPort (struct qsockaddr *addr, int port); 40 | -------------------------------------------------------------------------------- /WinQuake/quake.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate quake.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: quake-%{version}.tar.gz 18 | Group: Games 19 | Copyright: Restricted 20 | Icon: quake.gif 21 | BuildRoot: /var/tmp/%{name}-%{version} 22 | Summary: Quake for Linux 23 | 24 | %description 25 | "Quake is the biggest, baddest, and bloodiest 3-D action game ever 26 | conceived" - PC GAMER 27 | 28 | "The most important PC game ever" - PC ZONE 29 | 30 | ""Quake": Bloody Amazing" - USA TODAY 31 | 32 | "The Vanguard of a terrifying new level of immersive interactivity" - 33 | COMPUTER GAMING WORLD 34 | 35 | From the creators of DOOM and DOOM II comes the most intense, technologically 36 | advanced 3-D experience ever captured on CD ROM. Features free and fluid 37 | motion, ambient sound and lighting, and unmatched multiplayer capabilities 38 | (play with up to 15 others). 39 | 40 | Included in this archive are several different versions of Quake. 41 | 42 | - SQuake for SVGALib Console Graphics 43 | - GLQuake for 3DFX and other glX based hardware OpenGL 44 | - Quake.X11 for running Quake under X11 45 | 46 | %install 47 | 48 | %files 49 | %attr(644,root,root) $3/README 50 | %attr(4755,root,root) $3/squake 51 | %attr(4755,root,root) $3/glquake 52 | %attr(4755,root,root) $3/glquake.glx 53 | %attr(4755,root,root) $3/glquake.3dfxgl 54 | %attr(755,root,root) $3/quake.x11 55 | %attr(755,root,root) /usr/lib/lib3dfxgl.so 56 | %attr(755,root,root) /usr/lib/libMesaGL.so.2.6 57 | 58 | %post 59 | /sbin/ldconfig 60 | EOF 61 | 62 | -------------------------------------------------------------------------------- /WinQuake/screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // screen.h 21 | 22 | void SCR_Init (void); 23 | 24 | void SCR_UpdateScreen (void); 25 | 26 | 27 | void SCR_SizeUp (void); 28 | void SCR_SizeDown (void); 29 | void SCR_BringDownConsole (void); 30 | void SCR_CenterPrint (char *str); 31 | 32 | void SCR_BeginLoadingPlaque (void); 33 | void SCR_EndLoadingPlaque (void); 34 | 35 | int SCR_ModalMessage (char *text); 36 | 37 | extern float scr_con_current; 38 | extern float scr_conlines; // lines of console to display 39 | 40 | extern int scr_fullupdate; // set to 0 to force full redraw 41 | extern int sb_lines; 42 | 43 | extern int clearnotify; // set to 0 whenever notify text is drawn 44 | extern qboolean scr_disabled_for_loading; 45 | extern qboolean scr_skipupdate; 46 | 47 | extern cvar_t scr_viewsize; 48 | 49 | extern cvar_t scr_viewsize; 50 | 51 | // only the refresh window will be updated unless these variables are flagged 52 | extern int scr_copytop; 53 | extern int scr_copyeverything; 54 | 55 | extern qboolean block_drawing; 56 | 57 | void SCR_UpdateWholeScreen (void); 58 | -------------------------------------------------------------------------------- /QW/client/r_varsa.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // r_varsa.s 22 | // 23 | 24 | #include "asm_i386.h" 25 | #include "quakeasm.h" 26 | #include "asm_draw.h" 27 | #include "d_ifacea.h" 28 | 29 | #if id386 30 | 31 | .data 32 | 33 | //------------------------------------------------------- 34 | // ASM-only variables 35 | //------------------------------------------------------- 36 | .globl float_1, float_particle_z_clip, float_point5 37 | .globl float_minus_1, float_0 38 | float_0: .single 0.0 39 | float_1: .single 1.0 40 | float_minus_1: .single -1.0 41 | float_particle_z_clip: .single PARTICLE_Z_CLIP 42 | float_point5: .single 0.5 43 | 44 | .globl fp_16, fp_64k, fp_1m, fp_64kx64k 45 | .globl fp_1m_minus_1 46 | .globl fp_8 47 | fp_1m: .single 1048576.0 48 | fp_1m_minus_1: .single 1048575.0 49 | fp_64k: .single 65536.0 50 | fp_8: .single 8.0 51 | fp_16: .single 16.0 52 | fp_64kx64k: .long 0x4f000000 // (float)0x8000*0x10000 53 | 54 | 55 | .globl FloatZero, Float2ToThe31nd, FloatMinus2ToThe31nd 56 | FloatZero: .long 0 57 | Float2ToThe31nd: .long 0x4f000000 58 | FloatMinus2ToThe31nd: .long 0xcf000000 59 | 60 | .globl C(r_bmodelactive) 61 | C(r_bmodelactive): .long 0 62 | 63 | #endif // id386 64 | 65 | -------------------------------------------------------------------------------- /WinQuake/r_varsa.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // r_varsa.s 22 | // 23 | 24 | #include "asm_i386.h" 25 | #include "quakeasm.h" 26 | #include "asm_draw.h" 27 | #include "d_ifacea.h" 28 | 29 | #if id386 30 | 31 | .data 32 | 33 | //------------------------------------------------------- 34 | // ASM-only variables 35 | //------------------------------------------------------- 36 | .globl float_1, float_particle_z_clip, float_point5 37 | .globl float_minus_1, float_0 38 | float_0: .single 0.0 39 | float_1: .single 1.0 40 | float_minus_1: .single -1.0 41 | float_particle_z_clip: .single PARTICLE_Z_CLIP 42 | float_point5: .single 0.5 43 | 44 | .globl fp_16, fp_64k, fp_1m, fp_64kx64k 45 | .globl fp_1m_minus_1 46 | .globl fp_8 47 | fp_1m: .single 1048576.0 48 | fp_1m_minus_1: .single 1048575.0 49 | fp_64k: .single 65536.0 50 | fp_8: .single 8.0 51 | fp_16: .single 16.0 52 | fp_64kx64k: .long 0x4f000000 // (float)0x8000*0x10000 53 | 54 | 55 | .globl FloatZero, Float2ToThe31nd, FloatMinus2ToThe31nd 56 | FloatZero: .long 0 57 | Float2ToThe31nd: .long 0x4f000000 58 | FloatMinus2ToThe31nd: .long 0xcf000000 59 | 60 | .globl C(r_bmodelactive) 61 | C(r_bmodelactive): .long 0 62 | 63 | #endif // id386 64 | 65 | -------------------------------------------------------------------------------- /QW/release233_notes.txt: -------------------------------------------------------------------------------- 1 | 2 | QuakeWorld 2.33 Test Release 3 | ---------------------------- 4 | 5 | QuakeWorld 2.33 is a test release to address several issues that have 6 | come to light in the QuakeWorld community. Several different DoS 7 | (Denial Of Service) attacks have surfaced that need addressed. 8 | 9 | This test release contains both a new client and server to address these 10 | problems. This release is currently compatible with 2.30 servers and clients, 11 | but this will not be true once the test period has completed. The next 12 | release of QuakeWorld with be 2.4 and will be changed so previous versions 13 | will no longer function. This is necessary in order to fully combat all 14 | the denial of service attacks currently present and to facility some changes 15 | in the prevention of cheating. 16 | 17 | The QuakeWorld 2.33 client has the follow changes and issues addressed: 18 | 19 | - Bug where client would crash during a level change if a skin name longer 20 | than 16 characters on the server has been fixed. 21 | - The client now ignores foreign connection requests while connected to a 22 | server. 23 | - A foreign message packet with C-style format strings no longer cause a 24 | client crash. 25 | - Large packets sent to the client could cause it to exit with a fatal error 26 | - Timing issues with later versions of Windows 95 and Windows 98 that would 27 | cause clients to mistime their frame times and result in a player that could 28 | run faster/slower on a server has been changed and fixed. 29 | - When the client is running in a window, going to the menu or the console 30 | automatically frees up the mouse cursor. 31 | 32 | QuakeWorld 2.33 server changes: 33 | 34 | - Server now unpauses when all clients disconnect. 35 | - A possible server crash with large userinfo data has been fixed 36 | - A minor buffering error in network data was fixed 37 | 38 | Feedback for the release should be directed to Zoid at zoid@idsoftware.com 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /QW/client/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | // 22 | // console 23 | // 24 | 25 | #define CON_TEXTSIZE 16384 26 | typedef struct 27 | { 28 | char text[CON_TEXTSIZE]; 29 | int current; // line where next message will be printed 30 | int x; // offset in current line for next print 31 | int display; // bottom of console displays this line 32 | } console_t; 33 | 34 | extern console_t con_main; 35 | extern console_t con_chat; 36 | extern console_t *con; // point to either con_main or con_chat 37 | 38 | extern int con_ormask; 39 | 40 | extern int con_totallines; 41 | extern qboolean con_initialized; 42 | extern byte *con_chars; 43 | extern int con_notifylines; // scan lines to clear for notify lines 44 | 45 | void Con_DrawCharacter (int cx, int line, int num); 46 | 47 | void Con_CheckResize (void); 48 | void Con_Init (void); 49 | void Con_DrawConsole (int lines); 50 | void Con_Print (char *txt); 51 | void Con_Printf (char *fmt, ...); 52 | void Con_DPrintf (char *fmt, ...); 53 | void Con_SafePrintf (char *fmt, ...); 54 | void Con_Clear_f (void); 55 | void Con_DrawNotify (void); 56 | void Con_ClearNotify (void); 57 | void Con_ToggleConsole_f (void); 58 | 59 | void Con_NotifyBox (char *text); // during startup for sound / cd warnings 60 | 61 | -------------------------------------------------------------------------------- /QW/client/wad.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // wad.h 21 | 22 | //=============== 23 | // TYPES 24 | //=============== 25 | 26 | #define CMP_NONE 0 27 | #define CMP_LZSS 1 28 | 29 | #define TYP_NONE 0 30 | #define TYP_LABEL 1 31 | 32 | #define TYP_LUMPY 64 // 64 + grab command number 33 | #define TYP_PALETTE 64 34 | #define TYP_QTEX 65 35 | #define TYP_QPIC 66 36 | #define TYP_SOUND 67 37 | #define TYP_MIPTEX 68 38 | 39 | typedef struct 40 | { 41 | int width, height; 42 | byte data[4]; // variably sized 43 | } qpic_t; 44 | 45 | 46 | 47 | typedef struct 48 | { 49 | char identification[4]; // should be WAD2 or 2DAW 50 | int numlumps; 51 | int infotableofs; 52 | } wadinfo_t; 53 | 54 | typedef struct 55 | { 56 | int filepos; 57 | int disksize; 58 | int size; // uncompressed 59 | char type; 60 | char compression; 61 | char pad1, pad2; 62 | char name[16]; // must be null terminated 63 | } lumpinfo_t; 64 | 65 | extern int wad_numlumps; 66 | extern lumpinfo_t *wad_lumps; 67 | extern byte *wad_base; 68 | 69 | void W_LoadWadFile (char *filename); 70 | void W_CleanupName (char *in, char *out); 71 | lumpinfo_t *W_GetLumpinfo (char *name); 72 | void *W_GetLumpName (char *name); 73 | void *W_GetLumpNum (int num); 74 | 75 | void SwapPic (qpic_t *pic); 76 | -------------------------------------------------------------------------------- /WinQuake/wad.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // wad.h 21 | 22 | //=============== 23 | // TYPES 24 | //=============== 25 | 26 | #define CMP_NONE 0 27 | #define CMP_LZSS 1 28 | 29 | #define TYP_NONE 0 30 | #define TYP_LABEL 1 31 | 32 | #define TYP_LUMPY 64 // 64 + grab command number 33 | #define TYP_PALETTE 64 34 | #define TYP_QTEX 65 35 | #define TYP_QPIC 66 36 | #define TYP_SOUND 67 37 | #define TYP_MIPTEX 68 38 | 39 | typedef struct 40 | { 41 | int width, height; 42 | byte data[4]; // variably sized 43 | } qpic_t; 44 | 45 | 46 | 47 | typedef struct 48 | { 49 | char identification[4]; // should be WAD2 or 2DAW 50 | int numlumps; 51 | int infotableofs; 52 | } wadinfo_t; 53 | 54 | typedef struct 55 | { 56 | int filepos; 57 | int disksize; 58 | int size; // uncompressed 59 | char type; 60 | char compression; 61 | char pad1, pad2; 62 | char name[16]; // must be null terminated 63 | } lumpinfo_t; 64 | 65 | extern int wad_numlumps; 66 | extern lumpinfo_t *wad_lumps; 67 | extern byte *wad_base; 68 | 69 | void W_LoadWadFile (char *filename); 70 | void W_CleanupName (char *in, char *out); 71 | lumpinfo_t *W_GetLumpinfo (char *name); 72 | void *W_GetLumpName (char *name); 73 | void *W_GetLumpNum (int num); 74 | 75 | void SwapPic (qpic_t *pic); 76 | -------------------------------------------------------------------------------- /WinQuake/vregset.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // vregset.c: video register-setting interpreter 22 | // 23 | 24 | #include 25 | #include 26 | 27 | #include "quakedef.h" 28 | #include "vregset.h" 29 | 30 | //#define outportb loutportb 31 | 32 | void loutportb (int port, int val) 33 | { 34 | printf ("port, val: %x %x\n", port, val); 35 | getch (); 36 | } 37 | 38 | /* 39 | ================ 40 | VideoRegisterSet 41 | ================ 42 | */ 43 | void VideoRegisterSet (int *pregset) 44 | { 45 | int port, temp0, temp1, temp2; 46 | 47 | for ( ;; ) 48 | { 49 | switch (*pregset++) 50 | { 51 | case VRS_END: 52 | return; 53 | 54 | case VRS_BYTE_OUT: 55 | port = *pregset++; 56 | outportb (port, *pregset++); 57 | break; 58 | 59 | case VRS_BYTE_RMW: 60 | port = *pregset++; 61 | temp0 = *pregset++; 62 | temp1 = *pregset++; 63 | temp2 = inportb (port); 64 | temp2 &= temp0; 65 | temp2 |= temp1; 66 | outportb (port, temp2); 67 | break; 68 | 69 | case VRS_WORD_OUT: 70 | port = *pregset++; 71 | outportb (port, *pregset & 0xFF); 72 | outportb (port+1, *pregset >> 8); 73 | pregset++; 74 | break; 75 | 76 | default: 77 | Sys_Error ("VideoRegisterSet: Invalid command\n"); 78 | } 79 | } 80 | } 81 | 82 | -------------------------------------------------------------------------------- /QW/client/buildnum.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the included (GNU.txt) GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #include 21 | #include 22 | 23 | #include 24 | 25 | // char *date = "Oct 24 1996"; 26 | // char *time = "13:22:52"; 27 | char *date = __DATE__ ; 28 | char *time = __TIME__ ; 29 | 30 | char *mon[12] = 31 | { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 32 | char mond[12] = 33 | { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; 34 | 35 | // returns days since Oct 24 1996 36 | int build_number( void ) 37 | { 38 | int m = 0; 39 | int d = 0; 40 | int y = 0; 41 | int hr, min; 42 | static int b = 0; 43 | 44 | if (b != 0) 45 | return b; 46 | 47 | for (m = 0; m < 11; m++) 48 | { 49 | if (_strnicmp( &date[0], mon[m], 3 ) == 0) 50 | break; 51 | d += mond[m]; 52 | } 53 | 54 | d += atoi( &date[4] ) - 1; 55 | 56 | y = atoi( &date[7] ) - 1900; 57 | 58 | b = d + (int)((y - 1) * 365.25); 59 | 60 | if (((y % 4) == 0) && m > 1) 61 | { 62 | b += 1; 63 | } 64 | 65 | b -= 34995; // Oct 24 1996 66 | 67 | hr = (time[0] - '0') * 10 + (time[1] - '0'); 68 | min = (time[3] - '0') * 10 + (time[4] - '0'); 69 | // sec = (time[6] - '0') * 10 + (time[7] - '0'); 70 | 71 | b *= 60*24; 72 | b += hr * 60 + min; 73 | 74 | return b; 75 | } 76 | 77 | -------------------------------------------------------------------------------- /WinQuake/quake-shareware.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate quake-shareware.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: quake-%{version}.tar.gz 18 | Group: Games 19 | Copyright: Restricted 20 | Icon: quake.gif 21 | BuildRoot: /var/tmp/%{name}-%{version} 22 | Summary: Quake for Linux 23 | 24 | %description 25 | "Quake is the biggest, baddest, and bloodiest 3-D action game ever 26 | conceived" - PC GAMER 27 | 28 | "The most important PC game ever" - PC ZONE 29 | 30 | ""Quake": Bloody Amazing" - USA TODAY 31 | 32 | "The Vanguard of a terrifying new level of immersive interactivity" - 33 | COMPUTER GAMING WORLD 34 | 35 | From the creators of DOOM and DOOM II comes the most intense, technologically 36 | advanced 3-D experience ever captured on CD ROM. Features free and fluid 37 | motion, ambient sound and lighting, and unmatched multiplayer capabilities 38 | (play with up to 15 others). 39 | 40 | Included in this archive are several different versions of Quake. 41 | 42 | - SQuake for SVGALib Console Graphics 43 | - GLQuake for 3DFX and other glX based hardware OpenGL 44 | - Quake.X11 for running Quake under X11 45 | 46 | %install 47 | 48 | %files 49 | %attr(644,root,root) $3/README 50 | %attr(4755,root,root) $3/squake 51 | %attr(4755,root,root) $3/glquake 52 | %attr(4755,root,root) $3/glquake.glx 53 | %attr(4755,root,root) $3/glquake.3dfxgl 54 | %attr(755,root,root) $3/quake.x11 55 | %attr(644,root,root) $3/help.txt 56 | %attr(644,root,root) $3/licinfo.txt 57 | %attr(644,root,root) $3/manual.txt 58 | %attr(644,root,root) $3/readme.txt 59 | %attr(644,root,root) $3/slicnse.txt 60 | %attr(644,root,root) $3/techinfo.txt 61 | %attr(644,root,root) $3/id1/pak0.pak 62 | %attr(755,root,root) /usr/lib/lib3dfxgl.so 63 | %attr(755,root,root) /usr/lib/libMesaGL.so.2.6 64 | 65 | %post 66 | /sbin/ldconfig 67 | 68 | EOF 69 | 70 | -------------------------------------------------------------------------------- /QW/client/makefile.svgalib: -------------------------------------------------------------------------------- 1 | OBJS= \ 2 | cl_demo.o \ 3 | cl_ents.o \ 4 | cl_input.o \ 5 | cl_main.o \ 6 | cl_parse.o \ 7 | cl_pred.o \ 8 | cl_tent.o \ 9 | cl_cam.o \ 10 | cmd.o \ 11 | common.o \ 12 | console.o \ 13 | crc.o \ 14 | cvar.o \ 15 | d_edge.o \ 16 | d_fill.o \ 17 | d_init.o \ 18 | d_modech.o \ 19 | d_part.o \ 20 | d_polyse.o \ 21 | d_scan.o \ 22 | d_sky.o \ 23 | d_sprite.o \ 24 | d_surf.o \ 25 | d_vars.o \ 26 | d_zpoint.o \ 27 | draw.o \ 28 | keys.o \ 29 | mathlib.o \ 30 | md4.o \ 31 | menu.o \ 32 | model.o \ 33 | net_chan.o \ 34 | net_udp.o \ 35 | nonintel.o \ 36 | pmove.o \ 37 | pmovetst.o \ 38 | r_aclip.o \ 39 | r_alias.o \ 40 | r_bsp.o \ 41 | r_draw.o \ 42 | r_edge.o \ 43 | r_efrag.o \ 44 | r_light.o \ 45 | r_main.o \ 46 | r_misc.o \ 47 | r_part.o \ 48 | r_sky.o \ 49 | r_sprite.o \ 50 | r_surf.o \ 51 | r_vars.o \ 52 | sbar.o \ 53 | screen.o \ 54 | skin.o \ 55 | snd_dma.o \ 56 | snd_mem.o \ 57 | snd_mix.o \ 58 | view.o \ 59 | wad.o \ 60 | zone.o \ 61 | cd_linux.o \ 62 | sys_linux.o \ 63 | vid_svgalib.o \ 64 | snd_linux.o 65 | 66 | ASMOBJS= \ 67 | d_copy.o \ 68 | d_draw.o \ 69 | d_draw16.o \ 70 | d_parta.o \ 71 | d_polysa.o \ 72 | d_scana.o \ 73 | d_spr8.o \ 74 | d_varsa.o \ 75 | math.o \ 76 | r_aclipa.o \ 77 | r_aliasa.o \ 78 | r_drawa.o \ 79 | r_edgea.o \ 80 | r_varsa.o \ 81 | snd_mixa.o \ 82 | surf16.o \ 83 | surf8.o \ 84 | sys_dosa.o 85 | 86 | #CFLAGS=-O3 -Wall -fomit-frame-pointer -fno-strength-reduce -funroll-loops 87 | #CFLAGS=-mpentium -O3 -Wall -fomit-frame-pointer -fno-strength-reduce 88 | CFLAGS=-V2.7.2.1 -bi486-linux/ -O6 -Wall -fomit-frame-pointer -fno-strength-reduce 89 | #CFLAGS=-V2.7.2.1 -bi486-linux/ -O2 -g -Wall 90 | 91 | LDFLAGS = 92 | 93 | LIBS = -lm -lvga 94 | TARGET = qwcl 95 | 96 | %.o : %.s 97 | $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -c $< 98 | 99 | #$(TARGET) : $(OBJS) 100 | # $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) 101 | 102 | $(TARGET) : $(ASMOBJS) $(OBJS) 103 | $(CC) $(LDFLAGS) -o $(TARGET) $(ASMOBJS) $(OBJS) $(LIBS) 104 | 105 | clean: 106 | -rm $(OBJS) 107 | 108 | clobber: clean 109 | -rm $(TARGET) 110 | -------------------------------------------------------------------------------- /WinQuake/snd_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // snd_null.c -- include this instead of all the other snd_* files to have 21 | // no sound code whatsoever 22 | 23 | #include "quakedef.h" 24 | 25 | cvar_t bgmvolume = {"bgmvolume", "1", true}; 26 | cvar_t volume = {"volume", "0.7", true}; 27 | 28 | 29 | void S_Init (void) 30 | { 31 | } 32 | 33 | void S_AmbientOff (void) 34 | { 35 | } 36 | 37 | void S_AmbientOn (void) 38 | { 39 | } 40 | 41 | void S_Shutdown (void) 42 | { 43 | } 44 | 45 | void S_TouchSound (char *sample) 46 | { 47 | } 48 | 49 | void S_ClearBuffer (void) 50 | { 51 | } 52 | 53 | void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuation) 54 | { 55 | } 56 | 57 | void S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation) 58 | { 59 | } 60 | 61 | void S_StopSound (int entnum, int entchannel) 62 | { 63 | } 64 | 65 | sfx_t *S_PrecacheSound (char *sample) 66 | { 67 | return NULL; 68 | } 69 | 70 | void S_ClearPrecache (void) 71 | { 72 | } 73 | 74 | void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up) 75 | { 76 | } 77 | 78 | void S_StopAllSounds (qboolean clear) 79 | { 80 | } 81 | 82 | void S_BeginPrecaching (void) 83 | { 84 | } 85 | 86 | void S_EndPrecaching (void) 87 | { 88 | } 89 | 90 | void S_ExtraUpdate (void) 91 | { 92 | } 93 | 94 | void S_LocalSound (char *s) 95 | { 96 | } 97 | 98 | -------------------------------------------------------------------------------- /QW/client/sys.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // sys.h -- non-portable functions 21 | 22 | // 23 | // file IO 24 | // 25 | 26 | // returns the file size 27 | // return -1 if file is not present 28 | // the file should be in BINARY mode for stupid OSs that care 29 | int Sys_FileOpenRead (char *path, int *hndl); 30 | 31 | int Sys_FileOpenWrite (char *path); 32 | void Sys_FileClose (int handle); 33 | void Sys_FileSeek (int handle, int position); 34 | int Sys_FileRead (int handle, void *dest, int count); 35 | int Sys_FileWrite (int handle, void *data, int count); 36 | int Sys_FileTime (char *path); 37 | void Sys_mkdir (char *path); 38 | 39 | // 40 | // memory protection 41 | // 42 | void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length); 43 | 44 | // 45 | // system IO 46 | // 47 | void Sys_DebugLog(char *file, char *fmt, ...); 48 | 49 | void Sys_Error (char *error, ...); 50 | // an error will cause the entire program to exit 51 | 52 | void Sys_Printf (char *fmt, ...); 53 | // send text to the console 54 | 55 | void Sys_Quit (void); 56 | 57 | double Sys_DoubleTime (void); 58 | 59 | char *Sys_ConsoleInput (void); 60 | 61 | void Sys_Sleep (void); 62 | // called to yield for a little bit so as 63 | // not to hog cpu when paused or debugging 64 | 65 | void Sys_SendKeyEvents (void); 66 | // Perform Key_Event () callbacks until the input que is empty 67 | 68 | void Sys_LowFPPrecision (void); 69 | void Sys_HighFPPrecision (void); 70 | void Sys_SetFPCW (void); 71 | 72 | -------------------------------------------------------------------------------- /QW/client/d_fill.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // d_clear: clears a specified rectangle to the specified color 21 | 22 | #include "quakedef.h" 23 | 24 | 25 | /* 26 | ================ 27 | D_FillRect 28 | ================ 29 | */ 30 | void D_FillRect (vrect_t *rect, int color) 31 | { 32 | int rx, ry, rwidth, rheight; 33 | unsigned char *dest; 34 | unsigned *ldest; 35 | 36 | rx = rect->x; 37 | ry = rect->y; 38 | rwidth = rect->width; 39 | rheight = rect->height; 40 | 41 | if (rx < 0) 42 | { 43 | rwidth += rx; 44 | rx = 0; 45 | } 46 | if (ry < 0) 47 | { 48 | rheight += ry; 49 | ry = 0; 50 | } 51 | if (rx+rwidth > vid.width) 52 | rwidth = vid.width - rx; 53 | if (ry+rheight > vid.height) 54 | rheight = vid.height - rx; 55 | 56 | if (rwidth < 1 || rheight < 1) 57 | return; 58 | 59 | dest = ((byte *)vid.buffer + ry*vid.rowbytes + rx); 60 | 61 | if (((rwidth & 0x03) == 0) && (((long)dest & 0x03) == 0)) 62 | { 63 | // faster aligned dword clear 64 | ldest = (unsigned *)dest; 65 | color += color << 16; 66 | 67 | rwidth >>= 2; 68 | color += color << 8; 69 | 70 | for (ry=0 ; ryx; 37 | ry = rect->y; 38 | rwidth = rect->width; 39 | rheight = rect->height; 40 | 41 | if (rx < 0) 42 | { 43 | rwidth += rx; 44 | rx = 0; 45 | } 46 | if (ry < 0) 47 | { 48 | rheight += ry; 49 | ry = 0; 50 | } 51 | if (rx+rwidth > vid.width) 52 | rwidth = vid.width - rx; 53 | if (ry+rheight > vid.height) 54 | rheight = vid.height - rx; 55 | 56 | if (rwidth < 1 || rheight < 1) 57 | return; 58 | 59 | dest = ((byte *)vid.buffer + ry*vid.rowbytes + rx); 60 | 61 | if (((rwidth & 0x03) == 0) && (((long)dest & 0x03) == 0)) 62 | { 63 | // faster aligned dword clear 64 | ldest = (unsigned *)dest; 65 | color += color << 16; 66 | 67 | rwidth >>= 2; 68 | color += color << 8; 69 | 70 | for (ry=0 ; ry 3 | // 4 | // These functions are called from the server if they exist. 5 | // Note that Spectators only have one think since they movement code doesn't 6 | // track them much. Impulse commands work as usual, but don't call 7 | // the regular ImpulseCommand handler in weapons.qc since Spectators don't 8 | // have any weapons and things can explode. 9 | // 10 | // --- Zoid. 11 | 12 | /* 13 | =========== 14 | SpectatorConnect 15 | 16 | called when a spectator connects to a server 17 | ============ 18 | */ 19 | void() SpectatorConnect = 20 | { 21 | bprint (PRINT_MEDIUM, "Spectator "); 22 | bprint (PRINT_MEDIUM, self.netname); 23 | bprint (PRINT_MEDIUM, " entered the game\n"); 24 | 25 | self.goalentity = world; // used for impulse 1 below 26 | }; 27 | 28 | /* 29 | =========== 30 | SpectatorDisconnect 31 | 32 | called when a spectator disconnects from a server 33 | ============ 34 | */ 35 | void() SpectatorDisconnect = 36 | { 37 | bprint (PRINT_MEDIUM, "Spectator "); 38 | bprint (PRINT_MEDIUM, self.netname); 39 | bprint (PRINT_MEDIUM, " left the game\n"); 40 | }; 41 | 42 | /* 43 | ================ 44 | SpectatorImpulseCommand 45 | 46 | Called by SpectatorThink if the spectator entered an impulse 47 | ================ 48 | */ 49 | void() SpectatorImpulseCommand = 50 | { 51 | if (self.impulse == 1) { 52 | // teleport the spectator to the next spawn point 53 | // note that if the spectator is tracking, this doesn't do 54 | // much 55 | self.goalentity = find(self.goalentity, classname, "info_player_deathmatch"); 56 | if (self.goalentity == world) 57 | self.goalentity = find(self.goalentity, classname, "info_player_deathmatch"); 58 | if (self.goalentity != world) { 59 | setorigin(self, self.goalentity.origin); 60 | self.angles = self.goalentity.angles; 61 | self.fixangle = TRUE; // turn this way immediately 62 | } 63 | } 64 | 65 | self.impulse = 0; 66 | }; 67 | 68 | /* 69 | ================ 70 | SpectatorThink 71 | 72 | Called every frame after physics are run 73 | ================ 74 | */ 75 | void() SpectatorThink = 76 | { 77 | // self.origin, etc contains spectator position, so you could 78 | // do some neat stuff here 79 | 80 | if (self.impulse) 81 | SpectatorImpulseCommand(); 82 | }; 83 | 84 | 85 | -------------------------------------------------------------------------------- /WinQuake/vid_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // vid_null.c -- null video driver to aid porting efforts 21 | 22 | #include "quakedef.h" 23 | #include "d_local.h" 24 | 25 | viddef_t vid; // global video state 26 | 27 | #define BASEWIDTH 320 28 | #define BASEHEIGHT 200 29 | 30 | byte vid_buffer[BASEWIDTH*BASEHEIGHT]; 31 | short zbuffer[BASEWIDTH*BASEHEIGHT]; 32 | byte surfcache[256*1024]; 33 | 34 | unsigned short d_8to16table[256]; 35 | unsigned d_8to24table[256]; 36 | 37 | void VID_SetPalette (unsigned char *palette) 38 | { 39 | } 40 | 41 | void VID_ShiftPalette (unsigned char *palette) 42 | { 43 | } 44 | 45 | void VID_Init (unsigned char *palette) 46 | { 47 | vid.maxwarpwidth = vid.width = vid.conwidth = BASEWIDTH; 48 | vid.maxwarpheight = vid.height = vid.conheight = BASEHEIGHT; 49 | vid.aspect = 1.0; 50 | vid.numpages = 1; 51 | vid.colormap = host_colormap; 52 | vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048)); 53 | vid.buffer = vid.conbuffer = vid_buffer; 54 | vid.rowbytes = vid.conrowbytes = BASEWIDTH; 55 | 56 | d_pzbuffer = zbuffer; 57 | D_InitCaches (surfcache, sizeof(surfcache)); 58 | } 59 | 60 | void VID_Shutdown (void) 61 | { 62 | } 63 | 64 | void VID_Update (vrect_t *rects) 65 | { 66 | } 67 | 68 | /* 69 | ================ 70 | D_BeginDirectRect 71 | ================ 72 | */ 73 | void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height) 74 | { 75 | } 76 | 77 | 78 | /* 79 | ================ 80 | D_EndDirectRect 81 | ================ 82 | */ 83 | void D_EndDirectRect (int x, int y, int width, int height) 84 | { 85 | } 86 | 87 | 88 | -------------------------------------------------------------------------------- /QW/client/d_scana.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // d_scana.s 22 | // x86 assembly-language turbulent texture mapping code 23 | // 24 | 25 | #include "asm_i386.h" 26 | #include "quakeasm.h" 27 | #include "asm_draw.h" 28 | #include "d_ifacea.h" 29 | 30 | #if id386 31 | 32 | .data 33 | 34 | .text 35 | 36 | //---------------------------------------------------------------------- 37 | // turbulent texture mapping code 38 | //---------------------------------------------------------------------- 39 | 40 | .align 4 41 | .globl C(D_DrawTurbulent8Span) 42 | C(D_DrawTurbulent8Span): 43 | pushl %ebp // preserve caller's stack frame pointer 44 | pushl %esi // preserve register variables 45 | pushl %edi 46 | pushl %ebx 47 | 48 | movl C(r_turb_s),%esi 49 | movl C(r_turb_t),%ecx 50 | movl C(r_turb_pdest),%edi 51 | movl C(r_turb_spancount),%ebx 52 | 53 | Llp: 54 | movl %ecx,%eax 55 | movl %esi,%edx 56 | sarl $16,%eax 57 | movl C(r_turb_turb),%ebp 58 | sarl $16,%edx 59 | andl $(CYCLE-1),%eax 60 | andl $(CYCLE-1),%edx 61 | movl (%ebp,%eax,4),%eax 62 | movl (%ebp,%edx,4),%edx 63 | addl %esi,%eax 64 | sarl $16,%eax 65 | addl %ecx,%edx 66 | sarl $16,%edx 67 | andl $(TURB_TEX_SIZE-1),%eax 68 | andl $(TURB_TEX_SIZE-1),%edx 69 | shll $6,%edx 70 | movl C(r_turb_pbase),%ebp 71 | addl %eax,%edx 72 | incl %edi 73 | addl C(r_turb_sstep),%esi 74 | addl C(r_turb_tstep),%ecx 75 | movb (%ebp,%edx,1),%dl 76 | decl %ebx 77 | movb %dl,-1(%edi) 78 | jnz Llp 79 | 80 | movl %edi,C(r_turb_pdest) 81 | 82 | popl %ebx // restore register variables 83 | popl %edi 84 | popl %esi 85 | popl %ebp // restore caller's stack frame pointer 86 | ret 87 | 88 | #endif // id386 89 | 90 | -------------------------------------------------------------------------------- /WinQuake/d_scana.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // d_scana.s 22 | // x86 assembly-language turbulent texture mapping code 23 | // 24 | 25 | #include "asm_i386.h" 26 | #include "quakeasm.h" 27 | #include "asm_draw.h" 28 | #include "d_ifacea.h" 29 | 30 | #if id386 31 | 32 | .data 33 | 34 | .text 35 | 36 | //---------------------------------------------------------------------- 37 | // turbulent texture mapping code 38 | //---------------------------------------------------------------------- 39 | 40 | .align 4 41 | .globl C(D_DrawTurbulent8Span) 42 | C(D_DrawTurbulent8Span): 43 | pushl %ebp // preserve caller's stack frame pointer 44 | pushl %esi // preserve register variables 45 | pushl %edi 46 | pushl %ebx 47 | 48 | movl C(r_turb_s),%esi 49 | movl C(r_turb_t),%ecx 50 | movl C(r_turb_pdest),%edi 51 | movl C(r_turb_spancount),%ebx 52 | 53 | Llp: 54 | movl %ecx,%eax 55 | movl %esi,%edx 56 | sarl $16,%eax 57 | movl C(r_turb_turb),%ebp 58 | sarl $16,%edx 59 | andl $(CYCLE-1),%eax 60 | andl $(CYCLE-1),%edx 61 | movl (%ebp,%eax,4),%eax 62 | movl (%ebp,%edx,4),%edx 63 | addl %esi,%eax 64 | sarl $16,%eax 65 | addl %ecx,%edx 66 | sarl $16,%edx 67 | andl $(TURB_TEX_SIZE-1),%eax 68 | andl $(TURB_TEX_SIZE-1),%edx 69 | shll $6,%edx 70 | movl C(r_turb_pbase),%ebp 71 | addl %eax,%edx 72 | incl %edi 73 | addl C(r_turb_sstep),%esi 74 | addl C(r_turb_tstep),%ecx 75 | movb (%ebp,%edx,1),%dl 76 | decl %ebx 77 | movb %dl,-1(%edi) 78 | jnz Llp 79 | 80 | movl %edi,C(r_turb_pdest) 81 | 82 | popl %ebx // restore register variables 83 | popl %edi 84 | popl %esi 85 | popl %ebp // restore caller's stack frame pointer 86 | ret 87 | 88 | #endif // id386 89 | 90 | -------------------------------------------------------------------------------- /QW/qwcl.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate qwcl.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: qwcl-%{version}.tar.gz 18 | Group: Games 19 | Copyright: Restricted 20 | Icon: quake.gif 21 | BuildRoot: /var/tmp/%{name}-%{version} 22 | Summary: QuakeWorld Client 23 | 24 | %description 25 | QuakeWorld is an Internet multi-player specific version of Quake. While the 26 | original version of Quake can be played over the Internet, many users modem 27 | users - the majority of players, had less than satisfactory play. Symptoms 28 | like excessive lag - actions actually happening much later than you did them; 29 | packet loss - the game would freeze and resume several seconds later; and 30 | various other difficulties plagued users. 31 | 32 | After realizing how many people played Quake on the internet, and how many 33 | wanted to, but couldn't due to the play being unsatisfactory, John Carmack 34 | of id Software decided to create a version of Quake that was optimized for 35 | the average modem Internet player. This Internet specific version does only 36 | one thing, play deathmatch games over a TCP/IP network such as the Internet. 37 | It has no support for solo play, and you can't do anything with out connecting 38 | to a special server. 39 | 40 | Now in it's second generation, QuakeWorld has been sculpted by countless 41 | hours of user feedback and tweaking to provide the best multi-player 42 | experience that can be had from the equipment the average gamer will have. 43 | All that is required to use QuakeWorld is registered Quake. 44 | 45 | %install 46 | 47 | %files 48 | %attr(644,root,root) ${3}/README.qwcl 49 | %attr(4755,root,root) ${3}/qwcl 50 | %attr(4755,root,root) ${3}/glqwcl 51 | %attr(4755,root,root) ${3}/glqwcl.glx 52 | %attr(755,root,root) ${3}/glqwcl.3dfxgl 53 | %attr(755,root,root) ${3}/lib3dfxgl.so 54 | %attr(755,root,root) ${3}/libMesaGL.so.2.6 55 | %attr(755,root,root) ${3}/libMesaGL.so.2 56 | %attr(755,root,root) ${3}/libMesaGL.so 57 | %attr(755,root,root) ${3}/libGL.so 58 | %attr(755,root,root) ${3}/qwcl.x11 59 | %attr(755,root,root) ${3}/qw/skins/fixskins.sh 60 | EOF 61 | 62 | 63 | -------------------------------------------------------------------------------- /QW/client/sys_null.c: -------------------------------------------------------------------------------- 1 | // sys_null.h -- null system driver to aid porting efforts 2 | 3 | #include "quakedef.h" 4 | #include "errno.h" 5 | 6 | 7 | /* 8 | ================ 9 | filelength 10 | ================ 11 | */ 12 | int filelength (FILE *f) 13 | { 14 | int pos; 15 | int end; 16 | 17 | pos = ftell (f); 18 | fseek (f, 0, SEEK_END); 19 | end = ftell (f); 20 | fseek (f, pos, SEEK_SET); 21 | 22 | return end; 23 | } 24 | 25 | 26 | int Sys_FileTime (char *path) 27 | { 28 | FILE *f; 29 | 30 | f = fopen(path, "rb"); 31 | if (f) 32 | { 33 | fclose(f); 34 | return 1; 35 | } 36 | 37 | return -1; 38 | } 39 | 40 | void Sys_mkdir (char *path) 41 | { 42 | } 43 | 44 | 45 | /* 46 | =============================================================================== 47 | 48 | SYSTEM IO 49 | 50 | =============================================================================== 51 | */ 52 | 53 | void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length) 54 | { 55 | } 56 | 57 | 58 | void Sys_DebugLog(char *file, char *fmt, ...) 59 | { 60 | } 61 | 62 | void Sys_Error (char *error, ...) 63 | { 64 | va_list argptr; 65 | 66 | printf ("I_Error: "); 67 | va_start (argptr,error); 68 | vprintf (error,argptr); 69 | va_end (argptr); 70 | printf ("\n"); 71 | 72 | exit (1); 73 | } 74 | 75 | void Sys_Printf (char *fmt, ...) 76 | { 77 | va_list argptr; 78 | 79 | va_start (argptr,fmt); 80 | vprintf (fmt,argptr); 81 | va_end (argptr); 82 | } 83 | 84 | void Sys_Quit (void) 85 | { 86 | exit (0); 87 | } 88 | 89 | double Sys_FloatTime (void) 90 | { 91 | static double t; 92 | 93 | t += 0.1; 94 | 95 | return t; 96 | } 97 | 98 | char *Sys_ConsoleInput (void) 99 | { 100 | return NULL; 101 | } 102 | 103 | void Sys_Sleep (void) 104 | { 105 | } 106 | 107 | void Sys_SendKeyEvents (void) 108 | { 109 | } 110 | 111 | void Sys_HighFPPrecision (void) 112 | { 113 | } 114 | 115 | void Sys_LowFPPrecision (void) 116 | { 117 | } 118 | 119 | //============================================================================= 120 | 121 | void main (int argc, char **argv) 122 | { 123 | quakeparms_t parms; 124 | 125 | parms.memsize = 5861376; 126 | parms.membase = malloc (parms.memsize); 127 | parms.basedir = "."; 128 | 129 | COM_InitArgv (argc, argv); 130 | 131 | parms.argc = com_argc; 132 | parms.argv = com_argv; 133 | 134 | printf ("Host_Init\n"); 135 | Host_Init (&parms); 136 | while (1) 137 | { 138 | Host_Frame (0.1); 139 | } 140 | } 141 | 142 | 143 | -------------------------------------------------------------------------------- /WinQuake/3dfx.txt: -------------------------------------------------------------------------------- 1 | GLQuake Drivers 2 | 3 | Graphics Subsystem: Voodoo Graphics or Voodoo Rush 4 | 5 | Copyright ( 1997 3Dfx Interactive, Inc. ) 6 | All Rights Reserved 7 | 8 | 3Dfx Interactive, Inc. 9 | www: www.3dfx.com 10 | news: news.3dfx.com 11 | 12 | ----------------------------------------------------------------------- 13 | NOTE: GLQuake requires DirectX support DirectSound. DirectX can be 14 | installed from the media provided with your Voodoo Based 3D Accelerator. 15 | 16 | Glide 2.31 or HIGHER runtime drivers *MUST* be installed to use this 17 | GLQuake driver. Please download these drivers from your board 18 | manufacturer OR unsupported drivers from http://www.3dfx.com 19 | ----------------------------------------------------------------------- 20 | 21 | Release Notes for GLQuake's mini-GL driver 22 | 23 | What's in the distribution? 24 | --------------------------- 25 | 26 | This distribution contains GLQuake Drivers for Voodoo Based 3D 27 | Accelerators. These drivers were tested on the following boards: 28 | 29 | Voodoo Graphics: 30 | - Quantum 3D Obsidian 31 | - Diamond Monster 3D 32 | - Orchid Righteous 3D 33 | - Deltron Realvision Flash 3D 34 | - Guillemot MaxiGamer 35 | - Skywell Magic 3D 36 | 37 | Voodoo Rush: 38 | - Hercules Stringray 128-3D 39 | - Intergraph Intense 3D Voodoo 40 | - Jazz Multimedia Adrenaline Rush 41 | 42 | NOTE: The enclosed drivers are not meant to replace any Direct3D or 43 | Glide drivers provided by your Voodoo Graphics card manufacturer. 44 | Please obtain supported drivers from your board manufacturer. 45 | 46 | OEMSR2 and NT users: Do NOT replace OPENGL32.DLL located in your 47 | Windows\SYSTEM directory. 48 | 49 | Requirements 50 | ------------ 51 | 52 | - Voodoo Graphics or Voodoo Rush Based 3D Accelerator 53 | - Windows 95 (Windows NT is supported for Voodoo Rush) 54 | - A PC with a Pentium 90 or higher CPU 55 | - 16MB of RAM 56 | - 2D Video card set at 16 bit color 57 | 58 | Support and Frequently Asked Questions 59 | -------------------------------------- 60 | 61 | GLQuake is currently unsupported. You may however find answers to 62 | questions on various Quake dedicated websites. 3Dfx provides a GLQuake 63 | newsgroup on news.3dfx.com (Newsgroup name is 3dfx.games.glquake ) to 64 | discuss GLQuake with other users. 3Dfx also provides a regularly 65 | updated GLQuake FAQ at: http://www.3dfx.com/game_dev/quake_faq.html 66 | 67 | 68 | Voodoo Graphics and Voodoo Rush are trademarks of 3Dfx Interactive, Inc. 69 | All other trademarks are the property of their respective owners. -------------------------------------------------------------------------------- /QW/client/sys_wina.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // sys_wina.s 22 | // x86 assembly-language Win-dependent routines. 23 | 24 | #include "asm_i386.h" 25 | #include "quakeasm.h" 26 | 27 | //@@@ should be id386-dependent, and have an equivalent C path 28 | 29 | .data 30 | 31 | .align 4 32 | fpenv: 33 | .long 0, 0, 0, 0, 0, 0, 0, 0 34 | 35 | .text 36 | 37 | .globl C(MaskExceptions) 38 | C(MaskExceptions): 39 | fnstenv fpenv 40 | orl $0x3F,fpenv 41 | fldenv fpenv 42 | 43 | ret 44 | 45 | #if 0 46 | .globl C(unmaskexceptions) 47 | C(unmaskexceptions): 48 | fnstenv fpenv 49 | andl $0xFFFFFFE0,fpenv 50 | fldenv fpenv 51 | 52 | ret 53 | #endif 54 | 55 | .data 56 | 57 | .align 4 58 | .globl ceil_cw, single_cw, full_cw, cw, pushed_cw 59 | ceil_cw: .long 0 60 | single_cw: .long 0 61 | full_cw: .long 0 62 | cw: .long 0 63 | pushed_cw: .long 0 64 | 65 | .text 66 | 67 | .globl C(Sys_LowFPPrecision) 68 | C(Sys_LowFPPrecision): 69 | fldcw single_cw 70 | 71 | ret 72 | 73 | .globl C(Sys_HighFPPrecision) 74 | C(Sys_HighFPPrecision): 75 | fldcw full_cw 76 | 77 | ret 78 | 79 | .globl C(Sys_PushFPCW_SetHigh) 80 | C(Sys_PushFPCW_SetHigh): 81 | fnstcw pushed_cw 82 | fldcw full_cw 83 | 84 | ret 85 | 86 | .globl C(Sys_PopFPCW) 87 | C(Sys_PopFPCW): 88 | fldcw pushed_cw 89 | 90 | ret 91 | 92 | .globl C(Sys_SetFPCW) 93 | C(Sys_SetFPCW): 94 | fnstcw cw 95 | movl cw,%eax 96 | #if id386 97 | andb $0xF0,%ah 98 | orb $0x03,%ah // round mode, 64-bit precision 99 | #endif 100 | movl %eax,full_cw 101 | 102 | #if id386 103 | andb $0xF0,%ah 104 | orb $0x0C,%ah // chop mode, single precision 105 | #endif 106 | movl %eax,single_cw 107 | 108 | #if id386 109 | andb $0xF0,%ah 110 | orb $0x08,%ah // ceil mode, single precision 111 | #endif 112 | movl %eax,ceil_cw 113 | 114 | ret 115 | 116 | -------------------------------------------------------------------------------- /QW/client/block8.h: -------------------------------------------------------------------------------- 1 | LEnter16_8: 2 | movb (%esi),%al 3 | movb (%esi,%ebx,),%cl 4 | movb %dh,%ah 5 | addl %ebp,%edx 6 | movb %dh,%ch 7 | leal (%esi,%ebx,2),%esi 8 | movb 0x12345678(%eax),%al 9 | LBPatch0: 10 | addl %ebp,%edx 11 | movb %al,(%edi) 12 | movb 0x12345678(%ecx),%cl 13 | LBPatch1: 14 | movb %cl,1(%edi) 15 | addl $0x2,%edi 16 | 17 | movb (%esi),%al 18 | movb (%esi,%ebx,),%cl 19 | movb %dh,%ah 20 | addl %ebp,%edx 21 | movb %dh,%ch 22 | leal (%esi,%ebx,2),%esi 23 | movb 0x12345678(%eax),%al 24 | LBPatch2: 25 | addl %ebp,%edx 26 | movb %al,(%edi) 27 | movb 0x12345678(%ecx),%cl 28 | LBPatch3: 29 | movb %cl,1(%edi) 30 | addl $0x2,%edi 31 | 32 | movb (%esi),%al 33 | movb (%esi,%ebx,),%cl 34 | movb %dh,%ah 35 | addl %ebp,%edx 36 | movb %dh,%ch 37 | leal (%esi,%ebx,2),%esi 38 | movb 0x12345678(%eax),%al 39 | LBPatch4: 40 | addl %ebp,%edx 41 | movb %al,(%edi) 42 | movb 0x12345678(%ecx),%cl 43 | LBPatch5: 44 | movb %cl,1(%edi) 45 | addl $0x2,%edi 46 | 47 | movb (%esi),%al 48 | movb (%esi,%ebx,),%cl 49 | movb %dh,%ah 50 | addl %ebp,%edx 51 | movb %dh,%ch 52 | leal (%esi,%ebx,2),%esi 53 | movb 0x12345678(%eax),%al 54 | LBPatch6: 55 | addl %ebp,%edx 56 | movb %al,(%edi) 57 | movb 0x12345678(%ecx),%cl 58 | LBPatch7: 59 | movb %cl,1(%edi) 60 | addl $0x2,%edi 61 | 62 | LEnter8_8: 63 | movb (%esi),%al 64 | movb (%esi,%ebx,),%cl 65 | movb %dh,%ah 66 | addl %ebp,%edx 67 | movb %dh,%ch 68 | leal (%esi,%ebx,2),%esi 69 | movb 0x12345678(%eax),%al 70 | LBPatch8: 71 | addl %ebp,%edx 72 | movb %al,(%edi) 73 | movb 0x12345678(%ecx),%cl 74 | LBPatch9: 75 | movb %cl,1(%edi) 76 | addl $0x2,%edi 77 | 78 | movb (%esi),%al 79 | movb (%esi,%ebx,),%cl 80 | movb %dh,%ah 81 | addl %ebp,%edx 82 | movb %dh,%ch 83 | leal (%esi,%ebx,2),%esi 84 | movb 0x12345678(%eax),%al 85 | LBPatch10: 86 | addl %ebp,%edx 87 | movb %al,(%edi) 88 | movb 0x12345678(%ecx),%cl 89 | LBPatch11: 90 | movb %cl,1(%edi) 91 | addl $0x2,%edi 92 | 93 | LEnter4_8: 94 | movb (%esi),%al 95 | movb (%esi,%ebx,),%cl 96 | movb %dh,%ah 97 | addl %ebp,%edx 98 | movb %dh,%ch 99 | leal (%esi,%ebx,2),%esi 100 | movb 0x12345678(%eax),%al 101 | LBPatch12: 102 | addl %ebp,%edx 103 | movb %al,(%edi) 104 | movb 0x12345678(%ecx),%cl 105 | LBPatch13: 106 | movb %cl,1(%edi) 107 | addl $0x2,%edi 108 | 109 | LEnter2_8: 110 | movb (%esi),%al 111 | movb (%esi,%ebx,),%cl 112 | movb %dh,%ah 113 | addl %ebp,%edx 114 | movb %dh,%ch 115 | leal (%esi,%ebx,2),%esi 116 | movb 0x12345678(%eax),%al 117 | LBPatch14: 118 | addl %ebp,%edx 119 | movb %al,(%edi) 120 | movb 0x12345678(%ecx),%cl 121 | LBPatch15: 122 | movb %cl,1(%edi) 123 | addl $0x2,%edi 124 | 125 | -------------------------------------------------------------------------------- /WinQuake/sys_wina.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // 21 | // sys_wina.s 22 | // x86 assembly-language Win-dependent routines. 23 | 24 | #define GLQUAKE 1 // don't include unneeded defs 25 | #include "asm_i386.h" 26 | #include "quakeasm.h" 27 | 28 | // LATER should be id386-dependent, and have an equivalent C path 29 | 30 | .data 31 | 32 | .align 4 33 | fpenv: 34 | .long 0, 0, 0, 0, 0, 0, 0, 0 35 | 36 | .text 37 | 38 | .globl C(MaskExceptions) 39 | C(MaskExceptions): 40 | fnstenv fpenv 41 | orl $0x3F,fpenv 42 | fldenv fpenv 43 | 44 | ret 45 | 46 | #if 0 47 | .globl C(unmaskexceptions) 48 | C(unmaskexceptions): 49 | fnstenv fpenv 50 | andl $0xFFFFFFE0,fpenv 51 | fldenv fpenv 52 | 53 | ret 54 | #endif 55 | 56 | .data 57 | 58 | .align 4 59 | .globl ceil_cw, single_cw, full_cw, cw, pushed_cw 60 | ceil_cw: .long 0 61 | single_cw: .long 0 62 | full_cw: .long 0 63 | cw: .long 0 64 | pushed_cw: .long 0 65 | 66 | .text 67 | 68 | .globl C(Sys_LowFPPrecision) 69 | C(Sys_LowFPPrecision): 70 | fldcw single_cw 71 | 72 | ret 73 | 74 | .globl C(Sys_HighFPPrecision) 75 | C(Sys_HighFPPrecision): 76 | fldcw full_cw 77 | 78 | ret 79 | 80 | .globl C(Sys_PushFPCW_SetHigh) 81 | C(Sys_PushFPCW_SetHigh): 82 | fnstcw pushed_cw 83 | fldcw full_cw 84 | 85 | ret 86 | 87 | .globl C(Sys_PopFPCW) 88 | C(Sys_PopFPCW): 89 | fldcw pushed_cw 90 | 91 | ret 92 | 93 | .globl C(Sys_SetFPCW) 94 | C(Sys_SetFPCW): 95 | fnstcw cw 96 | movl cw,%eax 97 | #if id386 98 | andb $0xF0,%ah 99 | orb $0x03,%ah // round mode, 64-bit precision 100 | #endif 101 | movl %eax,full_cw 102 | 103 | #if id386 104 | andb $0xF0,%ah 105 | orb $0x0C,%ah // chop mode, single precision 106 | #endif 107 | movl %eax,single_cw 108 | 109 | #if id386 110 | andb $0xF0,%ah 111 | orb $0x08,%ah // ceil mode, single precision 112 | #endif 113 | movl %eax,ceil_cw 114 | 115 | ret 116 | 117 | -------------------------------------------------------------------------------- /QW/client/block16.h: -------------------------------------------------------------------------------- 1 | LEnter16_16: 2 | movb (%esi),%al 3 | movb (%esi,%ebx,),%cl 4 | movb %dh,%ah 5 | addl %ebp,%edx 6 | movb %dh,%ch 7 | leal (%esi,%ebx,2),%esi 8 | movw 0x12345678(,%eax,2),%ax 9 | LBPatch0: 10 | addl %ebp,%edx 11 | movw %ax,(%edi) 12 | movw 0x12345678(,%ecx,2),%cx 13 | LBPatch1: 14 | movw %cx,2(%edi) 15 | addl $0x4,%edi 16 | 17 | movb (%esi),%al 18 | movb (%esi,%ebx,),%cl 19 | movb %dh,%ah 20 | addl %ebp,%edx 21 | movb %dh,%ch 22 | leal (%esi,%ebx,2),%esi 23 | movw 0x12345678(,%eax,2),%ax 24 | LBPatch2: 25 | addl %ebp,%edx 26 | movw %ax,(%edi) 27 | movw 0x12345678(,%ecx,2),%cx 28 | LBPatch3: 29 | movw %cx,2(%edi) 30 | addl $0x4,%edi 31 | 32 | movb (%esi),%al 33 | movb (%esi,%ebx,),%cl 34 | movb %dh,%ah 35 | addl %ebp,%edx 36 | movb %dh,%ch 37 | leal (%esi,%ebx,2),%esi 38 | movw 0x12345678(,%eax,2),%ax 39 | LBPatch4: 40 | addl %ebp,%edx 41 | movw %ax,(%edi) 42 | movw 0x12345678(,%ecx,2),%cx 43 | LBPatch5: 44 | movw %cx,2(%edi) 45 | addl $0x4,%edi 46 | 47 | movb (%esi),%al 48 | movb (%esi,%ebx,),%cl 49 | movb %dh,%ah 50 | addl %ebp,%edx 51 | movb %dh,%ch 52 | leal (%esi,%ebx,2),%esi 53 | movw 0x12345678(,%eax,2),%ax 54 | LBPatch6: 55 | addl %ebp,%edx 56 | movw %ax,(%edi) 57 | movw 0x12345678(,%ecx,2),%cx 58 | LBPatch7: 59 | movw %cx,2(%edi) 60 | addl $0x4,%edi 61 | 62 | LEnter8_16: 63 | movb (%esi),%al 64 | movb (%esi,%ebx,),%cl 65 | movb %dh,%ah 66 | addl %ebp,%edx 67 | movb %dh,%ch 68 | leal (%esi,%ebx,2),%esi 69 | movw 0x12345678(,%eax,2),%ax 70 | LBPatch8: 71 | addl %ebp,%edx 72 | movw %ax,(%edi) 73 | movw 0x12345678(,%ecx,2),%cx 74 | LBPatch9: 75 | movw %cx,2(%edi) 76 | addl $0x4,%edi 77 | 78 | movb (%esi),%al 79 | movb (%esi,%ebx,),%cl 80 | movb %dh,%ah 81 | addl %ebp,%edx 82 | movb %dh,%ch 83 | leal (%esi,%ebx,2),%esi 84 | movw 0x12345678(,%eax,2),%ax 85 | LBPatch10: 86 | addl %ebp,%edx 87 | movw %ax,(%edi) 88 | movw 0x12345678(,%ecx,2),%cx 89 | LBPatch11: 90 | movw %cx,2(%edi) 91 | addl $0x4,%edi 92 | 93 | LEnter4_16: 94 | movb (%esi),%al 95 | movb (%esi,%ebx,),%cl 96 | movb %dh,%ah 97 | addl %ebp,%edx 98 | movb %dh,%ch 99 | leal (%esi,%ebx,2),%esi 100 | movw 0x12345678(,%eax,2),%ax 101 | LBPatch12: 102 | addl %ebp,%edx 103 | movw %ax,(%edi) 104 | movw 0x12345678(,%ecx,2),%cx 105 | LBPatch13: 106 | movw %cx,2(%edi) 107 | addl $0x4,%edi 108 | 109 | LEnter2_16: 110 | movb (%esi),%al 111 | movb (%esi,%ebx,),%cl 112 | movb %dh,%ah 113 | addl %ebp,%edx 114 | movb %dh,%ch 115 | leal (%esi,%ebx,2),%esi 116 | movw 0x12345678(,%eax,2),%ax 117 | LBPatch14: 118 | addl %ebp,%edx 119 | movw %ax,(%edi) 120 | movw 0x12345678(,%ecx,2),%cx 121 | LBPatch15: 122 | movw %cx,2(%edi) 123 | addl $0x4,%edi 124 | -------------------------------------------------------------------------------- /QW/server/qwsvdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // quakedef.h -- primary header for server 21 | 22 | #define QUAKE_GAME // as opposed to utilities 23 | 24 | //define PARANOID // speed sapping error checking 25 | 26 | #ifdef _WIN32 27 | #pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018) 28 | #endif 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "bothdefs.h" 39 | 40 | #include "common.h" 41 | #include "bspfile.h" 42 | #include "sys.h" 43 | #include "zone.h" 44 | #include "mathlib.h" 45 | 46 | #include "cvar.h" 47 | #include "net.h" 48 | #include "protocol.h" 49 | #include "cmd.h" 50 | #include "model.h" 51 | #include "crc.h" 52 | #include "progs.h" 53 | 54 | #include "server.h" 55 | #include "world.h" 56 | #include "pmove.h" 57 | 58 | //============================================================================= 59 | 60 | // the host system specifies the base of the directory tree, the 61 | // command line parms passed to the program, and the amount of memory 62 | // available for the program to use 63 | 64 | typedef struct 65 | { 66 | char *basedir; 67 | char *cachedir; // for development over ISDN lines 68 | int argc; 69 | char **argv; 70 | void *membase; 71 | int memsize; 72 | } quakeparms_t; 73 | 74 | 75 | //============================================================================= 76 | 77 | // 78 | // host 79 | // 80 | extern quakeparms_t host_parms; 81 | 82 | extern cvar_t sys_nostdout; 83 | extern cvar_t developer; 84 | 85 | extern qboolean host_initialized; // true if into command execution 86 | extern double host_frametime; 87 | extern double realtime; // not bounded in any way, changed at 88 | // start of every frame, never reset 89 | 90 | void SV_Error (char *error, ...); 91 | void SV_Init (quakeparms_t *parms); 92 | 93 | void Con_Printf (char *fmt, ...); 94 | void Con_DPrintf (char *fmt, ...); 95 | 96 | -------------------------------------------------------------------------------- /QW/server/newnet.txt: -------------------------------------------------------------------------------- 1 | registered clients will auto-kick unregistered clients 2 | 3 | central clearingghouse for active servers 4 | 5 | server logon messages 6 | 7 | problem with reconnect to same server out of order packets 8 | 9 | acknowledge all command line parameters 10 | 11 | annoying pause on intermission screen 12 | 13 | seperate accept/reject list for server packets and client packets 14 | 15 | server compile time should be part of connect message and status 16 | 17 | allocate new cvars during file parse 18 | 19 | remote console should be able to do cvar setting/reading 20 | 21 | make punchangle a client side operation 22 | 23 | remove sys_printf 24 | remove host_client 25 | 26 | packet filter list 27 | client move by test final pos and test 1/16 down 28 | simulate world first, then clients, clients explicitly sim weapon projectiles 29 | allow remote locations to subscribe to console output 30 | 31 | 32 | 33 | client zombie state? 34 | seperate command ques for client and server? 35 | worry about partial connection during level change 36 | worry about zombie state for if(!state) constructs 37 | 38 | make sound/ and models/ implicit in data types 39 | 40 | int sequence 41 | int reliable_sequence; 42 | bit reliable_payload; 43 | 44 | consumption 45 | renewable resources 46 | depletable resources 47 | rate of extraction 48 | 49 | 50 | how can you influence other characters 51 | how can you communicate 52 | 53 | 54 | login 55 | logoff 56 | disconnection 57 | 58 | client to server 59 | ---------------- 60 | last good received server time 61 | milliseconds since last move frame 62 | angles 63 | movement 64 | buttonstates 65 | impulse 66 | 67 | 68 | server to client 69 | ---------------- 70 | last movemessage received 71 | origin 72 | velocity 73 | 74 | 75 | build movement 76 | send movement packet to server 77 | set player position to last known good 78 | execute all unaknowledged movement packets 79 | 80 | 81 | needs to know all things that can effect movement 82 | 83 | movement context 84 | ---------------- 85 | origin 86 | velocity 87 | size 88 | 89 | run move command (context, move) 90 | 91 | 92 | 93 | #define MAX_MOVEMESSAGES 64 94 | 95 | typedef struct 96 | { 97 | double time; // client time when sent 98 | byte milliseconds; 99 | } movemessage_t; 100 | 101 | int ack_movemessage; 102 | int current_movemessage; 103 | 104 | movemessage_t movemessages[MAX_MOVEMESSAGES]; 105 | 106 | void CL_Frame (void) 107 | { 108 | get all pending server messages 109 | 110 | latency = cl.time - movemessage[last].time; 111 | 112 | movetime = cl.time - cl.oldtime; 113 | get movemessage 114 | 115 | send packet to server 116 | } 117 | 118 | 119 | 120 | 121 | does not adress interpolating other object's movement 122 | -------------------------------------------------------------------------------- /QW/server/worlda.s: -------------------------------------------------------------------------------- 1 | // 2 | // worlda.s 3 | // x86 assembly-language server testing stuff 4 | // 5 | 6 | #include "asm_i386.h" 7 | #include "quakeasm.h" 8 | //include "d_ifacea.h" 9 | 10 | #if id386 11 | 12 | .data 13 | 14 | Ltemp: .long 0 15 | 16 | .text 17 | 18 | //---------------------------------------------------------------------- 19 | // hull-point test 20 | //---------------------------------------------------------------------- 21 | 22 | #define hull 4+8 // because only partially pushed 23 | #define num 8+4 // because only partially pushed 24 | #define p 12+12 // because only partially pushed 25 | 26 | .align 4 27 | .globl C(SV_HullPointContents) 28 | C(SV_HullPointContents): 29 | pushl %edi // preserve register variables 30 | movl num(%esp),%eax 31 | testl %eax,%eax 32 | js Lhquickout 33 | 34 | // float d; 35 | // dclipnode_t *node; 36 | // mplane_t *plane; 37 | 38 | pushl %ebx 39 | movl hull(%esp),%ebx 40 | 41 | pushl %ebp 42 | movl p(%esp),%edx 43 | 44 | movl hu_clipnodes(%ebx),%edi 45 | movl hu_planes(%ebx),%ebp 46 | 47 | subl %ebx,%ebx 48 | pushl %esi 49 | 50 | // %ebx: 0 51 | // %eax: num 52 | // %edx: p 53 | // %edi: hull->clipnodes 54 | // %ebp: hull->planes 55 | 56 | // while (num >= 0) 57 | // { 58 | 59 | Lhloop: 60 | 61 | // node = hull->clipnodes + num; 62 | // plane = hull->planes + node->planenum; 63 | // !!! if the size of dclipnode_t changes, the scaling of %eax needs to be 64 | // changed !!! 65 | movl nd_planenum(%edi,%eax,8),%ecx 66 | movl nd_children(%edi,%eax,8),%eax 67 | movl %eax,%esi 68 | rorl $16,%eax 69 | leal (%ecx,%ecx,4),%ecx 70 | 71 | // if (plane->type < 3) 72 | // d = p[plane->type] - plane->dist; 73 | movl pl_type(%ebp,%ecx,4),%bl 74 | cmpb $3,%bl 75 | jb Lnodot 76 | 77 | // else 78 | // d = DotProduct (plane->normal, p) - plane->dist; 79 | flds pl_normal(%ebp,%ecx,4) 80 | fmuls 0(%edx) 81 | flds pl_normal+4(%ebp,%ecx,4) 82 | fmuls 4(%edx) 83 | flds pl_normal+8(%ebp,%ecx,4) 84 | fmuls 8(%edx) 85 | fxch %st(1) 86 | faddp %st(0),%st(2) 87 | faddp %st(0),%st(1) 88 | fsubs pl_dist(%ebp,%ecx,4) 89 | jmp Lsub 90 | 91 | Lnodot: 92 | flds pl_dist(%ebp,%ecx,4) 93 | fsubrs (%edx,%ebx,4) 94 | 95 | Lsub: 96 | sarl $16,%eax 97 | sarl $16,%esi 98 | 99 | // if (d < 0) 100 | // num = node->children[1]; 101 | // else 102 | // num = node->children[0]; 103 | fstps Ltemp 104 | movl Ltemp,%ecx 105 | sarl $31,%ecx 106 | andl %ecx,%esi 107 | xorl $0xFFFFFFFF,%ecx 108 | andl %ecx,%eax 109 | orl %esi,%eax 110 | jns Lhloop 111 | 112 | // return num; 113 | Lhdone: 114 | popl %esi 115 | popl %ebp 116 | popl %ebx // restore register variables 117 | 118 | Lhquickout: 119 | popl %edi 120 | 121 | ret 122 | 123 | #endif // id386 124 | 125 | -------------------------------------------------------------------------------- /QW/scitech/include/mgldos.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * MegaGraph Graphics Library 4 | * 5 | * Copyright (C) 1996 SciTech Software. 6 | * All rights reserved. 7 | * 8 | * Filename: $Workfile: mgldos.h $ 9 | * Version: $Revision: 1.9 $ 10 | * 11 | * Language: ANSI C 12 | * Environment: IBM PC (MS DOS) 13 | * 14 | * Description: Header file for the MGLDOS binding for the MSDOS environment. 15 | * 16 | * $Date: 30 Jan 1997 17:31:58 $ $Author: KendallB $ 17 | * 18 | ****************************************************************************/ 19 | 20 | #ifndef __MGLDOS_H 21 | #define __MGLDOS_H 22 | 23 | #ifndef MGLDOS 24 | #define MGLDOS 25 | #endif 26 | 27 | /*---------------------- Macros and type definitions ----------------------*/ 28 | 29 | typedef void *MGL_HWND; 30 | 31 | /*------------------------- Function Prototypes ---------------------------*/ 32 | 33 | #ifdef __cplusplus 34 | extern "C" { /* Use "C" linkage when in C++ mode */ 35 | #endif 36 | 37 | /* Initialise the MGL for fullscreen output */ 38 | 39 | bool MGLAPI MGL_init(m_int *driver,m_int *mode,const char *mglpath); 40 | 41 | /* Change the active display mode. You must destroy all display device 42 | * contexts before calling this function, and re-create them again with 43 | * the new display mode. Does not affect any event handling hooks. 44 | */ 45 | 46 | bool MGLAPI MGL_changeDisplayMode(m_int mode); 47 | 48 | /* Disable/enable event handling (call before calling MGL_init */ 49 | 50 | void MGLAPI MGL_useEvents(bool use); 51 | 52 | /* Device context management */ 53 | 54 | MGLDC * MGLAPI MGL_createDisplayDC(m_int numBuffers); 55 | MGLDC * MGLAPI MGL_createScrollingDC(m_int virtualX,m_int virtualY,m_int numBuffers); 56 | MGLDC * MGLAPI MGL_createOffscreenDC(void); 57 | MGLDC * MGLAPI MGL_createLinearOffscreenDC(void); 58 | MGLDC * MGLAPI MGL_createMemoryDC(m_int xSize,m_int ySize,m_int bitsPerPixel,pixel_format_t *pf); 59 | bool MGLAPI MGL_destroyDC(MGLDC *dc); 60 | 61 | /* Generic helper functions */ 62 | 63 | ulong MGLAPI MGL_getTicks(void); 64 | ulong MGLAPI MGL_getTickResolution(void); 65 | void MGLAPI MGL_delay(m_int millseconds); 66 | void MGLAPI MGL_beep(m_int freq,m_int milliseconds); 67 | void MGLAPI MGL_suspend(void); 68 | void MGLAPI MGL_resume(void); 69 | 70 | /* Fullscreen specific routines */ 71 | 72 | void MGLAPI MGL_setPaletteSnowLevel(MGLDC *dc,m_int level); 73 | m_int MGLAPI MGL_getPaletteSnowLevel(MGLDC *dc); 74 | 75 | /* Determine if a specific scancode'ed key is held down (PC specific) */ 76 | 77 | bool MGLAPI EVT_isKeyDown(uchar scanCode); 78 | 79 | #ifdef __cplusplus 80 | } /* End of "C" linkage for C++ */ 81 | #endif 82 | 83 | #endif /* __MGLDOS_H */ 84 | -------------------------------------------------------------------------------- /WinQuake/scitech/INCLUDE/MGLDOS.H: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * MegaGraph Graphics Library 4 | * 5 | * Copyright (C) 1996 SciTech Software. 6 | * All rights reserved. 7 | * 8 | * Filename: $Workfile: mgldos.h $ 9 | * Version: $Revision: 1.9 $ 10 | * 11 | * Language: ANSI C 12 | * Environment: IBM PC (MS DOS) 13 | * 14 | * Description: Header file for the MGLDOS binding for the MSDOS environment. 15 | * 16 | * $Date: 30 Jan 1997 17:31:58 $ $Author: KendallB $ 17 | * 18 | ****************************************************************************/ 19 | 20 | #ifndef __MGLDOS_H 21 | #define __MGLDOS_H 22 | 23 | #ifndef MGLDOS 24 | #define MGLDOS 25 | #endif 26 | 27 | /*---------------------- Macros and type definitions ----------------------*/ 28 | 29 | typedef void *MGL_HWND; 30 | 31 | /*------------------------- Function Prototypes ---------------------------*/ 32 | 33 | #ifdef __cplusplus 34 | extern "C" { /* Use "C" linkage when in C++ mode */ 35 | #endif 36 | 37 | /* Initialise the MGL for fullscreen output */ 38 | 39 | bool MGLAPI MGL_init(m_int *driver,m_int *mode,const char *mglpath); 40 | 41 | /* Change the active display mode. You must destroy all display device 42 | * contexts before calling this function, and re-create them again with 43 | * the new display mode. Does not affect any event handling hooks. 44 | */ 45 | 46 | bool MGLAPI MGL_changeDisplayMode(m_int mode); 47 | 48 | /* Disable/enable event handling (call before calling MGL_init */ 49 | 50 | void MGLAPI MGL_useEvents(bool use); 51 | 52 | /* Device context management */ 53 | 54 | MGLDC * MGLAPI MGL_createDisplayDC(m_int numBuffers); 55 | MGLDC * MGLAPI MGL_createScrollingDC(m_int virtualX,m_int virtualY,m_int numBuffers); 56 | MGLDC * MGLAPI MGL_createOffscreenDC(void); 57 | MGLDC * MGLAPI MGL_createLinearOffscreenDC(void); 58 | MGLDC * MGLAPI MGL_createMemoryDC(m_int xSize,m_int ySize,m_int bitsPerPixel,pixel_format_t *pf); 59 | bool MGLAPI MGL_destroyDC(MGLDC *dc); 60 | 61 | /* Generic helper functions */ 62 | 63 | ulong MGLAPI MGL_getTicks(void); 64 | ulong MGLAPI MGL_getTickResolution(void); 65 | void MGLAPI MGL_delay(m_int millseconds); 66 | void MGLAPI MGL_beep(m_int freq,m_int milliseconds); 67 | void MGLAPI MGL_suspend(void); 68 | void MGLAPI MGL_resume(void); 69 | 70 | /* Fullscreen specific routines */ 71 | 72 | void MGLAPI MGL_setPaletteSnowLevel(MGLDC *dc,m_int level); 73 | m_int MGLAPI MGL_getPaletteSnowLevel(MGLDC *dc); 74 | 75 | /* Determine if a specific scancode'ed key is held down (PC specific) */ 76 | 77 | bool MGLAPI EVT_isKeyDown(uchar scanCode); 78 | 79 | #ifdef __cplusplus 80 | } /* End of "C" linkage for C++ */ 81 | #endif 82 | 83 | #endif /* __MGLDOS_H */ 84 | -------------------------------------------------------------------------------- /WinQuake/chase.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // chase.c -- chase camera code 21 | 22 | #include "quakedef.h" 23 | 24 | cvar_t chase_back = {"chase_back", "100"}; 25 | cvar_t chase_up = {"chase_up", "16"}; 26 | cvar_t chase_right = {"chase_right", "0"}; 27 | cvar_t chase_active = {"chase_active", "0"}; 28 | 29 | vec3_t chase_pos; 30 | vec3_t chase_angles; 31 | 32 | vec3_t chase_dest; 33 | vec3_t chase_dest_angles; 34 | 35 | 36 | void Chase_Init (void) 37 | { 38 | Cvar_RegisterVariable (&chase_back); 39 | Cvar_RegisterVariable (&chase_up); 40 | Cvar_RegisterVariable (&chase_right); 41 | Cvar_RegisterVariable (&chase_active); 42 | } 43 | 44 | void Chase_Reset (void) 45 | { 46 | // for respawning and teleporting 47 | // start position 12 units behind head 48 | } 49 | 50 | void TraceLine (vec3_t start, vec3_t end, vec3_t impact) 51 | { 52 | trace_t trace; 53 | 54 | memset (&trace, 0, sizeof(trace)); 55 | SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace); 56 | 57 | VectorCopy (trace.endpos, impact); 58 | } 59 | 60 | void Chase_Update (void) 61 | { 62 | int i; 63 | float dist; 64 | vec3_t forward, up, right; 65 | vec3_t dest, stop; 66 | 67 | 68 | // if can't see player, reset 69 | AngleVectors (cl.viewangles, forward, right, up); 70 | 71 | // calc exact destination 72 | for (i=0 ; i<3 ; i++) 73 | chase_dest[i] = r_refdef.vieworg[i] 74 | - forward[i]*chase_back.value 75 | - right[i]*chase_right.value; 76 | chase_dest[2] = r_refdef.vieworg[2] + chase_up.value; 77 | 78 | // find the spot the player is looking at 79 | VectorMA (r_refdef.vieworg, 4096, forward, dest); 80 | TraceLine (r_refdef.vieworg, dest, stop); 81 | 82 | // calculate pitch to look at the same spot from camera 83 | VectorSubtract (stop, r_refdef.vieworg, stop); 84 | dist = DotProduct (stop, forward); 85 | if (dist < 1) 86 | dist = 1; 87 | r_refdef.viewangles[PITCH] = -atan(stop[2] / dist) / M_PI * 180; 88 | 89 | // move towards destination 90 | VectorCopy (chase_dest, r_refdef.vieworg); 91 | } 92 | 93 | -------------------------------------------------------------------------------- /QW/client/d_modech.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // d_modech.c: called when mode has just changed 21 | 22 | #include "quakedef.h" 23 | #include "d_local.h" 24 | 25 | int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle; 26 | 27 | int d_y_aspect_shift, d_pix_min, d_pix_max, d_pix_shift; 28 | 29 | int d_scantable[MAXHEIGHT]; 30 | short *zspantable[MAXHEIGHT]; 31 | 32 | /* 33 | ================ 34 | D_Patch 35 | ================ 36 | */ 37 | void D_Patch (void) 38 | { 39 | #if id386 40 | 41 | static qboolean protectset8 = false; 42 | 43 | if (!protectset8) 44 | { 45 | Sys_MakeCodeWriteable ((int)D_PolysetAff8Start, 46 | (int)D_PolysetAff8End - (int)D_PolysetAff8Start); 47 | protectset8 = true; 48 | } 49 | 50 | #endif // id386 51 | } 52 | 53 | 54 | /* 55 | ================ 56 | D_ViewChanged 57 | ================ 58 | */ 59 | void D_ViewChanged (void) 60 | { 61 | int rowbytes; 62 | 63 | if (r_dowarp) 64 | rowbytes = WARP_WIDTH; 65 | else 66 | rowbytes = vid.rowbytes; 67 | 68 | scale_for_mip = xscale; 69 | if (yscale > xscale) 70 | scale_for_mip = yscale; 71 | 72 | d_zrowbytes = vid.width * 2; 73 | d_zwidth = vid.width; 74 | 75 | d_pix_min = r_refdef.vrect.width / 320; 76 | if (d_pix_min < 1) 77 | d_pix_min = 1; 78 | 79 | d_pix_max = (int)((float)r_refdef.vrect.width / (320.0 / 4.0) + 0.5); 80 | d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5); 81 | if (d_pix_max < 1) 82 | d_pix_max = 1; 83 | 84 | if (pixelAspect > 1.4) 85 | d_y_aspect_shift = 1; 86 | else 87 | d_y_aspect_shift = 0; 88 | 89 | d_vrectx = r_refdef.vrect.x; 90 | d_vrecty = r_refdef.vrect.y; 91 | d_vrectright_particle = r_refdef.vrectright - d_pix_max; 92 | d_vrectbottom_particle = 93 | r_refdef.vrectbottom - (d_pix_max << d_y_aspect_shift); 94 | 95 | { 96 | int i; 97 | 98 | for (i=0 ; iv.modified 52 | 53 | void SV_LinkEdict (edict_t *ent, qboolean touch_triggers); 54 | // Needs to be called any time an entity changes origin, mins, maxs, or solid 55 | // flags ent->v.modified 56 | // sets ent->v.absmin and ent->v.absmax 57 | // if touchtriggers, calls prog functions for the intersected triggers 58 | 59 | int SV_PointContents (vec3_t p); 60 | int SV_TruePointContents (vec3_t p); 61 | // returns the CONTENTS_* value from the world at the given point. 62 | // does not check any entities at all 63 | // the non-true version remaps the water current contents to content_water 64 | 65 | edict_t *SV_TestEntityPosition (edict_t *ent); 66 | 67 | trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict); 68 | // mins and maxs are reletive 69 | 70 | // if the entire move stays in a solid volume, trace.allsolid will be set 71 | 72 | // if the starting point is in a solid, it will be allowed to move out 73 | // to an open area 74 | 75 | // nomonsters is used for line of sight or edge testing, where mosnters 76 | // shouldn't be considered solid objects 77 | 78 | // passedict is explicitly excluded from clipping checks (normally NULL) 79 | -------------------------------------------------------------------------------- /QW/qwsv.spec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Generate qwsv.spec 3 | # $1 is version 4 | # $2 is release 5 | # $3 is install dir (assumed to be in /var/tmp) 6 | cat < 16 | URL: http://www.idsoftware.com/ 17 | Source: qwsv-%{version}.tar.gz 18 | Group: Games 19 | Copyright: Restricted 20 | Icon: quake.gif 21 | BuildRoot: /var/tmp/%{name}-%{version} 22 | Summary: QuakeWorld Server 23 | 24 | %description 25 | QuakeWorld is an Internet multi-player specific version of Quake. While the 26 | original version of Quake can be played over the Internet, many users modem 27 | users - the majority of players, had less than satisfactory play. Symptoms 28 | like excessive lag - actions actually happening much later than you did them; 29 | packet loss - the game would freeze and resume several seconds later; and 30 | various other difficulties plagued users. 31 | 32 | After realizing how many people played Quake on the internet, and how many 33 | wanted to, but couldn't due to the play being unsatisfactory, John Carmack 34 | of id Software decided to create a version of Quake that was optimized for 35 | the average modem Internet player. This Internet specific version does only 36 | one thing, play deathmatch games over a TCP/IP network such as the Internet. 37 | It has no support for solo play, and you can't do anything with out connecting 38 | to a special server. 39 | 40 | Now in it's second generation, QuakeWorld has been sculpted by countless 41 | hours of user feedback and tweaking to provide the best multi-player 42 | experience that can be had from the equipment the average gamer will have. 43 | All that is required to use QuakeWorld is registered Quake. 44 | 45 | %install 46 | 47 | %files 48 | %attr(644,root,root) ${3}/README.qwsv 49 | %attr(755,root,root) ${3}/qwsv 50 | %attr(644,root,root) ${3}/qw/buttons.qc 51 | %attr(644,root,root) ${3}/qw/client.qc 52 | %attr(644,root,root) ${3}/qw/combat.qc 53 | %attr(644,root,root) ${3}/qw/defs.qc 54 | %attr(644,root,root) ${3}/qw/doors.qc 55 | %attr(644,root,root) ${3}/qw/items.qc 56 | %attr(644,root,root) ${3}/qw/misc.qc 57 | %attr(644,root,root) ${3}/qw/models.qc 58 | %attr(644,root,root) ${3}/qw/plats.qc 59 | %attr(644,root,root) ${3}/qw/player.qc 60 | %attr(644,root,root) ${3}/qw/progdefs.h 61 | %attr(644,root,root) ${3}/qw/progs.src 62 | %attr(644,root,root) ${3}/qw/qwprogs.dat 63 | %attr(644,root,root) ${3}/qw/server.qc 64 | %attr(644,root,root) ${3}/qw/spectate.qc 65 | %attr(644,root,root) ${3}/qw/sprites.qc 66 | %attr(644,root,root) ${3}/qw/subs.qc 67 | %attr(644,root,root) ${3}/qw/triggers.qc 68 | %attr(644,root,root) ${3}/qw/weapons.qc 69 | %attr(644,root,root) ${3}/qw/world.qc 70 | %attr(644,root,root) ${3}/qw/skins/fixskins.sh 71 | EOF 72 | 73 | 74 | -------------------------------------------------------------------------------- /WinQuake/d_modech.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1996-1997 Id Software, Inc. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | // d_modech.c: called when mode has just changed 21 | 22 | #include "quakedef.h" 23 | #include "d_local.h" 24 | 25 | int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle; 26 | 27 | int d_y_aspect_shift, d_pix_min, d_pix_max, d_pix_shift; 28 | 29 | int d_scantable[MAXHEIGHT]; 30 | short *zspantable[MAXHEIGHT]; 31 | 32 | /* 33 | ================ 34 | D_Patch 35 | ================ 36 | */ 37 | void D_Patch (void) 38 | { 39 | #if id386 40 | 41 | static qboolean protectset8 = false; 42 | 43 | if (!protectset8) 44 | { 45 | Sys_MakeCodeWriteable ((int)D_PolysetAff8Start, 46 | (int)D_PolysetAff8End - (int)D_PolysetAff8Start); 47 | protectset8 = true; 48 | } 49 | 50 | #endif // id386 51 | } 52 | 53 | 54 | /* 55 | ================ 56 | D_ViewChanged 57 | ================ 58 | */ 59 | void D_ViewChanged (void) 60 | { 61 | int rowbytes; 62 | 63 | if (r_dowarp) 64 | rowbytes = WARP_WIDTH; 65 | else 66 | rowbytes = vid.rowbytes; 67 | 68 | scale_for_mip = xscale; 69 | if (yscale > xscale) 70 | scale_for_mip = yscale; 71 | 72 | d_zrowbytes = vid.width * 2; 73 | d_zwidth = vid.width; 74 | 75 | d_pix_min = r_refdef.vrect.width / 320; 76 | if (d_pix_min < 1) 77 | d_pix_min = 1; 78 | 79 | d_pix_max = (int)((float)r_refdef.vrect.width / (320.0 / 4.0) + 0.5); 80 | d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5); 81 | if (d_pix_max < 1) 82 | d_pix_max = 1; 83 | 84 | if (pixelAspect > 1.4) 85 | d_y_aspect_shift = 1; 86 | else 87 | d_y_aspect_shift = 0; 88 | 89 | d_vrectx = r_refdef.vrect.x; 90 | d_vrecty = r_refdef.vrect.y; 91 | d_vrectright_particle = r_refdef.vrectright - d_pix_max; 92 | d_vrectbottom_particle = 93 | r_refdef.vrectbottom - (d_pix_max << d_y_aspect_shift); 94 | 95 | { 96 | int i; 97 | 98 | for (i=0 ; i