3dfx.txt:-----------------------------------------------------------------------
3dfx.txt:-----------------------------------------------------------------------
3dfx.txt:Release Notes for GLQuake's mini-GL driver
3dfx.txt:---------------------------
3dfx.txt:- Quantum 3D Obsidian 
3dfx.txt:- Diamond Monster 3D
3dfx.txt:- Orchid Righteous 3D
3dfx.txt:- Deltron Realvision Flash 3D
3dfx.txt:- Guillemot MaxiGamer 
3dfx.txt:- Skywell Magic 3D
3dfx.txt:- Hercules Stringray 128-3D
3dfx.txt:- Intergraph Intense 3D Voodoo
3dfx.txt:- Jazz Multimedia Adrenaline Rush
3dfx.txt:------------
3dfx.txt:- Voodoo Graphics or Voodoo Rush Based 3D Accelerator
3dfx.txt:- Windows 95 (Windows NT is supported for Voodoo Rush)
3dfx.txt:- A PC with a Pentium 90 or higher CPU
3dfx.txt:- 16MB of RAM
3dfx.txt:- 2D Video card set at 16 bit color
3dfx.txt:--------------------------------------
Makefile:ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6 ];then echo libc6;fi)))
Makefile:GLIBC=-glibc
Makefile:ifneq (,$(findstring alpha,$(shell uname -m)))
Makefile:MESA_DIR=/usr/local/src/Mesa-2.6
Makefile:RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
Makefile:DEBUG_CFLAGS=$(BASE_CFLAGS) -g
Makefile:LDFLAGS=-lm
Makefile:MESAGLLDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -L$(MESA_DIR)/lib -lMesaGL -lglide2x -lX11 -lXext -ldl
Makefile:TDFXGLLDFLAGS=-L$(TDFXGL_DIR)/release$(ARCH)$(GLIBC) -l3dfxgl -lglide2x -ldl
Makefile:GLLDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lGL -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm
Makefile:GLCFLAGS=-DGLQUAKE -I$(MESA_DIR)/include -I/usr/include/glide
Makefile:DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
Makefile:DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $<
Makefile:DO_GL_CC=$(CC) $(CFLAGS) $(GLCFLAGS) -o $@ -c $<
Makefile:DO_GL_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(GLCFLAGS) -o $@ -c $<
Makefile:DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $<
Makefile:DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
Makefile:DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
Makefile:	@-mkdir $(BUILD_RELEASE_DIR) \
Makefile:	@-mkdir $(BUILD_DEBUG_DIR) \
Makefile:	@-mkdir $(BUILD_RELEASE_DIR) \
Makefile:	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLSVGA_OBJS) $(MESAGLLDFLAGS) $(SVGALDFLAGS) $(LDFLAGS)
Makefile:	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS)
Makefile:	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLSVGA_OBJS) $(TDFXGLLDFLAGS) $(SVGALDFLAGS) $(LDFLAGS)
Makefile:clean: clean-debug clean-release
Makefile:	rm -f squake.spec glquake.spec quake.x11.spec
Makefile:clean-debug:
Makefile:clean-release:
Makefile:	-rm -f $(GLQUAKE_OBJS) $(GLSVGA_OBJS) $(GLX_OBJS)
Makefile.Solaris:ifneq (,$(findstring i86pc,$(shell uname -m)))
Makefile.Solaris:BASE_CFLAGS=-I/usr/openwin/include
Makefile.Solaris:RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
Makefile.Solaris:DEBUG_CFLAGS=$(BASE_CFLAGS) -g
Makefile.Solaris:LDFLAGS=-R /usr/openwin/lib -L /usr/openwin/lib -lm -lX11 -lXext -lsocket -lnsl -lthread -ldl 
Makefile.Solaris:XIL_LDFLAGS=-L /opt/SUNWits/Graphics-sw/xil/lib -R /opt/SUNWits/Graphics-sw/xil/lib:/usr/openwin/lib -L /usr/openwin/lib -lm -lxil -lX11 -lXext -lsocket -lnsl -lthread -ldl 
Makefile.Solaris:DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
Makefile.Solaris:DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
Makefile.Solaris:	@-mkdir $(BUILD_DEBUG_DIR)
Makefile.Solaris:	@-mkdir $(BUILD_RELEASE_DIR)
Makefile.Solaris:	$(CC) -o $(@) $(QUAKE_OBJS) $(QUAKE_AS_OBJS) $(QUAKE_X_OBJS) $(LDFLAGS)
Makefile.Solaris:	$(CC) -o $(@) $(QUAKE_OBJS) $(QUAKE_AS_OBJS) $(QUAKE_XIL_OBJS) $(XIL_LDFLAGS)
Makefile.Solaris:	$(CC) -o $(@) $(QUAKE_OBJS) $(QUAKE_X_OBJS) $(LDFLAGS)
Makefile.Solaris:	$(CC) -o $(@) $(QUAKE_OBJS) $(QUAKE_XIL_OBJS) $(XIL_LDFLAGS)
Makefile.Solaris:RPMDIR = /var/tmp/quake-$(VERSION)
Makefile.Solaris:	if [ ! -d archives ];then mkdir archives;fi
Makefile.Solaris:	cd $(RPMDIR); tar cvf q2ded-$(VERSION)-$(ARCH)-sun-solaris2.5.1.tar *
Makefile.Solaris:	cd $(RPMDIR); compress q2ded-$(VERSION)-$(ARCH)-sun-solaris2.5.1.tar
Makefile.Solaris:	rm -rf $(RPMDIR)
Makefile.Solaris:	-mkdirhier $(COPYDIR)
Makefile.Solaris:clean: clean-debug clean-release
Makefile.Solaris:clean-debug:
Makefile.Solaris:clean-release:
Makefile.Solaris:	-rm -f $(QUAKE_OBJS) $(QUAKE_X_OBJS) $(QUAKE_XIL_OBJS)
Makefile.linuxi386:ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6 ];then echo libc6;fi)))
Makefile.linuxi386:GLIBC=-glibc
Makefile.linuxi386:ifneq (,$(findstring alpha,$(shell uname -m)))
Makefile.linuxi386:MESA_DIR=/usr/local/src/Mesa-2.6
Makefile.linuxi386:EGCS=/usr/local/egcs-1.1.2/bin/gcc
Makefile.linuxi386:BASE_CFLAGS=-Dstricmp=strcasecmp
Makefile.linuxi386:RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
Makefile.linuxi386:	-fomit-frame-pointer -fexpensive-optimizations
Makefile.linuxi386:DEBUG_CFLAGS=$(BASE_CFLAGS) -g
Makefile.linuxi386:LDFLAGS=-lm
Makefile.linuxi386:SVGALDFLAGS=-lvga
Makefile.linuxi386:XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga
Makefile.linuxi386:XCFLAGS=-DX11
Makefile.linuxi386:MESAGLLDFLAGS=-L/usr/X11/lib -L/usr/local/lib -L$(MESA_DIR)/lib -lMesaGL -lglide2x -lX11 -lXext -ldl
Makefile.linuxi386:TDFXGLLDFLAGS=-L$(TDFXGL_DIR)/release$(ARCH)$(GLIBC) -l3dfxgl -lglide2x -ldl
Makefile.linuxi386:GLLDFLAGS=-L/usr/X11/lib -L/usr/local/lib -lGL -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm
Makefile.linuxi386:GLCFLAGS=-DGLQUAKE -I$(MESA_DIR)/include -I/usr/include/glide
Makefile.linuxi386:DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_GL_CC=$(CC) $(CFLAGS) $(GLCFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_GL_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(GLCFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_X11_CC=$(CC) $(CFLAGS) $(XCFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_X11_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(XCFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $<
Makefile.linuxi386:DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
Makefile.linuxi386:DO_GL_AS=$(CC) $(CFLAGS) $(GLCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
Makefile.linuxi386:	@-mkdir $(BUILD_DEBUG_DIR) \
Makefile.linuxi386:	@-mkdir $(BUILD_RELEASE_DIR) \
Makefile.linuxi386:	$(CC) $(CFLAGS) -o $@ $(SQUAKE_OBJS) $(SVGALDFLAGS) $(LDFLAGS)
Makefile.linuxi386:	$(CC) $(CFLAGS) -o $@ $(X11_OBJS) $(XLDFLAGS) $(LDFLAGS)
Makefile.linuxi386:	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLSVGA_OBJS) $(MESAGLLDFLAGS) $(SVGALDFLAGS) $(LDFLAGS)
Makefile.linuxi386:	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS)
Makefile.linuxi386:	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLSVGA_OBJS) $(TDFXGLLDFLAGS) $(SVGALDFLAGS) $(LDFLAGS)
Makefile.linuxi386:RPMFLAGS = -bb
Makefile.linuxi386:RPMDIR = $(TMPDIR)/quake-$(VERSION)
Makefile.linuxi386:BASERPMDIR = $(TMPDIR)/quake-$(BASEVERSION)
Makefile.linuxi386:rpm: rpm-quake rpm-quake-data rpm-hipnotic rpm-rogue
Makefile.linuxi386:rpm-quake: quake.spec \
Makefile.linuxi386:	touch $(RPMROOT)/SOURCES/quake-$(VERSION).tar.gz
Makefile.linuxi386:	if [ ! -d RPMS ];then mkdir RPMS;fi
Makefile.linuxi386:	-mkdirhier $(RPMDIR)/$(INSTALLDIR)
Makefile.linuxi386:	-mkdirhier $(RPMDIR)/usr/lib
Makefile.linuxi386:	rm -rf $(RPMDIR)
Makefile.linuxi386:	rm -f $(RPMROOT)/SOURCES/quake-$(VERSION).tar.gz
Makefile.linuxi386:	mv $(RPMROOT)/RPMS/$(ARCH)/quake-$(VERSION)-$(RPM_RELEASE).$(ARCH).rpm RPMS/.
Makefile.linuxi386:QUAKEDATADIR=$(TMPDIR)/quake-data-$(BASEVERSION)
Makefile.linuxi386:rpm-quake-data: quake-data.spec
Makefile.linuxi386:	touch $(RPMROOT)/SOURCES/quake-$(BASEVERSION)-data.tar.gz
Makefile.linuxi386:	-mkdirhier $(QUAKEDATADIR)/$(INSTALLDIR)/id1
Makefile.linuxi386:	cp quake-data.spec $(RPMROOT)/SPECS/.
Makefile.linuxi386:	cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) quake-data.spec
Makefile.linuxi386:	rm -rf $(QUAKEDATADIR)
Makefile.linuxi386:	rm -f $(RPMROOT)/SOURCES/quake-$(BASEVERSION)-data.tar.gz
Makefile.linuxi386:	mv $(RPMROOT)/RPMS/$(NOARCH)/quake-data-$(BASEVERSION)-$(RPM_RELEASE).$(NOARCH).rpm RPMS/.
Makefile.linuxi386:RPMHIPNOTICDIR=$(TMPDIR)/quake-hipnotic-$(BASEVERSION)
Makefile.linuxi386:rpm-hipnotic: quake-hipnotic.spec
Makefile.linuxi386:	touch $(RPMROOT)/SOURCES/quake-hipnotic-$(BASEVERSION).tar.gz
Makefile.linuxi386:	if [ ! -d RPMS ];then mkdir RPMS;fi
Makefile.linuxi386:	-mkdirhier $(RPMHIPNOTICDIR)/$(INSTALLDIR)/hipnotic/docs
Makefile.linuxi386:	cp quake-hipnotic.spec $(RPMROOT)/SPECS/.
Makefile.linuxi386:	cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) quake-hipnotic.spec
Makefile.linuxi386:	rm -rf $(RPMHIPNOTICDIR)
Makefile.linuxi386:	rm -f $(RPMROOT)/SOURCES/quake-hipnotic-$(BASEVERSION).tar.gz
Makefile.linuxi386:	mv $(RPMROOT)/RPMS/$(NOARCH)/quake-hipnotic-$(BASEVERSION)-$(RPM_RELEASE).$(NOARCH).rpm RPMS/.
Makefile.linuxi386:RPMROGUEDIR=$(TMPDIR)/quake-rogue-$(BASEVERSION)
Makefile.linuxi386:rpm-rogue: quake-rogue.spec
Makefile.linuxi386:	touch $(RPMROOT)/SOURCES/quake-rogue-$(BASEVERSION).tar.gz
Makefile.linuxi386:	if [ ! -d RPMS ];then mkdir RPMS;fi
Makefile.linuxi386:	-mkdirhier $(RPMROGUEDIR)/$(INSTALLDIR)/rogue/docs
Makefile.linuxi386:	cp quake-rogue.spec $(RPMROOT)/SPECS/.
Makefile.linuxi386:	cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) quake-rogue.spec
Makefile.linuxi386:	rm -rf $(RPMROGUEDIR)
Makefile.linuxi386:	rm -f $(RPMROOT)/SOURCES/quake-rogue-$(BASEVERSION).tar.gz
Makefile.linuxi386:	mv $(RPMROOT)/RPMS/$(NOARCH)/quake-rogue-$(BASEVERSION)-$(RPM_RELEASE).$(NOARCH).rpm RPMS/.
Makefile.linuxi386:quake-data.spec : $(MOUNT_DIR)/quake-data.spec.sh
Makefile.linuxi386:quake-hipnotic.spec : $(MOUNT_DIR)/quake-hipnotic.spec.sh
Makefile.linuxi386:quake-rogue.spec : $(MOUNT_DIR)/quake-rogue.spec.sh
Makefile.linuxi386:clean: clean-debug clean-release
Makefile.linuxi386:	rm -f squake.spec glquake.spec quake.x11.spec
Makefile.linuxi386:clean-debug:
Makefile.linuxi386:clean-release:
Makefile.linuxi386:	-rm -f $(SQUAKE_OBJS) $(X11_OBJS) $(GLQUAKE_OBJS) $(GLSVGA_OBJS) \
README.Solaris:----------------------------
README.Solaris:------------
README.Solaris:	-winsize <width> <height>
README.Solaris:	-count_frames
README.Solaris:		% quake.xil +pixel_multiply 2 -winsize 400 300
README.Solaris:-----------------------------------------
README.Solaris:		% qwcl.xil +pixel_multiply 2 -winsize 400 300
README.Solaris:-----------------------------
WinQuake.dsp:# Microsoft Developer Studio Project File - Name="winquake" - Package Owner=<4>
WinQuake.dsp:CFG=winquake - Win32 Release
WinQuake.dsp:!MESSAGE NMAKE /f "WinQuake.mak" CFG="winquake - Win32 Release"
WinQuake.dsp:!MESSAGE "winquake - Win32 Release" (based on "Win32 (x86) Application")
WinQuake.dsp:!MESSAGE "winquake - Win32 Debug" (based on "Win32 (x86) Application")
WinQuake.dsp:!MESSAGE "winquake - Win32 GL Debug" (based on "Win32 (x86) Application")
WinQuake.dsp:!MESSAGE "winquake - Win32 GL Release" (based on "Win32 (x86) Application")
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:# Name "winquake - Win32 Release"
WinQuake.dsp:# Name "winquake - Win32 Debug"
WinQuake.dsp:# Name "winquake - Win32 GL Debug"
WinQuake.dsp:# Name "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:!IF  "$(CFG)" == "winquake - Win32 Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Debug"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsp:!ELSEIF  "$(CFG)" == "winquake - Win32 GL Release"
WinQuake.dsp:# Begin Custom Build - mycoolbuild
WinQuake.dsw:Project: "dr_default"=.\dr_default\dr_default.dsp - Package Owner=<4>
WinQuake.dsw:Project: "gas2masm"=.\gas2masm\gas2masm.dsp - Package Owner=<4>
WinQuake.dsw:Project: "winquake"=.\WinQuake.dsp - Package Owner=<4>
Binary file WinQuake.mdp matches
Binary file WinQuake.ncb matches
Binary file WinQuake.opt matches
WinQuake.plg:--------------------Configuration: winquake - Win32 GL Release--------------------
WinQuake.plg:glquake.exe - 0 error(s), 2 warning(s)
adivtab.h:Copyright (C) 1996-1997 Id Software, Inc.
adivtab.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
adivtab.h:// table of quotients and remainders for [-15...16] / [-15...16]
adivtab.h:// numerator = -15
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{1, -5},
adivtab.h:{1, -6},
adivtab.h:{1, -7},
adivtab.h:{2, -1},
adivtab.h:{2, -3},
adivtab.h:{3, -3},
adivtab.h:{7, -1},
adivtab.h:{-15, 0},
adivtab.h:{-8, 1},
adivtab.h:{-5, 0},
adivtab.h:{-4, 1},
adivtab.h:{-3, 0},
adivtab.h:{-3, 3},
adivtab.h:{-3, 6},
adivtab.h:{-2, 1},
adivtab.h:{-2, 3},
adivtab.h:{-2, 5},
adivtab.h:{-2, 7},
adivtab.h:{-2, 9},
adivtab.h:{-2, 11},
adivtab.h:{-2, 13},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:// numerator = -14
adivtab.h:{0, -14},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{1, -5},
adivtab.h:{1, -6},
adivtab.h:{2, -2},
adivtab.h:{2, -4},
adivtab.h:{3, -2},
adivtab.h:{4, -2},
adivtab.h:{-14, 0},
adivtab.h:{-7, 0},
adivtab.h:{-5, 1},
adivtab.h:{-4, 2},
adivtab.h:{-3, 1},
adivtab.h:{-3, 4},
adivtab.h:{-2, 0},
adivtab.h:{-2, 2},
adivtab.h:{-2, 4},
adivtab.h:{-2, 6},
adivtab.h:{-2, 8},
adivtab.h:{-2, 10},
adivtab.h:{-2, 12},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:// numerator = -13
adivtab.h:{0, -13},
adivtab.h:{0, -13},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{1, -5},
adivtab.h:{1, -6},
adivtab.h:{2, -1},
adivtab.h:{2, -3},
adivtab.h:{3, -1},
adivtab.h:{4, -1},
adivtab.h:{6, -1},
adivtab.h:{-13, 0},
adivtab.h:{-7, 1},
adivtab.h:{-5, 2},
adivtab.h:{-4, 3},
adivtab.h:{-3, 2},
adivtab.h:{-3, 5},
adivtab.h:{-2, 1},
adivtab.h:{-2, 3},
adivtab.h:{-2, 5},
adivtab.h:{-2, 7},
adivtab.h:{-2, 9},
adivtab.h:{-2, 11},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:// numerator = -12
adivtab.h:{0, -12},
adivtab.h:{0, -12},
adivtab.h:{0, -12},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{1, -5},
adivtab.h:{2, -2},
adivtab.h:{-12, 0},
adivtab.h:{-6, 0},
adivtab.h:{-4, 0},
adivtab.h:{-3, 0},
adivtab.h:{-3, 3},
adivtab.h:{-2, 0},
adivtab.h:{-2, 2},
adivtab.h:{-2, 4},
adivtab.h:{-2, 6},
adivtab.h:{-2, 8},
adivtab.h:{-2, 10},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:// numerator = -11
adivtab.h:{0, -11},
adivtab.h:{0, -11},
adivtab.h:{0, -11},
adivtab.h:{0, -11},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{1, -5},
adivtab.h:{2, -1},
adivtab.h:{2, -3},
adivtab.h:{3, -2},
adivtab.h:{5, -1},
adivtab.h:{-11, 0},
adivtab.h:{-6, 1},
adivtab.h:{-4, 1},
adivtab.h:{-3, 1},
adivtab.h:{-3, 4},
adivtab.h:{-2, 1},
adivtab.h:{-2, 3},
adivtab.h:{-2, 5},
adivtab.h:{-2, 7},
adivtab.h:{-2, 9},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:// numerator = -10
adivtab.h:{0, -10},
adivtab.h:{0, -10},
adivtab.h:{0, -10},
adivtab.h:{0, -10},
adivtab.h:{0, -10},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{2, -2},
adivtab.h:{3, -1},
adivtab.h:{-10, 0},
adivtab.h:{-5, 0},
adivtab.h:{-4, 2},
adivtab.h:{-3, 2},
adivtab.h:{-2, 0},
adivtab.h:{-2, 2},
adivtab.h:{-2, 4},
adivtab.h:{-2, 6},
adivtab.h:{-2, 8},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:// numerator = -9
adivtab.h:{0, -9},
adivtab.h:{0, -9},
adivtab.h:{0, -9},
adivtab.h:{0, -9},
adivtab.h:{0, -9},
adivtab.h:{0, -9},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{1, -4},
adivtab.h:{2, -1},
adivtab.h:{4, -1},
adivtab.h:{-9, 0},
adivtab.h:{-5, 1},
adivtab.h:{-3, 0},
adivtab.h:{-3, 3},
adivtab.h:{-2, 1},
adivtab.h:{-2, 3},
adivtab.h:{-2, 5},
adivtab.h:{-2, 7},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:// numerator = -8
adivtab.h:{0, -8},
adivtab.h:{0, -8},
adivtab.h:{0, -8},
adivtab.h:{0, -8},
adivtab.h:{0, -8},
adivtab.h:{0, -8},
adivtab.h:{0, -8},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{2, -2},
adivtab.h:{-8, 0},
adivtab.h:{-4, 0},
adivtab.h:{-3, 1},
adivtab.h:{-2, 0},
adivtab.h:{-2, 2},
adivtab.h:{-2, 4},
adivtab.h:{-2, 6},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:// numerator = -7
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{0, -7},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{1, -3},
adivtab.h:{2, -1},
adivtab.h:{3, -1},
adivtab.h:{-7, 0},
adivtab.h:{-4, 1},
adivtab.h:{-3, 2},
adivtab.h:{-2, 1},
adivtab.h:{-2, 3},
adivtab.h:{-2, 5},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:// numerator = -6
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{0, -6},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{-6, 0},
adivtab.h:{-3, 0},
adivtab.h:{-2, 0},
adivtab.h:{-2, 2},
adivtab.h:{-2, 4},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:{-1, 10},
adivtab.h:// numerator = -5
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{0, -5},
adivtab.h:{1, -1},
adivtab.h:{1, -2},
adivtab.h:{2, -1},
adivtab.h:{-5, 0},
adivtab.h:{-3, 1},
adivtab.h:{-2, 1},
adivtab.h:{-2, 3},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:{-1, 10},
adivtab.h:{-1, 11},
adivtab.h:// numerator = -4
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{0, -4},
adivtab.h:{1, -1},
adivtab.h:{-4, 0},
adivtab.h:{-2, 0},
adivtab.h:{-2, 2},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:{-1, 10},
adivtab.h:{-1, 11},
adivtab.h:{-1, 12},
adivtab.h:// numerator = -3
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{0, -3},
adivtab.h:{1, -1},
adivtab.h:{-3, 0},
adivtab.h:{-2, 1},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:{-1, 10},
adivtab.h:{-1, 11},
adivtab.h:{-1, 12},
adivtab.h:{-1, 13},
adivtab.h:// numerator = -2
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{0, -2},
adivtab.h:{-2, 0},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:{-1, 10},
adivtab.h:{-1, 11},
adivtab.h:{-1, 12},
adivtab.h:{-1, 13},
adivtab.h:{-1, 14},
adivtab.h:// numerator = -1
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{0, -1},
adivtab.h:{-1, 0},
adivtab.h:{-1, 1},
adivtab.h:{-1, 2},
adivtab.h:{-1, 3},
adivtab.h:{-1, 4},
adivtab.h:{-1, 5},
adivtab.h:{-1, 6},
adivtab.h:{-1, 7},
adivtab.h:{-1, 8},
adivtab.h:{-1, 9},
adivtab.h:{-1, 10},
adivtab.h:{-1, 11},
adivtab.h:{-1, 12},
adivtab.h:{-1, 13},
adivtab.h:{-1, 14},
adivtab.h:{-1, 15},
adivtab.h:{-1, -14},
adivtab.h:{-1, -13},
adivtab.h:{-1, -12},
adivtab.h:{-1, -11},
adivtab.h:{-1, -10},
adivtab.h:{-1, -9},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-1, -13},
adivtab.h:{-1, -12},
adivtab.h:{-1, -11},
adivtab.h:{-1, -10},
adivtab.h:{-1, -9},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, 0},
adivtab.h:{-1, -12},
adivtab.h:{-1, -11},
adivtab.h:{-1, -10},
adivtab.h:{-1, -9},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -1},
adivtab.h:{-3, 0},
adivtab.h:{-1, -11},
adivtab.h:{-1, -10},
adivtab.h:{-1, -9},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-4, 0},
adivtab.h:{-1, -10},
adivtab.h:{-1, -9},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -3},
adivtab.h:{-2, -1},
adivtab.h:{-3, -1},
adivtab.h:{-5, 0},
adivtab.h:{-1, -9},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -4},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-3, 0},
adivtab.h:{-6, 0},
adivtab.h:{-1, -8},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -5},
adivtab.h:{-2, -3},
adivtab.h:{-2, -1},
adivtab.h:{-3, -2},
adivtab.h:{-4, -1},
adivtab.h:{-7, 0},
adivtab.h:{-1, -7},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -6},
adivtab.h:{-2, -4},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-3, -1},
adivtab.h:{-4, 0},
adivtab.h:{-8, 0},
adivtab.h:{-1, -6},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -7},
adivtab.h:{-2, -5},
adivtab.h:{-2, -3},
adivtab.h:{-2, -1},
adivtab.h:{-3, -3},
adivtab.h:{-3, 0},
adivtab.h:{-5, -1},
adivtab.h:{-9, 0},
adivtab.h:{-1, -5},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -8},
adivtab.h:{-2, -6},
adivtab.h:{-2, -4},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-3, -2},
adivtab.h:{-4, -2},
adivtab.h:{-5, 0},
adivtab.h:{-10, 0},
adivtab.h:{-1, -4},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -9},
adivtab.h:{-2, -7},
adivtab.h:{-2, -5},
adivtab.h:{-2, -3},
adivtab.h:{-2, -1},
adivtab.h:{-3, -4},
adivtab.h:{-3, -1},
adivtab.h:{-4, -1},
adivtab.h:{-6, -1},
adivtab.h:{-11, 0},
adivtab.h:{-1, -3},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -10},
adivtab.h:{-2, -8},
adivtab.h:{-2, -6},
adivtab.h:{-2, -4},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-3, -3},
adivtab.h:{-3, 0},
adivtab.h:{-4, 0},
adivtab.h:{-6, 0},
adivtab.h:{-12, 0},
adivtab.h:{-1, -2},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -11},
adivtab.h:{-2, -9},
adivtab.h:{-2, -7},
adivtab.h:{-2, -5},
adivtab.h:{-2, -3},
adivtab.h:{-2, -1},
adivtab.h:{-3, -5},
adivtab.h:{-3, -2},
adivtab.h:{-4, -3},
adivtab.h:{-5, -2},
adivtab.h:{-7, -1},
adivtab.h:{-13, 0},
adivtab.h:{-1, -1},
adivtab.h:{-1, 0},
adivtab.h:{-2, -12},
adivtab.h:{-2, -10},
adivtab.h:{-2, -8},
adivtab.h:{-2, -6},
adivtab.h:{-2, -4},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-3, -4},
adivtab.h:{-3, -1},
adivtab.h:{-4, -2},
adivtab.h:{-5, -1},
adivtab.h:{-7, 0},
adivtab.h:{-14, 0},
adivtab.h:{-1, 0},
adivtab.h:{-2, -13},
adivtab.h:{-2, -11},
adivtab.h:{-2, -9},
adivtab.h:{-2, -7},
adivtab.h:{-2, -5},
adivtab.h:{-2, -3},
adivtab.h:{-2, -1},
adivtab.h:{-3, -6},
adivtab.h:{-3, -3},
adivtab.h:{-3, 0},
adivtab.h:{-4, -1},
adivtab.h:{-5, 0},
adivtab.h:{-8, -1},
adivtab.h:{-15, 0},
adivtab.h:{-2, -14},
adivtab.h:{-2, -12},
adivtab.h:{-2, -10},
adivtab.h:{-2, -8},
adivtab.h:{-2, -6},
adivtab.h:{-2, -4},
adivtab.h:{-2, -2},
adivtab.h:{-2, 0},
adivtab.h:{-3, -5},
adivtab.h:{-3, -2},
adivtab.h:{-4, -4},
adivtab.h:{-4, 0},
adivtab.h:{-6, -2},
adivtab.h:{-8, 0},
adivtab.h:{-16, 0},
anorm_dots.h:Copyright (C) 1996-1997 Id Software, Inc.
anorm_dots.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
anorms.h:Copyright (C) 1996-1997 Id Software, Inc.
anorms.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
anorms.h:{-0.525731, 0.000000, 0.850651}, 
anorms.h:{-0.442863, 0.238856, 0.864188}, 
anorms.h:{-0.295242, 0.000000, 0.955423}, 
anorms.h:{-0.309017, 0.500000, 0.809017}, 
anorms.h:{-0.162460, 0.262866, 0.951056}, 
anorms.h:{-0.147621, 0.716567, 0.681718}, 
anorms.h:{-0.681718, 0.147621, 0.716567}, 
anorms.h:{-0.809017, 0.309017, 0.500000}, 
anorms.h:{-0.587785, 0.425325, 0.688191}, 
anorms.h:{-0.850651, 0.525731, 0.000000}, 
anorms.h:{-0.864188, 0.442863, 0.238856}, 
anorms.h:{-0.716567, 0.681718, 0.147621}, 
anorms.h:{-0.688191, 0.587785, 0.425325}, 
anorms.h:{-0.500000, 0.809017, 0.309017}, 
anorms.h:{-0.238856, 0.864188, 0.442863}, 
anorms.h:{-0.425325, 0.688191, 0.587785}, 
anorms.h:{-0.716567, 0.681718, -0.147621}, 
anorms.h:{-0.500000, 0.809017, -0.309017}, 
anorms.h:{-0.525731, 0.850651, 0.000000}, 
anorms.h:{0.000000, 0.850651, -0.525731}, 
anorms.h:{-0.238856, 0.864188, -0.442863}, 
anorms.h:{0.000000, 0.955423, -0.295242}, 
anorms.h:{-0.262866, 0.951056, -0.162460}, 
anorms.h:{-0.262866, 0.951056, 0.162460}, 
anorms.h:{0.238856, 0.864188, -0.442863}, 
anorms.h:{0.262866, 0.951056, -0.162460}, 
anorms.h:{0.500000, 0.809017, -0.309017}, 
anorms.h:{0.716567, 0.681718, -0.147621}, 
anorms.h:{0.850651, -0.525731, 0.000000}, 
anorms.h:{0.955423, -0.295242, 0.000000}, 
anorms.h:{0.864188, -0.442863, 0.238856}, 
anorms.h:{0.951056, -0.162460, 0.262866}, 
anorms.h:{0.809017, -0.309017, 0.500000}, 
anorms.h:{0.681718, -0.147621, 0.716567}, 
anorms.h:{0.864188, 0.442863, -0.238856}, 
anorms.h:{0.809017, 0.309017, -0.500000}, 
anorms.h:{0.951056, 0.162460, -0.262866}, 
anorms.h:{0.525731, 0.000000, -0.850651}, 
anorms.h:{0.681718, 0.147621, -0.716567}, 
anorms.h:{0.681718, -0.147621, -0.716567}, 
anorms.h:{0.850651, 0.000000, -0.525731}, 
anorms.h:{0.809017, -0.309017, -0.500000}, 
anorms.h:{0.864188, -0.442863, -0.238856}, 
anorms.h:{0.951056, -0.162460, -0.262866}, 
anorms.h:{0.147621, 0.716567, -0.681718}, 
anorms.h:{0.309017, 0.500000, -0.809017}, 
anorms.h:{0.425325, 0.688191, -0.587785}, 
anorms.h:{0.442863, 0.238856, -0.864188}, 
anorms.h:{0.587785, 0.425325, -0.688191}, 
anorms.h:{0.688191, 0.587785, -0.425325}, 
anorms.h:{-0.147621, 0.716567, -0.681718}, 
anorms.h:{-0.309017, 0.500000, -0.809017}, 
anorms.h:{0.000000, 0.525731, -0.850651}, 
anorms.h:{-0.525731, 0.000000, -0.850651}, 
anorms.h:{-0.442863, 0.238856, -0.864188}, 
anorms.h:{-0.295242, 0.000000, -0.955423}, 
anorms.h:{-0.162460, 0.262866, -0.951056}, 
anorms.h:{0.000000, 0.000000, -1.000000}, 
anorms.h:{0.295242, 0.000000, -0.955423}, 
anorms.h:{0.162460, 0.262866, -0.951056}, 
anorms.h:{-0.442863, -0.238856, -0.864188}, 
anorms.h:{-0.309017, -0.500000, -0.809017}, 
anorms.h:{-0.162460, -0.262866, -0.951056}, 
anorms.h:{0.000000, -0.850651, -0.525731}, 
anorms.h:{-0.147621, -0.716567, -0.681718}, 
anorms.h:{0.147621, -0.716567, -0.681718}, 
anorms.h:{0.000000, -0.525731, -0.850651}, 
anorms.h:{0.309017, -0.500000, -0.809017}, 
anorms.h:{0.442863, -0.238856, -0.864188}, 
anorms.h:{0.162460, -0.262866, -0.951056}, 
anorms.h:{0.238856, -0.864188, -0.442863}, 
anorms.h:{0.500000, -0.809017, -0.309017}, 
anorms.h:{0.425325, -0.688191, -0.587785}, 
anorms.h:{0.716567, -0.681718, -0.147621}, 
anorms.h:{0.688191, -0.587785, -0.425325}, 
anorms.h:{0.587785, -0.425325, -0.688191}, 
anorms.h:{0.000000, -0.955423, -0.295242}, 
anorms.h:{0.000000, -1.000000, 0.000000}, 
anorms.h:{0.262866, -0.951056, -0.162460}, 
anorms.h:{0.000000, -0.850651, 0.525731}, 
anorms.h:{0.000000, -0.955423, 0.295242}, 
anorms.h:{0.238856, -0.864188, 0.442863}, 
anorms.h:{0.262866, -0.951056, 0.162460}, 
anorms.h:{0.500000, -0.809017, 0.309017}, 
anorms.h:{0.716567, -0.681718, 0.147621}, 
anorms.h:{0.525731, -0.850651, 0.000000}, 
anorms.h:{-0.238856, -0.864188, -0.442863}, 
anorms.h:{-0.500000, -0.809017, -0.309017}, 
anorms.h:{-0.262866, -0.951056, -0.162460}, 
anorms.h:{-0.850651, -0.525731, 0.000000}, 
anorms.h:{-0.716567, -0.681718, -0.147621}, 
anorms.h:{-0.716567, -0.681718, 0.147621}, 
anorms.h:{-0.525731, -0.850651, 0.000000}, 
anorms.h:{-0.500000, -0.809017, 0.309017}, 
anorms.h:{-0.238856, -0.864188, 0.442863}, 
anorms.h:{-0.262866, -0.951056, 0.162460}, 
anorms.h:{-0.864188, -0.442863, 0.238856}, 
anorms.h:{-0.809017, -0.309017, 0.500000}, 
anorms.h:{-0.688191, -0.587785, 0.425325}, 
anorms.h:{-0.681718, -0.147621, 0.716567}, 
anorms.h:{-0.442863, -0.238856, 0.864188}, 
anorms.h:{-0.587785, -0.425325, 0.688191}, 
anorms.h:{-0.309017, -0.500000, 0.809017}, 
anorms.h:{-0.147621, -0.716567, 0.681718}, 
anorms.h:{-0.425325, -0.688191, 0.587785}, 
anorms.h:{-0.162460, -0.262866, 0.951056}, 
anorms.h:{0.442863, -0.238856, 0.864188}, 
anorms.h:{0.162460, -0.262866, 0.951056}, 
anorms.h:{0.309017, -0.500000, 0.809017}, 
anorms.h:{0.147621, -0.716567, 0.681718}, 
anorms.h:{0.000000, -0.525731, 0.850651}, 
anorms.h:{0.425325, -0.688191, 0.587785}, 
anorms.h:{0.587785, -0.425325, 0.688191}, 
anorms.h:{0.688191, -0.587785, 0.425325}, 
anorms.h:{-0.955423, 0.295242, 0.000000}, 
anorms.h:{-0.951056, 0.162460, 0.262866}, 
anorms.h:{-1.000000, 0.000000, 0.000000}, 
anorms.h:{-0.850651, 0.000000, 0.525731}, 
anorms.h:{-0.955423, -0.295242, 0.000000}, 
anorms.h:{-0.951056, -0.162460, 0.262866}, 
anorms.h:{-0.864188, 0.442863, -0.238856}, 
anorms.h:{-0.951056, 0.162460, -0.262866}, 
anorms.h:{-0.809017, 0.309017, -0.500000}, 
anorms.h:{-0.864188, -0.442863, -0.238856}, 
anorms.h:{-0.951056, -0.162460, -0.262866}, 
anorms.h:{-0.809017, -0.309017, -0.500000}, 
anorms.h:{-0.681718, 0.147621, -0.716567}, 
anorms.h:{-0.681718, -0.147621, -0.716567}, 
anorms.h:{-0.850651, 0.000000, -0.525731}, 
anorms.h:{-0.688191, 0.587785, -0.425325}, 
anorms.h:{-0.587785, 0.425325, -0.688191}, 
anorms.h:{-0.425325, 0.688191, -0.587785}, 
anorms.h:{-0.425325, -0.688191, -0.587785}, 
anorms.h:{-0.587785, -0.425325, -0.688191}, 
anorms.h:{-0.688191, -0.587785, -0.425325}, 
asm_draw.h:Copyright (C) 1996-1997 Id Software, Inc.
asm_draw.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
asm_i386.h:Copyright (C) 1996-1997 Id Software, Inc.
asm_i386.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
block16.h:Copyright (C) 1996-1997 Id Software, Inc.
block16.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
block8.h:Copyright (C) 1996-1997 Id Software, Inc.
block8.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
bspfile.h:Copyright (C) 1996-1997 Id Software, Inc.
bspfile.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
bspfile.h:// 0-2 are axial planes
bspfile.h:// 3-5 are non-axial planes snapped to the nearest
bspfile.h:	int		type;		// PLANE_X - PLANE_ANYZ ?remove? trivial to regenerate
bspfile.h:#define	CONTENTS_EMPTY		-1
bspfile.h:#define	CONTENTS_SOLID		-2
bspfile.h:#define	CONTENTS_WATER		-3
bspfile.h:#define	CONTENTS_SLIME		-4
bspfile.h:#define	CONTENTS_LAVA		-5
bspfile.h:#define	CONTENTS_SKY		-6
bspfile.h:#define	CONTENTS_ORIGIN		-7		// removed at csg time
bspfile.h:#define	CONTENTS_CLIP		-8		// changed to contents_solid
bspfile.h:#define	CONTENTS_CURRENT_0		-9
bspfile.h:#define	CONTENTS_CURRENT_90		-10
bspfile.h:#define	CONTENTS_CURRENT_180	-11
bspfile.h:#define	CONTENTS_CURRENT_270	-12
bspfile.h:#define	CONTENTS_CURRENT_UP		-13
bspfile.h:#define	CONTENTS_CURRENT_DOWN	-14
bspfile.h:	short		children[2];	// negative numbers are -(leafs+1), not nodes
bspfile.h:	int			visofs;				// -1 = no visibility info
bspfile.h:#define	ANGLE_UP	-1
bspfile.h:#define	ANGLE_DOWN	-2
cd_audio.c:Copyright (C) 1996-1997 Id Software, Inc.
cd_audio.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cd_audio.c:#define MEDIA_CHANGED			-1
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_WRITE;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.write.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.write.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.write.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.write.length = sizeof(struct reset_s);
cd_audio.c:	cdRequest->x.write.startSector = 0;
cd_audio.c:	cdRequest->x.write.volumeID = 0;
cd_audio.c:	readInfo->reset.code = WRITE_REQUEST_RESET;
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_WRITE;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.write.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.write.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.write.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.write.length = sizeof(struct reset_s);
cd_audio.c:	cdRequest->x.write.startSector = 0;
cd_audio.c:	cdRequest->x.write.volumeID = 0;
cd_audio.c:	readInfo->reset.code = WRITE_REQUEST_EJECT;
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_READ;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.read.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.read.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.read.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.read.length = sizeof(struct audioTrackInfo_s);
cd_audio.c:	cdRequest->x.read.startSector = 0;
cd_audio.c:	cdRequest->x.read.volumeID = 0;
cd_audio.c:	readInfo->audioTrackInfo.code = READ_REQUEST_AUDIO_TRACK_INFO;
cd_audio.c:	readInfo->audioTrackInfo.track = track;
cd_audio.c:	if (cdRequest->status & STATUS_ERROR_BIT)
cd_audio.c:		Con_DPrintf("CDAudio_GetAudioTrackInfo %04x\n", cdRequest->status & 	0xffff);
cd_audio.c:		return -1;
cd_audio.c:	*start = readInfo->audioTrackInfo.start;
cd_audio.c:	control = readInfo->audioTrackInfo.control & AUDIO_CONTROL_MASK;
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_READ;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.read.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.read.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.read.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.read.length = sizeof(struct audioDiskInfo_s);
cd_audio.c:	cdRequest->x.read.startSector = 0;
cd_audio.c:	cdRequest->x.read.volumeID = 0;
cd_audio.c:	readInfo->audioDiskInfo.code = READ_REQUEST_AUDIO_DISK_INFO;
cd_audio.c:	if (cdRequest->status & STATUS_ERROR_BIT)
cd_audio.c:		Con_DPrintf("CDAudio_GetAudioDiskInfo %04x\n", cdRequest->status & 	0xffff);
cd_audio.c:		return -1;
cd_audio.c:	cd.lowTrack = readInfo->audioDiskInfo.lowTrack;
cd_audio.c:	cd.highTrack = readInfo->audioDiskInfo.highTrack;
cd_audio.c:	cd.leadOutAddress = readInfo->audioDiskInfo.leadOutStart;
cd_audio.c:			cd.track[n-1].length = RedBookToSector(cd.track[n].start) - RedBookToSector(cd.track[n-1].start);
cd_audio.c:				cd.track[n].length = RedBookToSector(cd.leadOutAddress) - RedBookToSector(cd.track[n].start);
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_READ;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.read.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.read.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.read.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.read.length = sizeof(struct audioStatus_s);
cd_audio.c:	cdRequest->x.read.startSector = 0;
cd_audio.c:	cdRequest->x.read.volumeID = 0;
cd_audio.c:	readInfo->audioDiskInfo.code = READ_REQUEST_AUDIO_STATUS;
cd_audio.c:	if (cdRequest->status & STATUS_ERROR_BIT)
cd_audio.c:		return -1;
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_READ;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.read.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.read.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.read.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.read.length = sizeof(struct mediaChange_s);
cd_audio.c:	cdRequest->x.read.startSector = 0;
cd_audio.c:	cdRequest->x.read.volumeID = 0;
cd_audio.c:	readInfo->mediaChange.code = READ_REQUEST_MEDIA_CHANGE;
cd_audio.c:	return readInfo->mediaChange.status;
cd_audio.c:// some cd-rom drivers seem to need it done this way
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_WRITE;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.read.mediaDescriptor = 0;
cd_audio.c:	cdRequest->x.read.bufferOffset = readInfoOffset;
cd_audio.c:	cdRequest->x.read.bufferSegment = readInfoSegment;
cd_audio.c:	cdRequest->x.read.length = sizeof(struct audioChannelInfo_s);
cd_audio.c:	cdRequest->x.read.startSector = 0;
cd_audio.c:	cdRequest->x.read.volumeID = 0;
cd_audio.c:	readInfo->audioChannelInfo.code = WRITE_REQUEST_AUDIO_CHANNEL_INFO;
cd_audio.c:	readInfo->audioChannelInfo.channel0input = 0;
cd_audio.c:	readInfo->audioChannelInfo.channel0volume = 0;
cd_audio.c:	readInfo->audioChannelInfo.channel1input = 1;
cd_audio.c:	readInfo->audioChannelInfo.channel1volume = 0;
cd_audio.c:	readInfo->audioChannelInfo.channel2input = 2;
cd_audio.c:	readInfo->audioChannelInfo.channel2volume = 0;
cd_audio.c:	readInfo->audioChannelInfo.channel3input = 3;
cd_audio.c:	readInfo->audioChannelInfo.channel3volume = 0;
cd_audio.c:	readInfo->audioChannelInfo.channel0volume = volume;
cd_audio.c:	readInfo->audioChannelInfo.channel1volume = volume;
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_PLAY_AUDIO;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->x.playAudio.addressingMode = ADDRESS_MODE_RED_BOOK;
cd_audio.c:	cdRequest->x.playAudio.startLocation = cd.track[track].start;
cd_audio.c:	cdRequest->x.playAudio.sectors = cd.track[track].length;
cd_audio.c:	if (cdRequest->status & STATUS_ERROR_BIT)
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_STOP_AUDIO;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:	cdRequest->headerLength = 13;
cd_audio.c:	cdRequest->unit = 0;
cd_audio.c:	cdRequest->command = COMMAND_RESUME_AUDIO;
cd_audio.c:	cdRequest->status = 0;
cd_audio.c:		ret = Cmd_Argc() - 2;
cd_audio.c:					Con_Printf("  %u -> %u\n", n, remap[n]);
cd_audio.c:		Con_Printf("%u tracks\n", cd.highTrack - cd.lowTrack + 1);
cd_audio.c:		Con_Printf("Status %04x\n", cdRequest->status & 0xffff);
cd_audio.c:	if ((realtime - lastUpdate) < 0.25)
cd_audio.c:		if ((realtime - lastCheck) < 5.0)
cd_audio.c:		if ((cdRequest->status & STATUS_BUSY_BIT) == 0)
cd_audio.c:		return -1;
cd_audio.c:	if (COM_CheckParm("-nocdaudio"))
cd_audio.c:		return -1;
cd_audio.c:	if (COM_CheckParm("-cdmediacheck"))
cd_audio.c:			"disabled.  Use \"-nocdaudio\" if you\n"
cd_audio.c:		return -1;
cd_audio.c:		Con_DPrintf("CDAudio_Init: First CD-ROM drive will be used\n");
cd_audio.c:		return -1;
cd_audio.c:		return -1;
cd_linux.c:Copyright (C) 1996-1997 Id Software, Inc.
cd_linux.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cd_linux.c:static int cdfile = -1;
cd_linux.c:	if (cdfile == -1 || !enabled)
cd_linux.c:	if ( ioctl(cdfile, CDROMEJECT) == -1 ) 
cd_linux.c:	if (cdfile == -1 || !enabled)
cd_linux.c:	if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 ) 
cd_linux.c:	if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 ) 
cd_linux.c:	  return -1;
cd_linux.c:		return -1;
cd_linux.c:	if (cdfile == -1 || !enabled)
cd_linux.c:	// don't try to play a non-audio track
cd_linux.c:    if ( ioctl(cdfile, CDROMREADTOCENTRY, &entry) == -1 )
cd_linux.c:	if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 ) 
cd_linux.c:	if ( ioctl(cdfile, CDROMRESUME) == -1 ) 
cd_linux.c:	if (cdfile == -1 || !enabled)
cd_linux.c:	if ( ioctl(cdfile, CDROMSTOP) == -1 )
cd_linux.c:	if (cdfile == -1 || !enabled)
cd_linux.c:	if ( ioctl(cdfile, CDROMPAUSE) == -1 ) 
cd_linux.c:	if (cdfile == -1 || !enabled)
cd_linux.c:	if ( ioctl(cdfile, CDROMRESUME) == -1 ) 
cd_linux.c:		ret = Cmd_Argc() - 2;
cd_linux.c:					Con_Printf("  %u -> %u\n", n, remap[n]);
cd_linux.c:		if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) {
cd_linux.c:		return -1;
cd_linux.c:	if (COM_CheckParm("-nocdaudio"))
cd_linux.c:		return -1;
cd_linux.c:	if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) {
cd_linux.c:		cd_dev[sizeof(cd_dev) - 1] = 0;
cd_linux.c:	if ((cdfile = open(cd_dev, O_RDONLY)) == -1) {
cd_linux.c:		cdfile = -1;
cd_linux.c:		return -1;
cd_linux.c:	cdfile = -1;
cd_null.c:Copyright (C) 1996-1997 Id Software, Inc.
cd_null.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cd_win.c:Copyright (C) 1996-1997 Id Software, Inc.
cd_win.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cd_win.c:		Con_DPrintf("CDAudio: drive ready test - get status failed\n");
cd_win.c:		return -1;
cd_win.c:		return -1;
cd_win.c:		Con_DPrintf("CDAudio: get tracks - status failed\n");
cd_win.c:		return -1;
cd_win.c:		return -1;
cd_win.c:	// don't try to play a non-audio track
cd_win.c:		ret = Cmd_Argc() - 2;
cd_win.c:					Con_Printf("  %u -> %u\n", n, remap[n]);
cd_win.c:		return -1;
cd_win.c:	if (COM_CheckParm("-nocdaudio"))
cd_win.c:		return -1;
cd_win.c:		return -1;
cd_win.c:		return -1;
cdaudio.h:Copyright (C) 1996-1997 Id Software, Inc.
cdaudio.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
chase.c:Copyright (C) 1996-1997 Id Software, Inc.
chase.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
chase.c:// chase.c -- chase camera code
chase.c:	SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
chase.c:		- forward[i]*chase_back.value
chase.c:		- right[i]*chase_right.value;
chase.c:	r_refdef.viewangles[PITCH] = -atan(stop[2] / dist) / M_PI * 180;
cl_demo.c:Copyright (C) 1996-1997 Id Software, Inc.
cl_demo.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cl_demo.c:			Con_Printf ("<-- server to client keepalive\n");
cl_demo.c:		Con_Printf("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
cl_demo.c:// write the forced cd track number, or -1
cl_demo.c:		track = -1;	
cl_demo.c:		cls.demonum = -1;		// stop demo loop
cl_demo.c:		if (c == '-')
cl_demo.c:			cls.forcetrack = cls.forcetrack * 10 + (c - '0');
cl_demo.c:		cls.forcetrack = -cls.forcetrack;
cl_demo.c:	frames = (host_framecount - cls.td_startframe) - 1;
cl_demo.c:	time = realtime - cls.td_starttime;
cl_demo.c:	cls.td_lastframe = -1;		// get a new message this frame
cl_input.c:Copyright (C) 1996-1997 Id Software, Inc.
cl_input.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cl_input.c:// cl.input.c  -- builds an intended movement command to send to the server
cl_input.c:		k = -1;		// typed manually at the console for continuous down
cl_input.c:	if (k == b->down[0] || k == b->down[1])
cl_input.c:	if (!b->down[0])
cl_input.c:		b->down[0] = k;
cl_input.c:	else if (!b->down[1])
cl_input.c:		b->down[1] = k;
cl_input.c:	if (b->state & 1)
cl_input.c:	b->state |= 1 + 2;	// down + impulse down
cl_input.c:		b->down[0] = b->down[1] = 0;
cl_input.c:		b->state = 4;	// impulse up
cl_input.c:	if (b->down[0] == k)
cl_input.c:		b->down[0] = 0;
cl_input.c:	else if (b->down[1] == k)
cl_input.c:		b->down[1] = 0;
cl_input.c:	if (b->down[0] || b->down[1])
cl_input.c:	if (!(b->state & 1))
cl_input.c:	b->state &= ~1;		// now up
cl_input.c:	b->state |= 4; 		// impulse up
cl_input.c:	impulsedown = key->state & 2;
cl_input.c:	impulseup = key->state & 4;
cl_input.c:	down = key->state & 1;
cl_input.c:			val = 0.75;	// released and re-pressed this frame
cl_input.c:	key->state &= 1;		// clear impulses
cl_input.c:		cl.viewangles[YAW] -= speed*cl_yawspeed.value*CL_KeyState (&in_right);
cl_input.c:		cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * CL_KeyState (&in_forward);
cl_input.c:	cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * up;
cl_input.c:	if (cl.viewangles[PITCH] < -70)
cl_input.c:		cl.viewangles[PITCH] = -70;
cl_input.c:	if (cl.viewangles[ROLL] < -50)
cl_input.c:		cl.viewangles[ROLL] = -50;
cl_input.c:		cmd->sidemove += cl_sidespeed.value * CL_KeyState (&in_right);
cl_input.c:		cmd->sidemove -= cl_sidespeed.value * CL_KeyState (&in_left);
cl_input.c:	cmd->sidemove += cl_sidespeed.value * CL_KeyState (&in_moveright);
cl_input.c:	cmd->sidemove -= cl_sidespeed.value * CL_KeyState (&in_moveleft);
cl_input.c:	cmd->upmove += cl_upspeed.value * CL_KeyState (&in_up);
cl_input.c:	cmd->upmove -= cl_upspeed.value * CL_KeyState (&in_down);
cl_input.c:		cmd->forwardmove += cl_forwardspeed.value * CL_KeyState (&in_forward);
cl_input.c:		cmd->forwardmove -= cl_backspeed.value * CL_KeyState (&in_back);
cl_input.c:		cmd->forwardmove *= cl_movespeedkey.value;
cl_input.c:		cmd->sidemove *= cl_movespeedkey.value;
cl_input.c:		cmd->upmove *= cl_movespeedkey.value;
cl_input.c:	cmd->lightlevel = cl.light_level;
cl_input.c:    MSG_WriteShort (&buf, cmd->forwardmove);
cl_input.c:    MSG_WriteShort (&buf, cmd->sidemove);
cl_input.c:    MSG_WriteShort (&buf, cmd->upmove);
cl_input.c:	MSG_WriteByte (&buf, cmd->lightlevel);
cl_input.c:	if (NET_SendUnreliableMessage (cls.netcon, &buf) == -1)
cl_input.c:	Cmd_AddCommand ("-moveup",IN_UpUp);
cl_input.c:	Cmd_AddCommand ("-movedown",IN_DownUp);
cl_input.c:	Cmd_AddCommand ("-left",IN_LeftUp);
cl_input.c:	Cmd_AddCommand ("-right",IN_RightUp);
cl_input.c:	Cmd_AddCommand ("-forward",IN_ForwardUp);
cl_input.c:	Cmd_AddCommand ("-back",IN_BackUp);
cl_input.c:	Cmd_AddCommand ("-lookup", IN_LookupUp);
cl_input.c:	Cmd_AddCommand ("-lookdown", IN_LookdownUp);
cl_input.c:	Cmd_AddCommand ("-strafe", IN_StrafeUp);
cl_input.c:	Cmd_AddCommand ("-moveleft", IN_MoveleftUp);
cl_input.c:	Cmd_AddCommand ("-moveright", IN_MoverightUp);
cl_input.c:	Cmd_AddCommand ("-speed", IN_SpeedUp);
cl_input.c:	Cmd_AddCommand ("-attack", IN_AttackUp);
cl_input.c:	Cmd_AddCommand ("-use", IN_UseUp);
cl_input.c:	Cmd_AddCommand ("-jump", IN_JumpUp);
cl_input.c:	Cmd_AddCommand ("-klook", IN_KLookUp);
cl_input.c:	Cmd_AddCommand ("-mlook", IN_MLookUp);
cl_main.c:Copyright (C) 1996-1997 Id Software, Inc.
cl_main.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cl_main.c:// cl_main.c  -- client main loop
cl_main.c:	for (i=0 ; i<MAX_EFRAGS-1 ; i++)
cl_main.c:	cls.demonum = -1;			// not in the demo loop now
cl_main.c:	if (cls.demonum == -1)
cl_main.c:			cls.demonum = -1;
cl_main.c:		if (!ent->model)
cl_main.c:		,ent->model->name,ent->frame, ent->origin[0], ent->origin[1], ent->origin[2], ent->angles[0], ent->angles[1], ent->angles[2]);
cl_main.c:			if (dl->key == key)
cl_main.c:				dl->key = key;
cl_main.c:		if (dl->die < cl.time)
cl_main.c:			dl->key = key;
cl_main.c:	dl->key = key;
cl_main.c:	time = cl.time - cl.oldtime;
cl_main.c:		if (dl->die < cl.time || !dl->radius)
cl_main.c:		dl->radius -= time*dl->decay;
cl_main.c:		if (dl->radius < 0)
cl_main.c:			dl->radius = 0;
cl_main.c:	f = cl.mtime[0] - cl.mtime[1];
cl_main.c:		cl.mtime[1] = cl.mtime[0] - 0.1;
cl_main.c:	frac = (cl.time - cl.mtime[1]) / f;
cl_main.c:		if (frac < -0.01)
cl_main.c:			frac * (cl.mvelocity[0][i] - cl.mvelocity[1][i]);
cl_main.c:			d = cl.mviewangles[0][j] - cl.mviewangles[1][j];
cl_main.c:				d -= 360;
cl_main.c:			else if (d < -180)
cl_main.c:		if (!ent->model)
cl_main.c:			if (ent->forcelink)
cl_main.c:		if (ent->msgtime != cl.mtime[0])
cl_main.c:			ent->model = NULL;
cl_main.c:		VectorCopy (ent->origin, oldorg);
cl_main.c:		if (ent->forcelink)
cl_main.c:			VectorCopy (ent->msg_origins[0], ent->origin);
cl_main.c:			VectorCopy (ent->msg_angles[0], ent->angles);
cl_main.c:				delta[j] = ent->msg_origins[0][j] - ent->msg_origins[1][j];
cl_main.c:				if (delta[j] > 100 || delta[j] < -100)
cl_main.c:				ent->origin[j] = ent->msg_origins[1][j] + f*delta[j];
cl_main.c:				d = ent->msg_angles[0][j] - ent->msg_angles[1][j];
cl_main.c:					d -= 360;
cl_main.c:				else if (d < -180)
cl_main.c:				ent->angles[j] = ent->msg_angles[1][j] + f*d;
cl_main.c:		if (ent->model->flags & EF_ROTATE)
cl_main.c:			ent->angles[1] = bobjrotate;
cl_main.c:		if (ent->effects & EF_BRIGHTFIELD)
cl_main.c:		if (ent->effects & EF_DARKFIELD)
cl_main.c:		if (ent->effects & EF_MUZZLEFLASH)
cl_main.c:			VectorCopy (ent->origin,  dl->origin);
cl_main.c:			dl->origin[2] += 16;
cl_main.c:			AngleVectors (ent->angles, fv, rv, uv);
cl_main.c:			VectorMA (dl->origin, 18, fv, dl->origin);
cl_main.c:			dl->radius = 200 + (rand()&31);
cl_main.c:			dl->minlight = 32;
cl_main.c:			dl->die = cl.time + 0.1;
cl_main.c:		if (ent->effects & EF_BRIGHTLIGHT)
cl_main.c:			VectorCopy (ent->origin,  dl->origin);
cl_main.c:			dl->origin[2] += 16;
cl_main.c:			dl->radius = 400 + (rand()&31);
cl_main.c:			dl->die = cl.time + 0.001;
cl_main.c:		if (ent->effects & EF_DIMLIGHT)
cl_main.c:			VectorCopy (ent->origin,  dl->origin);
cl_main.c:			dl->radius = 200 + (rand()&31);
cl_main.c:			dl->die = cl.time + 0.001;
cl_main.c:		if (ent->effects & EF_DARKLIGHT)
cl_main.c:			VectorCopy (ent->origin,  dl->origin);
cl_main.c:			dl->radius = 200.0 + (rand()&31);
cl_main.c:			dl->die = cl.time + 0.001;
cl_main.c:			dl->dark = true;
cl_main.c:		if (ent->effects & EF_LIGHT)
cl_main.c:			VectorCopy (ent->origin,  dl->origin);
cl_main.c:			dl->radius = 200;
cl_main.c:			dl->die = cl.time + 0.001;
cl_main.c:		if (ent->model->flags & EF_GIB)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 2);
cl_main.c:		else if (ent->model->flags & EF_ZOMGIB)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 4);
cl_main.c:		else if (ent->model->flags & EF_TRACER)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 3);
cl_main.c:		else if (ent->model->flags & EF_TRACER2)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 5);
cl_main.c:		else if (ent->model->flags & EF_ROCKET)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 0);
cl_main.c:			VectorCopy (ent->origin, dl->origin);
cl_main.c:			dl->radius = 200;
cl_main.c:			dl->die = cl.time + 0.01;
cl_main.c:		else if (ent->model->flags & EF_GRENADE)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 1);
cl_main.c:		else if (ent->model->flags & EF_TRACER3)
cl_main.c:			R_RocketTrail (oldorg, ent->origin, 6);
cl_main.c:		ent->forcelink = false;
cl_main.c:		if ( ent->effects & EF_NODRAW )
cl_main.c:		if (ret == -1)
cl_main.c:	if (NET_SendMessage (cls.netcon, &cls.message) == -1)
cl_parse.c:Copyright (C) 1996-1997 Id Software, Inc.
cl_parse.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cl_parse.c:// cl_parse.c  -- parse a message received from the server
cl_parse.c:	if (time - lastmsg < 5)
cl_parse.c:	Con_Printf ("--> client to server keepalive\n");
cl_parse.c:	strncpy (cl.levelname, str, sizeof(cl.levelname)-1);
cl_parse.c:	if (cls.signon == SIGNONS - 1)
cl_parse.c:	if (ent->msgtime != cl.mtime[1])
cl_parse.c:	ent->msgtime = cl.mtime[0];
cl_parse.c:		modnum = ent->baseline.modelindex;
cl_parse.c:	if (model != ent->model)
cl_parse.c:		ent->model = model;
cl_parse.c:			if (model->synctype == ST_RAND)
cl_parse.c:				ent->syncbase = (float)(rand()&0x7fff) / 0x7fff;
cl_parse.c:				ent->syncbase = 0.0;
cl_parse.c:			R_TranslatePlayerSkin (num - 1);
cl_parse.c:		ent->frame = MSG_ReadByte ();
cl_parse.c:		ent->frame = ent->baseline.frame;
cl_parse.c:		i = ent->baseline.colormap;
cl_parse.c:		ent->colormap = vid.colormap;
cl_parse.c:		ent->colormap = cl.scores[i-1].translations;
cl_parse.c:		skin = ent->baseline.skin;
cl_parse.c:	if (skin != ent->skinnum) {
cl_parse.c:		ent->skinnum = skin;
cl_parse.c:			R_TranslatePlayerSkin (num - 1);
cl_parse.c:		ent->skinnum = MSG_ReadByte();
cl_parse.c:		ent->skinnum = ent->baseline.skin;
cl_parse.c:		ent->effects = MSG_ReadByte();
cl_parse.c:		ent->effects = ent->baseline.effects;
cl_parse.c:	VectorCopy (ent->msg_origins[0], ent->msg_origins[1]);
cl_parse.c:	VectorCopy (ent->msg_angles[0], ent->msg_angles[1]);
cl_parse.c:		ent->msg_origins[0][0] = MSG_ReadCoord ();
cl_parse.c:		ent->msg_origins[0][0] = ent->baseline.origin[0];
cl_parse.c:		ent->msg_angles[0][0] = MSG_ReadAngle();
cl_parse.c:		ent->msg_angles[0][0] = ent->baseline.angles[0];
cl_parse.c:		ent->msg_origins[0][1] = MSG_ReadCoord ();
cl_parse.c:		ent->msg_origins[0][1] = ent->baseline.origin[1];
cl_parse.c:		ent->msg_angles[0][1] = MSG_ReadAngle();
cl_parse.c:		ent->msg_angles[0][1] = ent->baseline.angles[1];
cl_parse.c:		ent->msg_origins[0][2] = MSG_ReadCoord ();
cl_parse.c:		ent->msg_origins[0][2] = ent->baseline.origin[2];
cl_parse.c:		ent->msg_angles[0][2] = MSG_ReadAngle();
cl_parse.c:		ent->msg_angles[0][2] = ent->baseline.angles[2];
cl_parse.c:		ent->forcelink = true;
cl_parse.c:		VectorCopy (ent->msg_origins[0], ent->msg_origins[1]);
cl_parse.c:		VectorCopy (ent->msg_origins[0], ent->origin);
cl_parse.c:		VectorCopy (ent->msg_angles[0], ent->msg_angles[1]);
cl_parse.c:		VectorCopy (ent->msg_angles[0], ent->angles);
cl_parse.c:		ent->forcelink = true;
cl_parse.c:	ent->baseline.modelindex = MSG_ReadByte ();
cl_parse.c:	ent->baseline.frame = MSG_ReadByte ();
cl_parse.c:	ent->baseline.colormap = MSG_ReadByte();
cl_parse.c:	ent->baseline.skin = MSG_ReadByte();
cl_parse.c:		ent->baseline.origin[i] = MSG_ReadCoord ();
cl_parse.c:		ent->baseline.angles[i] = MSG_ReadAngle ();
cl_parse.c:				dest[TOP_RANGE+j] = source[top+15-j];
cl_parse.c:				dest[BOTTOM_RANGE+j] = source[bottom+15-j];		
cl_parse.c:	ent->model = cl.model_precache[ent->baseline.modelindex];
cl_parse.c:	ent->frame = ent->baseline.frame;
cl_parse.c:	ent->colormap = vid.colormap;
cl_parse.c:	ent->skinnum = ent->baseline.skin;
cl_parse.c:	ent->effects = ent->baseline.effects;
cl_parse.c:	VectorCopy (ent->baseline.origin, ent->origin);
cl_parse.c:	VectorCopy (ent->baseline.angles, ent->angles);	
cl_parse.c:#define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
cl_parse.c:		Con_Printf ("------------------\n");
cl_parse.c:		if (cmd == -1)
cl_parse.c:			if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) )
cl_tent.c:Copyright (C) 1996-1997 Id Software, Inc.
cl_tent.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cl_tent.c:// cl_tent.c -- client side temporary entities
cl_tent.c:		if (b->entity == ent)
cl_tent.c:			b->entity = ent;
cl_tent.c:			b->model = m;
cl_tent.c:			b->endtime = cl.time + 0.2;
cl_tent.c:			VectorCopy (start, b->start);
cl_tent.c:			VectorCopy (end, b->end);
cl_tent.c:		if (!b->model || b->endtime < cl.time)
cl_tent.c:			b->entity = ent;
cl_tent.c:			b->model = m;
cl_tent.c:			b->endtime = cl.time + 0.2;
cl_tent.c:			VectorCopy (start, b->start);
cl_tent.c:			VectorCopy (end, b->end);
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_wizhit, pos, 1, 1);
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_knighthit, pos, 1, 1);
cl_tent.c:			S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
cl_tent.c:				S_StartSound (-1, 0, cl_sfx_ric1, pos, 1, 1);
cl_tent.c:				S_StartSound (-1, 0, cl_sfx_ric2, pos, 1, 1);
cl_tent.c:				S_StartSound (-1, 0, cl_sfx_ric3, pos, 1, 1);
cl_tent.c:			S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1);
cl_tent.c:				S_StartSound (-1, 0, cl_sfx_ric1, pos, 1, 1);
cl_tent.c:				S_StartSound (-1, 0, cl_sfx_ric2, pos, 1, 1);
cl_tent.c:				S_StartSound (-1, 0, cl_sfx_ric3, pos, 1, 1);
cl_tent.c:		VectorCopy (pos, dl->origin);
cl_tent.c:		dl->radius = 350;
cl_tent.c:		dl->die = cl.time + 0.5;
cl_tent.c:		dl->decay = 300;
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
cl_tent.c:		VectorCopy (pos, dl->origin);
cl_tent.c:		dl->radius = 350;
cl_tent.c:		dl->die = cl.time + 0.5;
cl_tent.c:		dl->decay = 300;
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_imp, pos, 1, 1);
cl_tent.c:		S_StartSound (-1, 0, cl_sfx_rail, pos, 1, 1);
cl_tent.c:		S_StartSound (-1, 1, cl_sfx_r_exp3, endpos, 1, 1);
cl_tent.c:		dl = CL_AllocDlight (-1);
cl_tent.c:		VectorCopy (endpos, dl->origin);
cl_tent.c:		dl->radius = 350;
cl_tent.c:		dl->die = cl.time + 0.5;
cl_tent.c:		dl->decay = 300;
cl_tent.c:	ent->colormap = vid.colormap;
cl_tent.c:		if (!b->model || b->endtime < cl.time)
cl_tent.c:		if (b->entity == cl.viewentity)
cl_tent.c:			VectorCopy (cl_entities[cl.viewentity].origin, b->start);
cl_tent.c:		VectorSubtract (b->end, b->start, dist);
cl_tent.c:		VectorCopy (b->start, org);
cl_tent.c:			VectorCopy (org, ent->origin);
cl_tent.c:			ent->model = b->model;
cl_tent.c:			ent->angles[0] = pitch;
cl_tent.c:			ent->angles[1] = yaw;
cl_tent.c:			ent->angles[2] = rand()%360;
cl_tent.c:			d -= 30;
client.h:Copyright (C) 1996-1997 Id Software, Inc.
client.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
client.h:	int		percent;		// 0-256
client.h:	int			demonum;		// -1 = don't play demos
client.h:	int			forcetrack;			// -1 = use normal cd track
client.h:	double		oldtime;		// previous cl.time, time-oldtime is used
cmd.c:Copyright (C) 1996-1997 Id Software, Inc.
cmd.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cmd.c:// cmd.c -- Quake script command processing module
cmd.c:bind g "impulse 5 ; +attack ; wait ; -attack ; impulse 2"
cmd.c:			cmd_text.cursize -= i;
cmd.c:Commands lead with a +, and continue until a - or another +
cmd.c:quake -nosound +cmd amlev1
cmd.c:			continue;		// NEXTSTEP nulls out -NXHost
cmd.c:			continue;		// NEXTSTEP nulls out -NXHost
cmd.c:		if (i != com_argc-1)
cmd.c:	for (i=0 ; i<s-1 ; i++)
cmd.c:			for (j=i ; (text[j] != '+') && (text[j] != '-') && (text[j] != 0) ; j++)
cmd.c:			i = j-1;
cmd.c:		for (a = cmd_alias ; a ; a=a->next)
cmd.c:			Con_Printf ("%s : %s\n", a->name, a->value);
cmd.c:	for (a = cmd_alias ; a ; a=a->next)
cmd.c:		if (!strcmp(s, a->name))
cmd.c:			Z_Free (a->value);
cmd.c:		a->next = cmd_alias;
cmd.c:	strcpy (a->name, s);	
cmd.c:	a->value = CopyString (cmd);
cmd.c:	for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
cmd.c:		if (!Q_strcmp (cmd_name, cmd->name))
cmd.c:	cmd->name = cmd_name;
cmd.c:	cmd->function = function;
cmd.c:	cmd->next = cmd_functions;
cmd.c:	for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
cmd.c:		if (!Q_strcmp (cmd_name,cmd->name))
cmd.c:	for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
cmd.c:		if (!Q_strncmp (partial,cmd->name, len))
cmd.c:			return cmd->name;
cmd.c:	for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
cmd.c:		if (!Q_strcasecmp (cmd_argv[0],cmd->name))
cmd.c:			cmd->function ();
cmd.c:	for (a=cmd_alias ; a ; a=a->next)
cmd.c:		if (!Q_strcasecmp (cmd_argv[0], a->name))
cmd.c:			Cbuf_InsertText (a->value);
cmd.c:Returns the position (1 to argc-1) in the command's argument list
cmd.h:Copyright (C) 1996-1997 Id Software, Inc.
cmd.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cmd.h:// cmd.h -- Command buffer and command execution
cmd.h:// Returns the position (1 to argc-1) in the command's argument list
common.c:Copyright (C) 1996-1997 Id Software, Inc.
common.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
common.c:// common.c -- misc functions used in client and server
common.c:	{"-stdvid", "-nolan", "-nosound", "-nocdaudio", "-nojoy", "-nomouse", "-dibonly"};
common.c:qboolean        com_modified;   // set true if using non-id files
common.c:The "base directory" is the path to the directory holding the quake.exe and all game directories.  The sys_* files pass this to host_init in quakeparms_t->basedir.  This can be overridden with the "-basedir" command line parm to allow code debugging in a different directory.  The base directory is
common.c:The "game directory" is the first tree on the search path and directory that all generated files (savegames, screenshots, demos, config files) will be saved to.  This can be overridden with the "-game" command line parameter.  The game directory can never be changed while quake is executing.  This is a precacution against having a malicious server instruct clients to write files over areas they shouldn't.
common.c:The file "parms.txt" will be read out of the game directory and appended to the current command line arguments to allow different games to initialize startup parms differently.  This could be used to add a "-sspeed 22050" for the high quality sound edition.  Because they are added at the end, they will not override an explicit setting on the original command line.
common.c:	l->prev = l->next = l;
common.c:	l->next->prev = l->prev;
common.c:	l->prev->next = l->next;
common.c:	l->next = before;
common.c:	l->prev = before->prev;
common.c:	l->prev->next = l;
common.c:	l->next->prev = l;
common.c:	l->next = after->next;
common.c:	l->prev = after;
common.c:	l->prev->next = l;
common.c:	l->next->prev = l;
common.c:		count--;
common.c:			return -1;
common.c:	while (*src && count--)
common.c:    while (len--)
common.c:	if (*--s == c) return s;
common.c:			return -1;              // strings not equal    
common.c:	return -1;
common.c:		if (!count--)
common.c:			return -1;              // strings not equal    
common.c:	return -1;
common.c:		if (!n--)
common.c:				c1 -= ('a' - 'A');
common.c:				c2 -= ('a' - 'A');
common.c:				return -1;              // strings not equal
common.c:	return -1;
common.c:	if (*str == '-')
common.c:		sign = -1;
common.c:				val = (val<<4) + c - '0';
common.c:				val = (val<<4) + c - 'a' + 10;
common.c:				val = (val<<4) + c - 'A' + 10;
common.c:		val = val*10 + c - '0';
common.c:	if (*str == '-')
common.c:		sign = -1;
common.c:				val = (val*16) + c - '0';
common.c:				val = (val*16) + c - 'a' + 10;
common.c:				val = (val*16) + c - 'A' + 10;
common.c:	decimal = -1;
common.c:		val = val*10 + c - '0';
common.c:	if (decimal == -1)
common.c:		total--;
common.c:	if (c < -128 || c > 127)
common.c:// returns -1 and sets msg_badread if no more characters are available
common.c:		return -1;
common.c:		return -1;
common.c:		return -1;
common.c:		return -1;
common.c:		if (c == -1 || c == 0)
common.c:	} while (l < sizeof(string)-1);
common.c:	buf->data = Hunk_AllocName (startsize, "sizebuf");
common.c:	buf->maxsize = startsize;
common.c:	buf->cursize = 0;
common.c://      Z_Free (buf->data);
common.c://      buf->data = NULL;
common.c://      buf->maxsize = 0;
common.c:	buf->cursize = 0;
common.c:	buf->cursize = 0;
common.c:	if (buf->cursize + length > buf->maxsize)
common.c:		if (!buf->allowoverflow)
common.c:		if (length > buf->maxsize)
common.c:		buf->overflowed = true;
common.c:	data = buf->data + buf->cursize;
common.c:	buf->cursize += length;
common.c:	if (buf->data[buf->cursize-1])
common.c:		Q_memcpy ((byte *)SZ_GetSpace(buf, len-1)-1,data,len); // write over trailing 0
common.c:	s = in + strlen(in) - 1;
common.c:		s--;
common.c:	for (s2 = s ; *s2 && *s2 != '/' ; s2--)
common.c:	if (s-s2 < 2)
common.c:		s--;
common.c:		strncpy (out,s2+1, s-s2);
common.c:		out[s-s2] = 0;
common.c:	src = path + strlen(path) - 1;
common.c:		src--;
common.c:Returns the position (1 to argc-1) in the program's argument list
common.c:	if (h == -1)
common.c:		while ((n < (CMDLINE_LENGTH - 1)) && argv[j][i])
common.c:		if (n < (CMDLINE_LENGTH - 1))
common.c:		if (!Q_strcmp ("-safe", argv[com_argc]))
common.c:	// force all the safe-mode switches. Note that we reserved extra space in
common.c:	if (COM_CheckParm ("-rogue"))
common.c:	if (COM_CheckParm ("-hipnotic"))
common.c:	return -1;
common.c:	for (s=com_searchpaths ; s ; s=s->next)
common.c:		if (s->pack)
common.c:			Con_Printf ("%s (%i files)\n", s->pack->filename, s->pack->numfiles);
common.c:			Con_Printf ("%s\n", s->filename);
common.c:	if (handle == -1)
common.c:		remaining -= count;
common.c:			search = search->next;
common.c:	for ( ; search ; search = search->next)
common.c:		if (search->pack)
common.c:			pak = search->pack;
common.c:			for (i=0 ; i<pak->numfiles ; i++)
common.c:				if (!strcmp (pak->files[i].name, filename))
common.c:					Sys_Printf ("PackFile: %s : %s\n",pak->filename, filename);
common.c:						*handle = pak->handle;
common.c:						Sys_FileSeek (pak->handle, pak->files[i].filepos);
common.c:						*file = fopen (pak->filename, "rb");
common.c:							fseek (*file, pak->files[i].filepos, SEEK_SET);
common.c:					com_filesize = pak->files[i].filelen;
common.c:			sprintf (netpath, "%s/%s",search->filename, filename);
common.c:			if (findtime == -1)
common.c:		*handle = -1;
common.c:	com_filesize = -1;
common.c:	return -1;
common.c:	for (s = com_searchpaths ; s ; s=s->next)
common.c:		if (s->pack && s->pack->handle == h)
common.c:	if (h == -1)
common.c:	if (Sys_FileOpenRead (packfile, &packhandle) == -1)
common.c:	strcpy (pack->filename, packfile);
common.c:	pack->handle = packhandle;
common.c:	pack->numfiles = numpackfiles;
common.c:	pack->files = newfiles;
common.c:	strcpy (search->filename, dir);
common.c:	search->next = com_searchpaths;
common.c:		search->pack = pak;
common.c:		search->next = com_searchpaths;
common.c:// -basedir <path>
common.c:	i = COM_CheckParm ("-basedir");
common.c:	if (i && i < com_argc-1)
common.c:		if ((basedir[j-1] == '\\') || (basedir[j-1] == '/'))
common.c:			basedir[j-1] = 0;
common.c:// -cachedir <path>
common.c:// -cachedir - will disable caching.
common.c:	i = COM_CheckParm ("-cachedir");
common.c:	if (i && i < com_argc-1)
common.c:		if (com_argv[i+1][0] == '-')
common.c:	if (COM_CheckParm ("-rogue"))
common.c:	if (COM_CheckParm ("-hipnotic"))
common.c:// -game <gamedir>
common.c:	i = COM_CheckParm ("-game");
common.c:	if (i && i < com_argc-1)
common.c:// -path <dir or packfile> [<dir or packfile>] ...
common.c:	i = COM_CheckParm ("-path");
common.c:			if (!com_argv[i] || com_argv[i][0] == '+' || com_argv[i][0] == '-')
common.c:				search->pack = COM_LoadPackFile (com_argv[i]);
common.c:				if (!search->pack)
common.c:				strcpy (search->filename, com_argv[i]);
common.c:			search->next = com_searchpaths;
common.c:	if (COM_CheckParm ("-proghack"))
common.h:Copyright (C) 1996-1997 Id Software, Inc.
common.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
common.h:// comndef.h  -- general definitions
common.h:#define	STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m)))
conproc.c:Copyright (C) 1996-1997 Id Software, Inc.
conproc.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
conproc.c:		80 * (iEndLine - iBeginLine + 1),
conproc.c:		return (30 + upper - 65); 
conproc.c:		return (1 + upper - 47);
conproc.c:    info.srWindow.Right = info.dwSize.X - 1;                
conproc.c:    info.srWindow.Bottom = cy - 1;          
conproc.c:	info.srWindow.Right = cx - 1;
conproc.c:	info.srWindow.Bottom = info.dwSize.Y - 1;               
conproc.h:Copyright (C) 1996-1997 Id Software, Inc.
conproc.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
console.c:Copyright (C) 1996-1997 Id Software, Inc.
console.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
console.c:	width = (vid.width >> 3) - 2;
console.c:				con_text[(con_totallines - 1 - i) * con_linewidth + j] =
console.c:						tbuf[((con_current - i + oldtotallines) %
console.c:	con_current = con_totallines - 1;
console.c:	con_debuglog = COM_CheckParm("-condebug");
console.c:		if (strlen (com_gamedir) < (MAXGAMEDIRLEN - strlen (t2)))
console.c:	con_linewidth = -1;
console.c:			con_current--;
console.c:		return;			// don't confuse non-developers with techie stuff...
console.c:		text += 1 + key_linepos - con_linewidth;
console.c:	y = con_vislines-16;
console.c:		Draw_Character ( (i+1)<<3, con_vislines - 16, text[i]);
console.c:	for (i= con_current-NUM_CON_TIMES+1 ; i<=con_current ; i++)
console.c:		time = realtime - time;
console.c:	rows = (lines-16)>>3;		// rows of text to draw
console.c:	y = lines - 16 - (rows<<3);	// may start slightly negative
console.c:	for (i= con_current - rows + 1 ; i<=con_current ; i++, y+=8 )
console.c:		j = i - con_backscroll;
console.c:	key_count = -2;		// wait for a key down and up
console.c:		realtime += t2-t1;		// make the cursor blink
console.h:Copyright (C) 1996-1997 Id Software, Inc.
console.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
crc.c:Copyright (C) 1996-1997 Id Software, Inc.
crc.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
crc.c:// this is a 16 bit, non-reflected CRC using the polynomial 0x1021
crc.h:Copyright (C) 1996-1997 Id Software, Inc.
crc.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cvar.c:Copyright (C) 1996-1997 Id Software, Inc.
cvar.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
cvar.c:// cvar.c -- dynamic variable tracking
cvar.c:	for (var=cvar_vars ; var ; var=var->next)
cvar.c:		if (!Q_strcmp (var_name, var->name))
cvar.c:	return Q_atof (var->string);
cvar.c:	return var->string;
cvar.c:	for (cvar=cvar_vars ; cvar ; cvar=cvar->next)
cvar.c:		if (!Q_strncmp (partial,cvar->name, len))
cvar.c:			return cvar->name;
cvar.c:	changed = Q_strcmp(var->string, value);
cvar.c:	Z_Free (var->string);	// free the old value string
cvar.c:	var->string = Z_Malloc (Q_strlen(value)+1);
cvar.c:	Q_strcpy (var->string, value);
cvar.c:	var->value = Q_atof (var->string);
cvar.c:	if (var->server && changed)
cvar.c:			SV_BroadcastPrintf ("\"%s\" changed to \"%s\"\n", var->name, var->string);
cvar.c:	if (Cvar_FindVar (variable->name))
cvar.c:		Con_Printf ("Can't register variable %s, allready defined\n", variable->name);
cvar.c:	if (Cmd_Exists (variable->name))
cvar.c:		Con_Printf ("Cvar_RegisterVariable: %s is a command\n", variable->name);
cvar.c:	oldstr = variable->string;
cvar.c:	variable->string = Z_Malloc (Q_strlen(variable->string)+1);	
cvar.c:	Q_strcpy (variable->string, oldstr);
cvar.c:	variable->value = Q_atof (variable->string);
cvar.c:	variable->next = cvar_vars;
cvar.c:    if( !Cvar_FindVar( variable->name ) ) {
cvar.c:        Con_Printf( "Can't unregister variable %s, it does not exist\n", variable->name);
cvar.c:        cvar_vars = variable->next;
cvar.c:    for( var = cvar_vars; (var) && (var->next != variable); var = var->next ) {}
cvar.c:    var->next = var->next->next;
cvar.c:		Con_Printf ("\"%s\" is \"%s\"\n", v->name, v->string);
cvar.c:	Cvar_Set (v->name, Cmd_Argv(1));
cvar.c:	for (var = cvar_vars ; var ; var = var->next)
cvar.c:		if (var->archive)
cvar.c:			fprintf (f, "%s \"%s\"\n", var->name, var->string);
cvar.h:Copyright (C) 1996-1997 Id Software, Inc.
cvar.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
Binary file cwsdpmi.exe matches
d_copy.s:// x86 assembly-language screen copying code.
d_draw.s:Copyright (C) 1996-1997 Id Software, Inc.
d_draw.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_draw.s:// x86 assembly-language horizontal 8-bpp span-drawing code.
d_draw.s://----------------------------------------------------------------------
d_draw.s:// 8-bpp horizontal span drawing code for polygons, with no transparency.
d_draw.s://----------------------------------------------------------------------
d_draw.s:// out-of-line, rarely-needed clamping code
d_draw.s:// set up scaled-by-8 steps, for 8-long segments; also set up cacheblock
d_draw.s:	addl	%ecx,%edi				// pdest = &pdestspan[scans->u];
d_draw.s:	movl	s,%esi					// sfrac = scans->sfrac;
d_draw.s:	movl	t,%eax					// tfrac = scans->tfrac;
d_draw.s:// not the last segment; do full 8-wide segment
d_draw.s:	shll	$13,%ebp			// left-justify sstep fractional part
d_draw.s:	shll	$13,%ecx			// left-justify tstep fractional part
d_draw.s:	sbbl	%ecx,%ecx			// turn tstep carry into -1 (0 if none)
d_draw.s:	movb	%al,-1(%edi)
d_draw.s:	imull	reciprocal_table-8(,%ecx,4) // sstep = (snext - s) / (spancount-1)
d_draw.s:	imull	reciprocal_table-8(,%ecx,4) // tstep = (tnext - t) / (spancount-1)
d_draw.s:	shll	$16,%ebp			// left-justify sstep fractional part
d_draw.s:	shll	$16,%eax			// left-justify tstep fractional part
d_draw.s:	jmp		*jumptemp			// jump to the number-of-pixels handler
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------
d_draw.s://----------------------------------------------------------------------
d_draw.s:// 8-bpp horizontal span z drawing codefor polygons, with no transparency.
d_draw.s://----------------------------------------------------------------------
d_draw.s:// z-clamp on a non-negative gradient span
d_draw.s:// z-clamp on a negative gradient span
d_draw.s:	addl	%edx,%edi				// pdest = &pdestspan[scans->u];
d_draw.s:	addl	%edx,%edi				// pdest = &pdestspan[scans->u];
d_draw16.s:Copyright (C) 1996-1997 Id Software, Inc.
d_draw16.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_draw16.s:// x86 assembly-language horizontal 8-bpp span-drawing code, with 16-pixel
d_draw16.s://----------------------------------------------------------------------
d_draw16.s:// 8-bpp horizontal span drawing code for polygons, with no transparency and
d_draw16.s:// 16-pixel subdivision.
d_draw16.s://----------------------------------------------------------------------
d_draw16.s:// out-of-line, rarely-needed clamping code
d_draw16.s:// set up scaled-by-16 steps, for 16-long segments; also set up cacheblock
d_draw16.s:	addl	%ecx,%edi				// pdest = &pdestspan[scans->u];
d_draw16.s:	movl	s,%esi					// sfrac = scans->sfrac;
d_draw16.s:	movl	t,%eax					// tfrac = scans->tfrac;
d_draw16.s:// not the last segment; do full 16-wide segment
d_draw16.s:	shll	$12,%ebp			// left-justify sstep fractional part
d_draw16.s:	shll	$12,%ecx			// left-justify tstep fractional part
d_draw16.s:	sbbl	%ecx,%ecx			// turn tstep carry into -1 (0 if none)
d_draw16.s:	movb	%al,-1(%edi)
d_draw16.s:	imull	reciprocal_table_16-8(,%ecx,4)	// sstep = (snext - s) /
d_draw16.s:											//  (spancount-1)
d_draw16.s:	imull	reciprocal_table_16-8(,%ecx,4)	// tstep = (tnext - t) /
d_draw16.s:											//  (spancount-1)
d_draw16.s:	shll	$16,%ebp			// left-justify sstep fractional part
d_draw16.s:	shll	$16,%eax			// left-justify tstep fractional part
d_draw16.s:	jmp		*jumptemp			// jump to the number-of-pixels handler
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_draw16.s://----------------------------------------
d_edge.c:Copyright (C) 1996-1997 Id Software, Inc.
d_edge.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_edge.c:	for (span=surf->spans ; span ; span=span->pnext)
d_edge.c:		pdest = (byte *)d_viewbuffer + screenwidth*span->v;
d_edge.c:		u = span->u;
d_edge.c:		u2 = span->u + span->count - 1;
d_edge.c:		if (u2 - u < 8)
d_edge.c:			u2 -= 4;
d_edge.c:	pplane = pface->plane;
d_edge.c:	TransformVector (pface->texinfo->vecs[0], p_saxis);
d_edge.c:	TransformVector (pface->texinfo->vecs[1], p_taxis);
d_edge.c:	d_sdivzstepv = -p_saxis[1] * t;
d_edge.c:	d_tdivzstepv = -p_taxis[1] * t;
d_edge.c:	d_sdivzorigin = p_saxis[2] * mipscale - xcenter * d_sdivzstepu -
d_edge.c:	d_tdivzorigin = p_taxis[2] * mipscale - xcenter * d_tdivzstepu -
d_edge.c:	sadjust = ((fixed16_t)(DotProduct (p_temp1, p_saxis) * 0x10000 + 0.5)) -
d_edge.c:			((pface->texturemins[0] << 16) >> miplevel)
d_edge.c:			+ pface->texinfo->vecs[0][3]*t;
d_edge.c:	tadjust = ((fixed16_t)(DotProduct (p_temp1, p_taxis) * 0x10000 + 0.5)) -
d_edge.c:			((pface->texturemins[1] << 16) >> miplevel)
d_edge.c:			+ pface->texinfo->vecs[1][3]*t;
d_edge.c:// -1 (-epsilon) so we never wander off the edge of the texture
d_edge.c:	bbextents = ((pface->extents[0] << 16) >> miplevel) - 1;
d_edge.c:	bbextentt = ((pface->extents[1] << 16) >> miplevel) - 1;
d_edge.c:			if (!s->spans)
d_edge.c:			d_zistepu = s->d_zistepu;
d_edge.c:			d_zistepv = s->d_zistepv;
d_edge.c:			d_ziorigin = s->d_ziorigin;
d_edge.c:			D_DrawSolidSurface (s, (int)s->data & 0xFF);
d_edge.c:			D_DrawZSpans (s->spans);
d_edge.c:			if (!s->spans)
d_edge.c:			d_zistepu = s->d_zistepu;
d_edge.c:			d_zistepv = s->d_zistepv;
d_edge.c:			d_ziorigin = s->d_ziorigin;
d_edge.c:			if (s->flags & SURF_DRAWSKY)
d_edge.c:				D_DrawSkyScans8 (s->spans);
d_edge.c:				D_DrawZSpans (s->spans);
d_edge.c:			else if (s->flags & SURF_DRAWBACKGROUND)
d_edge.c:				d_ziorigin = -0.9;
d_edge.c:				D_DrawZSpans (s->spans);
d_edge.c:			else if (s->flags & SURF_DRAWTURB)
d_edge.c:				pface = s->data;
d_edge.c:						((byte *)pface->texinfo->texture +
d_edge.c:						pface->texinfo->texture->offsets[0]);
d_edge.c:				if (s->insubmodel)
d_edge.c:					currententity = s->entity;	//FIXME: make this passed in to
d_edge.c:					VectorSubtract (r_origin, currententity->origin,
d_edge.c:				Turbulent8 (s->spans);
d_edge.c:				D_DrawZSpans (s->spans);
d_edge.c:				if (s->insubmodel)
d_edge.c:				if (s->insubmodel)
d_edge.c:					currententity = s->entity;	//FIXME: make this passed in to
d_edge.c:					VectorSubtract (r_origin, currententity->origin, local_modelorg);
d_edge.c:				pface = s->data;
d_edge.c:				miplevel = D_MipLevelForScale (s->nearzi * scale_for_mip
d_edge.c:				* pface->texinfo->mipadjust);
d_edge.c:				cacheblock = (pixel_t *)pcurrentcache->data;
d_edge.c:				cachewidth = pcurrentcache->width;
d_edge.c:				(*d_drawspans) (s->spans);
d_edge.c:				D_DrawZSpans (s->spans);
d_edge.c:				if (s->insubmodel)
d_fill.c:Copyright (C) 1996-1997 Id Software, Inc.
d_fill.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_fill.c:	rx = rect->x;
d_fill.c:	ry = rect->y;
d_fill.c:	rwidth = rect->width;
d_fill.c:	rheight = rect->height;
d_fill.c:		rwidth = vid.width - rx;
d_fill.c:		rheight = vid.height - rx;
d_fill.c:	// slower byte-by-byte clear for unaligned cases
d_iface.h:Copyright (C) 1996-1997 Id Software, Inc.
d_iface.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_iface.h:// driver-usable fields
d_iface.h:extern float	r_aliasuvscale;		// scale-up factor for screen u and v
d_iface.h:// currently for internal use only, and should be a do-nothing function in
d_iface.h:#define SKYMASK			(SKYSIZE - 1)
d_ifacea.h:Copyright (C) 1996-1997 Id Software, Inc.
d_ifacea.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_ifacea.h:// driver-usable fields
d_init.c:Copyright (C) 1996-1997 Id Software, Inc.
d_init.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_init.c:float			d_scalemip[NUM_MIPS-1];
d_init.c:static float	basemip[NUM_MIPS-1] = {1.0, 0.5*0.8, 0.25*0.8};
d_init.c:	for (i=0 ; i<(NUM_MIPS-1) ; i++)
d_local.h:Copyright (C) 1996-1997 Id Software, Inc.
d_local.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_local.h:// TODO: fine-tune this; it's based on providing some overage even if there
d_local.h:// is a 2k-wide scan, with subdivision every 8, for 256 spans of 12 bytes each
d_local.h:#define DS_SPAN_LIST_END	-128
d_modech.c:Copyright (C) 1996-1997 Id Software, Inc.
d_modech.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_modech.c:						     (int)D_PolysetAff8End - (int)D_PolysetAff8Start);
d_modech.c:	d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5);
d_modech.c:	d_vrectright_particle = r_refdef.vrectright - d_pix_max;
d_modech.c:			r_refdef.vrectbottom - (d_pix_max << d_y_aspect_shift);
d_part.c:Copyright (C) 1996-1997 Id Software, Inc.
d_part.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_part.c:	VectorSubtract (pparticle->org, r_origin, local);
d_part.c:	v = (int)(ycenter - zi * transformed[1] + 0.5);
d_part.c:		for ( ; count ; count--, pz += d_zwidth, pdest += screenwidth)
d_part.c:				pdest[0] = pparticle->color;
d_part.c:		for ( ; count ; count--, pz += d_zwidth, pdest += screenwidth)
d_part.c:				pdest[0] = pparticle->color;
d_part.c:				pdest[1] = pparticle->color;
d_part.c:		for ( ; count ; count--, pz += d_zwidth, pdest += screenwidth)
d_part.c:				pdest[0] = pparticle->color;
d_part.c:				pdest[1] = pparticle->color;
d_part.c:				pdest[2] = pparticle->color;
d_part.c:		for ( ; count ; count--, pz += d_zwidth, pdest += screenwidth)
d_part.c:				pdest[0] = pparticle->color;
d_part.c:				pdest[1] = pparticle->color;
d_part.c:				pdest[2] = pparticle->color;
d_part.c:				pdest[3] = pparticle->color;
d_part.c:		for ( ; count ; count--, pz += d_zwidth, pdest += screenwidth)
d_part.c:					pdest[i] = pparticle->color;
d_parta.s:Copyright (C) 1996-1997 Id Software, Inc.
d_parta.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_parta.s:// x86 assembly-language 8-bpp particle-drawing code.
d_parta.s://----------------------------------------------------------------------
d_parta.s:// 8-bpp particle drawing code.
d_parta.s://----------------------------------------------------------------------
d_parta.s://----------------------------------------------------------------------
d_parta.s:// 8-bpp particle queueing code.
d_parta.s://----------------------------------------------------------------------
d_parta.s://	VectorSubtract (p->org, r_origin, local);
d_parta.s:// FIXME: use Terje's fp->int trick here?
d_parta.s:// FIXME: use Terje's fast fp->int trick?
d_parta.s:	jmp		DP_EntryTable-4(,%eax,4)
d_parta.s:// for ( ; count ; count--, pz += d_zwidth, pdest += screenwidth)
d_parta.s:	cmpw	%bp,-2(%edx,%eax,2)
d_parta.s:	movw	%bp,-2(%edx,%eax,2)
d_parta.s:	movb	%ch,-1(%edi,%eax,1)
d_parta.s:	decl	%eax			// --pix
d_parta.s:	decl	%ebx			// --count
d_polysa.s:Copyright (C) 1996-1997 Id Software, Inc.
d_polysa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_polysa.s:// x86 assembly-language polygon model drawing code
d_polysa.s://#define	SPAN_SIZE	(((DPS_MAXSPANS + 1 + ((CACHE_SIZE - 1) / spanpackage_t_size)) + 1) * spanpackage_t_size)
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://	p00_minus_p20 = r_p0[0] - r_p2[0];
d_polysa.s://	p01_minus_p21 = r_p0[1] - r_p2[1];
d_polysa.s://	p10_minus_p20 = r_p1[0] - r_p2[0];
d_polysa.s://	p11_minus_p21 = r_p1[1] - r_p2[1];
d_polysa.s://	xstepdenominv = 1.0 / (p10_minus_p20 * p01_minus_p21 -
d_polysa.s://	ystepdenominv = -xstepdenominv;
d_polysa.s://	t0 = r_p0[4] - r_p2[4];
d_polysa.s://	t1 = r_p1[4] - r_p2[4];
d_polysa.s://			ceil((t1 * p01_minus_p21 - t0 * p11_minus_p21) * xstepdenominv);
d_polysa.s://			ceil((t1 * p00_minus_p20 - t0 * p10_minus_p20) * ystepdenominv);
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fsubrp	%st(0),%st(1)	// t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fxch	%st(2)			// t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:	fmul	%st(3),%st(0)	// (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:	fxch	%st(1)			// t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:							//  (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s:	fmul	%st(2),%st(0)	// (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:							//  (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s://	t0 = r_p0[2] - r_p2[2];
d_polysa.s://	t1 = r_p1[2] - r_p2[2];
d_polysa.s://	r_sstepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
d_polysa.s://	r_sstepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fsubrp	%st(0),%st(1)	// t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fmul	%st(2),%st(0)	// (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fxch	%st(1)			// t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:	fmul	%st(3),%st(0)	// (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s:							//  (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:	fxch	%st(1)			// (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:							//  (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s://	t0 = r_p0[3] - r_p2[3];
d_polysa.s://	t1 = r_p1[3] - r_p2[3];
d_polysa.s://	r_tstepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
d_polysa.s://	r_tstepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fsubrp	%st(0),%st(1)	// t1*p00_minus_p20 - t0*p10_minus_p20 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fmul	%st(2),%st(0)	// (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:	fxch	%st(1)			// t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:	fmul	%st(3),%st(0)	// (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s:							//  (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:	fxch	%st(1)			// (t1*p00_minus_p20 - t0*p10_minus_p20)*
d_polysa.s:							//  (t1*p01_minus_p21 - t0*p11_minus_p21)*
d_polysa.s://	t0 = r_p0[5] - r_p2[5];
d_polysa.s://	t1 = r_p1[5] - r_p2[5];
d_polysa.s://	r_zistepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
d_polysa.s://	r_zistepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
d_polysa.s:	fsubrp	%st(0),%st(1)	// t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20
d_polysa.s:							//  t1*p01_minus_p21 - t0*p11_minus_p21 |
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20
d_polysa.s:							//  (t1*p01_minus_p21 - t0*p11_minus_p21) *
d_polysa.s:							//  t1*p00_minus_p20 - t0*p10_minus_p20
d_polysa.s:	fmulp	%st(0),%st(2)	// (t1*p01_minus_p21 - t0*p11_minus_p21) *
d_polysa.s:							//  (t1*p00_minus_p20 - t0*p10_minus_p20) *
d_polysa.s:	fistpl	C(r_zistepx)	// (t1*p00_minus_p20 - t0*p10_minus_p20) *
d_polysa.s://----------------------------------------------------------------------
d_polysa.s:// not C-callable because of stdcall return
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://	d = lp2[0] - lp1[0];
d_polysa.s://	if (d < -1 || d > 1)
d_polysa.s://	d = lp2[1] - lp1[1];
d_polysa.s://	if (d < -1 || d > 1)
d_polysa.s://	d = lp3[0] - lp2[0];
d_polysa.s://	if (d < -1 || d > 1)
d_polysa.s://	d = lp3[1] - lp2[1];
d_polysa.s://	if (d < -1 || d > 1)
d_polysa.s://	d = lp1[0] - lp3[0];
d_polysa.s://	if (d < -1 || d > 1)
d_polysa.s://	d = lp1[1] - lp3[1];
d_polysa.s://	if (d < -1 || d > 1)
d_polysa.s://----------------------------------------------------------------------
d_polysa.s:// 8-bpp horizontal span drawing code for affine polygons, with smooth
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://		lcount = d_aspancount - pspanpackage->count;
d_polysa.s://			errorterm -= erroradjustdown;
d_polysa.s:	andl	$7,%eax		// 0->0, 1->7, 2->6, ... , 7->1
d_polysa.s:	cmpl	$-999999,%edx		// any more spans?
d_polysa.s:// draw a one-long span
d_polysa.s:	movl	%eax,LPatch1-4
d_polysa.s:	movl	%eax,LPatch2-4
d_polysa.s:	movl	%eax,LPatch3-4
d_polysa.s:	movl	%eax,LPatch4-4
d_polysa.s:	movl	%eax,LPatch5-4
d_polysa.s:	movl	%eax,LPatch6-4
d_polysa.s:	movl	%eax,LPatch7-4
d_polysa.s:	movl	%eax,LPatch8-4
d_polysa.s:	movl	%eax,LPatch9-4
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://			((CACHE_SIZE - 1) / sizeof(spanpackage_t)) + 1];
d_polysa.s://			(((long)&spans[0] + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
d_polysa.s:	addl	$(CACHE_SIZE - 1),%eax
d_polysa.s:	andl	$(~(CACHE_SIZE - 1)),%eax
d_polysa.s:	movl	mtri_vertindex-16+0(%ebx,%ebp,),%ecx
d_polysa.s:	movl	mtri_vertindex-16+4(%ebx,%ebp,),%esi
d_polysa.s:	movl	mtri_vertindex-16+8(%ebx,%ebp,),%edx
d_polysa.s://		if (((index0->v[1]-index1->v[1]) *
d_polysa.s://				(index0->v[0]-index2->v[0]) -
d_polysa.s://				(index0->v[0]-index1->v[0])*(index0->v[1]-index2->v[1])) >= 0)
d_polysa.s://		d_pcolormap = &((byte *)acolormap)[index0->v[4] & 0xFF00];
d_polysa.s:	fsubr	%st(3),%st(0)	// i0v1-i1v1 | i0v0 | i2v0 | i0v1
d_polysa.s:	fildl	fv_v+0(%esi)	// i1v0 | i0v1-i1v1 | i0v0 | i2v0 | i0v1
d_polysa.s:	fxch	%st(2)			// i0v0 | i0v1-i1v1 | i1v0 | i2v0 | i0v1
d_polysa.s:	fsub	%st(0),%st(3)	// i0v0 | i0v1-i1v1 | i1v0 | i0v0-i2v0 | i0v1
d_polysa.s:	fildl	fv_v+4(%edx)	// i2v1 | i0v0 | i0v1-i1v1 | i1v0 | i0v0-i2v0| i0v1
d_polysa.s:	fxch	%st(1)			// i0v0 | i2v1 | i0v1-i1v1 | i1v0 | i0v0-i2v0| i0v1
d_polysa.s:	fsubp	%st(0),%st(3)	// i2v1 | i0v1-i1v1 | i0v0-i1v0 | i0v0-i2v0 | i0v1
d_polysa.s:	fxch	%st(1)			// i0v1-i1v1 | i2v1 | i0v0-i1v0 | i0v0-i2v0 | i0v1
d_polysa.s:	fmulp	%st(0),%st(3)	// i2v1 | i0v0-i1v0 | i0v1-i1v1*i0v0-i2v0 | i0v1
d_polysa.s:	fsubrp	%st(0),%st(3)	// i0v0-i1v0 | i0v1-i1v1*i0v0-i2v0 | i0v1-i2v1
d_polysa.s:	fmulp	%st(0),%st(2)	// i0v1-i1v1*i0v0-i2v0 | i0v0-i1v0*i0v1-i2v1
d_polysa.s:	fsubp	%st(0),%st(1)	// (i0v1-i1v1)*(i0v0-i2v0)-(i0v0-i1v0)*(i0v1-i2v1)
d_polysa.s://			D_PolysetRecursiveTriangle(index0->v, index1->v, index2->v);
d_polysa.s:	movl	mtri_facesfront-16(%ebx,%ebp,),%eax
d_polysa.s://			s0 = index0->v[2];
d_polysa.s://			s1 = index1->v[2];
d_polysa.s://			s2 = index2->v[2];
d_polysa.s://			if (index0->flags & ALIAS_ONSEAM)
d_polysa.s://				index0->v[2] += r_affinetridesc.seamfixupX16;
d_polysa.s://			if (index1->flags & ALIAS_ONSEAM)
d_polysa.s://				index1->v[2] += r_affinetridesc.seamfixupX16;
d_polysa.s://			if (index2->flags & ALIAS_ONSEAM)
d_polysa.s://				index2->v[2] += r_affinetridesc.seamfixupX16;
d_polysa.s://			D_PolysetRecursiveTriangle(index0->v, index1->v, index2->v);
d_polysa.s://			index0->v[2] = s0;
d_polysa.s://			index1->v[2] = s1;
d_polysa.s://			index2->v[2] = s2;
d_polysa.s://----------------------------------------------------------------------
d_polysa.s:// Alias model triangle left-edge scanning code
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://		d_pedgespanpackage->ptex = ptex;
d_polysa.s://		d_pedgespanpackage->pdest = d_pdest;
d_polysa.s://		d_pedgespanpackage->pz = d_pz;
d_polysa.s://		d_pedgespanpackage->count = d_aspancount;
d_polysa.s://		d_pedgespanpackage->light = d_light;
d_polysa.s://		d_pedgespanpackage->zi = d_zi;
d_polysa.s://		d_pedgespanpackage->sfrac = d_sfrac << 16;
d_polysa.s://		d_pedgespanpackage->tfrac = d_tfrac << 16;
d_polysa.s://			errorterm -= erroradjustdown;
d_polysa.s://	} while (--height);
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://		if ((fv->v[0] < r_refdef.vrectright) &&
d_polysa.s://			(fv->v[1] < r_refdef.vrectbottom))
d_polysa.s://			zbuf = zspantable[fv->v[1]] + fv->v[0];
d_polysa.s://			z = fv->v[5]>>16;
d_polysa.s://				pix = skintable[fv->v[3]>>16][fv->v[2]>>16];
d_polysa.s://				pix = ((byte *)acolormap)[pix + (fv->v[4] & 0xFF00)];
d_polysa.s://				d_viewbuffer[d_scantable[fv->v[1]] + fv->v[0]] = pix;
d_polysa.s://----------------------------------------------------------------------
d_polysa.s:// Alias model non-subdivided polygon dispatching code
d_polysa.s:// not C-callable because of stack buffer cleanup
d_polysa.s://----------------------------------------------------------------------
d_polysa.s://		index0 = pfv + ptri->vertindex[0];
d_polysa.s://		index1 = pfv + ptri->vertindex[1];
d_polysa.s://		index2 = pfv + ptri->vertindex[2];
d_polysa.s:	movl	mtri_vertindex+0-mtri_size(%esi,%ebp,1),%ecx
d_polysa.s:	movl	mtri_vertindex+4-mtri_size(%esi,%ebp,1),%edx
d_polysa.s:	movl	mtri_vertindex+8-mtri_size(%esi,%ebp,1),%ebx
d_polysa.s://		d_xdenom = (index0->v[1]-index1->v[1]) *
d_polysa.s://				(index0->v[0]-index2->v[0]) -
d_polysa.s://				(index0->v[0]-index1->v[0])*(index0->v[1]-index2->v[1]);
d_polysa.s://		r_p0[0] = index0->v[0];		// u
d_polysa.s://		r_p0[1] = index0->v[1];		// v
d_polysa.s://		r_p0[2] = index0->v[2];		// s
d_polysa.s://		r_p0[3] = index0->v[3];		// t
d_polysa.s://		r_p0[4] = index0->v[4];		// light
d_polysa.s://		r_p0[5] = index0->v[5];		// iz
d_polysa.s://		r_p1[0] = index1->v[0];
d_polysa.s://		r_p1[1] = index1->v[1];
d_polysa.s://		r_p1[2] = index1->v[2];
d_polysa.s://		r_p1[3] = index1->v[3];
d_polysa.s://		r_p1[4] = index1->v[4];
d_polysa.s://		r_p1[5] = index1->v[5];
d_polysa.s://		r_p2[0] = index2->v[0];
d_polysa.s://		r_p2[1] = index2->v[1];
d_polysa.s://		r_p2[2] = index2->v[2];
d_polysa.s://		r_p2[3] = index2->v[3];
d_polysa.s://		r_p2[4] = index2->v[4];
d_polysa.s://		r_p2[5] = index2->v[5];
d_polysa.s:	movl	mtri_facesfront-mtri_size(%edi,%ebp,1),%eax
d_polysa.s://		if (!ptri->facesfront)
d_polysa.s://			if (index0->flags & ALIAS_ONSEAM)
d_polysa.s://			if (index1->flags & ALIAS_ONSEAM)
d_polysa.s://			if (index2->flags & ALIAS_ONSEAM)
d_polyse.c:Copyright (C) 1996-1997 Id Software, Inc.
d_polyse.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_polyse.c:			((CACHE_SIZE - 1) / sizeof(spanpackage_t)) + 1];
d_polyse.c:			(((long)&spans[0] + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
d_polyse.c:		if ((fv->v[0] < r_refdef.vrectright) &&
d_polyse.c:			(fv->v[1] < r_refdef.vrectbottom))
d_polyse.c:			z = fv->v[5]>>16;
d_polyse.c:			zbuf = zspantable[fv->v[1]] + fv->v[0];
d_polyse.c:				pix = skintable[fv->v[3]>>16][fv->v[2]>>16];
d_polyse.c:				pix = ((byte *)acolormap)[pix + (fv->v[4] & 0xFF00) ];
d_polyse.c:				d_viewbuffer[d_scantable[fv->v[1]] + fv->v[0]] = pix;
d_polyse.c:		if (((index0->v[1]-index1->v[1]) *
d_polyse.c:			 (index0->v[0]-index2->v[0]) -
d_polyse.c:			 (index0->v[0]-index1->v[0]) * 
d_polyse.c:			 (index0->v[1]-index2->v[1])) >= 0)
d_polyse.c:		d_pcolormap = &((byte *)acolormap)[index0->v[4] & 0xFF00];
d_polyse.c:			D_PolysetRecursiveTriangle(index0->v, index1->v, index2->v);
d_polyse.c:			s0 = index0->v[2];
d_polyse.c:			s1 = index1->v[2];
d_polyse.c:			s2 = index2->v[2];
d_polyse.c:			if (index0->flags & ALIAS_ONSEAM)
d_polyse.c:				index0->v[2] += r_affinetridesc.seamfixupX16;
d_polyse.c:			if (index1->flags & ALIAS_ONSEAM)
d_polyse.c:				index1->v[2] += r_affinetridesc.seamfixupX16;
d_polyse.c:			if (index2->flags & ALIAS_ONSEAM)
d_polyse.c:				index2->v[2] += r_affinetridesc.seamfixupX16;
d_polyse.c:			D_PolysetRecursiveTriangle(index0->v, index1->v, index2->v);
d_polyse.c:			index0->v[2] = s0;
d_polyse.c:			index1->v[2] = s1;
d_polyse.c:			index2->v[2] = s2;
d_polyse.c:		index0 = pfv + ptri->vertindex[0];
d_polyse.c:		index1 = pfv + ptri->vertindex[1];
d_polyse.c:		index2 = pfv + ptri->vertindex[2];
d_polyse.c:		d_xdenom = (index0->v[1]-index1->v[1]) *
d_polyse.c:				(index0->v[0]-index2->v[0]) -
d_polyse.c:				(index0->v[0]-index1->v[0])*(index0->v[1]-index2->v[1]);
d_polyse.c:		r_p0[0] = index0->v[0];		// u
d_polyse.c:		r_p0[1] = index0->v[1];		// v
d_polyse.c:		r_p0[2] = index0->v[2];		// s
d_polyse.c:		r_p0[3] = index0->v[3];		// t
d_polyse.c:		r_p0[4] = index0->v[4];		// light
d_polyse.c:		r_p0[5] = index0->v[5];		// iz
d_polyse.c:		r_p1[0] = index1->v[0];
d_polyse.c:		r_p1[1] = index1->v[1];
d_polyse.c:		r_p1[2] = index1->v[2];
d_polyse.c:		r_p1[3] = index1->v[3];
d_polyse.c:		r_p1[4] = index1->v[4];
d_polyse.c:		r_p1[5] = index1->v[5];
d_polyse.c:		r_p2[0] = index2->v[0];
d_polyse.c:		r_p2[1] = index2->v[1];
d_polyse.c:		r_p2[2] = index2->v[2];
d_polyse.c:		r_p2[3] = index2->v[3];
d_polyse.c:		r_p2[4] = index2->v[4];
d_polyse.c:		r_p2[5] = index2->v[5];
d_polyse.c:		if (!ptri->facesfront)
d_polyse.c:			if (index0->flags & ALIAS_ONSEAM)
d_polyse.c:			if (index1->flags & ALIAS_ONSEAM)
d_polyse.c:			if (index2->flags & ALIAS_ONSEAM)
d_polyse.c:	d = lp2[0] - lp1[0];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp2[1] - lp1[1];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp3[0] - lp2[0];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp3[1] - lp2[1];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp1[0] - lp3[0];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp1[1] - lp3[1];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:		d_pedgespanpackage->pdest = d_pdest;
d_polyse.c:		d_pedgespanpackage->pz = d_pz;
d_polyse.c:		d_pedgespanpackage->count = d_aspancount;
d_polyse.c:		d_pedgespanpackage->ptex = d_ptex;
d_polyse.c:		d_pedgespanpackage->sfrac = d_sfrac;
d_polyse.c:		d_pedgespanpackage->tfrac = d_tfrac;
d_polyse.c:		d_pedgespanpackage->light = d_light;
d_polyse.c:		d_pedgespanpackage->zi = d_zi;
d_polyse.c:			errorterm -= erroradjustdown;
d_polyse.c:	} while (--height);
d_polyse.c:	errorterm = -1;
d_polyse.c:	tm = endvertu - startvertu;
d_polyse.c:	tn = endvertv - startvertv;
d_polyse.c:	if (((tm <= 16) && (tm >= -15)) &&
d_polyse.c:		((tn <= 16) && (tn >= -15)))
d_polyse.c:		ubasestep = ptemp->quotient;
d_polyse.c:		erroradjustup = ptemp->remainder;
d_polyse.c:	p00_minus_p20 = r_p0[0] - r_p2[0];
d_polyse.c:	p01_minus_p21 = r_p0[1] - r_p2[1];
d_polyse.c:	p10_minus_p20 = r_p1[0] - r_p2[0];
d_polyse.c:	p11_minus_p21 = r_p1[1] - r_p2[1];
d_polyse.c:	ystepdenominv = -xstepdenominv;
d_polyse.c:	t0 = r_p0[4] - r_p2[4];
d_polyse.c:	t1 = r_p1[4] - r_p2[4];
d_polyse.c:			ceil((t1 * p01_minus_p21 - t0 * p11_minus_p21) * xstepdenominv);
d_polyse.c:			ceil((t1 * p00_minus_p20 - t0 * p10_minus_p20) * ystepdenominv);
d_polyse.c:	t0 = r_p0[2] - r_p2[2];
d_polyse.c:	t1 = r_p1[2] - r_p2[2];
d_polyse.c:	r_sstepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
d_polyse.c:	r_sstepy = (int)((t1 * p00_minus_p20 - t0* p10_minus_p20) *
d_polyse.c:	t0 = r_p0[3] - r_p2[3];
d_polyse.c:	t1 = r_p1[3] - r_p2[3];
d_polyse.c:	r_tstepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
d_polyse.c:	r_tstepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
d_polyse.c:	t0 = r_p0[5] - r_p2[5];
d_polyse.c:	t1 = r_p1[5] - r_p2[5];
d_polyse.c:	r_zistepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
d_polyse.c:	r_zistepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
d_polyse.c:		lcount = d_aspancount - pspanpackage->count;
d_polyse.c:			errorterm -= erroradjustdown;
d_polyse.c:			lpdest = pspanpackage->pdest;
d_polyse.c:			lptex = pspanpackage->ptex;
d_polyse.c:			lpz = pspanpackage->pz;
d_polyse.c:			lsfrac = pspanpackage->sfrac;
d_polyse.c:			ltfrac = pspanpackage->tfrac;
d_polyse.c:			llight = pspanpackage->light;
d_polyse.c:			lzi = pspanpackage->zi;
d_polyse.c:			} while (--lcount);
d_polyse.c:	} while (pspanpackage->count != -999999);
d_polyse.c:		lcount = pspanpackage->count;
d_polyse.c:		if (lcount == -1)
d_polyse.c:			lpdest = pspanpackage->pdest;
d_polyse.c:			} while (--lcount);
d_polyse.c:	plefttop = pedgetable->pleftedgevert0;
d_polyse.c:	prighttop = pedgetable->prightedgevert0;
d_polyse.c:	pleftbottom = pedgetable->pleftedgevert1;
d_polyse.c:	prightbottom = pedgetable->prightedgevert1;
d_polyse.c:	initialleftheight = pleftbottom[1] - plefttop[1];
d_polyse.c:	initialrightheight = prightbottom[1] - prighttop[1];
d_polyse.c:	d_aspancount = plefttop[0] - prighttop[0];
d_polyse.c:		d_pedgespanpackage->pdest = d_pdest;
d_polyse.c:		d_pedgespanpackage->pz = d_pz;
d_polyse.c:		d_pedgespanpackage->count = d_aspancount;
d_polyse.c:		d_pedgespanpackage->ptex = d_ptex;
d_polyse.c:		d_pedgespanpackage->sfrac = d_sfrac;
d_polyse.c:		d_pedgespanpackage->tfrac = d_tfrac;
d_polyse.c:		d_pedgespanpackage->light = d_light;
d_polyse.c:		d_pedgespanpackage->zi = d_zi;
d_polyse.c:			working_lstepx = r_lstepx - 1;
d_polyse.c:	if (pedgetable->numleftedges == 2)
d_polyse.c:		pleftbottom = pedgetable->pleftedgevert2;
d_polyse.c:		height = pleftbottom[1] - plefttop[1];
d_polyse.c:		d_aspancount = plefttop[0] - prighttop[0];
d_polyse.c:			d_pedgespanpackage->pdest = d_pdest;
d_polyse.c:			d_pedgespanpackage->pz = d_pz;
d_polyse.c:			d_pedgespanpackage->count = d_aspancount;
d_polyse.c:			d_pedgespanpackage->ptex = d_ptex;
d_polyse.c:			d_pedgespanpackage->sfrac = d_sfrac;
d_polyse.c:			d_pedgespanpackage->tfrac = d_tfrac;
d_polyse.c:			d_pedgespanpackage->light = d_light;
d_polyse.c:			d_pedgespanpackage->zi = d_zi;
d_polyse.c:				working_lstepx = r_lstepx - 1;
d_polyse.c:	a_spans[initialrightheight].count = -999999; // mark end of the spanpackages
d_polyse.c:	if (pedgetable->numrightedges == 2)
d_polyse.c:		pstart->count = originalcount;
d_polyse.c:		d_aspancount = prightbottom[0] - prighttop[0];
d_polyse.c:		prightbottom = pedgetable->prightedgevert2;
d_polyse.c:		height = prightbottom[1] - prighttop[1];
d_polyse.c:		a_spans[initialrightheight + height].count = -999999;
d_polyse.c:	d = lp2[0] - lp1[0];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp2[1] - lp1[1];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp2[0] - lp1[0];
d_polyse.c:	if (d < -1 || d > 1)
d_polyse.c:	d = lp2[1] - lp1[1];
d_polyse.c:	if (d < -1 || d > 1)
d_scan.c:Copyright (C) 1996-1997 Id Software, Inc.
d_scan.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_scan.c:// Portable C scan-level rasterization code, all pixel depths.
d_scan.c:	turb = intsintable + ((int)(cl.time*SPEED)&(CYCLE-1));
d_scan.c:		sturb = ((r_turb_s + r_turb_turb[(r_turb_t>>16)&(CYCLE-1)])>>16)&63;
d_scan.c:		tturb = ((r_turb_t + r_turb_turb[(r_turb_s>>16)&(CYCLE-1)])>>16)&63;
d_scan.c:	} while (--r_turb_spancount > 0);
d_scan.c:	r_turb_turb = sintable + ((int)(cl.time*SPEED)&(CYCLE-1));
d_scan.c:				(screenwidth * pspan->v) + pspan->u);
d_scan.c:		count = pspan->count;
d_scan.c:		du = (float)pspan->u;
d_scan.c:		dv = (float)pspan->v;
d_scan.c:		z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_scan.c:			count -= r_turb_spancount;
d_scan.c:			// calculate s/z, t/z, zi->fixed s and t at far end of span,
d_scan.c:				z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_scan.c:					snext = 16;	// prevent round-off error on <0 steps from
d_scan.c:					tnext = 16;	// guard against round-off error on <0 steps
d_scan.c:				r_turb_sstep = (snext - r_turb_s) >> 4;
d_scan.c:				r_turb_tstep = (tnext - r_turb_t) >> 4;
d_scan.c:			// calculate s/z, t/z, zi->fixed s and t at last pixel in span (so
d_scan.c:				spancountminus1 = (float)(r_turb_spancount - 1);
d_scan.c:				z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_scan.c:					snext = 16;	// prevent round-off error on <0 steps from
d_scan.c:					tnext = 16;	// guard against round-off error on <0 steps
d_scan.c:					r_turb_sstep = (snext - r_turb_s) / (r_turb_spancount - 1);
d_scan.c:					r_turb_tstep = (tnext - r_turb_t) / (r_turb_spancount - 1);
d_scan.c:			r_turb_s = r_turb_s & ((CYCLE<<16)-1);
d_scan.c:			r_turb_t = r_turb_t & ((CYCLE<<16)-1);
d_scan.c:	} while ((pspan = pspan->pnext) != NULL);
d_scan.c:				(screenwidth * pspan->v) + pspan->u);
d_scan.c:		count = pspan->count;
d_scan.c:		du = (float)pspan->u;
d_scan.c:		dv = (float)pspan->v;
d_scan.c:		z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_scan.c:			count -= spancount;
d_scan.c:			// calculate s/z, t/z, zi->fixed s and t at far end of span,
d_scan.c:				z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_scan.c:					snext = 8;	// prevent round-off error on <0 steps from
d_scan.c:					tnext = 8;	// guard against round-off error on <0 steps
d_scan.c:				sstep = (snext - s) >> 3;
d_scan.c:				tstep = (tnext - t) >> 3;
d_scan.c:			// calculate s/z, t/z, zi->fixed s and t at last pixel in span (so
d_scan.c:				spancountminus1 = (float)(spancount - 1);
d_scan.c:				z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_scan.c:					snext = 8;	// prevent round-off error on <0 steps from
d_scan.c:					tnext = 8;	// guard against round-off error on <0 steps
d_scan.c:					sstep = (snext - s) / (spancount - 1);
d_scan.c:					tstep = (tnext - t) / (spancount - 1);
d_scan.c:			} while (--spancount > 0);
d_scan.c:	} while ((pspan = pspan->pnext) != NULL);
d_scan.c:		pdest = d_pzbuffer + (d_zwidth * pspan->v) + pspan->u;
d_scan.c:		count = pspan->count;
d_scan.c:		du = (float)pspan->u;
d_scan.c:		dv = (float)pspan->v;
d_scan.c:			count--;
d_scan.c:			} while (--doublecount > 0);
d_scan.c:	} while ((pspan = pspan->pnext) != NULL);
d_scana.s:Copyright (C) 1996-1997 Id Software, Inc.
d_scana.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_scana.s:// x86 assembly-language turbulent texture mapping code
d_scana.s://----------------------------------------------------------------------
d_scana.s://----------------------------------------------------------------------
d_scana.s:	andl	$(CYCLE-1),%eax
d_scana.s:	andl	$(CYCLE-1),%edx
d_scana.s:	andl	$(TURB_TEX_SIZE-1),%eax
d_scana.s:	andl	$(TURB_TEX_SIZE-1),%edx
d_scana.s:	movb	%dl,-1(%edi)
d_sky.c:Copyright (C) 1996-1997 Id Software, Inc.
d_sky.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_sky.c:	wu = 8192.0 * (float)(u-((int)vid.width>>1)) / temp;
d_sky.c:	wv = 8192.0 * (float)(((int)vid.height>>1)-v) / temp;
d_sky.c:	*s = (int)((temp + 6*(SKYSIZE/2-1)*end[0]) * 0x10000);
d_sky.c:	*t = (int)((temp + 6*(SKYSIZE/2-1)*end[1]) * 0x10000);
d_sky.c:				(screenwidth * pspan->v) + pspan->u);
d_sky.c:		count = pspan->count;
d_sky.c:		u = pspan->u;
d_sky.c:		v = pspan->v;
d_sky.c:			count -= spancount;
d_sky.c:				sstep = (snext - s) >> SKY_SPAN_SHIFT;
d_sky.c:				tstep = (tnext - t) >> SKY_SPAN_SHIFT;
d_sky.c:				spancountminus1 = (float)(spancount - 1);
d_sky.c:					sstep = (snext - s) / spancountminus1;
d_sky.c:					tstep = (tnext - t) / spancountminus1;
d_sky.c:			} while (--spancount > 0);
d_sky.c:	} while ((pspan = pspan->pnext) != NULL);
d_spr8.s:Copyright (C) 1996-1997 Id Software, Inc.
d_spr8.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_spr8.s:// x86 assembly-language horizontal 8-bpp transparent span-drawing code.
d_spr8.s://----------------------------------------------------------------------
d_spr8.s:// 8-bpp horizontal span drawing code for polygons, with transparency.
d_spr8.s://----------------------------------------------------------------------
d_spr8.s:// out-of-line, rarely-needed clamping code
d_spr8.s:// set up scaled-by-8 steps, for 8-long segments; also set up cacheblock
d_spr8.s:// and span list pointers, and 1/z step in 0.32 fixed-point
d_spr8.s:	fistpl	izi				// 0.32 fixed-point 1/z
d_spr8.s:// set pz to point to the first z-buffer pixel in the span
d_spr8.s:	addl	%ebp,%edi				// pdest = &pdestspan[scans->u];
d_spr8.s:	movl	s,%esi					// sfrac = scans->sfrac;
d_spr8.s:	movl	t,%eax					// tfrac = scans->tfrac;
d_spr8.s:// not the last segment; do full 8-wide segment
d_spr8.s:	shll	$13,%ebp			// left-justify sstep fractional part
d_spr8.s:	shll	$13,%ecx			// left-justify tstep fractional part
d_spr8.s:	sbbl	%eax,%eax			// turn tstep carry into -1 (0 if none)
d_spr8.s:	imull	reciprocal_table-8(,%ecx,4) // sstep = (snext - s) / (spancount-1)
d_spr8.s:	imull	reciprocal_table-8(,%ecx,4) // tstep = (tnext - t) / (spancount-1)
d_spr8.s:	shll	$16,%ebp			// left-justify sstep fractional part
d_spr8.s:	shll	$16,%eax			// left-justify tstep fractional part
d_spr8.s:	ret							// jump to the number-of-pixels handler
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_spr8.s://----------------------------------------
d_sprite.c:Copyright (C) 1996-1997 Id Software, Inc.
d_sprite.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_sprite.c:// d_sprite.c: software top-level rasterization driver module for drawing
d_sprite.c:		pdest = (byte *)d_viewbuffer + (screenwidth * pspan->v) + pspan->u;
d_sprite.c:		pz = d_pzbuffer + (d_zwidth * pspan->v) + pspan->u;
d_sprite.c:		count = pspan->count;
d_sprite.c:		du = (float)pspan->u;
d_sprite.c:		dv = (float)pspan->v;
d_sprite.c:		z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_sprite.c:			count -= spancount;
d_sprite.c:			// calculate s/z, t/z, zi->fixed s and t at far end of span,
d_sprite.c:				z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_sprite.c:					snext = 8;	// prevent round-off error on <0 steps from
d_sprite.c:					tnext = 8;	// guard against round-off error on <0 steps
d_sprite.c:				sstep = (snext - s) >> 3;
d_sprite.c:				tstep = (tnext - t) >> 3;
d_sprite.c:			// calculate s/z, t/z, zi->fixed s and t at last pixel in span (so
d_sprite.c:				spancountminus1 = (float)(spancount - 1);
d_sprite.c:				z = (float)0x10000 / zi;	// prescale to 16.16 fixed-point
d_sprite.c:					snext = 8;	// prevent round-off error on <0 steps from
d_sprite.c:					tnext = 8;	// guard against round-off error on <0 steps
d_sprite.c:					sstep = (snext - s) / (spancount - 1);
d_sprite.c:					tstep = (tnext - t) / (spancount - 1);
d_sprite.c:			} while (--spancount > 0);
d_sprite.c:	} while (pspan->count != DS_SPAN_LIST_END);
d_sprite.c:		pnext = pvert - 1;
d_sprite.c:		vbottom = ceil (pnext->v);
d_sprite.c:			du = pnext->u - pvert->u;
d_sprite.c:			dv = pnext->v - pvert->v;
d_sprite.c:			u = (int)((pvert->u + (slope * (vtop - pvert->v))) * 0x10000) +
d_sprite.c:					(0x10000 - 1);
d_sprite.c:				pspan->u = u >> 16;
d_sprite.c:				pspan->v = v;
d_sprite.c:		i--;
d_sprite.c:		vnext = pnext->v;
d_sprite.c:			uvert = pvert->u;
d_sprite.c:			unext = pnext->u;
d_sprite.c:			du = unext - uvert;
d_sprite.c:			dv = vnext - vvert;
d_sprite.c:			u = (int)((uvert + (slope * (vtop - vvert))) * 0x10000) +
d_sprite.c:					(0x10000 - 1);
d_sprite.c:				pspan->count = (u >> 16) - pspan->u;
d_sprite.c:	pspan->count = DS_SPAN_LIST_END;	// mark the end of the span list 
d_sprite.c:	distinv = 1.0 / (-DotProduct (modelorg, r_spritedesc.vpn));
d_sprite.c:	d_sdivzstepv = -p_saxis[1] * yscaleinv;
d_sprite.c:	d_tdivzstepv = -p_taxis[1] * yscaleinv;
d_sprite.c:	d_zistepv = -p_normal[1] * yscaleinv * distinv;
d_sprite.c:	d_sdivzorigin = p_saxis[2] - xcenter * d_sdivzstepu -
d_sprite.c:	d_tdivzorigin = p_taxis[2] - xcenter * d_tdivzstepu -
d_sprite.c:	d_ziorigin = p_normal[2] * distinv - xcenter * d_zistepu -
d_sprite.c:	sadjust = ((fixed16_t)(DotProduct (p_temp1, p_saxis) * 0x10000 + 0.5)) -
d_sprite.c:			(-(cachewidth >> 1) << 16);
d_sprite.c:	tadjust = ((fixed16_t)(DotProduct (p_temp1, p_taxis) * 0x10000 + 0.5)) -
d_sprite.c:			(-(sprite_height >> 1) << 16);
d_sprite.c:// -1 (-epsilon) so we never wander off the edge of the texture
d_sprite.c:	bbextents = (cachewidth << 16) - 1;
d_sprite.c:	bbextentt = (sprite_height << 16) - 1;
d_sprite.c:	ymax = -999999.9;
d_sprite.c:		if (pverts->v < ymin)
d_sprite.c:			ymin = pverts->v;
d_sprite.c:		if (pverts->v > ymax)
d_sprite.c:			ymax = pverts->v;
d_sprite.c:	cachewidth = r_spritedesc.pspriteframe->width;
d_sprite.c:	sprite_height = r_spritedesc.pspriteframe->height;
d_sprite.c:	cacheblock = (byte *)&r_spritedesc.pspriteframe->pixels[0];
d_surf.c:Copyright (C) 1996-1997 Id Software, Inc.
d_surf.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_surf.c:	if (COM_CheckParm ("-surfcachesize"))
d_surf.c:		size = Q_atoi(com_argv[COM_CheckParm("-surfcachesize")+1]) * 1024;
d_surf.c:		size += (pix-64000)*3;
d_surf.c:	sc_size = size - GUARDSIZE;
d_surf.c:	sc_base->next = NULL;
d_surf.c:	sc_base->owner = NULL;
d_surf.c:	sc_base->size = sc_size;
d_surf.c:	for (c = sc_base ; c ; c = c->next)
d_surf.c:		if (c->owner)
d_surf.c:			*c->owner = NULL;
d_surf.c:	sc_base->next = NULL;
d_surf.c:	sc_base->owner = NULL;
d_surf.c:	sc_base->size = sc_size;
d_surf.c:	size = (int)&((surfcache_t *)0)->data[size];
d_surf.c:	if ( !sc_rover || (byte *)sc_rover - (byte *)sc_base > sc_size - size)
d_surf.c:	if (sc_rover->owner)
d_surf.c:		*sc_rover->owner = NULL;
d_surf.c:	while (new->size < size)
d_surf.c:		sc_rover = sc_rover->next;
d_surf.c:		if (sc_rover->owner)
d_surf.c:			*sc_rover->owner = NULL;
d_surf.c:		new->size += sc_rover->size;
d_surf.c:		new->next = sc_rover->next;
d_surf.c:	if (new->size - size > 256)
d_surf.c:		sc_rover->size = new->size - size;
d_surf.c:		sc_rover->next = new->next;
d_surf.c:		sc_rover->width = 0;
d_surf.c:		sc_rover->owner = NULL;
d_surf.c:		new->next = sc_rover;
d_surf.c:		new->size = size;
d_surf.c:		sc_rover = new->next;
d_surf.c:	new->width = width;
d_surf.c:		new->height = (size - sizeof(*new) + sizeof(new->data)) / width;
d_surf.c:	new->owner = NULL;              // should be set properly after return
d_surf.c:	for (test = sc_base ; test ; test = test->next)
d_surf.c:		printf ("%p : %i bytes     %i width\n",test, test->size, test->width);
d_surf.c:	r_drawsurf.texture = R_TextureAnimation (surface->texinfo->texture);
d_surf.c:	r_drawsurf.lightadj[0] = d_lightstylevalue[surface->styles[0]];
d_surf.c:	r_drawsurf.lightadj[1] = d_lightstylevalue[surface->styles[1]];
d_surf.c:	r_drawsurf.lightadj[2] = d_lightstylevalue[surface->styles[2]];
d_surf.c:	r_drawsurf.lightadj[3] = d_lightstylevalue[surface->styles[3]];
d_surf.c:	cache = surface->cachespots[miplevel];
d_surf.c:	if (cache && !cache->dlight && surface->dlightframe != r_framecount
d_surf.c:			&& cache->texture == r_drawsurf.texture
d_surf.c:			&& cache->lightadj[0] == r_drawsurf.lightadj[0]
d_surf.c:			&& cache->lightadj[1] == r_drawsurf.lightadj[1]
d_surf.c:			&& cache->lightadj[2] == r_drawsurf.lightadj[2]
d_surf.c:			&& cache->lightadj[3] == r_drawsurf.lightadj[3] )
d_surf.c:	r_drawsurf.surfwidth = surface->extents[0] >> miplevel;
d_surf.c:	r_drawsurf.surfheight = surface->extents[1] >> miplevel;
d_surf.c:		surface->cachespots[miplevel] = cache;
d_surf.c:		cache->owner = &surface->cachespots[miplevel];
d_surf.c:		cache->mipscale = surfscale;
d_surf.c:	if (surface->dlightframe == r_framecount)
d_surf.c:		cache->dlight = 1;
d_surf.c:		cache->dlight = 0;
d_surf.c:	r_drawsurf.surfdat = (pixel_t *)cache->data;
d_surf.c:	cache->texture = r_drawsurf.texture;
d_surf.c:	cache->lightadj[0] = r_drawsurf.lightadj[0];
d_surf.c:	cache->lightadj[1] = r_drawsurf.lightadj[1];
d_surf.c:	cache->lightadj[2] = r_drawsurf.lightadj[2];
d_surf.c:	cache->lightadj[3] = r_drawsurf.lightadj[3];
d_surf.c:	return surface->cachespots[miplevel];
d_vars.c:Copyright (C) 1996-1997 Id Software, Inc.
d_vars.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_vars.c://-------------------------------------------------------
d_vars.c://-------------------------------------------------------
d_varsa.s:Copyright (C) 1996-1997 Id Software, Inc.
d_varsa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_varsa.s://-------------------------------------------------------
d_varsa.s://-------------------------------------------------------
d_varsa.s://-------------------------------------------------------
d_varsa.s:// ASM-only variables
d_varsa.s://-------------------------------------------------------
d_varsa.s://-------------------------------------------------------
d_varsa.s://-------------------------------------------------------
d_varsa.s://-------------------------------------------------------
d_varsa.s://-------------------------------------------------------
d_zpoint.c:Copyright (C) 1996-1997 Id Software, Inc.
d_zpoint.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d_zpoint.c:// d_zpoint.c: software driver module for drawing z-buffered points
dos_v2.c:Copyright (C) 1996-1997 Id Software, Inc.
dos_v2.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
dos_v2.c:static unsigned conventional_memory = -1;
dos_v2.c:	if (conventional_memory == -1)
dos_v2.c:	return (int)ptr - conventional_memory;
dos_v2.c:	outregs->x.ss = outregs->x.sp = 0;
dos_v2.c:	return rc || (outregs->x.flags & 1);
dos_v2.c:// Because of a quirk in dj's alloc-dos-memory wrapper, you need to keep
dos_v2.c:	_go32_dpmi_get_protected_mode_interrupt_vector(intr, &oldstuff->pm_oldvec);
dos_v2.c:	oldstuff->intr = intr;
dos_v2.c:		if (oldstuff->intr == intr)
dos_v2.c:				&oldstuff->pm_oldvec);
dos_v2.c:			oldstuff->intr = -1;
dosisms.h:Copyright (C) 1996-1997 Id Software, Inc.
dosisms.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
dr_warp_sin.h:Copyright (C) 1996-1997 Id Software, Inc.
dr_warp_sin.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
dr_warp_sin.h: 9.79717e-16, -0.19633, -0.392541, -0.588517, -0.784137, -0.979285, -1.17384, -1.3677,
dr_warp_sin.h: -1.56072, -1.75281, -1.94384, -2.1337, -2.32228, -2.50945, -2.69512, -2.87916,
dr_warp_sin.h: -3.06147, -3.24193, -3.42044, -3.59689, -3.77117, -3.94319, -4.11282, -4.27998,
dr_warp_sin.h: -4.44456, -4.60647, -4.76559, -4.92185, -5.07515, -5.22538, -5.37247, -5.51632,
dr_warp_sin.h: -5.65685, -5.79398, -5.92761, -6.05767, -6.18408, -6.30677, -6.42566, -6.54068,
dr_warp_sin.h: -6.65176, -6.75883, -6.86183, -6.9607, -7.05537, -7.14579, -7.23191, -7.31368,
dr_warp_sin.h: -7.39104, -7.46394, -7.53235, -7.59623, -7.65552, -7.71021, -7.76025, -7.80562,
dr_warp_sin.h: -7.84628, -7.88222, -7.91341, -7.93984, -7.96148, -7.97832, -7.99036, -7.99759,
dr_warp_sin.h: -8, -7.99759, -7.99036, -7.97832, -7.96148, -7.93984, -7.91341, -7.88222,
dr_warp_sin.h: -7.84628, -7.80562, -7.76025, -7.71021, -7.65552, -7.59623, -7.53235, -7.46394,
dr_warp_sin.h: -7.39104, -7.31368, -7.23191, -7.14579, -7.05537, -6.9607, -6.86183, -6.75883,
dr_warp_sin.h: -6.65176, -6.54068, -6.42566, -6.30677, -6.18408, -6.05767, -5.92761, -5.79398,
dr_warp_sin.h: -5.65685, -5.51632, -5.37247, -5.22538, -5.07515, -4.92185, -4.76559, -4.60647,
dr_warp_sin.h: -4.44456, -4.27998, -4.11282, -3.94319, -3.77117, -3.59689, -3.42044, -3.24193,
dr_warp_sin.h: -3.06147, -2.87916, -2.69512, -2.50945, -2.32228, -2.1337, -1.94384, -1.75281,
dr_warp_sin.h: -1.56072, -1.3677, -1.17384, -0.979285, -0.784137, -0.588517, -0.392541, -0.19633,
draw.c:Copyright (C) 1996-1997 Id Software, Inc.
draw.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
draw.c:// draw.c -- this is the only file outside the refresh that touches the
draw.c:		if (!strcmp (path, pic->name))
draw.c:		strcpy (pic->name, path);
draw.c:	dat = Cache_Check (&pic->cache);
draw.c:	COM_LoadCacheFile (path, &pic->cache);
draw.c:	dat = (qpic_t *)pic->cache.data;
draw.c:	r_rectdesc.width = draw_backtile->width;
draw.c:	r_rectdesc.height = draw_backtile->height;
draw.c:	r_rectdesc.ptexbytes = draw_backtile->data;
draw.c:	r_rectdesc.rowbytes = draw_backtile->width;
draw.c:	if (y <= -8)
draw.c:	if (y > vid.height - 8 || x < 0 || x > vid.width - 8)
draw.c:		source -= 128*y;
draw.c:		while (drawline--)
draw.c:	// FIXME: pre-expand to native format?
draw.c:		while (drawline--)
draw.c:	while (drawline--)
draw.c:		(x + pic->width > vid.width) ||
draw.c:		(y + pic->height > vid.height))
draw.c:	source = pic->data;
draw.c:		for (v=0 ; v<pic->height ; v++)
draw.c:			Q_memcpy (dest, source, pic->width);
draw.c:			source += pic->width;
draw.c:		for (v=0 ; v<pic->height ; v++)
draw.c:			for (u=0 ; u<pic->width ; u++)
draw.c:			source += pic->width;
draw.c:	if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 ||
draw.c:		 (unsigned)(y + pic->height) > vid.height)
draw.c:	source = pic->data;
draw.c:		if (pic->width & 7)
draw.c:			for (v=0 ; v<pic->height ; v++)
draw.c:				for (u=0 ; u<pic->width ; u++)
draw.c:				source += pic->width;
draw.c:			for (v=0 ; v<pic->height ; v++)
draw.c:				for (u=0 ; u<pic->width ; u+=8)
draw.c:				source += pic->width;
draw.c:		for (v=0 ; v<pic->height ; v++)
draw.c:			for (u=0 ; u<pic->width ; u++)
draw.c:			source += pic->width;
draw.c:	if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 ||
draw.c:		 (unsigned)(y + pic->height) > vid.height)
draw.c:	source = pic->data;
draw.c:		if (pic->width & 7)
draw.c:			for (v=0 ; v<pic->height ; v++)
draw.c:				for (u=0 ; u<pic->width ; u++)
draw.c:				source += pic->width;
draw.c:			for (v=0 ; v<pic->height ; v++)
draw.c:				for (u=0 ; u<pic->width ; u+=8)
draw.c:				source += pic->width;
draw.c:		for (v=0 ; v<pic->height ; v++)
draw.c:			for (u=0 ; u<pic->width ; u++)
draw.c:			source += pic->width;
draw.c:	while (drawline--)
draw.c:	dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
draw.c:	dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
draw.c:	dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
draw.c:	dest = conback->data + 320 - 43 + 320*186;
draw.c:			v = (vid.conheight - lines + y)*200/vid.conheight;
draw.c:			src = conback->data + v*320;
draw.c:		// FIXME: pre-expand to native format?
draw.c:			v = (vid.conheight - lines + y)*200/vid.conheight;
draw.c:			src = conback->data + v*320;
draw.c:	pdest = vid.buffer + (prect->y * vid.rowbytes) + prect->x;
draw.c:	srcdelta = rowbytes - prect->width;
draw.c:	destdelta = vid.rowbytes - prect->width;
draw.c:		for (i=0 ; i<prect->height ; i++)
draw.c:			for (j=0 ; j<prect->width ; j++)
draw.c:		for (i=0 ; i<prect->height ; i++)
draw.c:			memcpy (pdest, psrc, prect->width);
draw.c:// FIXME: would it be better to pre-expand native-format versions?
draw.c:			(prect->y * (vid.rowbytes >> 1)) + prect->x;
draw.c:	srcdelta = rowbytes - prect->width;
draw.c:	destdelta = (vid.rowbytes >> 1) - prect->width;
draw.c:		for (i=0 ; i<prect->height ; i++)
draw.c:			for (j=0 ; j<prect->width ; j++)
draw.c:		for (i=0 ; i<prect->height ; i++)
draw.c:			for (j=0 ; j<prect->width ; j++)
draw.c:			vr.height = r_rectdesc.height - tileoffsety;
draw.c:				vr.width = r_rectdesc.width - tileoffsetx;
draw.c:			width -= vr.width;
draw.c:			tileoffsetx = 0;	// only the left tile can be left-clipped
draw.c:		height -= vr.height;
draw.c:		tileoffsety = 0;		// only the top tile can be top-clipped
draw.c:	D_BeginDirectRect (vid.width - 24, 0, draw_disc->data, 24, 24);
draw.c:	D_EndDirectRect (vid.width - 24, 0, 24, 24);
draw.h:Copyright (C) 1996-1997 Id Software, Inc.
draw.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
draw.h:// draw.h -- these are the only functions outside the refresh allowed
dynamic_r.h:#pragma warning( disable : 4305 ) // shut up compiler -- trunc from double to float.
dynamic_r.h:// only non-export -- used internally.
gl_draw.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_draw.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_draw.c:// draw.c -- this is the only file outside the refresh that touches the
gl_draw.c:		for (i=0 ; i<BLOCK_WIDTH-w ; i++)
gl_draw.c:	gl = (glpic_t *)p->data;
gl_draw.c:	if (p->width < 64 && p->height < 64)
gl_draw.c:		texnum = Scrap_AllocBlock (p->width, p->height, &x, &y);
gl_draw.c:		for (i=0 ; i<p->height ; i++)
gl_draw.c:			for (j=0 ; j<p->width ; j++, k++)
gl_draw.c:				scrap_texels[texnum][(y+i)*BLOCK_WIDTH + x + j] = p->data[k];
gl_draw.c:		gl->texnum = texnum;
gl_draw.c:		gl->sl = (x+0.01)/(float)BLOCK_WIDTH;
gl_draw.c:		gl->sh = (x+p->width-0.01)/(float)BLOCK_WIDTH;
gl_draw.c:		gl->tl = (y+0.01)/(float)BLOCK_WIDTH;
gl_draw.c:		gl->th = (y+p->height-0.01)/(float)BLOCK_WIDTH;
gl_draw.c:		pic_texels += p->width*p->height;
gl_draw.c:		gl->texnum = GL_LoadPicTexture (p);
gl_draw.c:		gl->sl = 0;
gl_draw.c:		gl->sh = 1;
gl_draw.c:		gl->tl = 0;
gl_draw.c:		gl->th = 1;
gl_draw.c:		if (!strcmp (path, pic->name))
gl_draw.c:			return &pic->pic;
gl_draw.c:	strcpy (pic->name, path);
gl_draw.c:	// HACK HACK HACK --- we need to keep the bytes for
gl_draw.c:		memcpy (menuplyr_pixels, dat->data, dat->width*dat->height);
gl_draw.c:	pic->pic.width = dat->width;
gl_draw.c:	pic->pic.height = dat->height;
gl_draw.c:	gl = (glpic_t *)pic->pic.data;
gl_draw.c:	gl->texnum = GL_LoadPicTexture (dat);
gl_draw.c:	gl->sl = 0;
gl_draw.c:	gl->sh = 1;
gl_draw.c:	gl->tl = 0;
gl_draw.c:	gl->th = 1;
gl_draw.c:	return &pic->pic;
gl_draw.c:	while (drawline--)
gl_draw.c:		if (glt->mipmap)
gl_draw.c:			GL_Bind (glt->texnum);
gl_draw.c:	dest = cb->data + 320*186 + 320 - 11 - 8*strlen(ver);
gl_draw.c:	conback->width = vid.conwidth;
gl_draw.c:	conback->height = vid.conheight;
gl_draw.c: 		src = cb->data + cb->width * (y*cb->height/vid.conheight);
gl_draw.c: 		if (vid.conwidth == cb->width)
gl_draw.c: 			fstep = cb->width*0x10000/vid.conwidth;
gl_draw.c:	conback->width = cb->width;
gl_draw.c:	conback->height = cb->height;
gl_draw.c:	ncdata = cb->data;
gl_draw.c:	gl = (glpic_t *)conback->data;
gl_draw.c:	gl->texnum = GL_LoadTexture ("conback", conback->width, conback->height, ncdata, false, false);
gl_draw.c:	gl->sl = 0;
gl_draw.c:	gl->sh = 1;
gl_draw.c:	gl->tl = 0;
gl_draw.c:	gl->th = 1;
gl_draw.c:	conback->width = vid.width;
gl_draw.c:	conback->height = vid.height;
gl_draw.c:	if (y <= -8)
gl_draw.c:	gl = (glpic_t *)pic->data;
gl_draw.c:	GL_Bind (gl->texnum);
gl_draw.c:	glTexCoord2f (gl->sl, gl->tl);
gl_draw.c:	glTexCoord2f (gl->sh, gl->tl);
gl_draw.c:	glVertex2f (x+pic->width, y);
gl_draw.c:	glTexCoord2f (gl->sh, gl->th);
gl_draw.c:	glVertex2f (x+pic->width, y+pic->height);
gl_draw.c:	glTexCoord2f (gl->sl, gl->th);
gl_draw.c:	glVertex2f (x, y+pic->height);
gl_draw.c:	gl = (glpic_t *)pic->data;
gl_draw.c:	GL_Bind (gl->texnum);
gl_draw.c:	glTexCoord2f (gl->sl, gl->tl);
gl_draw.c:	glTexCoord2f (gl->sh, gl->tl);
gl_draw.c:	glVertex2f (x+pic->width, y);
gl_draw.c:	glTexCoord2f (gl->sh, gl->th);
gl_draw.c:	glVertex2f (x+pic->width, y+pic->height);
gl_draw.c:	glTexCoord2f (gl->sl, gl->th);
gl_draw.c:	glVertex2f (x, y+pic->height);
gl_draw.c:	if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 ||
gl_draw.c:		 (unsigned)(y + pic->height) > vid.height)
gl_draw.c:	c = pic->width * pic->height;
gl_draw.c:		src = &menuplyr_pixels[ ((v*pic->height)>>6) *pic->width];
gl_draw.c:			p = src[(u*pic->width)>>6];
gl_draw.c:	glVertex2f (x+pic->width, y);
gl_draw.c:	glVertex2f (x+pic->width, y+pic->height);
gl_draw.c:	glVertex2f (x, y+pic->height);
gl_draw.c:		Draw_Pic(0, lines - vid.height, conback);
gl_draw.c:		Draw_AlphaPic (0, lines - vid.height, conback, (float)(1.2 * lines)/y);
gl_draw.c:	GL_Bind (*(int *)draw_backtile->data);
gl_draw.c:	Draw_Pic (vid.width - 24, 0, draw_disc);
gl_draw.c:	glOrtho  (0, vid.width, vid.height, 0, -99999, 99999);
gl_draw.c:		if (!strcmp (identifier, glt->identifier))
gl_draw.c:	return -1;
gl_draw.c:GL_Resample8BitTexture -- JACK
gl_draw.c:			if (!strcmp (identifier, glt->identifier))
gl_draw.c:				if (width != glt->width || height != glt->height)
gl_draw.c:	strcpy (glt->identifier, identifier);
gl_draw.c:	glt->texnum = texture_extension_number;
gl_draw.c:	glt->width = width;
gl_draw.c:	glt->height = height;
gl_draw.c:	glt->mipmap = mipmap;
gl_draw.c:	return texture_extension_number-1;
gl_draw.c:	return GL_LoadTexture ("", pic->width, pic->height, pic->data, false, true);
gl_mesh.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_mesh.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_mesh.c:	stripverts[0] = last->vertindex[(startv)%3];
gl_mesh.c:	stripverts[1] = last->vertindex[(startv+1)%3];
gl_mesh.c:	stripverts[2] = last->vertindex[(startv+2)%3];
gl_mesh.c:	m1 = last->vertindex[(startv+2)%3];
gl_mesh.c:	m2 = last->vertindex[(startv+1)%3];
gl_mesh.c:	for (j=starttri+1, check=&triangles[starttri+1] ; j<pheader->numtris ; j++, check++)
gl_mesh.c:		if (check->facesfront != last->facesfront)
gl_mesh.c:			if (check->vertindex[k] != m1)
gl_mesh.c:			if (check->vertindex[ (k+1)%3 ] != m2)
gl_mesh.c:				m2 = check->vertindex[ (k+2)%3 ];
gl_mesh.c:				m1 = check->vertindex[ (k+2)%3 ];
gl_mesh.c:			stripverts[stripcount+2] = check->vertindex[ (k+2)%3 ];
gl_mesh.c:	for (j=starttri+1 ; j<pheader->numtris ; j++)
gl_mesh.c:	stripverts[0] = last->vertindex[(startv)%3];
gl_mesh.c:	stripverts[1] = last->vertindex[(startv+1)%3];
gl_mesh.c:	stripverts[2] = last->vertindex[(startv+2)%3];
gl_mesh.c:	m1 = last->vertindex[(startv+0)%3];
gl_mesh.c:	m2 = last->vertindex[(startv+2)%3];
gl_mesh.c:	for (j=starttri+1, check=&triangles[starttri+1] ; j<pheader->numtris ; j++, check++)
gl_mesh.c:		if (check->facesfront != last->facesfront)
gl_mesh.c:			if (check->vertindex[k] != m1)
gl_mesh.c:			if (check->vertindex[ (k+1)%3 ] != m2)
gl_mesh.c:			m2 = check->vertindex[ (k+2)%3 ];
gl_mesh.c:	for (j=starttri+1 ; j<pheader->numtris ; j++)
gl_mesh.c:	for (i=0 ; i<pheader->numtris ; i++)
gl_mesh.c:			commands[numcommands++] = -(bestlen+2);
gl_mesh.c:				s += pheader->skinwidth / 2;	// on back side
gl_mesh.c:			s = (s + 0.5) / pheader->skinwidth;
gl_mesh.c:			t = (t + 0.5) / pheader->skinheight;
gl_mesh.c:	Con_DPrintf ("%3i tri %3i vert %3i cmd\n", pheader->numtris, numorder, numcommands);
gl_mesh.c:	alltris += pheader->numtris;
gl_mesh.c:	COM_StripExtension (m->name+strlen("progs/"), cache+strlen("glquake/"));
gl_mesh.c:		Con_Printf ("meshing %s...\n",m->name);
gl_mesh.c:	paliashdr->poseverts = numorder;
gl_mesh.c:	paliashdr->commands = (byte *)cmds - (byte *)paliashdr;
gl_mesh.c:	verts = Hunk_Alloc (paliashdr->numposes * paliashdr->poseverts 
gl_mesh.c:	paliashdr->posedata = (byte *)verts - (byte *)paliashdr;
gl_mesh.c:	for (i=0 ; i<paliashdr->numposes ; i++)
gl_model.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_model.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_model.c:// models.c -- model loading and caching
gl_model.c:	r = Cache_Check (&mod->cache);
gl_model.c:	if (!mod->cache.data)
gl_model.c:	return mod->cache.data;
gl_model.c:	if (!model || !model->nodes)
gl_model.c:	node = model->nodes;
gl_model.c:		if (node->contents < 0)
gl_model.c:		plane = node->plane;
gl_model.c:		d = DotProduct (p,plane->normal) - plane->dist;
gl_model.c:			node = node->children[0];
gl_model.c:			node = node->children[1];
gl_model.c:	row = (model->numleafs+7)>>3;	
gl_model.c:			row--;
gl_model.c:			c--;
gl_model.c:	} while (out - decompressed < row);
gl_model.c:	if (leaf == model->leafs)
gl_model.c:	return Mod_DecompressVis (leaf->compressed_vis, model);
gl_model.c:		if (mod->type != mod_alias)
gl_model.c:			mod->needload = true;
gl_model.c:		if (!strcmp (mod->name, name) )
gl_model.c:		strcpy (mod->name, name);
gl_model.c:		mod->needload = true;
gl_model.c:	if (!mod->needload)
gl_model.c:		if (mod->type == mod_alias)
gl_model.c:			Cache_Check (&mod->cache);
gl_model.c:	if (!mod->needload)
gl_model.c:		if (mod->type == mod_alias)
gl_model.c:			d = Cache_Check (&mod->cache);
gl_model.c:	buf = (unsigned *)COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf));
gl_model.c:			Sys_Error ("Mod_NumForName: %s not found", mod->name);
gl_model.c:	COM_FileBase (mod->name, loadname);
gl_model.c:	mod->needload = false;
gl_model.c:	if (!l->filelen)
gl_model.c:		loadmodel->textures = NULL;
gl_model.c:	m = (dmiptexlump_t *)(mod_base + l->fileofs);
gl_model.c:	m->nummiptex = LittleLong (m->nummiptex);
gl_model.c:	loadmodel->numtextures = m->nummiptex;
gl_model.c:	loadmodel->textures = Hunk_AllocName (m->nummiptex * sizeof(*loadmodel->textures) , loadname);
gl_model.c:	for (i=0 ; i<m->nummiptex ; i++)
gl_model.c:		m->dataofs[i] = LittleLong(m->dataofs[i]);
gl_model.c:		if (m->dataofs[i] == -1)
gl_model.c:		mt = (miptex_t *)((byte *)m + m->dataofs[i]);
gl_model.c:		mt->width = LittleLong (mt->width);
gl_model.c:		mt->height = LittleLong (mt->height);
gl_model.c:			mt->offsets[j] = LittleLong (mt->offsets[j]);
gl_model.c:		if ( (mt->width & 15) || (mt->height & 15) )
gl_model.c:			Sys_Error ("Texture %s is not 16 aligned", mt->name);
gl_model.c:		pixels = mt->width*mt->height/64*85;
gl_model.c:		loadmodel->textures[i] = tx;
gl_model.c:		memcpy (tx->name, mt->name, sizeof(tx->name));
gl_model.c:		tx->width = mt->width;
gl_model.c:		tx->height = mt->height;
gl_model.c:			tx->offsets[j] = mt->offsets[j] + sizeof(texture_t) - sizeof(miptex_t);
gl_model.c:		if (!Q_strncmp(mt->name,"sky",3))	
gl_model.c:			tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx+1), true, false);
gl_model.c:	for (i=0 ; i<m->nummiptex ; i++)
gl_model.c:		tx = loadmodel->textures[i];
gl_model.c:		if (!tx || tx->name[0] != '+')
gl_model.c:		if (tx->anim_next)
gl_model.c:		max = tx->name[1];
gl_model.c:			max -= 'a' - 'A';
gl_model.c:			max -= '0';
gl_model.c:			altmax = max - 'A';
gl_model.c:			Sys_Error ("Bad animating texture %s", tx->name);
gl_model.c:		for (j=i+1 ; j<m->nummiptex ; j++)
gl_model.c:			tx2 = loadmodel->textures[j];
gl_model.c:			if (!tx2 || tx2->name[0] != '+')
gl_model.c:			if (strcmp (tx2->name+2, tx->name+2))
gl_model.c:			num = tx2->name[1];
gl_model.c:				num -= 'a' - 'A';
gl_model.c:				num -= '0';
gl_model.c:				num = num - 'A';
gl_model.c:				Sys_Error ("Bad animating texture %s", tx->name);
gl_model.c:				Sys_Error ("Missing frame %i of %s",j, tx->name);
gl_model.c:			tx2->anim_total = max * ANIM_CYCLE;
gl_model.c:			tx2->anim_min = j * ANIM_CYCLE;
gl_model.c:			tx2->anim_max = (j+1) * ANIM_CYCLE;
gl_model.c:			tx2->anim_next = anims[ (j+1)%max ];
gl_model.c:				tx2->alternate_anims = altanims[0];
gl_model.c:				Sys_Error ("Missing frame %i of %s",j, tx->name);
gl_model.c:			tx2->anim_total = altmax * ANIM_CYCLE;
gl_model.c:			tx2->anim_min = j * ANIM_CYCLE;
gl_model.c:			tx2->anim_max = (j+1) * ANIM_CYCLE;
gl_model.c:			tx2->anim_next = altanims[ (j+1)%altmax ];
gl_model.c:				tx2->alternate_anims = anims[0];
gl_model.c:	if (!l->filelen)
gl_model.c:		loadmodel->lightdata = NULL;
gl_model.c:	loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname);	
gl_model.c:	memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
gl_model.c:	if (!l->filelen)
gl_model.c:		loadmodel->visdata = NULL;
gl_model.c:	loadmodel->visdata = Hunk_AllocName ( l->filelen, loadname);	
gl_model.c:	memcpy (loadmodel->visdata, mod_base + l->fileofs, l->filelen);
gl_model.c:	if (!l->filelen)
gl_model.c:		loadmodel->entities = NULL;
gl_model.c:	loadmodel->entities = Hunk_AllocName ( l->filelen, loadname);	
gl_model.c:	memcpy (loadmodel->entities, mod_base + l->fileofs, l->filelen);
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->vertexes = out;
gl_model.c:	loadmodel->numvertexes = count;
gl_model.c:		out->position[0] = LittleFloat (in->point[0]);
gl_model.c:		out->position[1] = LittleFloat (in->point[1]);
gl_model.c:		out->position[2] = LittleFloat (in->point[2]);
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->submodels = out;
gl_model.c:	loadmodel->numsubmodels = count;
gl_model.c:			out->mins[j] = LittleFloat (in->mins[j]) - 1;
gl_model.c:			out->maxs[j] = LittleFloat (in->maxs[j]) + 1;
gl_model.c:			out->origin[j] = LittleFloat (in->origin[j]);
gl_model.c:			out->headnode[j] = LittleLong (in->headnode[j]);
gl_model.c:		out->visleafs = LittleLong (in->visleafs);
gl_model.c:		out->firstface = LittleLong (in->firstface);
gl_model.c:		out->numfaces = LittleLong (in->numfaces);
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->edges = out;
gl_model.c:	loadmodel->numedges = count;
gl_model.c:		out->v[0] = (unsigned short)LittleShort(in->v[0]);
gl_model.c:		out->v[1] = (unsigned short)LittleShort(in->v[1]);
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->texinfo = out;
gl_model.c:	loadmodel->numtexinfo = count;
gl_model.c:			out->vecs[0][j] = LittleFloat (in->vecs[0][j]);
gl_model.c:		len1 = Length (out->vecs[0]);
gl_model.c:		len2 = Length (out->vecs[1]);
gl_model.c:			out->mipadjust = 4;
gl_model.c:			out->mipadjust = 3;
gl_model.c:			out->mipadjust = 2;
gl_model.c:			out->mipadjust = 1;
gl_model.c:			out->mipadjust = 1;		// don't crash
gl_model.c:			out->mipadjust = 1 / floor( (len1+len2)/2 + 0.1 );
gl_model.c:		miptex = LittleLong (in->miptex);
gl_model.c:		out->flags = LittleLong (in->flags);
gl_model.c:		if (!loadmodel->textures)
gl_model.c:			out->texture = r_notexture_mip;	// checkerboard texture
gl_model.c:			out->flags = 0;
gl_model.c:			if (miptex >= loadmodel->numtextures)
gl_model.c:				Sys_Error ("miptex >= loadmodel->numtextures");
gl_model.c:			out->texture = loadmodel->textures[miptex];
gl_model.c:			if (!out->texture)
gl_model.c:				out->texture = r_notexture_mip; // texture not found
gl_model.c:				out->flags = 0;
gl_model.c:Fills in s->texturemins[] and s->extents[]
gl_model.c:	maxs[0] = maxs[1] = -99999;
gl_model.c:	tex = s->texinfo;
gl_model.c:	for (i=0 ; i<s->numedges ; i++)
gl_model.c:		e = loadmodel->surfedges[s->firstedge+i];
gl_model.c:			v = &loadmodel->vertexes[loadmodel->edges[e].v[0]];
gl_model.c:			v = &loadmodel->vertexes[loadmodel->edges[-e].v[1]];
gl_model.c:			val = v->position[0] * tex->vecs[j][0] + 
gl_model.c:				v->position[1] * tex->vecs[j][1] +
gl_model.c:				v->position[2] * tex->vecs[j][2] +
gl_model.c:				tex->vecs[j][3];
gl_model.c:		s->texturemins[i] = bmins[i] * 16;
gl_model.c:		s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
gl_model.c:		if ( !(tex->flags & TEX_SPECIAL) && s->extents[i] > 512 /* 256 */ )
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->surfaces = out;
gl_model.c:	loadmodel->numsurfaces = count;
gl_model.c:		out->firstedge = LittleLong(in->firstedge);
gl_model.c:		out->numedges = LittleShort(in->numedges);		
gl_model.c:		out->flags = 0;
gl_model.c:		planenum = LittleShort(in->planenum);
gl_model.c:		side = LittleShort(in->side);
gl_model.c:			out->flags |= SURF_PLANEBACK;			
gl_model.c:		out->plane = loadmodel->planes + planenum;
gl_model.c:		out->texinfo = loadmodel->texinfo + LittleShort (in->texinfo);
gl_model.c:			out->styles[i] = in->styles[i];
gl_model.c:		i = LittleLong(in->lightofs);
gl_model.c:		if (i == -1)
gl_model.c:			out->samples = NULL;
gl_model.c:			out->samples = loadmodel->lightdata + i;
gl_model.c:		if (!Q_strncmp(out->texinfo->texture->name,"sky",3))	// sky
gl_model.c:			out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
gl_model.c:		if (!Q_strncmp(out->texinfo->texture->name,"*",1))		// turbulent
gl_model.c:			out->flags |= (SURF_DRAWTURB | SURF_DRAWTILED);
gl_model.c:				out->extents[i] = 16384;
gl_model.c:				out->texturemins[i] = -8192;
gl_model.c:	node->parent = parent;
gl_model.c:	if (node->contents < 0)
gl_model.c:	Mod_SetParent (node->children[0], node);
gl_model.c:	Mod_SetParent (node->children[1], node);
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->nodes = out;
gl_model.c:	loadmodel->numnodes = count;
gl_model.c:			out->minmaxs[j] = LittleShort (in->mins[j]);
gl_model.c:			out->minmaxs[3+j] = LittleShort (in->maxs[j]);
gl_model.c:		p = LittleLong(in->planenum);
gl_model.c:		out->plane = loadmodel->planes + p;
gl_model.c:		out->firstsurface = LittleShort (in->firstface);
gl_model.c:		out->numsurfaces = LittleShort (in->numfaces);
gl_model.c:			p = LittleShort (in->children[j]);
gl_model.c:				out->children[j] = loadmodel->nodes + p;
gl_model.c:				out->children[j] = (mnode_t *)(loadmodel->leafs + (-1 - p));
gl_model.c:	Mod_SetParent (loadmodel->nodes, NULL);	// sets nodes and leafs
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->leafs = out;
gl_model.c:	loadmodel->numleafs = count;
gl_model.c:			out->minmaxs[j] = LittleShort (in->mins[j]);
gl_model.c:			out->minmaxs[3+j] = LittleShort (in->maxs[j]);
gl_model.c:		p = LittleLong(in->contents);
gl_model.c:		out->contents = p;
gl_model.c:		out->firstmarksurface = loadmodel->marksurfaces +
gl_model.c:			LittleShort(in->firstmarksurface);
gl_model.c:		out->nummarksurfaces = LittleShort(in->nummarksurfaces);
gl_model.c:		p = LittleLong(in->visofs);
gl_model.c:		if (p == -1)
gl_model.c:			out->compressed_vis = NULL;
gl_model.c:			out->compressed_vis = loadmodel->visdata + p;
gl_model.c:		out->efrags = NULL;
gl_model.c:			out->ambient_sound_level[j] = in->ambient_level[j];
gl_model.c:		if (out->contents != CONTENTS_EMPTY)
gl_model.c:			for (j=0 ; j<out->nummarksurfaces ; j++)
gl_model.c:				out->firstmarksurface[j]->flags |= SURF_UNDERWATER;
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->clipnodes = out;
gl_model.c:	loadmodel->numclipnodes = count;
gl_model.c:	hull = &loadmodel->hulls[1];
gl_model.c:	hull->clipnodes = out;
gl_model.c:	hull->firstclipnode = 0;
gl_model.c:	hull->lastclipnode = count-1;
gl_model.c:	hull->planes = loadmodel->planes;
gl_model.c:	hull->clip_mins[0] = -16;
gl_model.c:	hull->clip_mins[1] = -16;
gl_model.c:	hull->clip_mins[2] = -24;
gl_model.c:	hull->clip_maxs[0] = 16;
gl_model.c:	hull->clip_maxs[1] = 16;
gl_model.c:	hull->clip_maxs[2] = 32;
gl_model.c:	hull = &loadmodel->hulls[2];
gl_model.c:	hull->clipnodes = out;
gl_model.c:	hull->firstclipnode = 0;
gl_model.c:	hull->lastclipnode = count-1;
gl_model.c:	hull->planes = loadmodel->planes;
gl_model.c:	hull->clip_mins[0] = -32;
gl_model.c:	hull->clip_mins[1] = -32;
gl_model.c:	hull->clip_mins[2] = -24;
gl_model.c:	hull->clip_maxs[0] = 32;
gl_model.c:	hull->clip_maxs[1] = 32;
gl_model.c:	hull->clip_maxs[2] = 64;
gl_model.c:		out->planenum = LittleLong(in->planenum);
gl_model.c:		out->children[0] = LittleShort(in->children[0]);
gl_model.c:		out->children[1] = LittleShort(in->children[1]);
gl_model.c:	hull = &loadmodel->hulls[0];	
gl_model.c:	in = loadmodel->nodes;
gl_model.c:	count = loadmodel->numnodes;
gl_model.c:	hull->clipnodes = out;
gl_model.c:	hull->firstclipnode = 0;
gl_model.c:	hull->lastclipnode = count-1;
gl_model.c:	hull->planes = loadmodel->planes;
gl_model.c:		out->planenum = in->plane - loadmodel->planes;
gl_model.c:			child = in->children[j];
gl_model.c:			if (child->contents < 0)
gl_model.c:				out->children[j] = child->contents;
gl_model.c:				out->children[j] = child - loadmodel->nodes;
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->marksurfaces = out;
gl_model.c:	loadmodel->nummarksurfaces = count;
gl_model.c:		if (j >= loadmodel->numsurfaces)
gl_model.c:		out[i] = loadmodel->surfaces + j;
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->surfedges = out;
gl_model.c:	loadmodel->numsurfedges = count;
gl_model.c:	in = (void *)(mod_base + l->fileofs);
gl_model.c:	if (l->filelen % sizeof(*in))
gl_model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
gl_model.c:	count = l->filelen / sizeof(*in);
gl_model.c:	loadmodel->planes = out;
gl_model.c:	loadmodel->numplanes = count;
gl_model.c:			out->normal[j] = LittleFloat (in->normal[j]);
gl_model.c:			if (out->normal[j] < 0)
gl_model.c:		out->dist = LittleFloat (in->dist);
gl_model.c:		out->type = LittleLong (in->type);
gl_model.c:		out->signbits = bits;
gl_model.c:	loadmodel->type = mod_brush;
gl_model.c:	i = LittleLong (header->version);
gl_model.c:		Sys_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
gl_model.c:	Mod_LoadVertexes (&header->lumps[LUMP_VERTEXES]);
gl_model.c:	Mod_LoadEdges (&header->lumps[LUMP_EDGES]);
gl_model.c:	Mod_LoadSurfedges (&header->lumps[LUMP_SURFEDGES]);
gl_model.c:	Mod_LoadTextures (&header->lumps[LUMP_TEXTURES]);
gl_model.c:	Mod_LoadLighting (&header->lumps[LUMP_LIGHTING]);
gl_model.c:	Mod_LoadPlanes (&header->lumps[LUMP_PLANES]);
gl_model.c:	Mod_LoadTexinfo (&header->lumps[LUMP_TEXINFO]);
gl_model.c:	Mod_LoadFaces (&header->lumps[LUMP_FACES]);
gl_model.c:	Mod_LoadMarksurfaces (&header->lumps[LUMP_MARKSURFACES]);
gl_model.c:	Mod_LoadVisibility (&header->lumps[LUMP_VISIBILITY]);
gl_model.c:	Mod_LoadLeafs (&header->lumps[LUMP_LEAFS]);
gl_model.c:	Mod_LoadNodes (&header->lumps[LUMP_NODES]);
gl_model.c:	Mod_LoadClipnodes (&header->lumps[LUMP_CLIPNODES]);
gl_model.c:	Mod_LoadEntities (&header->lumps[LUMP_ENTITIES]);
gl_model.c:	Mod_LoadSubmodels (&header->lumps[LUMP_MODELS]);
gl_model.c:	mod->numframes = 2;		// regular and alternate animation
gl_model.c:	for (i=0 ; i<mod->numsubmodels ; i++)
gl_model.c:		bm = &mod->submodels[i];
gl_model.c:		mod->hulls[0].firstclipnode = bm->headnode[0];
gl_model.c:			mod->hulls[j].firstclipnode = bm->headnode[j];
gl_model.c:			mod->hulls[j].lastclipnode = mod->numclipnodes-1;
gl_model.c:		mod->firstmodelsurface = bm->firstface;
gl_model.c:		mod->nummodelsurfaces = bm->numfaces;
gl_model.c:		VectorCopy (bm->maxs, mod->maxs);
gl_model.c:		VectorCopy (bm->mins, mod->mins);
gl_model.c:		mod->radius = RadiusFromBounds (mod->mins, mod->maxs);
gl_model.c:		mod->numleafs = bm->visleafs;
gl_model.c:		if (i < mod->numsubmodels-1)
gl_model.c:			strcpy (loadmodel->name, name);
gl_model.c:	strcpy (frame->name, pdaliasframe->name);
gl_model.c:	frame->firstpose = posenum;
gl_model.c:	frame->numposes = 1;
gl_model.c:		frame->bboxmin.v[i] = pdaliasframe->bboxmin.v[i];
gl_model.c:		frame->bboxmin.v[i] = pdaliasframe->bboxmax.v[i];
gl_model.c:	pinframe += pheader->numverts;
gl_model.c:	numframes = LittleLong (pingroup->numframes);
gl_model.c:	frame->firstpose = posenum;
gl_model.c:	frame->numposes = numframes;
gl_model.c:		frame->bboxmin.v[i] = pingroup->bboxmin.v[i];
gl_model.c:		frame->bboxmin.v[i] = pingroup->bboxmax.v[i];
gl_model.c:	frame->interval = LittleFloat (pin_intervals->interval);
gl_model.c:		ptemp = (trivertx_t *)((daliasframe_t *)ptemp + 1) + pheader->numverts;
gl_model.c:Fill background pixels so mipmapping doesn't have haloes - Ed
gl_model.c:#define FLOODFILL_FIFO_MASK (FLOODFILL_FIFO_SIZE - 1)
gl_model.c:	int					filledcolor = -1;
gl_model.c:	if (filledcolor == -1)
gl_model.c:		if (x > 0)				FLOODFILL_STEP( -1, -1, 0 );
gl_model.c:		if (x < skinwidth - 1)	FLOODFILL_STEP( 1, 1, 0 );
gl_model.c:		if (y > 0)				FLOODFILL_STEP( -skinwidth, 0, -1 );
gl_model.c:		if (y < skinheight - 1)	FLOODFILL_STEP( skinwidth, 0, 1 );
gl_model.c:	s = pheader->skinwidth * pheader->skinheight;
gl_model.c:		if (pskintype->type == ALIAS_SKIN_SINGLE) {
gl_model.c:			Mod_FloodFillSkin( skin, pheader->skinwidth, pheader->skinheight );
gl_model.c:	//		if (!strcmp(loadmodel->name,"progs/player.mdl")) {
gl_model.c:				pheader->texels[i] = texels - (byte *)pheader;
gl_model.c:			sprintf (name, "%s_%i", loadmodel->name, i);
gl_model.c:			pheader->gl_texturenum[i][0] =
gl_model.c:			pheader->gl_texturenum[i][1] =
gl_model.c:			pheader->gl_texturenum[i][2] =
gl_model.c:			pheader->gl_texturenum[i][3] =
gl_model.c:				GL_LoadTexture (name, pheader->skinwidth, 
gl_model.c:				pheader->skinheight, (byte *)(pskintype + 1), true, false);
gl_model.c:			groupskins = LittleLong (pinskingroup->numskins);
gl_model.c:					Mod_FloodFillSkin( skin, pheader->skinwidth, pheader->skinheight );
gl_model.c:						pheader->texels[i] = texels - (byte *)pheader;
gl_model.c:					sprintf (name, "%s_%i_%i", loadmodel->name, i,j);
gl_model.c:					pheader->gl_texturenum[i][j&3] = 
gl_model.c:						GL_LoadTexture (name, pheader->skinwidth, 
gl_model.c:						pheader->skinheight, (byte *)(pskintype), true, false);
gl_model.c:				pheader->gl_texturenum[i][j&3] = 
gl_model.c:				pheader->gl_texturenum[i][j - k]; 
gl_model.c:	version = LittleLong (pinmodel->version);
gl_model.c:				 mod->name, version, ALIAS_VERSION);
gl_model.c:			+ (LittleLong (pinmodel->numframes) - 1) *
gl_model.c:			sizeof (pheader->frames[0]);
gl_model.c:	mod->flags = LittleLong (pinmodel->flags);
gl_model.c:// endian-adjust and copy the data, starting with the alias model header
gl_model.c:	pheader->boundingradius = LittleFloat (pinmodel->boundingradius);
gl_model.c:	pheader->numskins = LittleLong (pinmodel->numskins);
gl_model.c:	pheader->skinwidth = LittleLong (pinmodel->skinwidth);
gl_model.c:	pheader->skinheight = LittleLong (pinmodel->skinheight);
gl_model.c:	if (pheader->skinheight > MAX_LBM_HEIGHT)
gl_model.c:		Sys_Error ("model %s has a skin taller than %d", mod->name,
gl_model.c:	pheader->numverts = LittleLong (pinmodel->numverts);
gl_model.c:	if (pheader->numverts <= 0)
gl_model.c:		Sys_Error ("model %s has no vertices", mod->name);
gl_model.c:	if (pheader->numverts > MAXALIASVERTS)
gl_model.c:		Sys_Error ("model %s has too many vertices", mod->name);
gl_model.c:	pheader->numtris = LittleLong (pinmodel->numtris);
gl_model.c:	if (pheader->numtris <= 0)
gl_model.c:		Sys_Error ("model %s has no triangles", mod->name);
gl_model.c:	pheader->numframes = LittleLong (pinmodel->numframes);
gl_model.c:	numframes = pheader->numframes;
gl_model.c:	pheader->size = LittleFloat (pinmodel->size) * ALIAS_BASE_SIZE_RATIO;
gl_model.c:	mod->synctype = LittleLong (pinmodel->synctype);
gl_model.c:	mod->numframes = pheader->numframes;
gl_model.c:		pheader->scale[i] = LittleFloat (pinmodel->scale[i]);
gl_model.c:		pheader->scale_origin[i] = LittleFloat (pinmodel->scale_origin[i]);
gl_model.c:		pheader->eyeposition[i] = LittleFloat (pinmodel->eyeposition[i]);
gl_model.c:	pskintype = Mod_LoadAllSkins (pheader->numskins, pskintype);
gl_model.c:	for (i=0 ; i<pheader->numverts ; i++)
gl_model.c:	pintriangles = (dtriangle_t *)&pinstverts[pheader->numverts];
gl_model.c:	for (i=0 ; i<pheader->numtris ; i++)
gl_model.c:	pframetype = (daliasframetype_t *)&pintriangles[pheader->numtris];
gl_model.c:		frametype = LittleLong (pframetype->type);
gl_model.c:					Mod_LoadAliasFrame (pframetype + 1, &pheader->frames[i]);
gl_model.c:					Mod_LoadAliasGroup (pframetype + 1, &pheader->frames[i]);
gl_model.c:	pheader->numposes = posenum;
gl_model.c:	mod->type = mod_alias;
gl_model.c:	mod->mins[0] = mod->mins[1] = mod->mins[2] = -16;
gl_model.c:	mod->maxs[0] = mod->maxs[1] = mod->maxs[2] = 16;
gl_model.c:	total = end - start;
gl_model.c:	Cache_Alloc (&mod->cache, total, loadname);
gl_model.c:	if (!mod->cache.data)
gl_model.c:	memcpy (mod->cache.data, pheader, total);
gl_model.c:	width = LittleLong (pinframe->width);
gl_model.c:	height = LittleLong (pinframe->height);
gl_model.c:	pspriteframe->width = width;
gl_model.c:	pspriteframe->height = height;
gl_model.c:	origin[0] = LittleLong (pinframe->origin[0]);
gl_model.c:	origin[1] = LittleLong (pinframe->origin[1]);
gl_model.c:	pspriteframe->up = origin[1];
gl_model.c:	pspriteframe->down = origin[1] - height;
gl_model.c:	pspriteframe->left = origin[0];
gl_model.c:	pspriteframe->right = width + origin[0];
gl_model.c:	sprintf (name, "%s_%i", loadmodel->name, framenum);
gl_model.c:	pspriteframe->gl_texturenum = GL_LoadTexture (name, width, height, (byte *)(pinframe + 1), true, true);
gl_model.c:	numframes = LittleLong (pingroup->numframes);
gl_model.c:				(numframes - 1) * sizeof (pspritegroup->frames[0]), loadname);
gl_model.c:	pspritegroup->numframes = numframes;
gl_model.c:	pspritegroup->intervals = poutintervals;
gl_model.c:		*poutintervals = LittleFloat (pin_intervals->interval);
gl_model.c:		ptemp = Mod_LoadSpriteFrame (ptemp, &pspritegroup->frames[i], framenum * 100 + i);
gl_model.c:	version = LittleLong (pin->version);
gl_model.c:				 "(%i should be %i)", mod->name, version, SPRITE_VERSION);
gl_model.c:	numframes = LittleLong (pin->numframes);
gl_model.c:	size = sizeof (msprite_t) +	(numframes - 1) * sizeof (psprite->frames);
gl_model.c:	mod->cache.data = psprite;
gl_model.c:	psprite->type = LittleLong (pin->type);
gl_model.c:	psprite->maxwidth = LittleLong (pin->width);
gl_model.c:	psprite->maxheight = LittleLong (pin->height);
gl_model.c:	psprite->beamlength = LittleFloat (pin->beamlength);
gl_model.c:	mod->synctype = LittleLong (pin->synctype);
gl_model.c:	psprite->numframes = numframes;
gl_model.c:	mod->mins[0] = mod->mins[1] = -psprite->maxwidth/2;
gl_model.c:	mod->maxs[0] = mod->maxs[1] = psprite->maxwidth/2;
gl_model.c:	mod->mins[2] = -psprite->maxheight/2;
gl_model.c:	mod->maxs[2] = psprite->maxheight/2;
gl_model.c:	mod->numframes = numframes;
gl_model.c:		frametype = LittleLong (pframetype->type);
gl_model.c:		psprite->frames[i].type = frametype;
gl_model.c:										 &psprite->frames[i].frameptr, i);
gl_model.c:										 &psprite->frames[i].frameptr, i);
gl_model.c:	mod->type = mod_sprite;
gl_model.c:		Con_Printf ("%8p : %s\n",mod->cache.data, mod->name);
gl_model.h:Copyright (C) 1996-1997 Id Software, Inc.
gl_model.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_model.h:d*_t structures are on-disk representations
gl_model.h:m*_t structures are in-memory
gl_model.h:	int			firstedge;	// look up in model->surfedges[], negative numbers
gl_refrag.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_refrag.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_refrag.c:	ef = ent->efrag;
gl_refrag.c:		prev = &ef->leaf->efrags;
gl_refrag.c:				*prev = ef->leafnext;
gl_refrag.c:				prev = &walk->leafnext;
gl_refrag.c:		ef = ef->entnext;
gl_refrag.c:		old->entnext = cl.free_efrags;
gl_refrag.c:	ent->efrag = NULL; 
gl_refrag.c:	if (node->contents == CONTENTS_SOLID)
gl_refrag.c:	if ( node->contents < 0)
gl_refrag.c:		cl.free_efrags = cl.free_efrags->entnext;
gl_refrag.c:		ef->entity = r_addent;
gl_refrag.c:		lastlink = &ef->entnext;
gl_refrag.c:		ef->entnext = NULL;
gl_refrag.c:		ef->leaf = leaf;
gl_refrag.c:		ef->leafnext = leaf->efrags;
gl_refrag.c:		leaf->efrags = ef;
gl_refrag.c:	splitplane = node->plane;
gl_refrag.c:		R_SplitEntityOnNode (node->children[0]);
gl_refrag.c:		R_SplitEntityOnNode (node->children[1]);
gl_refrag.c:	if (!ent->model)
gl_refrag.c:	lastlink = &ent->efrag;
gl_refrag.c:	entmodel = ent->model;
gl_refrag.c:		r_emins[i] = ent->origin[i] + entmodel->mins[i];
gl_refrag.c:		r_emaxs[i] = ent->origin[i] + entmodel->maxs[i];
gl_refrag.c:	R_SplitEntityOnNode (cl.worldmodel->nodes);
gl_refrag.c:	ent->topnode = r_pefragtopnode;
gl_refrag.c:// FIXME: a lot of this goes away with edge-based
gl_refrag.c:		pent = pefrag->entity;
gl_refrag.c:		clmodel = pent->model;
gl_refrag.c:		switch (clmodel->type)
gl_refrag.c:			pent = pefrag->entity;
gl_refrag.c:			if ((pent->visframe != r_framecount) &&
gl_refrag.c:				pent->visframe = r_framecount;
gl_refrag.c:			ppefrag = &pefrag->leafnext;
gl_refrag.c:			Sys_Error ("R_StoreEfrags: Bad entity type %d\n", clmodel->type);
gl_rlight.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_rlight.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_rlight.c:		k = cl_lightstyle[j].map[k] - 'a';
gl_rlight.c:	v_blend[3] = a = v_blend[3] + a2*(1-v_blend[3]);
gl_rlight.c:	v_blend[0] = v_blend[1]*(1-a2) + r*a2;
gl_rlight.c:	v_blend[1] = v_blend[1]*(1-a2) + g*a2;
gl_rlight.c:	v_blend[2] = v_blend[2]*(1-a2) + b*a2;
gl_rlight.c:	rad = light->radius * 0.35;
gl_rlight.c:	VectorSubtract (light->origin, r_origin, v);
gl_rlight.c:		AddLightBlend (1, 0.5, 0, light->radius * 0.0003);
gl_rlight.c:		v[i] = light->origin[i] - vpn[i]*rad;
gl_rlight.c:	for (i=16 ; i>=0 ; i--)
gl_rlight.c:			v[j] = light->origin[j] + vright[j]*cos(a)*rad
gl_rlight.c:		if (l->die < cl.time || !l->radius)
gl_rlight.c:	if (node->contents < 0)
gl_rlight.c:	splitplane = node->plane;
gl_rlight.c:	dist = DotProduct (light->origin, splitplane->normal) - splitplane->dist;
gl_rlight.c:	if (dist > light->radius)
gl_rlight.c:		R_MarkLights (light, bit, node->children[0]);
gl_rlight.c:	if (dist < -light->radius)
gl_rlight.c:		R_MarkLights (light, bit, node->children[1]);
gl_rlight.c:	surf = cl.worldmodel->surfaces + node->firstsurface;
gl_rlight.c:	for (i=0 ; i<node->numsurfaces ; i++, surf++)
gl_rlight.c:		if (surf->dlightframe != r_dlightframecount)
gl_rlight.c:			surf->dlightbits = 0;
gl_rlight.c:			surf->dlightframe = r_dlightframecount;
gl_rlight.c:		surf->dlightbits |= bit;
gl_rlight.c:	R_MarkLights (light, bit, node->children[0]);
gl_rlight.c:	R_MarkLights (light, bit, node->children[1]);
gl_rlight.c:		if (l->die < cl.time || !l->radius)
gl_rlight.c:		R_MarkLights ( l, 1<<i, cl.worldmodel->nodes );
gl_rlight.c:	if (node->contents < 0)
gl_rlight.c:		return -1;		// didn't hit anything
gl_rlight.c:	plane = node->plane;
gl_rlight.c:	front = DotProduct (start, plane->normal) - plane->dist;
gl_rlight.c:	back = DotProduct (end, plane->normal) - plane->dist;
gl_rlight.c:		return RecursiveLightPoint (node->children[side], start, end);
gl_rlight.c:	frac = front / (front-back);
gl_rlight.c:	mid[0] = start[0] + (end[0] - start[0])*frac;
gl_rlight.c:	mid[1] = start[1] + (end[1] - start[1])*frac;
gl_rlight.c:	mid[2] = start[2] + (end[2] - start[2])*frac;
gl_rlight.c:	r = RecursiveLightPoint (node->children[side], start, mid);
gl_rlight.c:		return -1;		// didn't hit anuthing
gl_rlight.c:	surf = cl.worldmodel->surfaces + node->firstsurface;
gl_rlight.c:	for (i=0 ; i<node->numsurfaces ; i++, surf++)
gl_rlight.c:		if (surf->flags & SURF_DRAWTILED)
gl_rlight.c:		tex = surf->texinfo;
gl_rlight.c:		s = DotProduct (mid, tex->vecs[0]) + tex->vecs[0][3];
gl_rlight.c:		t = DotProduct (mid, tex->vecs[1]) + tex->vecs[1][3];;
gl_rlight.c:		if (s < surf->texturemins[0] ||
gl_rlight.c:		t < surf->texturemins[1])
gl_rlight.c:		ds = s - surf->texturemins[0];
gl_rlight.c:		dt = t - surf->texturemins[1];
gl_rlight.c:		if ( ds > surf->extents[0] || dt > surf->extents[1] )
gl_rlight.c:		if (!surf->samples)
gl_rlight.c:		lightmap = surf->samples;
gl_rlight.c:			lightmap += dt * ((surf->extents[0]>>4)+1) + ds;
gl_rlight.c:			for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
gl_rlight.c:				scale = d_lightstylevalue[surf->styles[maps]];
gl_rlight.c:				lightmap += ((surf->extents[0]>>4)+1) *
gl_rlight.c:						((surf->extents[1]>>4)+1);
gl_rlight.c:	return RecursiveLightPoint (node->children[!side], mid, end);
gl_rlight.c:	if (!cl.worldmodel->lightdata)
gl_rlight.c:	end[2] = p[2] - 2048;
gl_rlight.c:	r = RecursiveLightPoint (cl.worldmodel->nodes, p, end);
gl_rlight.c:	if (r == -1)
gl_rmain.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_rmain.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_rmain.c:int			currenttexture = -1;		// to avoid unnecessary texture sets
gl_rmain.c:int			cnttextures[2] = {-1, -1};     // cached
gl_rmain.c:    glTranslatef (e->origin[0],  e->origin[1],  e->origin[2]);
gl_rmain.c:    glRotatef (e->angles[1],  0, 0, 1);
gl_rmain.c:    glRotatef (-e->angles[0],  0, 1, 0);
gl_rmain.c:    glRotatef (e->angles[2],  1, 0, 0);
gl_rmain.c:	if ((frame >= paliashdr->numframes) || (frame < 0))
gl_rmain.c:	pose = paliashdr->frames[frame].firstpose;
gl_rmain.c:	numposes = paliashdr->frames[frame].numposes;
gl_rmain.c:		interval = paliashdr->frames[frame].interval;
gl_rmain.c:	clmodel = currententity->model;
gl_rmain.c:	VectorAdd (currententity->origin, clmodel->mins, mins);
gl_rmain.c:	VectorAdd (currententity->origin, clmodel->maxs, maxs);
gl_rmain.c:	VectorCopy (currententity->origin, r_entorigin);
gl_rmain.c:	ambientlight = shadelight = R_LightPoint (currententity->origin);
gl_rmain.c:			VectorSubtract (currententity->origin,
gl_rmain.c:			add = cl_dlights[lnum].radius - Length(dist);
gl_rmain.c:		shadelight = 192 - ambientlight;
gl_rmain.c:	i = currententity - cl_entities;
gl_rmain.c:	if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
gl_rmain.c:	// HACK HACK HACK -- no fullbright colors, so make torches full light
gl_rmain.c:	if (!strcmp (clmodel->name, "progs/flame2.mdl")
gl_rmain.c:		|| !strcmp (clmodel->name, "progs/flame.mdl") )
gl_rmain.c:	shadedots = r_avertexnormal_dots[((int)(e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1)];
gl_rmain.c:	an = e->angles[1]/180*M_PI;
gl_rmain.c:	shadevector[0] = cos(-an);
gl_rmain.c:	shadevector[1] = sin(-an);
gl_rmain.c:	paliashdr = (aliashdr_t *)Mod_Extradata (currententity->model);
gl_rmain.c:	c_alias_polys += paliashdr->numtris;
gl_rmain.c:	if (!strcmp (clmodel->name, "progs/eyes.mdl") && gl_doubleeyes.value) {
gl_rmain.c:		glTranslatef (paliashdr->scale_origin[0], paliashdr->scale_origin[1], paliashdr->scale_origin[2] - (22 + 8));
gl_rmain.c:		glScalef (paliashdr->scale[0]*2, paliashdr->scale[1]*2, paliashdr->scale[2]*2);
gl_rmain.c:		glTranslatef (paliashdr->scale_origin[0], paliashdr->scale_origin[1], paliashdr->scale_origin[2]);
gl_rmain.c:		glScalef (paliashdr->scale[0], paliashdr->scale[1], paliashdr->scale[2]);
gl_rmain.c:    GL_Bind(paliashdr->gl_texturenum[currententity->skinnum][anim]);
gl_rmain.c:	if (currententity->colormap != vid.colormap && !gl_nocolors.value)
gl_rmain.c:		i = currententity - cl_entities;
gl_rmain.c:		if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
gl_rmain.c:		    GL_Bind(playertextures - 1 + i);
gl_rmain.c:	R_SetupAliasFrame (currententity->frame, paliashdr);
gl_rmain.c:		switch (currententity->model->type)
gl_rmain.c:		switch (currententity->model->type)
gl_rmain.c:	if (!currententity->model)
gl_rmain.c:	j = R_LightPoint (currententity->origin);
gl_rmain.c:		if (!dl->radius)
gl_rmain.c:		if (!dl->radius)
gl_rmain.c:		if (dl->die < cl.time)
gl_rmain.c:		VectorSubtract (currententity->origin, dl->origin, dist);
gl_rmain.c:		add = dl->radius - Length(dist);
gl_rmain.c:	glDepthRange (gldepthmin, gldepthmin + 0.3*(gldepthmax-gldepthmin));
gl_rmain.c:		if (out->normal[j] < 0)
gl_rmain.c:		RotatePointAroundVector( frustum[0].normal, vup, vpn, -(90-r_refdef.fov_x / 2 ) );
gl_rmain.c:		RotatePointAroundVector( frustum[1].normal, vup, vpn, 90-r_refdef.fov_x / 2 );
gl_rmain.c:		RotatePointAroundVector( frustum[2].normal, vright, vpn, 90-r_refdef.fov_y / 2 );
gl_rmain.c:		RotatePointAroundVector( frustum[3].normal, vright, vpn, -( 90 - r_refdef.fov_y / 2 ) );
gl_rmain.c:	V_SetContentsColor (r_viewleaf->contents);
gl_rmain.c:   ymin = -ymax;
gl_rmain.c:	y = (vid.height-r_refdef.vrect.y) * glheight/vid.height;
gl_rmain.c:	y2 = (vid.height - (r_refdef.vrect.y + r_refdef.vrect.height)) * glheight/vid.height;
gl_rmain.c:		x--;
gl_rmain.c:		y2--;
gl_rmain.c:	w = x2 - x;
gl_rmain.c:	h = y - y2;
gl_rmain.c:		if (mirror_plane->normal[2])
gl_rmain.c:			glScalef (1, -1, 1);
gl_rmain.c:			glScalef (-1, 1, 1);
gl_rmain.c:    glRotatef (-90,  1, 0, 0);	    // put Z going up
gl_rmain.c:    glRotatef (-r_refdef.viewangles[2],  1, 0, 0);
gl_rmain.c:    glRotatef (-r_refdef.viewangles[0],  0, 1, 0);
gl_rmain.c:    glRotatef (-r_refdef.viewangles[1],  0, 0, 1);
gl_rmain.c:    glTranslatef (-r_refdef.vieworg[0],  -r_refdef.vieworg[1],  -r_refdef.vieworg[2]);
gl_rmain.c:	d = DotProduct (r_refdef.vieworg, mirror_plane->normal) - mirror_plane->dist;
gl_rmain.c:	VectorMA (r_refdef.vieworg, -2*d, mirror_plane->normal, r_refdef.vieworg);
gl_rmain.c:	d = DotProduct (vpn, mirror_plane->normal);
gl_rmain.c:	VectorMA (vpn, -2*d, mirror_plane->normal, vpn);
gl_rmain.c:	r_refdef.viewangles[0] = -asin (vpn[2])/M_PI*180;
gl_rmain.c:	r_refdef.viewangles[2] = -r_refdef.viewangles[2];
gl_rmain.c:	if (mirror_plane->normal[2])
gl_rmain.c:		glScalef (1,-1,1);
gl_rmain.c:		glScalef (-1,1,1);
gl_rmain.c:	s = cl.worldmodel->textures[mirrortexturenum]->texturechain;
gl_rmain.c:	for ( ; s ; s=s->texturechain)
gl_rmain.c:	cl.worldmodel->textures[mirrortexturenum]->texturechain = NULL;
gl_rmain.c:		Con_Printf ("%3i ms  %4i wpoly %4i epoly\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys); 
gl_rmisc.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_rmisc.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_rmisc.c:// all this was added for the DLL rendering -- Alex
gl_rmisc.c:	r_notexture_mip->width = r_notexture_mip->height = 16;
gl_rmisc.c:	r_notexture_mip->offsets[0] = sizeof(texture_t);
gl_rmisc.c:	r_notexture_mip->offsets[1] = r_notexture_mip->offsets[0] + 16*16;
gl_rmisc.c:	r_notexture_mip->offsets[2] = r_notexture_mip->offsets[1] + 8*8;
gl_rmisc.c:	r_notexture_mip->offsets[3] = r_notexture_mip->offsets[2] + 4*4;
gl_rmisc.c:		dest = (byte *)r_notexture_mip + r_notexture_mip->offsets[m];
gl_rmisc.c:	r_refdef.viewangles[0] = -90;
gl_rmisc.c:    // add the command to switch renderers. -- Alex
gl_rmisc.c:Translates a skin texture by the per-player color lookup
gl_rmisc.c:			translate[TOP_RANGE+i] = top+15-i;
gl_rmisc.c:			translate[BOTTOM_RANGE+i] = bottom+15-i;
gl_rmisc.c:	model = currententity->model;
gl_rmisc.c:	if (model->type != mod_alias)
gl_rmisc.c:	s = paliashdr->skinwidth * paliashdr->skinheight;
gl_rmisc.c:	if (currententity->skinnum < 0 || currententity->skinnum >= paliashdr->numskins) {
gl_rmisc.c:		Con_Printf("(%d): Invalid player skin #%d\n", playernum, currententity->skinnum);
gl_rmisc.c:		original = (byte *)paliashdr + paliashdr->texels[0];
gl_rmisc.c:		original = (byte *)paliashdr + paliashdr->texels[currententity->skinnum];
gl_rmisc.c:	inwidth = paliashdr->skinwidth;
gl_rmisc.c:	inheight = paliashdr->skinheight;
gl_rmisc.c:	GL_Upload8 (translated, paliashdr->skinwidth, paliashdr->skinheight, false, false, true);
gl_rmisc.c:	for (i=0 ; i<cl.worldmodel->numleafs ; i++)
gl_rmisc.c:		cl.worldmodel->leafs[i].efrags = NULL;
gl_rmisc.c:	skytexturenum = -1;
gl_rmisc.c:	mirrortexturenum = -1;
gl_rmisc.c:	for (i=0 ; i<cl.worldmodel->numtextures ; i++)
gl_rmisc.c:		if (!cl.worldmodel->textures[i])
gl_rmisc.c:		if (!Q_strncmp(cl.worldmodel->textures[i]->name,"sky",3) )
gl_rmisc.c:		if (!Q_strncmp(cl.worldmodel->textures[i]->name,"window02_1",10) )
gl_rmisc.c: 		cl.worldmodel->textures[i]->texturechain = NULL;
gl_rmisc.c:	time = stop-start;
gl_rmisc.c:// R_dr_LoadRenderer_f -- load a new dynamic renderer.
gl_rsurf.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_rsurf.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_rsurf.c:// r_surf.c: surface-related refresh code
gl_rsurf.c:	smax = (surf->extents[0]>>4)+1;
gl_rsurf.c:	tmax = (surf->extents[1]>>4)+1;
gl_rsurf.c:	tex = surf->texinfo;
gl_rsurf.c:		if ( !(surf->dlightbits & (1<<lnum) ) )
gl_rsurf.c:		dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
gl_rsurf.c:				surf->plane->dist;
gl_rsurf.c:		rad -= fabs(dist);
gl_rsurf.c:		minlight = rad - minlight;
gl_rsurf.c:			impact[i] = cl_dlights[lnum].origin[i] -
gl_rsurf.c:					surf->plane->normal[i]*dist;
gl_rsurf.c:		local[0] = DotProduct (impact, tex->vecs[0]) + tex->vecs[0][3];
gl_rsurf.c:		local[1] = DotProduct (impact, tex->vecs[1]) + tex->vecs[1][3];
gl_rsurf.c:		local[0] -= surf->texturemins[0];
gl_rsurf.c:		local[1] -= surf->texturemins[1];
gl_rsurf.c:			td = local[1] - t*16;
gl_rsurf.c:				td = -td;
gl_rsurf.c:				sd = local[0] - s*16;
gl_rsurf.c:					sd = -sd;
gl_rsurf.c:					blocklights[t*smax + s] += (rad - dist)*256;
gl_rsurf.c:	surf->cached_dlight = (surf->dlightframe == r_framecount);
gl_rsurf.c:	smax = (surf->extents[0]>>4)+1;
gl_rsurf.c:	tmax = (surf->extents[1]>>4)+1;
gl_rsurf.c:	lightmap = surf->samples;
gl_rsurf.c:	if (r_fullbright.value || !cl.worldmodel->lightdata)
gl_rsurf.c:		for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
gl_rsurf.c:			scale = d_lightstylevalue[surf->styles[maps]];
gl_rsurf.c:			surf->cached_light[maps] = scale;	// 8.8 fraction
gl_rsurf.c:	if (surf->dlightframe == r_framecount)
gl_rsurf.c:		stride -= (smax<<2);
gl_rsurf.c:				dest[3] = 255-t;
gl_rsurf.c:				dest[j] = 255-t;
gl_rsurf.c:	if (currententity->frame)
gl_rsurf.c:		if (base->alternate_anims)
gl_rsurf.c:			base = base->alternate_anims;
gl_rsurf.c:	if (!base->anim_total)
gl_rsurf.c:	reletive = (int)(cl.time*10) % base->anim_total;
gl_rsurf.c:	while (base->anim_min > reletive || base->anim_max <= reletive)
gl_rsurf.c:		base = base->anim_next;
gl_rsurf.c:	if (fa->flags & SURF_DRAWSKY)
gl_rsurf.c:	t = R_TextureAnimation (fa->texinfo->texture);
gl_rsurf.c:	GL_Bind (t->gl_texturenum);
gl_rsurf.c:	if (fa->flags & SURF_DRAWTURB)
gl_rsurf.c:	if (fa->flags & SURF_UNDERWATER)
gl_rsurf.c:		DrawGLWaterPoly (fa->polys, realtime);
gl_rsurf.c:		DrawGLPoly (fa->polys);
gl_rsurf.c:	fa->polys->chain = lightmap_polys[fa->lightmaptexturenum];
gl_rsurf.c:	lightmap_polys[fa->lightmaptexturenum] = fa->polys;
gl_rsurf.c:	for (maps = 0 ; maps < MAXLIGHTMAPS && fa->styles[maps] != 255 ;
gl_rsurf.c:		if (d_lightstylevalue[fa->styles[maps]] != fa->cached_light[maps])
gl_rsurf.c:	if (fa->dlightframe == r_framecount	// dynamic this frame
gl_rsurf.c:		|| fa->cached_dlight)			// dynamic previously
gl_rsurf.c:			lightmap_modified[fa->lightmaptexturenum] = true;
gl_rsurf.c:			theRect = &lightmap_rectchange[fa->lightmaptexturenum];
gl_rsurf.c:			if (fa->light_t < theRect->t) {
gl_rsurf.c:				if (theRect->h)
gl_rsurf.c:					theRect->h += theRect->t - fa->light_t;
gl_rsurf.c:				theRect->t = fa->light_t;
gl_rsurf.c:			if (fa->light_s < theRect->l) {
gl_rsurf.c:				if (theRect->w)
gl_rsurf.c:					theRect->w += theRect->l - fa->light_s;
gl_rsurf.c:				theRect->l = fa->light_s;
gl_rsurf.c:			smax = (fa->extents[0]>>4)+1;
gl_rsurf.c:			tmax = (fa->extents[1]>>4)+1;
gl_rsurf.c:			if ((theRect->w + theRect->l) < (fa->light_s + smax))
gl_rsurf.c:				theRect->w = (fa->light_s-theRect->l)+smax;
gl_rsurf.c:			if ((theRect->h + theRect->t) < (fa->light_t + tmax))
gl_rsurf.c:				theRect->h = (fa->light_t-theRect->t)+tmax;
gl_rsurf.c:			base = lightmaps + fa->lightmaptexturenum*lightmap_bytes*BLOCK_WIDTH*BLOCK_HEIGHT;
gl_rsurf.c:			base += fa->light_t * BLOCK_WIDTH * lightmap_bytes + fa->light_s * lightmap_bytes;
gl_rsurf.c:	if (fa->flags & ( SURF_DRAWSKY | SURF_DRAWTURB) )
gl_rsurf.c:	fa->polys->chain = lightmap_polys[fa->lightmaptexturenum];
gl_rsurf.c:	lightmap_polys[fa->lightmaptexturenum] = fa->polys;
gl_rsurf.c:	for (maps = 0 ; maps < MAXLIGHTMAPS && fa->styles[maps] != 255 ;
gl_rsurf.c:		if (d_lightstylevalue[fa->styles[maps]] != fa->cached_light[maps])
gl_rsurf.c:	if (fa->dlightframe == r_framecount	// dynamic this frame
gl_rsurf.c:		|| fa->cached_dlight)			// dynamic previously
gl_rsurf.c:			lightmap_modified[fa->lightmaptexturenum] = true;
gl_rsurf.c:			theRect = &lightmap_rectchange[fa->lightmaptexturenum];
gl_rsurf.c:			if (fa->light_t < theRect->t) {
gl_rsurf.c:				if (theRect->h)
gl_rsurf.c:					theRect->h += theRect->t - fa->light_t;
gl_rsurf.c:				theRect->t = fa->light_t;
gl_rsurf.c:			if (fa->light_s < theRect->l) {
gl_rsurf.c:				if (theRect->w)
gl_rsurf.c:					theRect->w += theRect->l - fa->light_s;
gl_rsurf.c:				theRect->l = fa->light_s;
gl_rsurf.c:			smax = (fa->extents[0]>>4)+1;
gl_rsurf.c:			tmax = (fa->extents[1]>>4)+1;
gl_rsurf.c:			if ((theRect->w + theRect->l) < (fa->light_s + smax))
gl_rsurf.c:				theRect->w = (fa->light_s-theRect->l)+smax;
gl_rsurf.c:			if ((theRect->h + theRect->t) < (fa->light_t + tmax))
gl_rsurf.c:				theRect->h = (fa->light_t-theRect->t)+tmax;
gl_rsurf.c:			base = lightmaps + fa->lightmaptexturenum*lightmap_bytes*BLOCK_WIDTH*BLOCK_HEIGHT;
gl_rsurf.c:			base += fa->light_t * BLOCK_WIDTH * lightmap_bytes + fa->light_s * lightmap_bytes;
gl_rsurf.c:	mirror_plane = s->plane;
gl_rsurf.c:	for (i=0 ; i<cl.worldmodel->numtextures ; i++)
gl_rsurf.c:		t = cl.worldmodel->textures[i];
gl_rsurf.c:		s = t->texturechain;
gl_rsurf.c:		if ( !(s->flags & SURF_DRAWTURB) )
gl_rsurf.c:		GL_Bind (t->gl_texturenum);
gl_rsurf.c:		for ( ; s ; s=s->texturechain)
gl_rsurf.c:		t->texturechain = NULL;
gl_rsurf.c:		for ( s = waterchain ; s ; s=s->texturechain) {
gl_rsurf.c:			GL_Bind (s->texinfo->texture->gl_texturenum);
gl_rsurf.c:		for (i=0 ; i<cl.worldmodel->numtextures ; i++)
gl_rsurf.c:			t = cl.worldmodel->textures[i];
gl_rsurf.c:			s = t->texturechain;
gl_rsurf.c:			if ( !(s->flags & SURF_DRAWTURB ) )
gl_rsurf.c:			GL_Bind (t->gl_texturenum);
gl_rsurf.c:			for ( ; s ; s=s->texturechain)
gl_rsurf.c:			t->texturechain = NULL;
gl_rsurf.c:	for (i=0 ; i<cl.worldmodel->numtextures ; i++)
gl_rsurf.c:		t = cl.worldmodel->textures[i];
gl_rsurf.c:		s = t->texturechain;
gl_rsurf.c:			if ((s->flags & SURF_DRAWTURB) && r_wateralpha.value != 1.0)
gl_rsurf.c:			for ( ; s ; s=s->texturechain)
gl_rsurf.c:		t->texturechain = NULL;
gl_rsurf.c:	currenttexture = -1;
gl_rsurf.c:	clmodel = e->model;
gl_rsurf.c:	if (e->angles[0] || e->angles[1] || e->angles[2])
gl_rsurf.c:			mins[i] = e->origin[i] - clmodel->radius;
gl_rsurf.c:			maxs[i] = e->origin[i] + clmodel->radius;
gl_rsurf.c:		VectorAdd (e->origin, clmodel->mins, mins);
gl_rsurf.c:		VectorAdd (e->origin, clmodel->maxs, maxs);
gl_rsurf.c:	VectorSubtract (r_refdef.vieworg, e->origin, modelorg);
gl_rsurf.c:		AngleVectors (e->angles, forward, right, up);
gl_rsurf.c:		modelorg[1] = -DotProduct (temp, right);
gl_rsurf.c:	psurf = &clmodel->surfaces[clmodel->firstmodelsurface];
gl_rsurf.c:	if (clmodel->firstmodelsurface != 0 && !gl_flashblend.value)
gl_rsurf.c:				clmodel->nodes + clmodel->hulls[0].firstclipnode);
gl_rsurf.c:e->angles[0] = -e->angles[0];	// stupid quake bug
gl_rsurf.c:e->angles[0] = -e->angles[0];	// stupid quake bug
gl_rsurf.c:	for (i=0 ; i<clmodel->nummodelsurfaces ; i++, psurf++)
gl_rsurf.c:		pplane = psurf->plane;
gl_rsurf.c:		dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
gl_rsurf.c:		if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
gl_rsurf.c:			(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
gl_rsurf.c:	if (node->contents == CONTENTS_SOLID)
gl_rsurf.c:	if (node->visframe != r_visframecount)
gl_rsurf.c:	if (R_CullBox (node->minmaxs, node->minmaxs+3))
gl_rsurf.c:	if (node->contents < 0)
gl_rsurf.c:		mark = pleaf->firstmarksurface;
gl_rsurf.c:		c = pleaf->nummarksurfaces;
gl_rsurf.c:				(*mark)->visframe = r_framecount;
gl_rsurf.c:			} while (--c);
gl_rsurf.c:		if (pleaf->efrags)
gl_rsurf.c:			R_StoreEfrags (&pleaf->efrags);
gl_rsurf.c:	plane = node->plane;
gl_rsurf.c:	switch (plane->type)
gl_rsurf.c:		dot = modelorg[0] - plane->dist;
gl_rsurf.c:		dot = modelorg[1] - plane->dist;
gl_rsurf.c:		dot = modelorg[2] - plane->dist;
gl_rsurf.c:		dot = DotProduct (modelorg, plane->normal) - plane->dist;
gl_rsurf.c:	R_RecursiveWorldNode (node->children[side]);
gl_rsurf.c:	c = node->numsurfaces;
gl_rsurf.c:		surf = cl.worldmodel->surfaces + node->firstsurface;
gl_rsurf.c:		if (dot < 0 -BACKFACE_EPSILON)
gl_rsurf.c:			for ( ; c ; c--, surf++)
gl_rsurf.c:				if (surf->visframe != r_framecount)
gl_rsurf.c:				if ( !(surf->flags & SURF_UNDERWATER) && ( (dot < 0) ^ !!(surf->flags & SURF_PLANEBACK)) )
gl_rsurf.c:					|| surf->texinfo->texture != cl.worldmodel->textures[mirrortexturenum])
gl_rsurf.c:						surf->texturechain = surf->texinfo->texture->texturechain;
gl_rsurf.c:						surf->texinfo->texture->texturechain = surf;
gl_rsurf.c:				} else if (surf->flags & SURF_DRAWSKY) {
gl_rsurf.c:					surf->texturechain = skychain;
gl_rsurf.c:				} else if (surf->flags & SURF_DRAWTURB) {
gl_rsurf.c:					surf->texturechain = waterchain;
gl_rsurf.c:	R_RecursiveWorldNode (node->children[!side]);
gl_rsurf.c:	currenttexture = -1;
gl_rsurf.c:	R_RecursiveWorldNode (cl.worldmodel->nodes);
gl_rsurf.c:		memset (solid, 0xff, (cl.worldmodel->numleafs+7)>>3);
gl_rsurf.c:	for (i=0 ; i<cl.worldmodel->numleafs ; i++)
gl_rsurf.c:			node = (mnode_t *)&cl.worldmodel->leafs[i+1];
gl_rsurf.c:				if (node->visframe == r_visframecount)
gl_rsurf.c:				node->visframe = r_visframecount;
gl_rsurf.c:				node = node->parent;
gl_rsurf.c:		for (i=0 ; i<BLOCK_WIDTH-w ; i++)
gl_rsurf.c:	pedges = currentmodel->edges;
gl_rsurf.c:	lnumverts = fa->numedges;
gl_rsurf.c:	poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float));
gl_rsurf.c:	poly->next = fa->polys;
gl_rsurf.c:	poly->flags = fa->flags;
gl_rsurf.c:	fa->polys = poly;
gl_rsurf.c:	poly->numverts = lnumverts;
gl_rsurf.c:		lindex = currentmodel->surfedges[fa->firstedge + i];
gl_rsurf.c:			vec = r_pcurrentvertbase[r_pedge->v[0]].position;
gl_rsurf.c:			r_pedge = &pedges[-lindex];
gl_rsurf.c:			vec = r_pcurrentvertbase[r_pedge->v[1]].position;
gl_rsurf.c:		s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
gl_rsurf.c:		s /= fa->texinfo->texture->width;
gl_rsurf.c:		t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
gl_rsurf.c:		t /= fa->texinfo->texture->height;
gl_rsurf.c:		VectorCopy (vec, poly->verts[i]);
gl_rsurf.c:		poly->verts[i][3] = s;
gl_rsurf.c:		poly->verts[i][4] = t;
gl_rsurf.c:		s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
gl_rsurf.c:		s -= fa->texturemins[0];
gl_rsurf.c:		s += fa->light_s*16;
gl_rsurf.c:		s /= BLOCK_WIDTH*16; //fa->texinfo->texture->width;
gl_rsurf.c:		t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
gl_rsurf.c:		t -= fa->texturemins[1];
gl_rsurf.c:		t += fa->light_t*16;
gl_rsurf.c:		t /= BLOCK_HEIGHT*16; //fa->texinfo->texture->height;
gl_rsurf.c:		poly->verts[i][5] = s;
gl_rsurf.c:		poly->verts[i][6] = t;
gl_rsurf.c:	// remove co-linear points - Ed
gl_rsurf.c:	if (!gl_keeptjunctions.value && !(fa->flags & SURF_UNDERWATER) )
gl_rsurf.c:			prev = poly->verts[(i + lnumverts - 1) % lnumverts];
gl_rsurf.c:			this = poly->verts[i];
gl_rsurf.c:			next = poly->verts[(i + 1) % lnumverts];
gl_rsurf.c:			// skip co-linear points
gl_rsurf.c:			if ((fabs( v1[0] - v2[0] ) <= COLINEAR_EPSILON) &&
gl_rsurf.c:				(fabs( v1[1] - v2[1] ) <= COLINEAR_EPSILON) && 
gl_rsurf.c:				(fabs( v1[2] - v2[2] ) <= COLINEAR_EPSILON))
gl_rsurf.c:						poly->verts[j - 1][k] = poly->verts[j][k];
gl_rsurf.c:				--lnumverts;
gl_rsurf.c:				--i;
gl_rsurf.c:	poly->numverts = lnumverts;
gl_rsurf.c:	if (surf->flags & (SURF_DRAWSKY|SURF_DRAWTURB))
gl_rsurf.c:	smax = (surf->extents[0]>>4)+1;
gl_rsurf.c:	tmax = (surf->extents[1]>>4)+1;
gl_rsurf.c:	surf->lightmaptexturenum = AllocBlock (smax, tmax, &surf->light_s, &surf->light_t);
gl_rsurf.c:	base = lightmaps + surf->lightmaptexturenum*lightmap_bytes*BLOCK_WIDTH*BLOCK_HEIGHT;
gl_rsurf.c:	base += (surf->light_t * BLOCK_WIDTH + surf->light_s) * lightmap_bytes;
gl_rsurf.c:	if (COM_CheckParm ("-lm_1"))
gl_rsurf.c:	if (COM_CheckParm ("-lm_a"))
gl_rsurf.c:	if (COM_CheckParm ("-lm_i"))
gl_rsurf.c:	if (COM_CheckParm ("-lm_2"))
gl_rsurf.c:	if (COM_CheckParm ("-lm_4"))
gl_rsurf.c:		if (m->name[0] == '*')
gl_rsurf.c:		r_pcurrentvertbase = m->vertexes;
gl_rsurf.c:		for (i=0 ; i<m->numsurfaces ; i++)
gl_rsurf.c:			GL_CreateSurfaceLightmap (m->surfaces + i);
gl_rsurf.c:			if ( m->surfaces[i].flags & SURF_DRAWTURB )
gl_rsurf.c:			if ( m->surfaces[i].flags & SURF_DRAWSKY )
gl_rsurf.c:			BuildSurfaceDisplayList (m->surfaces + i);
gl_screen.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_screen.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_screen.c:// screen.c -- master for refresh, status bar, console, chat, notify, etc
gl_screen.c:cvar_t		scr_fov = {"fov","90"};	// 10 - 170
gl_screen.c:	strncpy (scr_centerstring, str, sizeof(scr_centerstring)-1);
gl_screen.c:		remaining = scr_printspeed.value * (cl.time - scr_centertime_start);
gl_screen.c:		x = (vid.width - l*8)/2;
gl_screen.c:			if (!remaining--)
gl_screen.c:	scr_centertime_off -= host_frametime;
gl_screen.c:	h = vid.height - sb_lines;
gl_screen.c:	if (r_refdef.vrect.height > vid.height - sb_lines)
gl_screen.c:		r_refdef.vrect.height = vid.height - sb_lines;
gl_screen.c:	r_refdef.vrect.x = (vid.width - r_refdef.vrect.width)/2;
gl_screen.c:		r_refdef.vrect.y = (h - r_refdef.vrect.height)/2;
gl_screen.c:	Cvar_SetValue ("viewsize",scr_viewsize.value-10);
gl_screen.c:	if (realtime - cl.last_received_message < 0.3)
gl_screen.c:	Draw_Pic ( (vid.width - pic->width)/2, 
gl_screen.c:		(vid.height - 48 - pic->height)/2, pic);
gl_screen.c:	Draw_Pic ( (vid.width - pic->width)/2, 
gl_screen.c:		(vid.height - 48 - pic->height)/2, pic);
gl_screen.c:		scr_con_current -= scr_conspeed.value*host_frametime;
gl_screen.c:		if (Sys_FileTime(checkname) == -1)
gl_screen.c:		x = (vid.width - l*8)/2;
gl_screen.c:		key_count = -1;		// wait for a key down and up
gl_screen.c:		Draw_TileClear (0, 0, r_refdef.vrect.x, vid.height - sb_lines);
gl_screen.c:			vid.width - r_refdef.vrect.x + r_refdef.vrect.width, 
gl_screen.c:			vid.height - sb_lines);
gl_screen.c:			vid.height - sb_lines - 
gl_screen.c:		if (realtime - scr_disabled_time > 60)
gl_test.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_test.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_test.c:	SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
gl_test.c:		if (p->length <= 0)
gl_test.c:	d = DotProduct (incoming, plane->normal);
gl_test.c:	VectorSubtract (vec3_origin, incoming, p->reflect);
gl_test.c:	VectorMA (p->reflect, d*2, plane->normal, p->reflect);
gl_test.c:	VectorCopy (origin, p->origin);
gl_test.c:	VectorCopy (plane->normal, p->normal);
gl_test.c:	CrossProduct (incoming, p->normal, p->up);
gl_test.c:	CrossProduct (p->up, p->normal, p->right);
gl_test.c:	p->length = 8;
gl_test.c:		if (p->length > 0)
gl_vidlinux.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_vidlinux.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_vidlinux.c:/*-----------------------------------------------------------------------*/
gl_vidlinux.c:/*-----------------------------------------------------------------------*/
gl_vidlinux.c:	// JACK: 3D distance calcs - k is last closest, l is the distance.
gl_vidlinux.c:			r1 = (int)r - (int)pal[0];
gl_vidlinux.c:			g1 = (int)g - (int)pal[1];
gl_vidlinux.c:			b1 = (int)b - (int)pal[2];
gl_vidlinux.c:	if (strstr(gl_extensions, "GL_SGIS_multitexture ") && !COM_CheckParm("-nomtex")) {
gl_vidlinux.c:	if (COM_CheckParm("-nokbd")) UseKeyboard = 0;
gl_vidlinux.c:		scantokey[12] = '-';
gl_vidlinux.c:		scantokey[74] = '-';
gl_vidlinux.c:	if (COM_CheckParm("-no8bit"))
gl_vidlinux.c:	if ((i = COM_CheckParm("-gamma")) == 0) {
gl_vidlinux.c:			vid_gamma = 0.7; // default to 0.7 on non-3dfx hardware
gl_vidlinux.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
gl_vidlinux.c:// interpret command-line params
gl_vidlinux.c:	if ((i = COM_CheckParm("-width")) != 0)
gl_vidlinux.c:	if ((i = COM_CheckParm("-height")) != 0)
gl_vidlinux.c:	if ((i = COM_CheckParm("-conwidth")) != 0)
gl_vidlinux.c:	if ((i = COM_CheckParm("-conheight")) != 0)
gl_vidlinux.c:		if (COM_CheckParm("-mdev"))
gl_vidlinux.c:			mousedev = com_argv[COM_CheckParm("-mdev")+1];
gl_vidlinux.c:		if (COM_CheckParm("-mrate"))
gl_vidlinux.c:			mouserate = atoi(com_argv[COM_CheckParm("-mrate")+1]);
gl_vidlinux.c:		cmd->sidemove += m_side.value * mouse_x;
gl_vidlinux.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
gl_vidlinux.c:		if (cl.viewangles[PITCH] < -70)
gl_vidlinux.c:			cl.viewangles[PITCH] = -70;
gl_vidlinux.c:			cmd->upmove -= m_forward.value * mouse_y;
gl_vidlinux.c:			cmd->forwardmove -= m_forward.value * mouse_y;
gl_vidlinuxglx.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_vidlinuxglx.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_vidlinuxglx.c:/*-----------------------------------------------------------------------*/
gl_vidlinuxglx.c:/*-----------------------------------------------------------------------*/
gl_vidlinuxglx.c:		case XK_KP_Subtract: key = '-'; break;
gl_vidlinuxglx.c:		case 0x05f: key = '-';break;/* [_] */
gl_vidlinuxglx.c:				key = key - 'A' + 'a';
gl_vidlinuxglx.c:					mx += ((int)event.xmotion.x - mwx) * 2;
gl_vidlinuxglx.c:					my += ((int)event.xmotion.y - mwy) * 2;
gl_vidlinuxglx.c:			b=-1;
gl_vidlinuxglx.c:			b=-1;
gl_vidlinuxglx.c:			r1 = (int)r - (int)pal[0];
gl_vidlinuxglx.c:			g1 = (int)g - (int)pal[1];
gl_vidlinuxglx.c:			b1 = (int)b - (int)pal[2];
gl_vidlinuxglx.c:	if (strstr(gl_extensions, "GL_SGIS_multitexture ") && !COM_CheckParm("-nomtex")) {
gl_vidlinuxglx.c:		Con_SafePrintf("8-bit GL extensions enabled.\n");
gl_vidlinuxglx.c:		Con_SafePrintf("8-bit GL extensions enabled.\n");
gl_vidlinuxglx.c:	if ((i = COM_CheckParm("-gamma")) == 0) {
gl_vidlinuxglx.c:			vid_gamma = 0.7; // default to 0.7 on non-3dfx hardware
gl_vidlinuxglx.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
gl_vidlinuxglx.c:// interpret command-line params
gl_vidlinuxglx.c:	if ((i = COM_CheckParm("-window")) != 0)
gl_vidlinuxglx.c:	if ((i = COM_CheckParm("-width")) != 0)
gl_vidlinuxglx.c:	if ((i = COM_CheckParm("-height")) != 0)
gl_vidlinuxglx.c:	if ((i = COM_CheckParm("-conwidth")) != 0)
gl_vidlinuxglx.c:	if ((i = COM_CheckParm("-conheight")) != 0)
gl_vidlinuxglx.c:		Con_Printf("Using XFree86-VidModeExtension Version %d.%d\n", MajorVersion, MinorVersion);
gl_vidlinuxglx.c:		fprintf(stderr, "qkHack: Error couldn't get an RGB, Double-buffered, Depth visual\n");
gl_vidlinuxglx.c:			best_fit = -1;
gl_vidlinuxglx.c:				if (width > vidmodes[i]->hdisplay ||
gl_vidlinuxglx.c:					height > vidmodes[i]->vdisplay)
gl_vidlinuxglx.c:				x = width - vidmodes[i]->hdisplay;
gl_vidlinuxglx.c:				y = height - vidmodes[i]->vdisplay;
gl_vidlinuxglx.c:			if (best_fit != -1) {
gl_vidlinuxglx.c:				actualWidth = vidmodes[best_fit]->hdisplay;
gl_vidlinuxglx.c:				actualHeight = vidmodes[best_fit]->vdisplay;
gl_vidlinuxglx.c:	attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
gl_vidlinuxglx.c:						0, visinfo->depth, InputOutput,
gl_vidlinuxglx.c:						visinfo->visual, mask, &attr);
gl_vidlinuxglx.c:		cmd->sidemove += m_side.value * mx;
gl_vidlinuxglx.c:		cl.viewangles[YAW] -= m_yaw.value * mx;
gl_vidlinuxglx.c:		if (cl.viewangles[PITCH] < -70)
gl_vidlinuxglx.c:			cl.viewangles[PITCH] = -70;
gl_vidlinuxglx.c:			cmd->upmove -= m_forward.value * my;
gl_vidlinuxglx.c:			cmd->forwardmove -= m_forward.value * my;
gl_vidnt.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_vidnt.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_vidnt.c:// gl_vidnt.c -- NT GL vid component
gl_vidnt.c:#define NO_MODE					(MODE_WINDOWED - 1)
gl_vidnt.c:	CenterX = (GetSystemMetrics(SM_CXSCREEN) - width) / 2;
gl_vidnt.c:	CenterY = (GetSystemMetrics(SM_CYSCREEN) - height) / 2;
gl_vidnt.c:	width = rect.right - rect.left;
gl_vidnt.c:	height = rect.bottom - rect.top;
gl_vidnt.c:	CenterWindow(dibwindow, WindowRect.right - WindowRect.left,
gl_vidnt.c:				 WindowRect.bottom - WindowRect.top, false);
gl_vidnt.c:// (to avoid flickering when re-sizing the window on the desktop),
gl_vidnt.c:	width = rect.right - rect.left;
gl_vidnt.c:	height = rect.bottom - rect.top;
gl_vidnt.c:	// (to avoid flickering when re-sizing the window on the desktop), we
gl_vidnt.c:// fix the leftover Alt from any Alt-Tab or the like that switched us away
gl_vidnt.c:	if (!texture_ext || COM_CheckParm ("-gl11") )
gl_vidnt.c:/*	if (strstr(gl_extensions, "GL_SGIS_multitexture ") && !COM_CheckParm("-nomtex")) {
gl_vidnt.c:	*width = WindowRect.right - WindowRect.left;
gl_vidnt.c:	*height = WindowRect.bottom - WindowRect.top;
gl_vidnt.c:	// JACK: 3D distance calcs - k is last closest, l is the distance.
gl_vidnt.c:			r1 = r-pal[0];
gl_vidnt.c:			g1 = g-pal[1];
gl_vidnt.c:			b1 = b-pal[2];
gl_vidnt.c:	24,				// 24-bit color depth
gl_vidnt.c:	32,				// 32-bit z-buffer	
gl_vidnt.c:	'7',    '8',    '9',    '0',    '-',    '=',    K_BACKSPACE, 9, // 0 
gl_vidnt.c:	K_UPARROW,K_PGUP,'-',K_LEFTARROW,'5',K_RIGHTARROW,'+',K_END, //4 
gl_vidnt.c:* Parameters:   fActive - True if app is activating
gl_vidnt.c:		// keep Alt-Space from happening
gl_vidnt.c:		// fix the leftover Alt from any Alt-Tab or the like that switched us away
gl_vidnt.c:		pinfo = pv->modedesc;
gl_vidnt.c:			sprintf(pinfo,"%s fullscreen", pv->modedesc);
gl_vidnt.c:			sprintf(pinfo, "%s windowed", pv->modedesc);
gl_vidnt.c:	if (COM_CheckParm("-width"))
gl_vidnt.c:		modelist[0].width = Q_atoi(com_argv[COM_CheckParm("-width")+1]);
gl_vidnt.c:	if (COM_CheckParm("-height"))
gl_vidnt.c:		modelist[0].height= Q_atoi(com_argv[COM_CheckParm("-height")+1]);
gl_vidnt.c:			// is probably a dual-screen monitor
gl_vidnt.c:				if (!COM_CheckParm("-noadjustaspect"))
gl_vidnt.c:// see if there are any low-res modes that aren't being reported
gl_vidnt.c:		COM_CheckParm("-no8bit"))
gl_vidnt.c:	Con_SafePrintf("8-bit GL extensions enabled.\n");
gl_vidnt.c:	if ((i = COM_CheckParm("-gamma")) == 0) {
gl_vidnt.c:			vid_gamma = 0.7; // default to 0.7 on non-3dfx hardware
gl_vidnt.c:	if (COM_CheckParm("-window"))
gl_vidnt.c:			Sys_Error ("Can't run in non-RGB mode");
gl_vidnt.c:		if (COM_CheckParm("-mode"))
gl_vidnt.c:			vid_default = Q_atoi(com_argv[COM_CheckParm("-mode")+1]);
gl_vidnt.c:			if (COM_CheckParm("-current"))
gl_vidnt.c:				if (COM_CheckParm("-width"))
gl_vidnt.c:					width = Q_atoi(com_argv[COM_CheckParm("-width")+1]);
gl_vidnt.c:				if (COM_CheckParm("-bpp"))
gl_vidnt.c:					bpp = Q_atoi(com_argv[COM_CheckParm("-bpp")+1]);
gl_vidnt.c:				if (COM_CheckParm("-height"))
gl_vidnt.c:					height = Q_atoi(com_argv[COM_CheckParm("-height")+1]);
gl_vidnt.c:				if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST))
gl_vidnt.c:					if (COM_CheckParm("-height"))
gl_vidnt.c:						height = Q_atoi(com_argv[COM_CheckParm("-height")+1]);
gl_vidnt.c:	if ((i = COM_CheckParm("-conwidth")) != 0)
gl_vidnt.c:	if ((i = COM_CheckParm("-conheight")) != 0)
gl_vidnt.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
gl_vidnt.c:		Sys_Error ("Could not initialize GL (wglCreateContext failed).\n\nMake sure you in are 65535 color mode, and try running -window.");
gl_vidnt.c:	if (COM_CheckParm("-fullsbar"))
gl_vidnt.c:	M_DrawPic ( (320-p->width)/2, 4, p);
gl_vidnt.c:			if ((i % VID_ROW_SIZE) == (VID_ROW_SIZE - 1))
gl_vidnt.c:			 "command line with -width <width>");
gl_vidnt.c:			 "and -bpp <bits-per-pixel>");
gl_vidnt.c:			 "Select windowed mode with -window");
gl_warp.c:Copyright (C) 1996-1997 Id Software, Inc.
gl_warp.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
gl_warp.c:// gl_warp.c -- sky and water polygons
gl_warp.c:	maxs[0] = maxs[1] = maxs[2] = -9999;
gl_warp.c:		if (maxs[i] - m < 8)
gl_warp.c:		if (m - mins[i] < 8)
gl_warp.c:			dist[j] = *v - m;
gl_warp.c:		v-=i;
gl_warp.c:				frac = dist[j] / (dist[j] - dist[j+1]);
gl_warp.c:					front[f][k] = back[b][k] = v[k] + frac*(v[3+k] - v[k]);
gl_warp.c:	poly = Hunk_Alloc (sizeof(glpoly_t) + (numverts-4) * VERTEXSIZE*sizeof(float));
gl_warp.c:	poly->next = warpface->polys;
gl_warp.c:	warpface->polys = poly;
gl_warp.c:	poly->numverts = numverts;
gl_warp.c:		VectorCopy (verts, poly->verts[i]);
gl_warp.c:		s = DotProduct (verts, warpface->texinfo->vecs[0]);
gl_warp.c:		t = DotProduct (verts, warpface->texinfo->vecs[1]);
gl_warp.c:		poly->verts[i][3] = s;
gl_warp.c:		poly->verts[i][4] = t;
gl_warp.c:	for (i=0 ; i<fa->numedges ; i++)
gl_warp.c:		lindex = loadmodel->surfedges[fa->firstedge + i];
gl_warp.c:			vec = loadmodel->vertexes[loadmodel->edges[lindex].v[0]].position;
gl_warp.c:			vec = loadmodel->vertexes[loadmodel->edges[-lindex].v[1]].position;
gl_warp.c:Does a sky warp on the pre-fragmented glpoly_t chain
gl_warp.c:	speedscale -= (int)speedscale & ~127 ;
gl_warp.c:	speedscale -= (int)speedscale & ~127 ;
gl_warp.c:	speedscale -= (int)speedscale & ~127 ;
gl_warp.c:	for (fa=s ; fa ; fa=fa->texturechain)
gl_warp.c:	speedscale -= (int)speedscale & ~127 ;
gl_warp.c:	for (fa=s ; fa ; fa=fa->texturechain)
gl_warp.c:	if (pcx->manufacturer != 0x0a
gl_warp.c:		|| pcx->version != 5
gl_warp.c:		|| pcx->encoding != 1
gl_warp.c:		|| pcx->bits_per_pixel != 8
gl_warp.c:		|| pcx->xmax >= 320
gl_warp.c:		|| pcx->ymax >= 256)
gl_warp.c:	fseek (f, -768, SEEK_END);
gl_warp.c:	fseek (f, sizeof(pcxbuf) - 4, SEEK_SET);
gl_warp.c:	count = (pcx->xmax+1) * (pcx->ymax+1);
gl_warp.c:	for (y=0 ; y<=pcx->ymax ; y++)
gl_warp.c:		pix = pcx_rgb + 4*y*(pcx->xmax+1);
gl_warp.c:		for (x=0 ; x<=pcx->ymax ; )
gl_warp.c:			while(runLength-- > 0)
gl_warp.c:		for(row=rows-1; row>=0; row--) {
gl_warp.c:		for(row=rows-1; row>=0; row--) {
gl_warp.c:				if (packetHeader & 0x80) {        // run-length packet
gl_warp.c:								row--;
gl_warp.c:				else {                            // non run-length packet
gl_warp.c:								row--;
gl_warp.c:	{1,-1,0},
gl_warp.c:	{0,-1,1},
gl_warp.c:	{-1,0,1} 
gl_warp.c:	{3,-1,2},
gl_warp.c:	{-3,1,2},
gl_warp.c:	{-1,-3,2},
gl_warp.c:	{-2,-1,3},		// 0 degrees yaw, look straight up
gl_warp.c:	{2,-1,-3}		// look straight down
gl_warp.c://	{-1,2,3},
gl_warp.c://	{1,2,-3}
gl_warp.c:	{-2,3,1},
gl_warp.c:	{2,3,-1},
gl_warp.c:	{-1,3,-2},
gl_warp.c:	{-2,-1,3},
gl_warp.c:	{-2,1,-3}
gl_warp.c://	{-1,2,3},
gl_warp.c://	{1,2,-3}
gl_warp.c:			dv = vecs[j - 1];
gl_warp.c:			dv = -vecs[-j - 1];
gl_warp.c:			s = -vecs[-j -1] / dv;
gl_warp.c:			s = vecs[j-1] / dv;
gl_warp.c:			t = -vecs[-j -1] / dv;
gl_warp.c:			t = vecs[j-1] / dv;
gl_warp.c:	if (nump > MAX_CLIP_VERTS-2)
gl_warp.c:		d = dists[i] / (dists[i] - dists[i+1]);
gl_warp.c:			e = v[j] + d*(v[j+3] - v[j]);
gl_warp.c:	for (fa=s ; fa ; fa=fa->texturechain)
gl_warp.c:		for (p=fa->polys ; p ; p=p->next)
gl_warp.c:			for (i=0 ; i<p->numverts ; i++)
gl_warp.c:				VectorSubtract (p->verts[i], r_origin, verts[i]);
gl_warp.c:			ClipSkyPolygon (p->numverts, verts[0], 0);
gl_warp.c:		skymaxs[0][i] = skymaxs[1][i] = -9999;
gl_warp.c:			v[j] = -b[-k - 1];
gl_warp.c:			v[j] = b[k - 1];
gl_warp.c:	t = 1.0 - t;
gl_warp.c:	src = (byte *)mt + mt->offsets[0];
glqnotes.txt:3dfx owners -- read the 3dfx.txt file.
glqnotes.txt:If you are running win-95, your desktop must be set to 32k or 64k colors 
glqnotes.txt:------------------
glqnotes.txt:glquake -window
glqnotes.txt:glquake -width 800 -height 600
glqnotes.txt:Tries to run glquake at the specified resolution.  Combined with -window, it 
glqnotes.txt:glquake -conwidth 320
glqnotes.txt:specify the height directly with -conheight).
glqnotes.txt:glquake -width 800 -height 600 -conwidth 800
glqnotes.txt:---------------
glqnotes.txt:working correctly, specify the command line option "-nomtex" to disable it.
glqnotes.txt:----------------
glqnotes.txt:----------------
glquake.h:Copyright (C) 1996-1997 Id Software, Inc.
glquake.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
glquake.h:// r_local.h -- private refresh defs
glquake.h:#define SKYMASK			(SKYSIZE - 1)
glquake.h:// driver-usable fields
glquake.h:// extern function pointers for the dynamic rendering -- Alex
glquake2.h:Copyright (C) 1996-1997 Id Software, Inc.
glquake2.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
glquake2.h:// r_local.h -- private refresh defs
glquake2.h:#define SKYMASK			(SKYSIZE - 1)
glquake2.h:// driver-usable fields
host.c:Copyright (C) 1996-1997 Id Software, Inc.
host.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
host.c:// host.c -- coordinates spawning and killing of local servers
host.c:cvar_t	skill = {"skill","1"};						// 0 - 3
host.c:	if (cls.demonum != -1)
host.c:	cls.demonum = -1;
host.c:	i = COM_CheckParm ("-dedicated");
host.c:		if (i != (com_argc - 1))
host.c:	i = COM_CheckParm ("-listen");
host.c:			Sys_Error ("Only one of -dedicated or -listen can be specified");
host.c:		if (i != (com_argc - 1))
host.c:	MSG_WriteByte (&host_client->message, svc_print);
host.c:	MSG_WriteString (&host_client->message, string);
host.c:	MSG_WriteByte (&host_client->message, svc_stufftext);
host.c:	MSG_WriteString (&host_client->message, string);
host.c:		if (NET_CanSendMessage (host_client->netconnection))
host.c:			MSG_WriteByte (&host_client->message, svc_disconnect);
host.c:			NET_SendMessage (host_client->netconnection, &host_client->message);
host.c:		if (host_client->edict && host_client->spawned)
host.c:			saveSelf = pr_global_struct->self;
host.c:			pr_global_struct->self = EDICT_TO_PROG(host_client->edict);
host.c:			PR_ExecuteProgram (pr_global_struct->ClientDisconnect);
host.c:			pr_global_struct->self = saveSelf;
host.c:		Sys_Printf ("Client %s removed\n",host_client->name);
host.c:	NET_Close (host_client->netconnection);
host.c:	host_client->netconnection = NULL;
host.c:	host_client->active = false;
host.c:	host_client->name[0] = 0;
host.c:	host_client->old_frags = -999999;
host.c:	net_activeconnections--;
host.c:		if (!client->active)
host.c:		MSG_WriteByte (&client->message, svc_updatename);
host.c:		MSG_WriteByte (&client->message, host_client - svs.clients);
host.c:		MSG_WriteString (&client->message, "");
host.c:		MSG_WriteByte (&client->message, svc_updatefrags);
host.c:		MSG_WriteByte (&client->message, host_client - svs.clients);
host.c:		MSG_WriteShort (&client->message, 0);
host.c:		MSG_WriteByte (&client->message, svc_updatecolors);
host.c:		MSG_WriteByte (&client->message, host_client - svs.clients);
host.c:		MSG_WriteByte (&client->message, 0);
host.c:// flush any pending messages - like the score!!!
host.c:			if (host_client->active && host_client->message.cursize)
host.c:				if (NET_CanSendMessage (host_client->netconnection))
host.c:					NET_SendMessage(host_client->netconnection, &host_client->message);
host.c:					SZ_Clear (&host_client->message);
host.c:					NET_GetMessage(host_client->netconnection);
host.c:		if ((Sys_FloatTime() - start) > 3.0)
host.c:		if (host_client->active)
host.c:	if (!cls.timedemo && realtime - oldrealtime < 1.0/72.0)
host.c:	host_frametime = realtime - oldrealtime;
host.c:	pr_global_struct->frametime = host_frametime;
host.c:	pr_global_struct->frametime = host_frametime;
host.c:		temp_host_frametime -= host_frametime;
host.c:	pr_global_struct->frametime = host_frametime;
host.c://-------------------
host.c://-------------------
host.c://-------------------
host.c://-------------------
host.c:		pass1 = (time1 - time3)*1000;
host.c:		pass2 = (time2 - time1)*1000;
host.c:		pass3 = (time3 - time2)*1000;
host.c:	timetotal += time2 - time1;
host.c:	if (COM_CheckParm("-playback"))
host.c:			Sys_Error("No other parameters allowed with -playback\n");
host.c:		if (vcrFile == -1)
host.c:		com_argv[0] = parms->argv[0];
host.c:		parms->argc = com_argc;
host.c:		parms->argv = com_argv;
host.c:	if ( (n = COM_CheckParm("-record")) != 0)
host.c:		i = com_argc - 1;
host.c:				Sys_FileWrite(vcrFile, "-playback", len);
host.c:	if (COM_CheckParm ("-minmemory"))
host.c:		parms->memsize = minimum_memory;
host.c:	if (parms->memsize < minimum_memory)
host.c:		Sys_Error ("Only %4.1f megs of memory available, can't execute game", parms->memsize / (float)0x100000);
host.c:	com_argc = parms->argc;
host.c:	com_argv = parms->argv;
host.c:	Memory_Init (parms->membase, parms->memsize);
host.c:	COM_Init (parms->basedir);
host.c:	Con_Printf ("%4.1f megabyte heap\n",parms->memsize/ (1024*1024.0));
host.c:	// FIXME: doesn't use the new one-window approach yet
host.c:	Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
host_cmd.c:Copyright (C) 1996-1997 Id Software, Inc.
host_cmd.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
host_cmd.c:		if (!client->active)
host_cmd.c:		seconds = (int)(net_time - client->netconnection->connecttime);
host_cmd.c:			seconds -= (minutes * 60);
host_cmd.c:				minutes -= (hours * 60);
host_cmd.c:		print ("#%-2u %-16.16s  %3i  %2i:%02i:%02i\n", j+1, client->name, (int)client->edict->v.frags, hours, minutes, seconds);
host_cmd.c:		print ("   %s\n", client->netconnection->address);
host_cmd.c:	if (pr_global_struct->deathmatch && !host_client->privileged)
host_cmd.c:	sv_player->v.flags = (int)sv_player->v.flags ^ FL_GODMODE;
host_cmd.c:	if (!((int)sv_player->v.flags & FL_GODMODE) )
host_cmd.c:	if (pr_global_struct->deathmatch && !host_client->privileged)
host_cmd.c:	sv_player->v.flags = (int)sv_player->v.flags ^ FL_NOTARGET;
host_cmd.c:	if (!((int)sv_player->v.flags & FL_NOTARGET) )
host_cmd.c:	if (pr_global_struct->deathmatch && !host_client->privileged)
host_cmd.c:	if (sv_player->v.movetype != MOVETYPE_NOCLIP)
host_cmd.c:		sv_player->v.movetype = MOVETYPE_NOCLIP;
host_cmd.c:		sv_player->v.movetype = MOVETYPE_WALK;
host_cmd.c:	if (pr_global_struct->deathmatch && !host_client->privileged)
host_cmd.c:	if (sv_player->v.movetype != MOVETYPE_FLY)
host_cmd.c:		sv_player->v.movetype = MOVETYPE_FLY;
host_cmd.c:		sv_player->v.movetype = MOVETYPE_WALK;
host_cmd.c:		if (!client->active)
host_cmd.c:			total+=client->ping_times[j];
host_cmd.c:		SV_ClientPrintf ("%4i %s\n", (int)(total*1000), client->name);
host_cmd.c:	cls.demonum = -1;		// stop demo loop in case this fails
host_cmd.c:	cls.demonum = -1;		// stop demo loop in case this fails
host_cmd.c:		if (svs.clients[i].active && (svs.clients[i].edict->v.health <= 0) )
host_cmd.c:		fprintf (f, "%f\n", svs.clients->spawn_parms[i]);
host_cmd.c:	cls.demonum = -1;		// stop demo loop in case this fails
host_cmd.c:	entnum = -1;		// -1 is the globals
host_cmd.c:		for (i=0 ; i<sizeof(str)-1 ; i++)
host_cmd.c:		if (i == sizeof(str)-1)
host_cmd.c:		if (entnum == -1)
host_cmd.c:			memset (&ent->v, 0, progs->entityfields * 4);
host_cmd.c:			ent->free = false;
host_cmd.c:			if (!ent->free)
host_cmd.c:		svs.clients->spawn_parms[i] = spawn_parms[i];
host_cmd.c://		fprintf (f, "%f\n", svs.clients->spawn_parms[i]);
host_cmd.c:		if ((int)ent->v.flags & FL_ARCHIVE_OVERRIDE)
host_cmd.c:		return -1;
host_cmd.c:		return -1;
host_cmd.c:		return -1;
host_cmd.c:		for (i=0 ; i<sizeof(str)-1 ; i++)
host_cmd.c:		if (i == sizeof(str)-1)
host_cmd.c:		memset (&ent->v, 0, progs->entityfields * 4);
host_cmd.c:		ent->free = false;
host_cmd.c:		if (!ent->free)
host_cmd.c://		svs.clients->spawn_parms[i] = spawn_parms[i];
host_cmd.c:	if (host_client->name[0] && strcmp(host_client->name, "unconnected") )
host_cmd.c:		if (Q_strcmp(host_client->name, newName) != 0)
host_cmd.c:			Con_Printf ("%s renamed to %s\n", host_client->name, newName);
host_cmd.c:	Q_strcpy (host_client->name, newName);
host_cmd.c:	host_client->edict->v.netname = host_client->name - pr_strings;
host_cmd.c:	MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
host_cmd.c:	MSG_WriteString (&sv.reliable_datagram, host_client->name);
host_cmd.c:		j = Q_atof(Cmd_Argv(2)) - 1;
host_cmd.c:		if (cl->privileged)
host_cmd.c:			cl->privileged = false;
host_cmd.c:			cl->edict->v.flags = (int)cl->edict->v.flags & ~(FL_GODMODE|FL_NOTARGET);
host_cmd.c:			cl->edict->v.movetype = MOVETYPE_WALK;
host_cmd.c:			cl->privileged = true;
host_cmd.c:		if (!cl->active)
host_cmd.c:		if (Q_strcasecmp(cl->name, Cmd_Argv(1)) == 0)
host_cmd.c:			if (cl->privileged)
host_cmd.c:				cl->privileged = false;
host_cmd.c:				cl->edict->v.flags = (int)cl->edict->v.flags & ~(FL_GODMODE|FL_NOTARGET);
host_cmd.c:				cl->edict->v.movetype = MOVETYPE_WALK;
host_cmd.c:				cl->privileged = true;
host_cmd.c:		p[Q_strlen(p)-1] = 0;
host_cmd.c:		sprintf (text, "%c%s: ", 1, save->name);
host_cmd.c:	j = sizeof(text) - 2 - Q_strlen(text);  // -2 for /n and null terminator
host_cmd.c:		if (!client || !client->active || !client->spawned)
host_cmd.c:		if (teamplay.value && teamonly && client->edict->v.team != save->edict->v.team)
host_cmd.c:	Q_strcpy(text, host_client->name);
host_cmd.c:		p[Q_strlen(p)-1] = 0;
host_cmd.c:	j = sizeof(text) - 2 - Q_strlen(text);  // -2 for /n and null terminator
host_cmd.c:		if (!client->active || !client->spawned)
host_cmd.c:		if (Q_strcasecmp(client->name, Cmd_Argv(1)))
host_cmd.c:		Con_Printf ("color <0-13> [0-13]\n");
host_cmd.c:	host_client->colors = playercolor;
host_cmd.c:	host_client->edict->v.team = bottom + 1;
host_cmd.c:	MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
host_cmd.c:	MSG_WriteByte (&sv.reliable_datagram, host_client->colors);
host_cmd.c:	if (sv_player->v.health <= 0)
host_cmd.c:		SV_ClientPrintf ("Can't suicide -- allready dead!\n");
host_cmd.c:	pr_global_struct->time = sv.time;
host_cmd.c:	pr_global_struct->self = EDICT_TO_PROG(sv_player);
host_cmd.c:	PR_ExecuteProgram (pr_global_struct->ClientKill);
host_cmd.c:			SV_BroadcastPrintf ("%s paused the game\n", pr_strings + sv_player->v.netname);
host_cmd.c:			SV_BroadcastPrintf ("%s unpaused the game\n",pr_strings + sv_player->v.netname);
host_cmd.c:	if (host_client->spawned)
host_cmd.c:		Con_Printf ("prespawn not valid -- allready spawned\n");
host_cmd.c:	SZ_Write (&host_client->message, sv.signon.data, sv.signon.cursize);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_signonnum);
host_cmd.c:	MSG_WriteByte (&host_client->message, 2);
host_cmd.c:	host_client->sendsignon = true;
host_cmd.c:	if (host_client->spawned)
host_cmd.c:		Con_Printf ("Spawn not valid -- allready spawned\n");
host_cmd.c:		ent = host_client->edict;
host_cmd.c:		memset (&ent->v, 0, progs->entityfields * 4);
host_cmd.c:		ent->v.colormap = NUM_FOR_EDICT(ent);
host_cmd.c:		ent->v.team = (host_client->colors & 15) + 1;
host_cmd.c:		ent->v.netname = host_client->name - pr_strings;
host_cmd.c:			(&pr_global_struct->parm1)[i] = host_client->spawn_parms[i];
host_cmd.c:		pr_global_struct->time = sv.time;
host_cmd.c:		pr_global_struct->self = EDICT_TO_PROG(sv_player);
host_cmd.c:		PR_ExecuteProgram (pr_global_struct->ClientConnect);
host_cmd.c:		if ((Sys_FloatTime() - host_client->netconnection->connecttime) <= sv.time)
host_cmd.c:			Sys_Printf ("%s entered the game\n", host_client->name);
host_cmd.c:		PR_ExecuteProgram (pr_global_struct->PutClientInServer);	
host_cmd.c:	SZ_Clear (&host_client->message);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_time);
host_cmd.c:	MSG_WriteFloat (&host_client->message, sv.time);
host_cmd.c:		MSG_WriteByte (&host_client->message, svc_updatename);
host_cmd.c:		MSG_WriteByte (&host_client->message, i);
host_cmd.c:		MSG_WriteString (&host_client->message, client->name);
host_cmd.c:		MSG_WriteByte (&host_client->message, svc_updatefrags);
host_cmd.c:		MSG_WriteByte (&host_client->message, i);
host_cmd.c:		MSG_WriteShort (&host_client->message, client->old_frags);
host_cmd.c:		MSG_WriteByte (&host_client->message, svc_updatecolors);
host_cmd.c:		MSG_WriteByte (&host_client->message, i);
host_cmd.c:		MSG_WriteByte (&host_client->message, client->colors);
host_cmd.c:		MSG_WriteByte (&host_client->message, svc_lightstyle);
host_cmd.c:		MSG_WriteByte (&host_client->message, (char)i);
host_cmd.c:		MSG_WriteString (&host_client->message, sv.lightstyles[i]);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_updatestat);
host_cmd.c:	MSG_WriteByte (&host_client->message, STAT_TOTALSECRETS);
host_cmd.c:	MSG_WriteLong (&host_client->message, pr_global_struct->total_secrets);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_updatestat);
host_cmd.c:	MSG_WriteByte (&host_client->message, STAT_TOTALMONSTERS);
host_cmd.c:	MSG_WriteLong (&host_client->message, pr_global_struct->total_monsters);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_updatestat);
host_cmd.c:	MSG_WriteByte (&host_client->message, STAT_SECRETS);
host_cmd.c:	MSG_WriteLong (&host_client->message, pr_global_struct->found_secrets);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_updatestat);
host_cmd.c:	MSG_WriteByte (&host_client->message, STAT_MONSTERS);
host_cmd.c:	MSG_WriteLong (&host_client->message, pr_global_struct->killed_monsters);
host_cmd.c:	ent = EDICT_NUM( 1 + (host_client - svs.clients) );
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_setangle);
host_cmd.c:		MSG_WriteAngle (&host_client->message, ent->v.angles[i] );
host_cmd.c:	MSG_WriteAngle (&host_client->message, 0 );
host_cmd.c:	SV_WriteClientdataToMessage (sv_player, &host_client->message);
host_cmd.c:	MSG_WriteByte (&host_client->message, svc_signonnum);
host_cmd.c:	MSG_WriteByte (&host_client->message, 3);
host_cmd.c:	host_client->sendsignon = true;
host_cmd.c:	host_client->spawned = true;
host_cmd.c:	else if (pr_global_struct->deathmatch && !host_client->privileged)
host_cmd.c:		i = Q_atof(Cmd_Argv(2)) - 1;
host_cmd.c:			if (!host_client->active)
host_cmd.c:			if (Q_strcasecmp(host_client->name, Cmd_Argv(1)) == 0)
host_cmd.c:			who = save->name;
host_cmd.c:	if (pr_global_struct->deathmatch && !host_client->privileged)
host_cmd.c:               sv_player->v.items = (int)sv_player->v.items | HIT_PROXIMITY_GUN;
host_cmd.c:               sv_player->v.items = (int)sv_player->v.items | IT_GRENADE_LAUNCHER;
host_cmd.c:            sv_player->v.items = (int)sv_player->v.items | HIT_LASER_CANNON;
host_cmd.c:            sv_player->v.items = (int)sv_player->v.items | HIT_MJOLNIR;
host_cmd.c:            sv_player->v.items = (int)sv_player->v.items | (IT_SHOTGUN << (t[0] - '2'));
host_cmd.c:            sv_player->v.items = (int)sv_player->v.items | (IT_SHOTGUN << (t[0] - '2'));
host_cmd.c:			    val->_float = v;
host_cmd.c:        sv_player->v.ammo_shells = v;
host_cmd.c:				val->_float = v;
host_cmd.c:				if (sv_player->v.weapon <= IT_LIGHTNING)
host_cmd.c:					sv_player->v.ammo_nails = v;
host_cmd.c:			sv_player->v.ammo_nails = v;
host_cmd.c:				val->_float = v;
host_cmd.c:				if (sv_player->v.weapon > IT_LIGHTNING)
host_cmd.c:					sv_player->v.ammo_nails = v;
host_cmd.c:				val->_float = v;
host_cmd.c:				if (sv_player->v.weapon <= IT_LIGHTNING)
host_cmd.c:					sv_player->v.ammo_rockets = v;
host_cmd.c:			sv_player->v.ammo_rockets = v;
host_cmd.c:				val->_float = v;
host_cmd.c:				if (sv_player->v.weapon > IT_LIGHTNING)
host_cmd.c:					sv_player->v.ammo_rockets = v;
host_cmd.c:        sv_player->v.health = v;
host_cmd.c:				val->_float = v;
host_cmd.c:				if (sv_player->v.weapon <= IT_LIGHTNING)
host_cmd.c:					sv_player->v.ammo_cells = v;
host_cmd.c:			sv_player->v.ammo_cells = v;
host_cmd.c:				val->_float = v;
host_cmd.c:				if (sv_player->v.weapon > IT_LIGHTNING)
host_cmd.c:					sv_player->v.ammo_cells = v;
host_cmd.c:		if ( !strcmp (pr_strings + e->v.classname, "viewthing") )
host_cmd.c:	e->v.frame = 0;
host_cmd.c:	cl.model_precache[(int)e->v.modelindex] = m;
host_cmd.c:	m = cl.model_precache[(int)e->v.modelindex];
host_cmd.c:	if (f >= m->numframes)
host_cmd.c:		f = m->numframes-1;
host_cmd.c:	e->v.frame = f;		
host_cmd.c:	pframedesc = &hdr->frames[frame];
host_cmd.c:	Con_Printf ("frame %i: %s\n", frame, pframedesc->name);
host_cmd.c:	m = cl.model_precache[(int)e->v.modelindex];
host_cmd.c:	e->v.frame = e->v.frame + 1;
host_cmd.c:	if (e->v.frame >= m->numframes)
host_cmd.c:		e->v.frame = m->numframes - 1;
host_cmd.c:	PrintFrameName (m, e->v.frame);		
host_cmd.c:	m = cl.model_precache[(int)e->v.modelindex];
host_cmd.c:	e->v.frame = e->v.frame - 1;
host_cmd.c:	if (e->v.frame < 0)
host_cmd.c:		e->v.frame = 0;
host_cmd.c:	PrintFrameName (m, e->v.frame);		
host_cmd.c:	c = Cmd_Argc() - 1;
host_cmd.c:		strncpy (cls.demos[i-1], Cmd_Argv(i), sizeof(cls.demos[0])-1);
host_cmd.c:	if (!sv.active && cls.demonum != -1 && !cls.demoplayback)
host_cmd.c:		cls.demonum = -1;
host_cmd.c:	if (cls.demonum == -1)
in_dos.c:Copyright (C) 1996-1997 Id Software, Inc.
in_dos.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
in_dos.c:// in_mouse.c -- dos mouse code
in_dos.c:			// r/o	1-6
in_dos.c:	long	numButtons;			// r/o	0-32
in_dos.c:	if ( COM_CheckParm ("-nomouse") ) 
in_dos.c:	Con_Printf("%d-button mouse available\n", mouse_buttons);
in_dos.c:	i = COM_CheckParm ("-control");
in_dos.c:		extern_buttonstate = extern_control->buttons;
in_dos.c:		cmd->sidemove += m_side.value * mouse_x;
in_dos.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
in_dos.c:		if (cl.viewangles[PITCH] < -70)
in_dos.c:			cl.viewangles[PITCH] = -70;
in_dos.c:			cmd->upmove -= m_forward.value * mouse_y;
in_dos.c:			cmd->forwardmove -= m_forward.value * mouse_y;
in_dos.c:			cmd->sidemove -= speed*cl_sidespeed.value; 
in_dos.c:			cmd->sidemove += speed*cl_sidespeed.value; 
in_dos.c:			cl.viewangles[YAW] -= aspeed*cl_yawspeed.value;
in_dos.c:			speed *= -1;
in_dos.c:			cl.viewangles[PITCH] -= aspeed*cl_pitchspeed.value;
in_dos.c:			cmd->forwardmove += speed*cl_forwardspeed.value; 
in_dos.c:			cmd->forwardmove -= speed*cl_backspeed.value;  
in_dos.c:		key_count = -1;
in_dos.c:		key_count = -1;
in_dos.c:	if ( COM_CheckParm ("-nojoy") ) 
in_dos.c:	if (extern_control->numButtons > 32)
in_dos.c:		extern_control->numButtons = 32;
in_dos.c:	Con_Printf("%s Initialized\n", extern_control->deviceName);
in_dos.c:	Con_Printf("  %u axes  %u buttons\n", extern_control->numAxes, extern_control->numButtons);
in_dos.c:	extern_buttons = extern_control->numButtons;
in_dos.c:	extern_control->viewangles[YAW] = cl.viewangles[YAW];
in_dos.c:	extern_control->viewangles[PITCH] = cl.viewangles[PITCH];
in_dos.c:	extern_control->viewangles[ROLL] = cl.viewangles[ROLL];
in_dos.c:	extern_control->forwardmove = cmd->forwardmove;
in_dos.c:	extern_control->sidemove = cmd->sidemove;
in_dos.c:	extern_control->upmove = cmd->upmove;
in_dos.c:Con_DPrintf("IN:  y:%f p:%f r:%f f:%f s:%f u:%f\n", extern_control->viewangles[YAW], extern_control->viewangles[PITCH], extern_control->viewangles[ROLL], extern_control->forwardmove, extern_control->sidemove, extern_control->upmove);
in_dos.c:	dos_int86(extern_control->interruptVector);
in_dos.c:Con_DPrintf("OUT: y:%f p:%f r:%f f:%f s:%f u:%f\n", extern_control->viewangles[YAW], extern_control->viewangles[PITCH], extern_control->viewangles[ROLL], extern_control->forwardmove, extern_control->sidemove, extern_control->upmove);
in_dos.c:	cl.viewangles[YAW] = extern_control->viewangles[YAW];
in_dos.c:	cl.viewangles[PITCH] = extern_control->viewangles[PITCH];
in_dos.c:	cl.viewangles[ROLL] = extern_control->viewangles[ROLL];
in_dos.c:	cmd->forwardmove = extern_control->forwardmove;
in_dos.c:	cmd->sidemove = extern_control->sidemove;
in_dos.c:	cmd->upmove = extern_control->upmove;
in_dos.c:	if (cl.viewangles[PITCH] < -70)
in_dos.c:		cl.viewangles[PITCH] = -70;
in_dos.c:	freelook = (extern_control->flags & AUX_FLAG_FREELOOK || aux_look.value || in_mlook.state & 1);
in_null.c:Copyright (C) 1996-1997 Id Software, Inc.
in_null.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
in_null.c:// in_null.c -- for systems without a mouse
in_sun.c:Copyright (C) 1996-1997 Id Software, Inc.
in_sun.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
in_sun.c:// in_sun.c -- SUN/X mouse input handler
in_sun.c:// IN_CenterMouse - center the mouse in the screen
in_sun.c:// IN_Init - setup mouse input
in_sun.c:// IN_Shutdown - clean up mouse settings (must be done from signal handler too!)
in_sun.c:// IN_Commands - process buttons
in_sun.c:// IN_Move - process mouse moves
in_sun.c:	if (now - last_movement > 100000000) {
in_sun.c:		cmd->sidemove += m_side.value * dx;
in_sun.c:		cl.viewangles[YAW] -= m_yaw.value * dx;
in_sun.c:		if (cl.viewangles[PITCH] < -70) cl.viewangles[PITCH] = -70;
in_sun.c:		if ((in_strafe.state & 1) && noclip_anglehack) cmd->upmove -= m_forward.value * dy;
in_sun.c:		else cmd->forwardmove -= m_forward.value * dy;
in_win.c:Copyright (C) 1996-1997 Id Software, Inc.
in_win.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
in_win.c:// in_win.c -- windows 95 mouse and joystick code
in_win.c:cvar_t	joy_forwardsensitivity = {"joyforwardsensitivity", "-1.0"};
in_win.c:cvar_t	joy_sidesensitivity = {"joysidesensitivity", "-1.0"};
in_win.c:cvar_t	joy_yawsensitivity = {"joyyawsensitivity", "-1.0"};
in_win.c:// forward-referenced functions
in_win.c:	if ( COM_CheckParm ("-nomouse") ) 
in_win.c:	if (COM_CheckParm ("-dinput"))
in_win.c:			if ( COM_CheckParm ("-noforcemspd") ) 
in_win.c:			if ( COM_CheckParm ("-noforcemaccel") ) 
in_win.c:			if ( COM_CheckParm ("-noforcemparms") ) 
in_win.c:		mx = current_pos.x - window_center_x + mx_accum;
in_win.c:		my = current_pos.y - window_center_y + my_accum;
in_win.c:		cmd->sidemove += m_side.value * mouse_x;
in_win.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
in_win.c:		if (cl.viewangles[PITCH] < -70)
in_win.c:			cl.viewangles[PITCH] = -70;
in_win.c:			cmd->upmove -= m_forward.value * mouse_y;
in_win.c:			cmd->forwardmove -= m_forward.value * mouse_y;
in_win.c:			mx_accum += current_pos.x - window_center_x;
in_win.c:			my_accum += current_pos.y - window_center_y;
in_win.c:	if ( COM_CheckParm ("-nojoy") ) 
in_win.c:		Con_Printf ("\njoystick not found -- driver not present\n\n");
in_win.c:		Con_Printf ("\njoystick not found -- no valid joysticks (%x)\n\n", mmr);
in_win.c:		Con_Printf ("\njoystick not found -- invalid joystick capabilities (%x)\n\n", mmr); 
in_win.c:		// this is a hack -- there is a bug in the Logitech WingMan Warrior DirectInput Driver
in_win.c:		// go figure -- anyway, now we get the full resolution out of the device
in_win.c:		// get the floating point zero-centered, potentially-inverted data for the current axis
in_win.c:		fAxisValue -= 32768.0;
in_win.c:				fAxisValue = (fAxisValue > 0.0) ? fTemp : -fTemp;
in_win.c:		// convert range from -32768..32767 to -1..1 
in_win.c:						cl.viewangles[PITCH] -= (fAxisValue * joy_pitchsensitivity.value) * aspeed * cl_pitchspeed.value;
in_win.c:					// disable pitch return-to-center unless requested by user
in_win.c:					cmd->forwardmove += (fAxisValue * joy_forwardsensitivity.value) * speed * cl_forwardspeed.value;
in_win.c:				cmd->sidemove += (fAxisValue * joy_sidesensitivity.value) * speed * cl_sidespeed.value;
in_win.c:					cmd->sidemove -= (fAxisValue * joy_sidesensitivity.value) * speed * cl_sidespeed.value;
in_win.c:					// disable pitch return-to-center unless requested by user
in_win.c:	if (cl.viewangles[PITCH] < -70.0)
in_win.c:		cl.viewangles[PITCH] = -70.0;
input.h:Copyright (C) 1996-1997 Id Software, Inc.
input.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
input.h:// input.h -- external (non-keyboard) input devices
keys.c:Copyright (C) 1996-1997 Id Software, Inc.
keys.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
keys.c:			key_linepos--;
keys.c:			history_line = (history_line - 1) & 31;
keys.c:		if (con_backscroll > con_totallines - (vid.height>>3) - 1)
keys.c:			con_backscroll = con_totallines - (vid.height>>3) - 1;
keys.c:		con_backscroll -= 2;
keys.c:		con_backscroll = con_totallines - (vid.height>>3) - 1;
keys.c:	if (key_linepos < MAXCMDLINE-1)
keys.c:			chat_bufferlen--;
keys.c:		return -1;
keys.c:	for (kn=keynames ; kn->name ; kn++)
keys.c:		if (!Q_strcasecmp(str,kn->name))
keys.c:			return kn->keynum;
keys.c:	return -1;
keys.c:	if (keynum == -1)
keys.c:	for (kn=keynames ; kn->name ; kn++)
keys.c:		if (keynum == kn->keynum)
keys.c:			return kn->name;
keys.c:	if (keynum == -1)
keys.c:	if (b==-1)
keys.c:	if (b==-1)
keys.c:		keyshift[i] = i - 'a' + 'A';
keys.c:	keyshift['-'] = '_';
keys.c:// update auto-repeat status
keys.c:			sprintf (cmd, "-%s %i\n", kb+1, key);
keys.c:				sprintf (cmd, "-%s %i\n", kb+1, key);
keys.h:Copyright (C) 1996-1997 Id Software, Inc.
keys.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
keys.h:// aux keys are for multi-buttoned joysticks to generate so they can use
makezip.bat: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
math.s:Copyright (C) 1996-1997 Id Software, Inc.
math.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
math.s:// x86 assembly-language math routines.
math.s:	flds	pl_normal(%edx)		// p->normal[0]
math.s:	fld		%st(0)				// p->normal[0] | p->normal[0]
math.s://dist1= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
math.s://dist2= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
math.s:	fmuls	(%ebx)				// p->normal[0]*emaxs[0] | p->normal[0]
math.s:	flds	pl_normal+4(%edx)	// p->normal[1] | p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]
math.s:	fxch	%st(2)				// p->normal[0] | p->normal[0]*emaxs[0] |
math.s:								//  p->normal[1]
math.s:	fmuls	(%ecx)				// p->normal[0]*emins[0] |
math.s:								//  p->normal[0]*emaxs[0] | p->normal[1]
math.s:	fxch	%st(2)				// p->normal[1] | p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fld		%st(0)				// p->normal[1] | p->normal[1] |
math.s:								//  p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fmuls	4(%ebx)				// p->normal[1]*emaxs[1] | p->normal[1] |
math.s:								//  p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	flds	pl_normal+8(%edx)	// p->normal[2] | p->normal[1]*emaxs[1] |
math.s:								//  p->normal[1] | p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fxch	%st(2)				// p->normal[1] | p->normal[1]*emaxs[1] |
math.s:								//  p->normal[2] | p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fmuls	4(%ecx)				// p->normal[1]*emins[1] |
math.s:								//  p->normal[1]*emaxs[1] |
math.s:								//  p->normal[2] | p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fxch	%st(2)				// p->normal[2] | p->normal[1]*emaxs[1] |
math.s:								//  p->normal[1]*emins[1] |
math.s:								//  p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fld		%st(0)				// p->normal[2] | p->normal[2] |
math.s:								//  p->normal[1]*emaxs[1] |
math.s:								//  p->normal[1]*emins[1] |
math.s:								//  p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fmuls	8(%ebx)				// p->normal[2]*emaxs[2] |
math.s:								//  p->normal[2] |
math.s:								//  p->normal[1]*emaxs[1] |
math.s:								//  p->normal[1]*emins[1] |
math.s:								//  p->normal[0]*emaxs[0] |
math.s:								//  p->normal[0]*emins[0]
math.s:	fxch	%st(5)				// p->normal[0]*emins[0] |
math.s:								//  p->normal[2] |
math.s:								//  p->normal[1]*emaxs[1] |
math.s:								//  p->normal[1]*emins[1] |
math.s:								//  p->normal[0]*emaxs[0] |
math.s:								//  p->normal[2]*emaxs[2]
math.s:	faddp	%st(0),%st(3)		//p->normal[2] |
math.s:								// p->normal[1]*emaxs[1] |
math.s:								// p->normal[1]*emins[1]+p->normal[0]*emins[0]|
math.s:								// p->normal[0]*emaxs[0] |
math.s:								// p->normal[2]*emaxs[2]
math.s:	fmuls	8(%ecx)				//p->normal[2]*emins[2] |
math.s:								// p->normal[1]*emaxs[1] |
math.s:								// p->normal[1]*emins[1]+p->normal[0]*emins[0]|
math.s:								// p->normal[0]*emaxs[0] |
math.s:								// p->normal[2]*emaxs[2]
math.s:	fxch	%st(1)				//p->normal[1]*emaxs[1] |
math.s:								// p->normal[2]*emins[2] |
math.s:								// p->normal[1]*emins[1]+p->normal[0]*emins[0]|
math.s:								// p->normal[0]*emaxs[0] |
math.s:								// p->normal[2]*emaxs[2]
math.s:	faddp	%st(0),%st(3)		//p->normal[2]*emins[2] |
math.s:								// p->normal[1]*emins[1]+p->normal[0]*emins[0]|
math.s:								// p->normal[0]*emaxs[0]+p->normal[1]*emaxs[1]|
math.s:								// p->normal[2]*emaxs[2]
math.s:	fxch	%st(3)				//p->normal[2]*emaxs[2] +
math.s:								// p->normal[1]*emins[1]+p->normal[0]*emins[0]|
math.s:								// p->normal[0]*emaxs[0]+p->normal[1]*emaxs[1]|
math.s:								// p->normal[2]*emins[2]
math.s:	faddp	%st(0),%st(2)		//p->normal[1]*emins[1]+p->normal[0]*emins[0]|
math.s:								// dist1 | p->normal[2]*emins[2]
math.s://dist1= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
math.s://dist2= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
math.s://dist1= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
math.s://dist2= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
math.s://dist1= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
math.s://dist2= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
math.s://dist1= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
math.s://dist2= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
math.s://dist1= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
math.s://dist2= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
math.s://dist1= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
math.s://dist2= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
math.s://dist1= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
math.s://dist2= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
math.s://	if (dist1 >= p->dist)
math.s://	if (dist2 < p->dist)
mathlib.c:Copyright (C) 1996-1997 Id Software, Inc.
mathlib.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
mathlib.c:// mathlib.c -- math primitives
mathlib.c:/*-----------------------------------------------------------------*/
mathlib.c:	dst[0] = p[0] - d * n[0];
mathlib.c:	dst[1] = p[1] - d * n[1];
mathlib.c:	dst[2] = p[2] - d * n[2];
mathlib.c:	zrot[1][0] = -sin( DEG2RAD( degrees ) );
mathlib.c:/*-----------------------------------------------------------------*/
mathlib.c:		a -= 360*(int)(a/360);
mathlib.c:		a += 360*( 1 + (int)(-a/360) );
mathlib.c:	if (p->type < 3)
mathlib.c:		if (p->dist <= emins[p->type])
mathlib.c:		if (p->dist >= emaxs[p->type])
mathlib.c:	switch (p->signbits)
mathlib.c:dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
mathlib.c:dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
mathlib.c:dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
mathlib.c:dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
mathlib.c:dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
mathlib.c:dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
mathlib.c:dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
mathlib.c:dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
mathlib.c:dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
mathlib.c:dist2 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
mathlib.c:dist1 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
mathlib.c:dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
mathlib.c:dist1 = p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
mathlib.c:dist2 = p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
mathlib.c:dist1 = p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
mathlib.c:dist2 = p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
mathlib.c:		if (plane->normal[i] < 0)
mathlib.c:	dist = DotProduct (plane->normal, corners[0]) - plane->dist;
mathlib.c:	dist2 = DotProduct (plane->normal, corners[1]) - plane->dist;
mathlib.c:	if (dist1 >= p->dist)
mathlib.c:	if (dist2 < p->dist)
mathlib.c:	forward[2] = -sp;
mathlib.c:	right[0] = (-1*sr*sp*cy+-1*cr*-sy);
mathlib.c:	right[1] = (-1*sr*sp*sy+-1*cr*cy);
mathlib.c:	right[2] = -1*sr*cp;
mathlib.c:	up[0] = (cr*sp*cy+-sr*-sy);
mathlib.c:	up[1] = (cr*sp*sy+-sr*cy);
mathlib.c:	out[0] = veca[0]-vecb[0];
mathlib.c:	out[1] = veca[1]-vecb[1];
mathlib.c:	out[2] = veca[2]-vecb[2];
mathlib.c:	cross[0] = v1[1]*v2[2] - v1[2]*v2[1];
mathlib.c:	cross[1] = v1[2]*v2[0] - v1[0]*v2[2];
mathlib.c:	cross[2] = v1[0]*v2[1] - v1[1]*v2[0];
mathlib.c:	v[0] = -v[0];
mathlib.c:	v[1] = -v[1];
mathlib.c:	v[2] = -v[2];
mathlib.c:Returns mathematically correct (floor-based) quotient and remainder for
mathlib.c://		Sys_Error ("FloorDivMod: non-integer numer or denom %f %f\n",
mathlib.c:		r = (int)floor(numer - (x * denom));
mathlib.c:	// perform operations with positive values, and fix mod to make floor-based
mathlib.c:		x = floor(-numer / denom);
mathlib.c:		q = -(int)x;
mathlib.c:		r = (int)floor(-numer - (x * denom));
mathlib.c:			q--;
mathlib.c:			r = (int)denom - r;
mathlib.h:Copyright (C) 1996-1997 Id Software, Inc.
mathlib.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
mathlib.h:#define VectorSubtract(a,b,c) {c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];}
mathlib.h:	(((p)->type < 3)?						\
mathlib.h:		((p)->dist <= (emins)[(p)->type])?	\
mathlib.h:			((p)->dist >= (emaxs)[(p)->type])?\
menu.c:Copyright (C) 1996-1997 Id Software, Inc.
menu.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
menu.c:	Draw_Character ( cx + ((vid.width - 320)>>1), line, num);
menu.c:	Draw_TransPic (x + ((vid.width - 320)>>1), y, pic);
menu.c:	Draw_Pic (x + ((vid.width - 320)>>1), y, pic);
menu.c:			dest[TOP_RANGE+j] = source[top+15-j];
menu.c:			dest[BOTTOM_RANGE+j] = source[bottom+15-j];
menu.c:	Draw_TransPicTranslate (x + ((vid.width - 320)>>1), y, pic, translationTable);
menu.c:		width -= 2;
menu.c:		cls.demonum = -1;
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:		if (cls.demonum != -1 && !cls.demoplayback && cls.state != ca_connected)
menu.c:		if (--m_main_cursor < 0)
menu.c:			m_main_cursor = MAIN_ITEMS - 1;
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:		if (--m_singleplayer_cursor < 0)
menu.c:			m_singleplayer_cursor = SINGLEPLAYER_ITEMS - 1;
menu.c:		strcpy (m_filenames[i], "--- UNUSED SLOT ---");
menu.c:		strncpy (m_filenames[i], name, sizeof(m_filenames[i])-1);
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:		load_cursor--;
menu.c:			load_cursor = MAX_SAVEGAMES-1;
menu.c:		load_cursor--;
menu.c:			load_cursor = MAX_SAVEGAMES-1;
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:	M_PrintWhite ((320/2) - ((27*8)/2), 148, "No Communications Available");
menu.c:		if (--m_multiplayer_cursor < 0)
menu.c:			m_multiplayer_cursor = MULTIPLAYER_ITEMS - 1;
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:	M_DrawTextBox (64, 140-8, 14, 1);
menu.c:		setup_cursor--;
menu.c:			setup_cursor = NUM_SETUP_CMDS-1;
menu.c:			setup_top = setup_top - 1;
menu.c:			setup_bottom = setup_bottom - 1;
menu.c:				setup_hostname[strlen(setup_hostname)-1] = 0;
menu.c:				setup_myname[strlen(setup_myname)-1] = 0;
menu.c:  " by a null-modem cable. ",
menu.c:  " or Windows 95 DOS-box. ",
menu.c:	m_net_cursor--;
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:	f = (320-26*8)/2;
menu.c:		if (--m_net_cursor < 0)
menu.c:			m_net_cursor = m_net_items - 1;
menu.c:		v_gamma.value -= dir * 0.05;
menu.c:		Cvar_SetValue ("m_pitch", -m_pitch.value);
menu.c:	M_DrawCharacter (x-8, y, 128);
menu.c:	M_DrawCharacter (x + (SLIDER_RANGE-1)*8 * range, y, 131);
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:	r = (scr_viewsize.value - 30) / (120 - 30);
menu.c:	r = (1.0 - v_gamma.value) / 0.5;
menu.c:	r = (sensitivity.value - 1)/10;
menu.c:		options_cursor--;
menu.c:			options_cursor = OPTIONS_ITEMS-1;
menu.c:		M_AdjustSliders (-1);
menu.c:	twokeys[0] = twokeys[1] = -1;
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:		if (keys[0] == -1)
menu.c:			if (keys[1] != -1)
menu.c:		keys_cursor--;
menu.c:			keys_cursor = NUMCOMMANDS-1;
menu.c:		if (keys[1] != -1)
menu.c:		if (--help_page < 0)
menu.c:			help_page = NUM_HELP_PAGES-1;
menu.c:  "  throw a blanket-party ",
menu.c:	basex = (320-p->width)/2;
menu.c:	M_Print (basex, 32, va ("%s - %s", startJoin, directModem));
menu.c:	M_DrawTextBox (160, serialConfig_cursor_table[1]-8, 1, 1);
menu.c:	M_DrawTextBox (160, serialConfig_cursor_table[2]-8, 5, 1);
menu.c:			M_DrawTextBox (160, serialConfig_cursor_table[4]-8, 16, 1);
menu.c:		M_DrawTextBox (basex, serialConfig_cursor_table[5]-8, 7, 1);
menu.c:		M_DrawTextBox (basex, serialConfig_cursor_table[5]-8, 2, 1);
menu.c:	M_DrawCharacter (basex-8, serialConfig_cursor_table [serialConfig_cursor], 12+((int)(realtime*4)&1));
menu.c:		serialConfig_cursor--;
menu.c:			serialConfig_cursor = NUM_SERIALCONFIG_CMDS-1;
menu.c:			serialConfig_comport--;
menu.c:			serialConfig_irq = ISA_IRQs[serialConfig_comport-1];
menu.c:			serialConfig_irq--;
menu.c:			serialConfig_baud--;
menu.c:			serialConfig_irq = ISA_IRQs[serialConfig_comport-1];
menu.c:			(*SetComPortConfig) (0, ISA_uarts[serialConfig_comport-1], serialConfig_irq, serialConfig_baudrate[serialConfig_baud], SerialConfig);
menu.c:		(*SetComPortConfig) (0, ISA_uarts[serialConfig_comport-1], serialConfig_irq, serialConfig_baudrate[serialConfig_baud], SerialConfig);
menu.c:				serialConfig_phone[strlen(serialConfig_phone)-1] = 0;
menu.c:	basex = (320-p->width)/2;
menu.c:	M_DrawTextBox (basex, modemConfig_cursor_table[4]-8, 2, 1);
menu.c:	M_DrawCharacter (basex-8, modemConfig_cursor_table [modemConfig_cursor], 12+((int)(realtime*4)&1));
menu.c:		modemConfig_cursor--;
menu.c:			modemConfig_cursor = NUM_MODEMCONFIG_CMDS-1;
menu.c:				modemConfig_clear[strlen(modemConfig_clear)-1] = 0;
menu.c:				modemConfig_init[strlen(modemConfig_init)-1] = 0;
menu.c:				modemConfig_hangup[strlen(modemConfig_hangup)-1] = 0;
menu.c:int		lanConfig_cursor = -1;
menu.c:	if (lanConfig_cursor == -1)
menu.c:	basex = (320-p->width)/2;
menu.c:	M_Print (basex, 32, va ("%s - %s", startJoin, protocol));
menu.c:	M_DrawTextBox (basex+8*8, lanConfig_cursor_table[0]-8, 6, 1);
menu.c:		M_DrawTextBox (basex+8, lanConfig_cursor_table[2]-8, 22, 1);
menu.c:		M_DrawTextBox (basex, lanConfig_cursor_table[1]-8, 2, 1);
menu.c:	M_DrawCharacter (basex-8, lanConfig_cursor_table [lanConfig_cursor], 12+((int)(realtime*4)&1));
menu.c:		lanConfig_cursor--;
menu.c:			lanConfig_cursor = NUM_LANCONFIG_CMDS-1;
menu.c:				lanConfig_portname[strlen(lanConfig_portname)-1] = 0;
menu.c:				lanConfig_joinname[strlen(lanConfig_joinname)-1] = 0;
menu.c:	{"end", "Shub-Niggurath's Pit"},			// 31
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:		if ((realtime - m_serverInfoMessageTime) < 5.0)
menu.c:			x = (320-26*8)/2;
menu.c:			startepisode = count - 1;
menu.c:			startlevel = count - 1;
menu.c:		gameoptions_cursor--;
menu.c:			gameoptions_cursor = NUM_GAMEOPTIONS-1;
menu.c:		M_NetStart_Change (-1);
menu.c:			Cbuf_AddText ("listen 0\n");	// so host_netport will be re-examined
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:	x = (320/2) - ((12*8)/2) + 4;
menu.c:	M_DrawTextBox (x-8, 32, 12, 1);
menu.c:	M_PrintWhite ((320/2) - ((22*8)/2), 64, "No Quake servers found");
menu.c:	if ((realtime - searchCompleteTime) < 3.0)
menu.c:	M_DrawPic ( (320-p->width)/2, 4, p);
menu.c:			sprintf(string, "%-15.15s %-15.15s %2u/%2u\n", hostcache[n].name, hostcache[n].map, hostcache[n].users, hostcache[n].maxusers);
menu.c:			sprintf(string, "%-15.15s %-15.15s\n", hostcache[n].name, hostcache[n].map);
menu.c:		slist_cursor--;
menu.c:			slist_cursor = hostCacheCount - 1;
menu.h:Copyright (C) 1996-1997 Id Software, Inc.
menu.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
model.c:Copyright (C) 1996-1997 Id Software, Inc.
model.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
model.c:// models.c -- model loading and caching
model.c:	r = Cache_Check (&mod->cache);
model.c:	if (!mod->cache.data)
model.c:	return mod->cache.data;
model.c:	if (!model || !model->nodes)
model.c:	node = model->nodes;
model.c:		if (node->contents < 0)
model.c:		plane = node->plane;
model.c:		d = DotProduct (p,plane->normal) - plane->dist;
model.c:			node = node->children[0];
model.c:			node = node->children[1];
model.c:	row = (model->numleafs+7)>>3;	
model.c:			row--;
model.c:			c--;
model.c:	} while (out - decompressed < row);
model.c:	if (leaf == model->leafs)
model.c:	return Mod_DecompressVis (leaf->compressed_vis, model);
model.c:		mod->needload = NL_UNREFERENCED;
model.c:		if (mod->type == mod_sprite) mod->cache.data = NULL;
model.c:		if (!strcmp (mod->name, name) )
model.c:		if (mod->needload == NL_UNREFERENCED)
model.c:			if (!avail || mod->type != mod_alias)
model.c:				if (mod->type == mod_alias)
model.c:					if (Cache_Check (&mod->cache))
model.c:						Cache_Free (&mod->cache);
model.c:		strcpy (mod->name, name);
model.c:		mod->needload = NL_NEEDS_LOADED;
model.c:	if (mod->needload == NL_PRESENT)
model.c:		if (mod->type == mod_alias)
model.c:			Cache_Check (&mod->cache);
model.c:	if (mod->type == mod_alias)
model.c:		if (Cache_Check (&mod->cache))
model.c:			mod->needload = NL_PRESENT;
model.c:		if (mod->needload == NL_PRESENT)
model.c:	buf = (unsigned *)COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf));
model.c:			Sys_Error ("Mod_NumForName: %s not found", mod->name);
model.c:	COM_FileBase (mod->name, loadname);
model.c:	mod->needload = NL_PRESENT;
model.c:	if (!l->filelen)
model.c:		loadmodel->textures = NULL;
model.c:	m = (dmiptexlump_t *)(mod_base + l->fileofs);
model.c:	m->nummiptex = LittleLong (m->nummiptex);
model.c:	loadmodel->numtextures = m->nummiptex;
model.c:	loadmodel->textures = Hunk_AllocName (m->nummiptex * sizeof(*loadmodel->textures) , loadname);
model.c:	for (i=0 ; i<m->nummiptex ; i++)
model.c:		m->dataofs[i] = LittleLong(m->dataofs[i]);
model.c:		if (m->dataofs[i] == -1)
model.c:		mt = (miptex_t *)((byte *)m + m->dataofs[i]);
model.c:		mt->width = LittleLong (mt->width);
model.c:		mt->height = LittleLong (mt->height);
model.c:			mt->offsets[j] = LittleLong (mt->offsets[j]);
model.c:		if ( (mt->width & 15) || (mt->height & 15) )
model.c:			Sys_Error ("Texture %s is not 16 aligned", mt->name);
model.c:		pixels = mt->width*mt->height/64*85;
model.c:		loadmodel->textures[i] = tx;
model.c:		memcpy (tx->name, mt->name, sizeof(tx->name));
model.c:		tx->width = mt->width;
model.c:		tx->height = mt->height;
model.c:			tx->offsets[j] = mt->offsets[j] + sizeof(texture_t) - sizeof(miptex_t);
model.c:		if (!Q_strncmp(mt->name,"sky",3))	
model.c:	for (i=0 ; i<m->nummiptex ; i++)
model.c:		tx = loadmodel->textures[i];
model.c:		if (!tx || tx->name[0] != '+')
model.c:		if (tx->anim_next)
model.c:		max = tx->name[1];
model.c:			max -= 'a' - 'A';
model.c:			max -= '0';
model.c:			altmax = max - 'A';
model.c:			Sys_Error ("Bad animating texture %s", tx->name);
model.c:		for (j=i+1 ; j<m->nummiptex ; j++)
model.c:			tx2 = loadmodel->textures[j];
model.c:			if (!tx2 || tx2->name[0] != '+')
model.c:			if (strcmp (tx2->name+2, tx->name+2))
model.c:			num = tx2->name[1];
model.c:				num -= 'a' - 'A';
model.c:				num -= '0';
model.c:				num = num - 'A';
model.c:				Sys_Error ("Bad animating texture %s", tx->name);
model.c:				Sys_Error ("Missing frame %i of %s",j, tx->name);
model.c:			tx2->anim_total = max * ANIM_CYCLE;
model.c:			tx2->anim_min = j * ANIM_CYCLE;
model.c:			tx2->anim_max = (j+1) * ANIM_CYCLE;
model.c:			tx2->anim_next = anims[ (j+1)%max ];
model.c:				tx2->alternate_anims = altanims[0];
model.c:				Sys_Error ("Missing frame %i of %s",j, tx->name);
model.c:			tx2->anim_total = altmax * ANIM_CYCLE;
model.c:			tx2->anim_min = j * ANIM_CYCLE;
model.c:			tx2->anim_max = (j+1) * ANIM_CYCLE;
model.c:			tx2->anim_next = altanims[ (j+1)%altmax ];
model.c:				tx2->alternate_anims = anims[0];
model.c:	if (!l->filelen)
model.c:		loadmodel->lightdata = NULL;
model.c:	loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname);	
model.c:	memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
model.c:	if (!l->filelen)
model.c:		loadmodel->visdata = NULL;
model.c:	loadmodel->visdata = Hunk_AllocName ( l->filelen, loadname);	
model.c:	memcpy (loadmodel->visdata, mod_base + l->fileofs, l->filelen);
model.c:	if (!l->filelen)
model.c:		loadmodel->entities = NULL;
model.c:	loadmodel->entities = Hunk_AllocName ( l->filelen, loadname);	
model.c:	memcpy (loadmodel->entities, mod_base + l->fileofs, l->filelen);
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->vertexes = out;
model.c:	loadmodel->numvertexes = count;
model.c:		out->position[0] = LittleFloat (in->point[0]);
model.c:		out->position[1] = LittleFloat (in->point[1]);
model.c:		out->position[2] = LittleFloat (in->point[2]);
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->submodels = out;
model.c:	loadmodel->numsubmodels = count;
model.c:			out->mins[j] = LittleFloat (in->mins[j]) - 1;
model.c:			out->maxs[j] = LittleFloat (in->maxs[j]) + 1;
model.c:			out->origin[j] = LittleFloat (in->origin[j]);
model.c:			out->headnode[j] = LittleLong (in->headnode[j]);
model.c:		out->visleafs = LittleLong (in->visleafs);
model.c:		out->firstface = LittleLong (in->firstface);
model.c:		out->numfaces = LittleLong (in->numfaces);
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->edges = out;
model.c:	loadmodel->numedges = count;
model.c:		out->v[0] = (unsigned short)LittleShort(in->v[0]);
model.c:		out->v[1] = (unsigned short)LittleShort(in->v[1]);
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->texinfo = out;
model.c:	loadmodel->numtexinfo = count;
model.c:			out->vecs[0][j] = LittleFloat (in->vecs[0][j]);
model.c:		len1 = Length (out->vecs[0]);
model.c:		len2 = Length (out->vecs[1]);
model.c:			out->mipadjust = 4;
model.c:			out->mipadjust = 3;
model.c:			out->mipadjust = 2;
model.c:			out->mipadjust = 1;
model.c:			out->mipadjust = 1;		// don't crash
model.c:			out->mipadjust = 1 / floor( (len1+len2)/2 + 0.1 );
model.c:		miptex = LittleLong (in->miptex);
model.c:		out->flags = LittleLong (in->flags);
model.c:		if (!loadmodel->textures)
model.c:			out->texture = r_notexture_mip;	// checkerboard texture
model.c:			out->flags = 0;
model.c:			if (miptex >= loadmodel->numtextures)
model.c:				Sys_Error ("miptex >= loadmodel->numtextures");
model.c:			out->texture = loadmodel->textures[miptex];
model.c:			if (!out->texture)
model.c:				out->texture = r_notexture_mip; // texture not found
model.c:				out->flags = 0;
model.c:Fills in s->texturemins[] and s->extents[]
model.c:	maxs[0] = maxs[1] = -99999;
model.c:	tex = s->texinfo;
model.c:	for (i=0 ; i<s->numedges ; i++)
model.c:		e = loadmodel->surfedges[s->firstedge+i];
model.c:			v = &loadmodel->vertexes[loadmodel->edges[e].v[0]];
model.c:			v = &loadmodel->vertexes[loadmodel->edges[-e].v[1]];
model.c:			val = v->position[0] * tex->vecs[j][0] + 
model.c:				v->position[1] * tex->vecs[j][1] +
model.c:				v->position[2] * tex->vecs[j][2] +
model.c:				tex->vecs[j][3];
model.c:		s->texturemins[i] = bmins[i] * 16;
model.c:		s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
model.c:		if ( !(tex->flags & TEX_SPECIAL) && s->extents[i] > 256)
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->surfaces = out;
model.c:	loadmodel->numsurfaces = count;
model.c:		out->firstedge = LittleLong(in->firstedge);
model.c:		out->numedges = LittleShort(in->numedges);		
model.c:		out->flags = 0;
model.c:		planenum = LittleShort(in->planenum);
model.c:		side = LittleShort(in->side);
model.c:			out->flags |= SURF_PLANEBACK;			
model.c:		out->plane = loadmodel->planes + planenum;
model.c:		out->texinfo = loadmodel->texinfo + LittleShort (in->texinfo);
model.c:			out->styles[i] = in->styles[i];
model.c:		i = LittleLong(in->lightofs);
model.c:		if (i == -1)
model.c:			out->samples = NULL;
model.c:			out->samples = loadmodel->lightdata + i;
model.c:		if (!Q_strncmp(out->texinfo->texture->name,"sky",3))	// sky
model.c:			out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
model.c:		if (!Q_strncmp(out->texinfo->texture->name,"*",1))		// turbulent
model.c:			out->flags |= (SURF_DRAWTURB | SURF_DRAWTILED);
model.c:				out->extents[i] = 16384;
model.c:				out->texturemins[i] = -8192;
model.c:	node->parent = parent;
model.c:	if (node->contents < 0)
model.c:	Mod_SetParent (node->children[0], node);
model.c:	Mod_SetParent (node->children[1], node);
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->nodes = out;
model.c:	loadmodel->numnodes = count;
model.c:			out->minmaxs[j] = LittleShort (in->mins[j]);
model.c:			out->minmaxs[3+j] = LittleShort (in->maxs[j]);
model.c:		p = LittleLong(in->planenum);
model.c:		out->plane = loadmodel->planes + p;
model.c:		out->firstsurface = LittleShort (in->firstface);
model.c:		out->numsurfaces = LittleShort (in->numfaces);
model.c:			p = LittleShort (in->children[j]);
model.c:				out->children[j] = loadmodel->nodes + p;
model.c:				out->children[j] = (mnode_t *)(loadmodel->leafs + (-1 - p));
model.c:	Mod_SetParent (loadmodel->nodes, NULL);	// sets nodes and leafs
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->leafs = out;
model.c:	loadmodel->numleafs = count;
model.c:			out->minmaxs[j] = LittleShort (in->mins[j]);
model.c:			out->minmaxs[3+j] = LittleShort (in->maxs[j]);
model.c:		p = LittleLong(in->contents);
model.c:		out->contents = p;
model.c:		out->firstmarksurface = loadmodel->marksurfaces +
model.c:			LittleShort(in->firstmarksurface);
model.c:		out->nummarksurfaces = LittleShort(in->nummarksurfaces);
model.c:		p = LittleLong(in->visofs);
model.c:		if (p == -1)
model.c:			out->compressed_vis = NULL;
model.c:			out->compressed_vis = loadmodel->visdata + p;
model.c:		out->efrags = NULL;
model.c:			out->ambient_sound_level[j] = in->ambient_level[j];
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->clipnodes = out;
model.c:	loadmodel->numclipnodes = count;
model.c:	hull = &loadmodel->hulls[1];
model.c:	hull->clipnodes = out;
model.c:	hull->firstclipnode = 0;
model.c:	hull->lastclipnode = count-1;
model.c:	hull->planes = loadmodel->planes;
model.c:	hull->clip_mins[0] = -16;
model.c:	hull->clip_mins[1] = -16;
model.c:	hull->clip_mins[2] = -24;
model.c:	hull->clip_maxs[0] = 16;
model.c:	hull->clip_maxs[1] = 16;
model.c:	hull->clip_maxs[2] = 32;
model.c:	hull = &loadmodel->hulls[2];
model.c:	hull->clipnodes = out;
model.c:	hull->firstclipnode = 0;
model.c:	hull->lastclipnode = count-1;
model.c:	hull->planes = loadmodel->planes;
model.c:	hull->clip_mins[0] = -32;
model.c:	hull->clip_mins[1] = -32;
model.c:	hull->clip_mins[2] = -24;
model.c:	hull->clip_maxs[0] = 32;
model.c:	hull->clip_maxs[1] = 32;
model.c:	hull->clip_maxs[2] = 64;
model.c:		out->planenum = LittleLong(in->planenum);
model.c:		out->children[0] = LittleShort(in->children[0]);
model.c:		out->children[1] = LittleShort(in->children[1]);
model.c:	hull = &loadmodel->hulls[0];	
model.c:	in = loadmodel->nodes;
model.c:	count = loadmodel->numnodes;
model.c:	hull->clipnodes = out;
model.c:	hull->firstclipnode = 0;
model.c:	hull->lastclipnode = count-1;
model.c:	hull->planes = loadmodel->planes;
model.c:		out->planenum = in->plane - loadmodel->planes;
model.c:			child = in->children[j];
model.c:			if (child->contents < 0)
model.c:				out->children[j] = child->contents;
model.c:				out->children[j] = child - loadmodel->nodes;
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->marksurfaces = out;
model.c:	loadmodel->nummarksurfaces = count;
model.c:		if (j >= loadmodel->numsurfaces)
model.c:		out[i] = loadmodel->surfaces + j;
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->surfedges = out;
model.c:	loadmodel->numsurfedges = count;
model.c:	in = (void *)(mod_base + l->fileofs);
model.c:	if (l->filelen % sizeof(*in))
model.c:		Sys_Error ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
model.c:	count = l->filelen / sizeof(*in);
model.c:	loadmodel->planes = out;
model.c:	loadmodel->numplanes = count;
model.c:			out->normal[j] = LittleFloat (in->normal[j]);
model.c:			if (out->normal[j] < 0)
model.c:		out->dist = LittleFloat (in->dist);
model.c:		out->type = LittleLong (in->type);
model.c:		out->signbits = bits;
model.c:	loadmodel->type = mod_brush;
model.c:	i = LittleLong (header->version);
model.c:		Sys_Error ("Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
model.c:	Mod_LoadVertexes (&header->lumps[LUMP_VERTEXES]);
model.c:	Mod_LoadEdges (&header->lumps[LUMP_EDGES]);
model.c:	Mod_LoadSurfedges (&header->lumps[LUMP_SURFEDGES]);
model.c:	Mod_LoadTextures (&header->lumps[LUMP_TEXTURES]);
model.c:	Mod_LoadLighting (&header->lumps[LUMP_LIGHTING]);
model.c:	Mod_LoadPlanes (&header->lumps[LUMP_PLANES]);
model.c:	Mod_LoadTexinfo (&header->lumps[LUMP_TEXINFO]);
model.c:	Mod_LoadFaces (&header->lumps[LUMP_FACES]);
model.c:	Mod_LoadMarksurfaces (&header->lumps[LUMP_MARKSURFACES]);
model.c:	Mod_LoadVisibility (&header->lumps[LUMP_VISIBILITY]);
model.c:	Mod_LoadLeafs (&header->lumps[LUMP_LEAFS]);
model.c:	Mod_LoadNodes (&header->lumps[LUMP_NODES]);
model.c:	Mod_LoadClipnodes (&header->lumps[LUMP_CLIPNODES]);
model.c:	Mod_LoadEntities (&header->lumps[LUMP_ENTITIES]);
model.c:	Mod_LoadSubmodels (&header->lumps[LUMP_MODELS]);
model.c:	mod->numframes = 2;		// regular and alternate animation
model.c:	mod->flags = 0;
model.c:	for (i=0 ; i<mod->numsubmodels ; i++)
model.c:		bm = &mod->submodels[i];
model.c:		mod->hulls[0].firstclipnode = bm->headnode[0];
model.c:			mod->hulls[j].firstclipnode = bm->headnode[j];
model.c:			mod->hulls[j].lastclipnode = mod->numclipnodes-1;
model.c:		mod->firstmodelsurface = bm->firstface;
model.c:		mod->nummodelsurfaces = bm->numfaces;
model.c:		VectorCopy (bm->maxs, mod->maxs);
model.c:		VectorCopy (bm->mins, mod->mins);
model.c:		mod->radius = RadiusFromBounds (mod->mins, mod->maxs);
model.c:		mod->numleafs = bm->visleafs;
model.c:		if (i < mod->numsubmodels-1)
model.c:			strcpy (loadmodel->name, name);
model.c:	strcpy (name, pdaliasframe->name);
model.c:		pbboxmin->v[i] = pdaliasframe->bboxmin.v[i];
model.c:		pbboxmax->v[i] = pdaliasframe->bboxmax.v[i];
model.c:	*pframeindex = (byte *)pframe - (byte *)pheader;
model.c:	numframes = LittleLong (pingroup->numframes);
model.c:			(numframes - 1) * sizeof (paliasgroup->frames[0]), loadname);
model.c:	paliasgroup->numframes = numframes;
model.c:		pbboxmin->v[i] = pingroup->bboxmin.v[i];
model.c:		pbboxmax->v[i] = pingroup->bboxmax.v[i];
model.c:	*pframeindex = (byte *)paliasgroup - (byte *)pheader;
model.c:	paliasgroup->intervals = (byte *)poutintervals - (byte *)pheader;
model.c:		*poutintervals = LittleFloat (pin_intervals->interval);
model.c:									&paliasgroup->frames[i].frame,
model.c:									&paliasgroup->frames[i].bboxmin,
model.c:									&paliasgroup->frames[i].bboxmax,
model.c:	*pskinindex = (byte *)pskin - (byte *)pheader;
model.c:	numskins = LittleLong (pinskingroup->numskins);
model.c:			(numskins - 1) * sizeof (paliasskingroup->skindescs[0]),
model.c:	paliasskingroup->numskins = numskins;
model.c:	*pskinindex = (byte *)paliasskingroup - (byte *)pheader;
model.c:	paliasskingroup->intervals = (byte *)poutskinintervals - (byte *)pheader;
model.c:		*poutskinintervals = LittleFloat (pinskinintervals->interval);
model.c:				&paliasskingroup->skindescs[i].skin, skinsize, pheader);
model.c:	version = LittleLong (pinmodel->version);
model.c:				 mod->name, version, ALIAS_VERSION);
model.c:	size = 	sizeof (aliashdr_t) + (LittleLong (pinmodel->numframes) - 1) *
model.c:			 sizeof (pheader->frames[0]) +
model.c:			LittleLong (pinmodel->numverts) * sizeof (stvert_t) +
model.c:			LittleLong (pinmodel->numtris) * sizeof (mtriangle_t);
model.c:			(LittleLong (pinmodel->numframes) - 1) *
model.c:			 sizeof (pheader->frames[0]));
model.c://	mod->cache.data = pheader;
model.c:	mod->flags = LittleLong (pinmodel->flags);
model.c:// endian-adjust and copy the data, starting with the alias model header
model.c:	pmodel->boundingradius = LittleFloat (pinmodel->boundingradius);
model.c:	pmodel->numskins = LittleLong (pinmodel->numskins);
model.c:	pmodel->skinwidth = LittleLong (pinmodel->skinwidth);
model.c:	pmodel->skinheight = LittleLong (pinmodel->skinheight);
model.c:	if (pmodel->skinheight > MAX_LBM_HEIGHT)
model.c:		Sys_Error ("model %s has a skin taller than %d", mod->name,
model.c:	pmodel->numverts = LittleLong (pinmodel->numverts);
model.c:	if (pmodel->numverts <= 0)
model.c:		Sys_Error ("model %s has no vertices", mod->name);
model.c:	if (pmodel->numverts > MAXALIASVERTS)
model.c:		Sys_Error ("model %s has too many vertices", mod->name);
model.c:	pmodel->numtris = LittleLong (pinmodel->numtris);
model.c:	if (pmodel->numtris <= 0)
model.c:		Sys_Error ("model %s has no triangles", mod->name);
model.c:	pmodel->numframes = LittleLong (pinmodel->numframes);
model.c:	pmodel->size = LittleFloat (pinmodel->size) * ALIAS_BASE_SIZE_RATIO;
model.c:	mod->synctype = LittleLong (pinmodel->synctype);
model.c:	mod->numframes = pmodel->numframes;
model.c:		pmodel->scale[i] = LittleFloat (pinmodel->scale[i]);
model.c:		pmodel->scale_origin[i] = LittleFloat (pinmodel->scale_origin[i]);
model.c:		pmodel->eyeposition[i] = LittleFloat (pinmodel->eyeposition[i]);
model.c:	numskins = pmodel->numskins;
model.c:	numframes = pmodel->numframes;
model.c:	if (pmodel->skinwidth & 0x03)
model.c:	pheader->model = (byte *)pmodel - (byte *)pheader;
model.c:	skinsize = pmodel->skinheight * pmodel->skinwidth;
model.c:	pheader->skindesc = (byte *)pskindesc - (byte *)pheader;
model.c:		skintype = LittleLong (pskintype->type);
model.c:	pheader->stverts = (byte *)pstverts - (byte *)pheader;
model.c:	for (i=0 ; i<pmodel->numverts ; i++)
model.c:	ptri = (mtriangle_t *)&pstverts[pmodel->numverts];
model.c:	pintriangles = (dtriangle_t *)&pinstverts[pmodel->numverts];
model.c:	pheader->triangles = (byte *)ptri - (byte *)pheader;
model.c:	for (i=0 ; i<pmodel->numtris ; i++)
model.c:	pframetype = (daliasframetype_t *)&pintriangles[pmodel->numtris];
model.c:		frametype = LittleLong (pframetype->type);
model.c:		pheader->frames[i].type = frametype;
model.c:										&pheader->frames[i].frame,
model.c:										pmodel->numverts,
model.c:										&pheader->frames[i].bboxmin,
model.c:										&pheader->frames[i].bboxmax,
model.c:										pheader, pheader->frames[i].name);
model.c:										&pheader->frames[i].frame,
model.c:										pmodel->numverts,
model.c:										&pheader->frames[i].bboxmin,
model.c:										&pheader->frames[i].bboxmax,
model.c:										pheader, pheader->frames[i].name);
model.c:	mod->type = mod_alias;
model.c:	mod->mins[0] = mod->mins[1] = mod->mins[2] = -16;
model.c:	mod->maxs[0] = mod->maxs[1] = mod->maxs[2] = 16;
model.c:	total = end - start;
model.c:	Cache_Alloc (&mod->cache, total, loadname);
model.c:	if (!mod->cache.data)
model.c:	memcpy (mod->cache.data, pheader, total);
model.c:	width = LittleLong (pinframe->width);
model.c:	height = LittleLong (pinframe->height);
model.c:	pspriteframe->width = width;
model.c:	pspriteframe->height = height;
model.c:	origin[0] = LittleLong (pinframe->origin[0]);
model.c:	origin[1] = LittleLong (pinframe->origin[1]);
model.c:	pspriteframe->up = origin[1];
model.c:	pspriteframe->down = origin[1] - height;
model.c:	pspriteframe->left = origin[0];
model.c:	pspriteframe->right = width + origin[0];
model.c:		Q_memcpy (&pspriteframe->pixels[0], (byte *)(pinframe + 1), size);
model.c:		ppixout = (unsigned short *)&pspriteframe->pixels[0];
model.c:	numframes = LittleLong (pingroup->numframes);
model.c:				(numframes - 1) * sizeof (pspritegroup->frames[0]), loadname);
model.c:	pspritegroup->numframes = numframes;
model.c:	pspritegroup->intervals = poutintervals;
model.c:		*poutintervals = LittleFloat (pin_intervals->interval);
model.c:		ptemp = Mod_LoadSpriteFrame (ptemp, &pspritegroup->frames[i]);
model.c:	version = LittleLong (pin->version);
model.c:				 "(%i should be %i)", mod->name, version, SPRITE_VERSION);
model.c:	numframes = LittleLong (pin->numframes);
model.c:	size = sizeof (msprite_t) +	(numframes - 1) * sizeof (psprite->frames);
model.c:	mod->cache.data = psprite;
model.c:	psprite->type = LittleLong (pin->type);
model.c:	psprite->maxwidth = LittleLong (pin->width);
model.c:	psprite->maxheight = LittleLong (pin->height);
model.c:	psprite->beamlength = LittleFloat (pin->beamlength);
model.c:	mod->synctype = LittleLong (pin->synctype);
model.c:	psprite->numframes = numframes;
model.c:	mod->mins[0] = mod->mins[1] = -psprite->maxwidth/2;
model.c:	mod->maxs[0] = mod->maxs[1] = psprite->maxwidth/2;
model.c:	mod->mins[2] = -psprite->maxheight/2;
model.c:	mod->maxs[2] = psprite->maxheight/2;
model.c:	mod->numframes = numframes;
model.c:	mod->flags = 0;
model.c:		frametype = LittleLong (pframetype->type);
model.c:		psprite->frames[i].type = frametype;
model.c:										 &psprite->frames[i].frameptr);
model.c:										 &psprite->frames[i].frameptr);
model.c:	mod->type = mod_sprite;
model.c:		Con_Printf ("%8p : %s",mod->cache.data, mod->name);
model.c:		if (mod->needload & NL_UNREFERENCED)
model.c:		if (mod->needload & NL_NEEDS_LOADED)
model.h:Copyright (C) 1996-1997 Id Software, Inc.
model.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
model.h:d*_t structures are on-disk representations
model.h:m*_t structures are in-memory
model.h:	int			firstedge;	// look up in model->surfedges[], negative numbers
modelgen.h:Copyright (C) 1996-1997 Id Software, Inc.
modelgen.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
modelgen.h:														// little-endian "IDPO"
mpdosock.h:/* WINSOCK.H--definitions to be used with the WINSOCK.DLL
mpdosock.h: * Copyright (c) 1993-1995, Microsoft Corp. All rights reserved.
mpdosock.h: * This file includes parts which are Copyright (c) 1982-1986 Regents
mpdosock.h:    for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \
mpdosock.h:        if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \
mpdosock.h:            while (__i < ((fd_set FAR *)(set))->fd_count-1) { \
mpdosock.h:                ((fd_set FAR *)(set))->fd_array[__i] = \
mpdosock.h:                    ((fd_set FAR *)(set))->fd_array[__i+1]; \
mpdosock.h:            ((fd_set FAR *)(set))->fd_count--; \
mpdosock.h:    if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) \
mpdosock.h:        ((fd_set FAR *)(set))->fd_array[((fd_set FAR *)(set))->fd_count++]=(fd);\
mpdosock.h:#define FD_ZERO(set) (((fd_set FAR *)(set))->fd_count=0)
mpdosock.h:#define timerisset(tvp)         ((tvp)->tv_sec || (tvp)->tv_usec)
mpdosock.h:        ((tvp)->tv_sec cmp (uvp)->tv_sec || \
mpdosock.h:         (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
mpdosock.h:#define timerclear(tvp)         (tvp)->tv_sec = (tvp)->tv_usec = 0
mpdosock.h:#define FIONBIO     _IOW('f', 126, u_long) /* set/clear non-blocking i/o */
mpdosock.h:#define IP_OPTIONS          1           /* set/get IP per-packet options    */
mpdosock.h: * This is used instead of -1, since the
mpdosock.h:#define SOCKET_ERROR            (-1)
mpdosock.h:#define SOCK_RAW        3               /* raw-protocol interface */
mpdosock.h:#define SOCK_RDM        4               /* reliably-delivered message */
mpdosock.h: * Option flags per-socket.
mpdosock.h:#define SO_SNDLOWAT     0x1003          /* send low-water mark */
mpdosock.h:#define SO_RCVLOWAT     0x1004          /* receive low-water mark */
mpdosock.h: * non-TCP/IP transports such as DECNet, OSI TP4, etc.
mpdosock.h: * Other NT-specific options.
mpdosock.h:#define AF_NETBIOS      17              /* NetBios-style addresses */
mpdosock.h:#define MSG_OOB         0x1             /* process out-of-band data */
mpdosock.h: * specific implementations or language run-time systems.
mpdosock.h:/* Non-Authoritative: Host not found, or SERVERFAIL */
mplib.c:Copyright (C) 1996-1997 Id Software, Inc.
mplib.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
mplpc.c:Copyright (C) 1996-1997 Id Software, Inc.
mplpc.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
mplpc.c:#define LPC_UNRECOGNIZED_SERVICE  -1
mplpc.c:// lowerOrderBits == 0..31, upperOrderBits == 32-63
mplpc.c:      to++; from++; len--;
mplpc.c:      from++; to++; len--;
mplpc.c:   SockMap = (SocketMap *) FARPKL(&n->rtqDatum);
mplpc.c:         FARPOKL(&n->rtqUpCtr, bufSize);
mplpc.c:         return (void *) FARPKL(&n->rtqDatum);
mplpc.c:      if (Qsizes[i] == FARPKS(&n->rtqLen)) {
mplpc.c:   FARPOKL(&(lpc->version), 1);
mplpc.c:   FARPOKL(&(lpc->sizeOfArgs), 0);
mplpc.c:   FARPOKL(&(lpc->service), 0);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKBIND);
mplpc.c:   bargs = (BindArgs *) p->Data;
mplpc.c:   FARPOKL(&bargs->s, s);
mplpc.c:   FARPOKL(&bargs->namelen, namelen);
mplpc.c:   fmemcpyto(bargs->name, name, namelen);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   if (FARPKS(&r->error) != LPC_NOERROR) {
mplpc.c:      return -1;
mplpc.c:   retVal = FARPKL(r->Data);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKCLOSE);
mplpc.c:   FARPOKL(p->Data, s);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   if (FARPKS(&r->error) != LPC_NOERROR) {
mplpc.c:      return -1;
mplpc.c:   retVal = FARPKL(r->Data);
mplpc.c:   s->h_name = HostEnt_hname;
mplpc.c:   fstrncpyfrom(s->h_name, (char *) FARPKL(&old->h_name), HOSTENT_STRLEN_LIMIT-1);
mplpc.c:   s->h_name[HOSTENT_STRLEN_LIMIT-1] = 0;
mplpc.c:   s->h_aliases = HostEnt_h_aliases;
mplpc.c:   ptr = (char **) FARPKL(&old->h_aliases);
mplpc.c:   for (i = 0; i < (HOSTENT_ALIAS_LIMIT-1) && FARPKL(ptr); i++, ptr++) {
mplpc.c:      s->h_aliases[i] = HostEnt_names[i];
mplpc.c:      // fstrncpyfrom(s->h_aliases[i], (void *) FARPKL(ptr), HOSTENT_STRLEN_LIMIT-1);
mplpc.c:      s->h_aliases[i][HOSTENT_STRLEN_LIMIT-1] = 0;
mplpc.c:   s->h_aliases[i] = 0;
mplpc.c:   s->h_addrtype = FARPKS(&old->h_addrtype);
mplpc.c:   s->h_length = FARPKS(&old->h_length);
mplpc.c:   if (FARPKS(&old->h_length) != sizeof(struct in_addr)) {
mplpc.c:   s->h_addr_list = (char **) HostEnt_addr_list;
mplpc.c:   ptr = (char **) FARPKL(&old->h_addr_list);
mplpc.c:   for (i = 0; i < (HOSTENT_ADDR_LIST_LIMIT - 1) && FARPKL(ptr); i++, ptr++) {
mplpc.c:      s->h_addr_list[i] = (char *) &(HostEnt_addrs[i]);
mplpc.c:      fmemcpyfrom(s->h_addr_list[i], (void *) FARPKL(ptr), s->h_length);
mplpc.c:   s->h_addr_list[i] = 0;
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKGETSOCKNAME);
mplpc.c:   FARPOKL(p->Data, s);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   if (FARPKS(&r->error) != LPC_NOERROR) {
mplpc.c:      return -1;
mplpc.c:   ret = (GetSockNameRet *) r->Data;
mplpc.c:   retVal = FARPKL(&ret->retVal);
mplpc.c:   fmemcpyfrom(name, ret->name, FARPKL(&ret->namelen));
mplpc.c:   *namelen = FARPKL(&ret->namelen);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service,LPC_SOCKGETHOSTNAME);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   if (FARPKS(&r->error) != LPC_NOERROR) {
mplpc.c:      return -1;
mplpc.c:   ret = (GetHostNameRet *) r->Data;
mplpc.c:   retVal = FARPKL(&ret->retVal);
mplpc.c:   s = ret->name;
mplpc.c:   len = strlen(ret->name);
mplpc.c:      memcpy(name, ret->name, ret->namelen);
mplpc.c:      strcpy(name, ret->name);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKGETHOSTBYNAME);
mplpc.c:   fstrcpyto(p->Data, name);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   retVal = (struct hostent *) r->Data;
mplpc.c:   if (FARPKL(&retVal->h_name) == 0) {
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKGETHOSTBYADDR);
mplpc.c:   args = (GetHostByAddrArgs *) p->Data;
mplpc.c:   FARPOKL(&args->len, len);
mplpc.c:   FARPOKL(&args->type, type);
mplpc.c:   fmemcpyto(args->addr, addr, len);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   retVal = (struct hostent *) r->Data;
mplpc.c:   if (FARPKL(&retVal->h_name) == 0) {
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKSOCKET);
mplpc.c:   args = (SocketArgs *) p->Data;
mplpc.c:   FARPOKL(&args->af, af);
mplpc.c:   FARPOKL(&args->type, type);
mplpc.c:   FARPOKL(&args->protocol, protocol);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   if (FARPKS(&r->error) != LPC_NOERROR) {
mplpc.c:      return -1;
mplpc.c:   retVal = FARPKL(r->Data);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKFLUSH);
mplpc.c:      if (FARPKL(&(SockMap->sock[i])) == s)
mplpc.c:      return -1;
mplpc.c:   data = (WinSockData *) FARPKL(&n->rtqDatum);
mplpc.c:   bytesRead = FARPKL(&data->len);
mplpc.c:      fmemcpyfrom(from, &data->addr, sizeof(struct sockaddr));
mplpc.c:      *fromlen = FARPKL(&data->addrlen);
mplpc.c:   fmemcpyfrom(buf, data->data, len > bytesRead ? bytesRead : len);
mplpc.c:      if (FARPKL(&SockMap->sock[i]) == s) {
mplpc.c:   FARPOKL(&data->s, s);
mplpc.c:   FARPOKL(&data->len, len);
mplpc.c:      fmemcpyto(&data->addr, to, tolen);
mplpc.c:      FARPOKL(&data->addrlen, tolen);
mplpc.c:      FARPOKL(&data->addrlen, 0);
mplpc.c:   FARPOKL(&data->flags, flags);
mplpc.c:   fmemcpyto(data->data, buf, len);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKIOCTL);
mplpc.c:   args = (IoctlArgs *) p->Data;
mplpc.c:   FARPOKL(&args->s, s);
mplpc.c:   FARPOKL(&args->cmd, cmd);
mplpc.c:      FARPOKL(args->data, *argp);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   retVal = FARPKL(r->Data);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKSETOPT);
mplpc.c:   args = (SetSockOptArgs *) p->Data;
mplpc.c:   FARPOKL(&args->s, s);
mplpc.c:   FARPOKL(&args->level, level);
mplpc.c:   FARPOKL(&args->optname, optname);
mplpc.c:   FARPOKL(&args->optlen, optlen);
mplpc.c:   fmemcpyto(args->optval, optval, optlen);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   retVal = FARPKL(r->Data);
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKGETLASTERROR);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   retVal = FARPKL(r->Data);
mplpc.c:		return -1;
mplpc.c:   p = (LPCData *) FARPKL(&n->rtqDatum);
mplpc.c:   FARPOKL(&p->service, LPC_SOCKINETADDR);
mplpc.c:   fstrcpyto(p->Data, cp);
mplpc.c:   r = (LPCReturn *) FARPKL(&n->rtqDatum);
mplpc.c:   if (FARPKS(&r->error) != LPC_NOERROR) {
mplpc.c:      return -1;
mplpc.c:   retVal = FARPKL(r->Data);
net.h:Copyright (C) 1996-1997 Id Software, Inc.
net.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net.h:// net.h -- quake's interface to the networking layer
net.h:// returns a new connection number if there is one pending, else -1
net.h:// called by client to connect to a host.  Returns -1 if not able to
net.h:// returns -1 if the connection died
net.h:// returns -1 if the connection died
net_bsd.c:Copyright (C) 1996-1997 Id Software, Inc.
net_bsd.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_bw.c:Copyright (C) 1996-1997 Id Software, Inc.
net_bw.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_bw.c: * Option flags per-socket.
net_bw.c:#define SO_SNDLOWAT		0x1003		/* send low-water mark */
net_bw.c:#define SO_RCVLOWAT		0x1004		/* receive low-water mark */
net_bw.c:	char			data[1];			// actual size is <dataLenPlus8> - 8		
net_bw.c:static int net_acceptsocket = -1;		// socket for fielding new connections
net_bw.c:		return -1;
net_bw.c:		return -1;
net_bw.c:	if (COM_CheckParm ("-noudp"))
net_bw.c:		return -1;
net_bw.c:		return -1;
net_bw.c:	netmask = 0xffffffff >> (32 - ethdevinfo.subnetMask);
net_bw.c:	if ((net_controlsocket = BW_OpenSocket (0)) == -1)
net_bw.c:		return -1;
net_bw.c:		if (net_acceptsocket != -1)
net_bw.c:		if ((net_acceptsocket = BW_OpenSocket (net_hostport)) == -1)
net_bw.c:	if (net_acceptsocket == -1)
net_bw.c:	net_acceptsocket = -1;
net_bw.c:should be set here if they are needed.  -1 is returned on failure.
net_bw.c:	Q_strcpy((char *)lowmem_buffer, "UDP-IP10");
net_bw.c:		return -1;
net_bw.c:		return -1;
net_bw.c:		return -1;
net_bw.c:			return -1;
net_bw.c:		deadman--;
net_bw.c:		return -1;
net_bw.c:			return -1;
net_bw.c:		return -1;
net_bw.c:		return -1;
net_bw.c:		return -1;
net_bw.c:	info2 = (BW_UDPreadInfo2_t *)(lowmem_buffer + info1->info2Offset);
net_bw.c:		from->sa_family = AF_INET;
net_bw.c:		((struct sockaddr_in *)from)->sin_addr = info1->remoteAddr;
net_bw.c:		((struct sockaddr_in *)from)->sin_port = htons(info2->remotePort);
net_bw.c:	len = info2->dataLenPlus8 - 8;
net_bw.c:		return -1;
net_bw.c:	Q_memcpy(buf, info2->data, len);
net_bw.c:	writeInfo->remoteAddr = bcastaddr;
net_bw.c:	writeInfo->remotePort = net_hostport;
net_bw.c:	writeInfo->dataLen = len;
net_bw.c:	Q_memcpy(writeInfo->data, msg, len);
net_bw.c:	writeInfo->data[len] = 0;
net_bw.c:		return -1;
net_bw.c:	writeInfo->remoteAddr = ((struct sockaddr_in *)to)->sin_addr;
net_bw.c:	writeInfo->remotePort = ntohs(((struct sockaddr_in *)to)->sin_port);
net_bw.c:	writeInfo->dataLen = len;
net_bw.c:	Q_memcpy(writeInfo->data, msg, len);
net_bw.c:	writeInfo->data[len] = 0;
net_bw.c:		return -1;
net_bw.c:		((struct sockaddr_in *)addr)->sin_addr.s_net,
net_bw.c:		((struct sockaddr_in *)addr)->sin_addr.s_host,
net_bw.c:		((struct sockaddr_in *)addr)->sin_addr.s_lh,
net_bw.c:		((struct sockaddr_in *)addr)->sin_addr.s_impno,
net_bw.c:		ntohs(((struct sockaddr_in *)addr)->sin_port)
net_bw.c:	addr->sa_family = AF_INET;
net_bw.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr);
net_bw.c:	((struct sockaddr_in *)addr)->sin_port = htons((short)hp);
net_bw.c:	addr->sa_family = AF_INET;
net_bw.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = ((BW_UDPinfo_t *)lowmem_buffer)->localAddr.s_addr;
net_bw.c:	((struct sockaddr_in *)addr)->sin_port = htons(((BW_UDPinfo_t *)lowmem_buffer)->localPort);
net_bw.c:		return -1;
net_bw.c:	mask = -1;
net_bw.c:		  num = num*10 + *b++ - '0';
net_bw.c:		  	return -1;
net_bw.c:			return -1;
net_bw.c:			return -1;
net_bw.c:	hostaddr->sa_family = AF_INET;
net_bw.c:	((struct sockaddr_in *)hostaddr)->sin_port = htons((short)port);	
net_bw.c:	((struct sockaddr_in *)hostaddr)->sin_addr.s_addr =
net_bw.c:	if (addr1->sa_family != addr2->sa_family)
net_bw.c:		return -1;
net_bw.c:	if (((struct sockaddr_in *)addr1)->sin_addr.s_addr != ((struct sockaddr_in *)addr2)->sin_addr.s_addr)
net_bw.c:		return -1;
net_bw.c:	if (((struct sockaddr_in *)addr1)->sin_port != ((struct sockaddr_in *)addr2)->sin_port)
net_bw.c:	return ntohs(((struct sockaddr_in *)addr)->sin_port);
net_bw.c:	((struct sockaddr_in *)addr)->sin_port = htons(port);
net_bw.h:Copyright (C) 1996-1997 Id Software, Inc.
net_bw.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_comx.c:Copyright (C) 1996-1997 Id Software, Inc.
net_comx.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_comx.c:#define ERR_TTY_LINE_STATUS		-1
net_comx.c:#define ERR_TTY_MODEM_STATUS	-2
net_comx.c:#define ERR_TTY_NODATA			-3
net_comx.c:#define QUEUEMASK	(QUEUESIZE - 1)
net_comx.c:#define FULL(q)			(q.head == ((q.tail-1) & QUEUEMASK))
net_comx.c:	while((source = inportb (p->uart + INTERRUPT_ID_REGISTER) & 0x07) != 1)
net_comx.c:				b = inportb (p->uart + RECEIVE_BUFFER_REGISTER);
net_comx.c:				if (! FULL(p->inputQueue))
net_comx.c:					ENQUEUE (p->inputQueue, b);
net_comx.c:					p->lineStatus |= LSR_OVERRUN_ERROR;
net_comx.c:					p->statusUpdated = true;
net_comx.c:				if (! EMPTY(p->outputQueue))
net_comx.c:					DEQUEUE (p->outputQueue, b);
net_comx.c:					outportb (p->uart + TRANSMIT_HOLDING_REGISTER, b);
net_comx.c:				p->modemStatus = (inportb (p->uart + MODEM_STATUS_REGISTER) & MODEM_STATUS_MASK) | p->modemStatusIgnore;
net_comx.c:				p->statusUpdated = true;
net_comx.c:				p->lineStatus = inportb (p->uart + LINE_STATUS_REGISTER);
net_comx.c:				p->statusUpdated = true;
net_comx.c:		source = inportb (p->uart + INTERRUPT_ID_REGISTER) & 0x07;
net_comx.c:	while((source = inportb (p->uart + INTERRUPT_ID_REGISTER) & 0x07) != 1)
net_comx.c:					b = inportb (p->uart + RECEIVE_BUFFER_REGISTER);
net_comx.c:					if (!FULL(p->inputQueue))
net_comx.c:						ENQUEUE (p->inputQueue, b);
net_comx.c:						p->lineStatus |= LSR_OVERRUN_ERROR;
net_comx.c:						p->statusUpdated = true;
net_comx.c:				} while (inportb (p->uart + LINE_STATUS_REGISTER) & LSR_DATA_READY);
net_comx.c:				while ((! EMPTY(p->outputQueue)) && count--)
net_comx.c:					DEQUEUE (p->outputQueue, b);
net_comx.c:					outportb (p->uart + TRANSMIT_HOLDING_REGISTER, b);
net_comx.c:				p->modemStatus = (inportb (p->uart + MODEM_STATUS_REGISTER) & MODEM_STATUS_MASK) | p->modemStatusIgnore;
net_comx.c:				p->statusUpdated = true;
net_comx.c:				p->lineStatus = inportb (p->uart + LINE_STATUS_REGISTER);
net_comx.c:				p->statusUpdated = true;
net_comx.c:		source = inportb (p->uart + INTERRUPT_ID_REGISTER) & 0x07;
net_comx.c:	if (inportb (p->uart + LINE_STATUS_REGISTER ) & LSR_TRANSMITTER_EMPTY)
net_comx.c:		while ((! EMPTY(p->outputQueue)) && count--)
net_comx.c:			DEQUEUE (p->outputQueue, b);
net_comx.c:			outportb (p->uart + TRANSMIT_HOLDING_REGISTER, b);
net_comx.c:	*port = p->uart;
net_comx.c:	*irq = p->irq;
net_comx.c:	*baud = 115200 / p->baudBits;
net_comx.c:	*useModem = p->useModem;
net_comx.c:	p->uart = port;
net_comx.c:	p->irq = irq;
net_comx.c:	p->baudBits = 115200 / baud;
net_comx.c:	p->useModem = useModem;
net_comx.c:	*dialType = p->dialType;
net_comx.c:	Q_strcpy(clear, p->clear);
net_comx.c:	Q_strcpy(init, p->startup);
net_comx.c:	Q_strcpy(hangup, p->shutdown);
net_comx.c:	p->dialType = dialType[0];
net_comx.c:	Q_strcpy(p->clear, clear);
net_comx.c:	Q_strcpy(p->startup, init);
net_comx.c:	Q_strcpy(p->shutdown, hangup);
net_comx.c:	p->modemInitialized = false;
net_comx.c:	p->useModem = false;
net_comx.c:	p->uartType = UART_AUTO;
net_comx.c:	p->uart = ISA_uarts[p->portNumber];
net_comx.c:	p->irq = ISA_IRQs[p->portNumber];
net_comx.c:	p->modemStatusIgnore = MSR_CD | MSR_CTS | MSR_DSR;
net_comx.c:	p->baudBits = 115200 / 57600;
net_comx.c:	p->lineControl = LCR_DATA_BITS_8 | LCR_STOP_BITS_1 | LCR_PARITY_NONE;
net_comx.c:	Q_strcpy(p->clear, "ATZ");
net_comx.c:	Q_strcpy(p->startup, "");
net_comx.c:	Q_strcpy(p->shutdown, "AT H");
net_comx.c:	p->modemRang = false;
net_comx.c:	p->modemConnected = false;
net_comx.c:	p->statusUpdated = false;
net_comx.c:	p->outputQueue.head = p->outputQueue.tail = 0;
net_comx.c:	p->inputQueue.head = p->inputQueue.tail = 0;
net_comx.c:	if (p->enabled)
net_comx.c:	outportb (p->uart + INTERRUPT_ENABLE_REGISTER, 0);
net_comx.c:	while((inportb (p->uart + LINE_STATUS_REGISTER)) & LSR_DATA_READY)
net_comx.c:		inportb (p->uart + RECEIVE_BUFFER_REGISTER);
net_comx.c:	p->modemStatus = (inportb (p->uart + MODEM_STATUS_REGISTER) & MODEM_STATUS_MASK) | p->modemStatusIgnore;
net_comx.c:	p->lineStatus = inportb (p->uart + LINE_STATUS_REGISTER);
net_comx.c:		n = inportb (p->uart + INTERRUPT_ID_REGISTER) & 7;
net_comx.c:			inportb (p->uart + RECEIVE_BUFFER_REGISTER);
net_comx.c:	if (p->uartType == UART_AUTO)
net_comx.c:		outportb (p->uart + FIFO_CONTROL_REGISTER, FCR_FIFO_ENABLE);
net_comx.c:		b = inportb (p->uart + INTERRUPT_ID_REGISTER);
net_comx.c:			p->uartType = UART_16550;
net_comx.c:			p->uartType = UART_8250;
net_comx.c:	_go32_dpmi_get_protected_mode_interrupt_vector(p->irq + 8, &p->protectedModeSaveInfo);
net_comx.c:	if (p->uartType == UART_8250)
net_comx.c:		outportb (p->uart + FIFO_CONTROL_REGISTER, 0);
net_comx.c:		outportb (p->uart + FIFO_CONTROL_REGISTER, FCR_FIFO_ENABLE | FCR_RCVR_FIFO_RESET | FCR_XMIT_FIFO_RESET | FCR_TRIGGER_08);
net_comx.c:	p->protectedModeInfo.pm_offset = (int)isr;
net_comx.c:	n = _go32_dpmi_allocate_iret_wrapper(&p->protectedModeInfo);
net_comx.c:	_go32_dpmi_set_protected_mode_interrupt_vector(p->irq + 8, &p->protectedModeInfo);
net_comx.c:	outportb (0x21, inportb (0x21) & ~(1<<p->irq));
net_comx.c:	outportb (p->uart + LINE_CONTROL_REGISTER, LCR_DLAB | p->lineControl);
net_comx.c:	outportb (p->uart, p->baudBits);
net_comx.c:	outportb (p->uart + 1, 0);
net_comx.c:	outportb (p->uart + LINE_CONTROL_REGISTER, p->lineControl);
net_comx.c:	outportb(p->uart + MODEM_CONTROL_REGISTER, MCR_OUT2 | MCR_RTS | MCR_DTR);
net_comx.c:	outportb (p->uart + INTERRUPT_ENABLE_REGISTER, IER_RX_DATA_READY | IER_TX_HOLDING_REGISTER_EMPTY | IER_LINE_STATUS | IER_MODEM_STATUS);
net_comx.c:	p->enabled = true;
net_comx.c:	if (!p->enabled)
net_comx.c:	outportb (p->uart + INTERRUPT_ENABLE_REGISTER, 0);
net_comx.c:	outportb (0x21, inportb (0x21) | (1<<p->irq));
net_comx.c:	_go32_dpmi_set_protected_mode_interrupt_vector(p->irq + 8, &p->protectedModeSaveInfo);
net_comx.c:	_go32_dpmi_free_iret_wrapper(&p->protectedModeInfo);
net_comx.c:	p->enabled = false;
net_comx.c:	if (p->statusUpdated)
net_comx.c:		p->statusUpdated = false;
net_comx.c:		if (p->lineStatus & (LSR_OVERRUN_ERROR | LSR_PARITY_ERROR | LSR_FRAMING_ERROR | LSR_BREAK_DETECT))
net_comx.c:			if (p->lineStatus & LSR_OVERRUN_ERROR)
net_comx.c:			if (p->lineStatus & LSR_PARITY_ERROR)
net_comx.c:			if (p->lineStatus & LSR_FRAMING_ERROR)
net_comx.c:			if (p->lineStatus & LSR_BREAK_DETECT)
net_comx.c:		if ((p->modemStatus & MODEM_STATUS_MASK) != MODEM_STATUS_MASK)
net_comx.c:			if (!(p->modemStatus & MSR_CTS))
net_comx.c:			if (!(p->modemStatus & MSR_DSR))
net_comx.c:			if (!(p->modemStatus & MSR_CD))
net_comx.c:	// I got this from the guys at head-to-head who say it's necessary.
net_comx.c:	outportb(p->uart + MODEM_CONTROL_REGISTER, 0);
net_comx.c:	while ((Sys_FloatTime() - start) < 0.5)
net_comx.c:	outportb(p->uart + MODEM_CONTROL_REGISTER, MCR_OUT2 | MCR_RTS | MCR_DTR);
net_comx.c:	while ((Sys_FloatTime() - start) < 0.25)
net_comx.c:	if (*p->clear)
net_comx.c:		Modem_Command (p, p->clear);
net_comx.c:			if ((Sys_FloatTime() - start) > 3.0)
net_comx.c:				Con_Printf("No response - clear failed\n");
net_comx.c:				p->enabled = false;
net_comx.c:				p->enabled = false;
net_comx.c:	if (*p->startup)
net_comx.c:		Modem_Command (p, p->startup);
net_comx.c:			if ((Sys_FloatTime() - start) > 3.0)
net_comx.c:				Con_Printf("No response - init failed\n");
net_comx.c:				p->enabled = false;
net_comx.c:				p->enabled = false;
net_comx.c:	p->modemInitialized = true;
net_comx.c:	if (p->enabled)
net_comx.c:	if (p->useModem && !p->modemInitialized)
net_comx.c:	while ((Sys_FloatTime() - startTime) < 1.0)
net_comx.c:		if (EMPTY(p->outputQueue))
net_comx.c:	if (p->useModem)
net_comx.c:		if (p->modemConnected)
net_comx.c:	if (EMPTY (p->inputQueue))
net_comx.c:	DEQUEUE (p->inputQueue, ret);
net_comx.c:	if (FULL(p->outputQueue))
net_comx.c:		return -1;
net_comx.c:	ENQUEUE (p->outputQueue, data);
net_comx.c:	if (inportb (p->uart + LINE_STATUS_REGISTER ) & LSR_TRANSMITTER_EMPTY)
net_comx.c:		DEQUEUE (p->outputQueue, b);
net_comx.c:		outportb(p->uart, b);
net_comx.c:	if ((p->modemStatus & MODEM_STATUS_MASK) != MODEM_STATUS_MASK)
net_comx.c:		if ((p->modemStatus & MSR_CTS) == 0)
net_comx.c:		if ((p->modemStatus & MSR_DSR) == 0)
net_comx.c:		if ((p->modemStatus & MSR_CD) == 0)
net_comx.c:		return -1;
net_comx.c:	while (! EMPTY (p->inputQueue))
net_comx.c:		DEQUEUE (p->inputQueue, b);
net_comx.c:	if (p->useModem)
net_comx.c:		key_count = -2;
net_comx.c:		sprintf(dialstring, "AT D%c %s\r", p->dialType, host);
net_comx.c:			if ((Sys_FloatTime() - start) > 60.0)
net_comx.c:					key_count = -2;
net_comx.c:				while ((Sys_FloatTime() - start) < 5.0)
net_comx.c:				p->outputQueue.head = p->outputQueue.tail = 0;
net_comx.c:				p->inputQueue.head = p->inputQueue.tail = 0;
net_comx.c:				outportb(p->uart + MODEM_CONTROL_REGISTER, inportb(p->uart + MODEM_CONTROL_REGISTER) & ~MCR_DTR);
net_comx.c:				while ((Sys_FloatTime() - start) < 0.75)
net_comx.c:				outportb(p->uart + MODEM_CONTROL_REGISTER, inportb(p->uart + MODEM_CONTROL_REGISTER) | MCR_DTR);
net_comx.c:				p->modemRang = true;
net_comx.c:				p->modemConnected = true;
net_comx.c:				p->outputQueue.head = p->outputQueue.tail = 0;
net_comx.c:				p->inputQueue.head = p->inputQueue.tail = 0;
net_comx.c:		return -1;
net_comx.c:	if (p->useModem && p->modemConnected)
net_comx.c:	if (p->useModem)
net_comx.c:		if (!p->modemRang)
net_comx.c:			if (Q_strncmp(p->buffer, "RING", 4) == 0)
net_comx.c:				p->modemRang = true;
net_comx.c:				p->timestamp = net_time;
net_comx.c:		if (!p->modemConnected)
net_comx.c:			if ((net_time - p->timestamp) > 35.0)
net_comx.c:				p->modemRang = false;
net_comx.c:			if (Q_strncmp (p->buffer, "CONNECT", 7) != 0)
net_comx.c:			p->modemConnected = true;
net_comx.c:			p->outputQueue.head = p->outputQueue.tail = 0;
net_comx.c:			p->inputQueue.head = p->inputQueue.tail = 0;
net_comx.c:	if (EMPTY (p->inputQueue))
net_comx.c:	return handleToPort[serialPortNumber]->enabled;
net_comx.c:	return handleToPort[serialPortNumber]->useModem;
net_comx.c:	return EMPTY(handleToPort[handle]->outputQueue);
net_comx.c:	portNumber = Q_atoi(Cmd_Argv (0) + 3) - 1;
net_comx.c:		Con_Printf("enabled:   %s\n", p->enabled ? "true" : "false");
net_comx.c:		if (p->uartType == UART_AUTO)
net_comx.c:		else if (p->uartType == UART_8250)
net_comx.c:		Con_Printf("port:      %x\n", p->uart);
net_comx.c:		Con_Printf("irq:       %i\n", p->irq);
net_comx.c:		Con_Printf("baud:      %i\n", 115200 / p->baudBits);	
net_comx.c:		Con_Printf("CTS:       %s\n", (p->modemStatusIgnore & MSR_CTS) ? "ignored" : "honored");
net_comx.c:		Con_Printf("DSR:       %s\n", (p->modemStatusIgnore & MSR_DSR) ? "ignored" : "honored");
net_comx.c:		Con_Printf("CD:        %s\n", (p->modemStatusIgnore & MSR_CD) ? "ignored" : "honored");
net_comx.c:		if (p->useModem)
net_comx.c:			Con_Printf("clear:     %s\n", p->clear);
net_comx.c:			Con_Printf("startup:   %s\n", p->startup);
net_comx.c:			Con_Printf("shutdown:  %s\n", p->shutdown);
net_comx.c:		if (p->enabled)
net_comx.c:		p->modemInitialized = false;
net_comx.c:		if (p->enabled)
net_comx.c:		p->uart = Q_atoi (Cmd_Argv (i+1));
net_comx.c:		if (p->enabled)
net_comx.c:		p->irq = Q_atoi (Cmd_Argv (i+1));
net_comx.c:		if (p->enabled)
net_comx.c:			p->baudBits = 115200 / n;
net_comx.c:		if (p->enabled)
net_comx.c:		p->uartType = UART_8250;
net_comx.c:		if (p->enabled)
net_comx.c:		p->uartType = UART_16550;
net_comx.c:		if (p->enabled)
net_comx.c:		p->uartType = UART_AUTO;
net_comx.c:		p->dialType = 'P';
net_comx.c:		p->dialType = 'T';
net_comx.c:		p->useModem = false;
net_comx.c:		p->useModem = true;
net_comx.c:		Q_strncpy (p->clear, Cmd_Argv (i+1), 16);
net_comx.c:		Q_strncpy (p->startup, Cmd_Argv (i+1), 32);
net_comx.c:		p->modemInitialized = false;
net_comx.c:		Q_strncpy (p->shutdown, Cmd_Argv (i+1), 16);
net_comx.c:	if (Cmd_CheckParm ("-cts"))
net_comx.c:		p->modemStatusIgnore |= MSR_CTS;
net_comx.c:		p->modemStatus |= MSR_CTS;
net_comx.c:		p->modemStatusIgnore &= (~MSR_CTS);
net_comx.c:		p->modemStatus = (inportb (p->uart + MODEM_STATUS_REGISTER) & MODEM_STATUS_MASK) | p->modemStatusIgnore;
net_comx.c:	if (Cmd_CheckParm ("-dsr"))
net_comx.c:		p->modemStatusIgnore |= MSR_DSR;
net_comx.c:		p->modemStatus |= MSR_DSR;
net_comx.c:		p->modemStatusIgnore &= (~MSR_DSR);
net_comx.c:		p->modemStatus = (inportb (p->uart + MODEM_STATUS_REGISTER) & MODEM_STATUS_MASK) | p->modemStatusIgnore;
net_comx.c:	if (Cmd_CheckParm ("-cd"))
net_comx.c:		p->modemStatusIgnore |= MSR_CD;
net_comx.c:		p->modemStatus |= MSR_CD;
net_comx.c:		p->modemStatusIgnore &= (~MSR_CD);
net_comx.c:		p->modemStatus = (inportb (p->uart + MODEM_STATUS_REGISTER) & MODEM_STATUS_MASK) | p->modemStatusIgnore;
net_comx.c:		if (!p->enabled)
net_comx.c:		if (p->useModem && !p->modemInitialized)
net_comx.c:		p->next = portList;
net_comx.c:		p->portNumber = n;
net_comx.c:		p->dialType = 'T';
net_comx.c:		sprintf(p->name, "com%u", n+1);
net_comx.c:		Cmd_AddCommand (p->name, Com_f);
net_comx.c:		if (p->enabled)
net_comx.c:			while (p->modemConnected)
net_comx.c:		return -1;
net_comx.c:	p->outputQueue.head = p->outputQueue.tail = 0;
net_comx.c:	p->inputQueue.head = p->inputQueue.tail = 0;
net_comx.c:	p->bufferUsed = 0;
net_comx.c:		ENQUEUE (p->outputQueue, *commandString++);
net_comx.c:	ENQUEUE (p->outputQueue, '\r');
net_comx.c:	DEQUEUE (p->outputQueue, b);
net_comx.c:	outportb(p->uart, b);
net_comx.c:	while (! EMPTY(p->inputQueue))
net_comx.c:		DEQUEUE (p->inputQueue, b);
net_comx.c:		if (p->bufferUsed == (sizeof(p->buffer) - 1))
net_comx.c:		if (b == '\r' && p->bufferUsed)
net_comx.c:			p->buffer[p->bufferUsed] = 0;
net_comx.c:			Con_Printf("%s\n", p->buffer);
net_comx.c:			p->bufferUsed = 0;
net_comx.c:			return p->buffer;
net_comx.c:		p->buffer[p->bufferUsed] = b;
net_comx.c:		p->bufferUsed++;
net_comx.c:	p->modemRang = false;
net_comx.c:	p->outputQueue.head = p->outputQueue.tail = 0;
net_comx.c:	p->inputQueue.head = p->inputQueue.tail = 0;
net_comx.c:	outportb(p->uart + MODEM_CONTROL_REGISTER, inportb(p->uart + MODEM_CONTROL_REGISTER) & ~MCR_DTR);
net_comx.c:	p->poll.procedure = Modem_Hangup2;
net_comx.c:	p->poll.arg = p;
net_comx.c:	SchedulePollProcedure(&p->poll, 1.5);
net_comx.c:	outportb(p->uart + MODEM_CONTROL_REGISTER, inportb(p->uart + MODEM_CONTROL_REGISTER) | MCR_DTR);
net_comx.c:	p->poll.procedure = Modem_Hangup3;
net_comx.c:	SchedulePollProcedure(&p->poll, 1.5);
net_comx.c:	Modem_Command(p, p->shutdown);
net_comx.c:	p->poll.procedure = Modem_Hangup4;
net_comx.c:	SchedulePollProcedure(&p->poll, 1.5);
net_comx.c:	p->modemConnected = false;
net_dgrm.c:Copyright (C) 1996-1997 Id Software, Inc.
net_dgrm.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_dgrm.c:#define sfunc	net_landrivers[sock->landriver]
net_dgrm.c:		if (pr_global_struct->deathmatch && !host_client->privileged)
net_dgrm.c:			if (((struct in_addr *)&banAddr)->s_addr)
net_dgrm.c:	if (data->cursize == 0)
net_dgrm.c:	if (data->cursize > NET_MAXMESSAGE)
net_dgrm.c:		Sys_Error("Datagram_SendMessage: message too big %u\n", data->cursize);
net_dgrm.c:	if (sock->canSend == false)
net_dgrm.c:	Q_memcpy(sock->sendMessage, data->data, data->cursize);
net_dgrm.c:	sock->sendMessageLength = data->cursize;
net_dgrm.c:	if (data->cursize <= MAX_DATAGRAM)
net_dgrm.c:		dataLen = data->cursize;
net_dgrm.c:	packetBuffer.sequence = BigLong(sock->sendSequence++);
net_dgrm.c:	Q_memcpy (packetBuffer.data, sock->sendMessage, dataLen);
net_dgrm.c:	sock->canSend = false;
net_dgrm.c:	if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
net_dgrm.c:		return -1;
net_dgrm.c:	sock->lastSendTime = net_time;
net_dgrm.c:	if (sock->sendMessageLength <= MAX_DATAGRAM)
net_dgrm.c:		dataLen = sock->sendMessageLength;
net_dgrm.c:	packetBuffer.sequence = BigLong(sock->sendSequence++);
net_dgrm.c:	Q_memcpy (packetBuffer.data, sock->sendMessage, dataLen);
net_dgrm.c:	sock->sendNext = false;
net_dgrm.c:	if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
net_dgrm.c:		return -1;
net_dgrm.c:	sock->lastSendTime = net_time;
net_dgrm.c:	if (sock->sendMessageLength <= MAX_DATAGRAM)
net_dgrm.c:		dataLen = sock->sendMessageLength;
net_dgrm.c:	packetBuffer.sequence = BigLong(sock->sendSequence - 1);
net_dgrm.c:	Q_memcpy (packetBuffer.data, sock->sendMessage, dataLen);
net_dgrm.c:	sock->sendNext = false;
net_dgrm.c:	if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
net_dgrm.c:		return -1;
net_dgrm.c:	sock->lastSendTime = net_time;
net_dgrm.c:	if (sock->sendNext)
net_dgrm.c:	return sock->canSend;
net_dgrm.c:	if (data->cursize == 0)
net_dgrm.c:	if (data->cursize > MAX_DATAGRAM)
net_dgrm.c:		Sys_Error("Datagram_SendUnreliableMessage: message too big %u\n", data->cursize);
net_dgrm.c:	packetLen = NET_HEADERSIZE + data->cursize;
net_dgrm.c:	packetBuffer.sequence = BigLong(sock->unreliableSendSequence++);
net_dgrm.c:	Q_memcpy (packetBuffer.data, data->data, data->cursize);
net_dgrm.c:	if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
net_dgrm.c:		return -1;
net_dgrm.c:	if (!sock->canSend)
net_dgrm.c:		if ((net_time - sock->lastSendTime) > 1.0)
net_dgrm.c:		length = sfunc.Read (sock->socket, (byte *)&packetBuffer, NET_DATAGRAMSIZE, &readaddr);
net_dgrm.c:		if (length == -1)
net_dgrm.c:			return -1;
net_dgrm.c:		if (sfunc.AddrCompare(&readaddr, &sock->addr) != 0)
net_dgrm.c:			Con_DPrintf("Expected: %s\n", StrAddr (&sock->addr));
net_dgrm.c:			if (sequence < sock->unreliableReceiveSequence)
net_dgrm.c:			if (sequence != sock->unreliableReceiveSequence)
net_dgrm.c:				count = sequence - sock->unreliableReceiveSequence;
net_dgrm.c:			sock->unreliableReceiveSequence = sequence + 1;
net_dgrm.c:			length -= NET_HEADERSIZE;
net_dgrm.c:			if (sequence != (sock->sendSequence - 1))
net_dgrm.c:			if (sequence == sock->ackSequence)
net_dgrm.c:				sock->ackSequence++;
net_dgrm.c:				if (sock->ackSequence != sock->sendSequence)
net_dgrm.c:			sock->sendMessageLength -= MAX_DATAGRAM;
net_dgrm.c:			if (sock->sendMessageLength > 0)
net_dgrm.c:				Q_memcpy(sock->sendMessage, sock->sendMessage+MAX_DATAGRAM, sock->sendMessageLength);
net_dgrm.c:				sock->sendNext = true;
net_dgrm.c:				sock->sendMessageLength = 0;
net_dgrm.c:				sock->canSend = true;
net_dgrm.c:			sfunc.Write (sock->socket, (byte *)&packetBuffer, NET_HEADERSIZE, &readaddr);
net_dgrm.c:			if (sequence != sock->receiveSequence)
net_dgrm.c:			sock->receiveSequence++;
net_dgrm.c:			length -= NET_HEADERSIZE;
net_dgrm.c:				SZ_Write(&net_message, sock->receiveMessage, sock->receiveMessageLength);
net_dgrm.c:				sock->receiveMessageLength = 0;
net_dgrm.c:			Q_memcpy(sock->receiveMessage + sock->receiveMessageLength, packetBuffer.data, length);
net_dgrm.c:			sock->receiveMessageLength += length;
net_dgrm.c:	if (sock->sendNext)
net_dgrm.c:	Con_Printf("canSend = %4u   \n", s->canSend);
net_dgrm.c:	Con_Printf("sendSeq = %4u   ", s->sendSequence);
net_dgrm.c:	Con_Printf("recvSeq = %4u   \n", s->receiveSequence);
net_dgrm.c:		for (s = net_activeSockets; s; s = s->next)
net_dgrm.c:		for (s = net_freeSockets; s; s = s->next)
net_dgrm.c:		for (s = net_activeSockets; s; s = s->next)
net_dgrm.c:			if (Q_strcasecmp(Cmd_Argv(1), s->address) == 0)
net_dgrm.c:			for (s = net_freeSockets; s; s = s->next)
net_dgrm.c:				if (Q_strcasecmp(Cmd_Argv(1), s->address) == 0)
net_dgrm.c:		if (control == -1)
net_dgrm.c:	testPollCount--;
net_dgrm.c:		if (dfunc.GetAddrFromName(host, &sendaddr) != -1)
net_dgrm.c:	if (testSocket == -1)
net_dgrm.c:	if (control == -1)
net_dgrm.c:	Con_Printf("%-16.16s  %-16.16s\n", name, value);
net_dgrm.c:		if (dfunc.GetAddrFromName(host, &sendaddr) != -1)
net_dgrm.c:	if (test2Socket == -1)
net_dgrm.c:	if (COM_CheckParm("-nolan"))
net_dgrm.c:		return -1;
net_dgrm.c:		if (csock == -1)
net_dgrm.c:	sfunc.CloseSocket(sock->socket);
net_dgrm.c:	if (acceptsock == -1)
net_dgrm.c:	if (control == -1)
net_dgrm.c:		activeNumber = -1;
net_dgrm.c:			if (client->active)
net_dgrm.c:		MSG_WriteString(&net_message, client->name);
net_dgrm.c:		MSG_WriteLong(&net_message, client->colors);
net_dgrm.c:		MSG_WriteLong(&net_message, (int)client->edict->v.frags);
net_dgrm.c:		MSG_WriteLong(&net_message, (int)(net_time - client->netconnection->connecttime));
net_dgrm.c:		MSG_WriteString(&net_message, client->netconnection->address);
net_dgrm.c:			var = var->next;
net_dgrm.c:			if (var->server)
net_dgrm.c:			var = var->next;
net_dgrm.c:			MSG_WriteString(&net_message, var->name);
net_dgrm.c:			MSG_WriteString(&net_message, var->string);
net_dgrm.c:		testAddr = ((struct sockaddr_in *)&clientaddr)->sin_addr.s_addr;
net_dgrm.c:	for (s = net_activeSockets; s; s = s->next)
net_dgrm.c:		if (s->driver != net_driverlevel)
net_dgrm.c:		ret = dfunc.AddrCompare(&clientaddr, &s->addr);
net_dgrm.c:			if (ret == 0 && net_time - s->connecttime < 2.0)
net_dgrm.c:				dfunc.GetSocketAddr(s->socket, &newaddr);
net_dgrm.c:	if (newsock == -1)
net_dgrm.c:	if (dfunc.Connect (newsock, &clientaddr) == -1)
net_dgrm.c:	sock->socket = newsock;
net_dgrm.c:	sock->landriver = net_landriverlevel;
net_dgrm.c:	sock->addr = clientaddr;
net_dgrm.c:	Q_strcpy(sock->address, dfunc.AddrToString(&clientaddr));
net_dgrm.c:		if (control == -1)
net_dgrm.c:				if (i < 15 && hostcache[n].name[i-1] > '8')
net_dgrm.c:					hostcache[n].name[i-1]++;
net_dgrm.c:				i = -1;
net_dgrm.c:	if (dfunc.GetAddrFromName(host, &sendaddr) == -1)
net_dgrm.c:	if (newsock == -1)
net_dgrm.c:	sock->socket = newsock;
net_dgrm.c:	sock->landriver = net_landriverlevel;
net_dgrm.c:	if (dfunc.Connect (newsock, &sendaddr) == -1)
net_dgrm.c:				if (control == -1)
net_dgrm.c:		while (ret == 0 && (SetNetTime() - start_time) < 2.5);
net_dgrm.c:	if (ret == -1)
net_dgrm.c:		Q_memcpy(&sock->addr, &sendaddr, sizeof(struct qsockaddr));
net_dgrm.c:		dfunc.SetSocketPort (&sock->addr, MSG_ReadLong());
net_dgrm.c:	dfunc.GetNameFromAddr (&sendaddr, sock->address);
net_dgrm.c:	sock->lastMessageTime = SetNetTime();
net_dgrm.c:	if (dfunc.Connect (newsock, &sock->addr) == -1)
net_dgrm.h:Copyright (C) 1996-1997 Id Software, Inc.
net_dgrm.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_dos.c:Copyright (C) 1996-1997 Id Software, Inc.
net_dos.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_ipx.c:Copyright (C) 1996-1997 Id Software, Inc.
net_ipx.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_ipx.c:#define IPXBUFFERS		((LOWMEMSIZE - LOWMEMSAVE)/ sizeof(ipx_lowmem_buffer_t))
net_ipx.c:static int net_acceptsocket = -1;
net_ipx.c:		return -1;
net_ipx.c:		if (lma->socketbuffer[s][n].ecb.inUse == 0)
net_ipx.c:			for (ecb = readlist[s], prev = NULL; ecb; ecb = ecb->link)
net_ipx.c:				if (lma->socketbuffer[s][n].sequence < ((ipx_lowmem_buffer_t *) ecb)->sequence)
net_ipx.c:				lma->socketbuffer[s][n].ecb.link = ecb;
net_ipx.c:				lma->socketbuffer[s][n].ecb.link = NULL;
net_ipx.c:				prev->link = &lma->socketbuffer[s][n].ecb;
net_ipx.c:				readlist[s] = &lma->socketbuffer[s][n].ecb;
net_ipx.c:			lma->socketbuffer[s][n].ecb.inUse = 0xff;
net_ipx.c:	if (COM_CheckParm ("-noipx"))
net_ipx.c:		return -1;
net_ipx.c:		return -1;
net_ipx.c:		return -1;
net_ipx.c:			lma->socketbuffer[s][n].ecb.link = NULL;
net_ipx.c:			lma->socketbuffer[s][n].ecb.ESR_off = 0;
net_ipx.c:			lma->socketbuffer[s][n].ecb.ESR_seg = 0;
net_ipx.c:			lma->socketbuffer[s][n].ecb.socket = 0;
net_ipx.c:			lma->socketbuffer[s][n].ecb.inUse = 0xff;
net_ipx.c:			lma->socketbuffer[s][n].ecb.completionCode = 0;
net_ipx.c:			lma->socketbuffer[s][n].ecb.fragCount = 1;
net_ipx.c:			lma->socketbuffer[s][n].ecb.fragOff = ptr2real(&lma->socketbuffer[s][n].header) & 0xf;
net_ipx.c:			lma->socketbuffer[s][n].ecb.fragSeg = ptr2real(&lma->socketbuffer[s][n].header) >> 4;
net_ipx.c:			lma->socketbuffer[s][n].ecb.fragSize = sizeof(IPXheader) + sizeof(int) + NET_DATAGRAMSIZE;
net_ipx.c:	if ((net_controlsocket = IPX_OpenSocket (0)) == -1)
net_ipx.c:		return -1;
net_ipx.c:		if (net_acceptsocket != -1)
net_ipx.c:		if ((net_acceptsocket = IPX_OpenSocket (net_hostport)) == -1)
net_ipx.c:	if (net_acceptsocket == -1)
net_ipx.c:	net_acceptsocket = -1;
net_ipx.c:		return -1;
net_ipx.c:		return -1;
net_ipx.c:		return -1;
net_ipx.c:		return -1;
net_ipx.c:				lma->socketbuffer[handle][n].ecb.socket = socket;
net_ipx.c:				lma->socketbuffer[handle][n].ecb.inUse = 0;
net_ipx.c:					IPX_ListenForPacket(&lma->socketbuffer[handle][n].ecb);
net_ipx.c:	return -1;
net_ipx.c:	if (lma->socketbuffer[handle][0].ecb.inUse != 0)
net_ipx.c:	handlesInUse--;
net_ipx.c:	Q_memcpy(&ipxaddr, &((struct sockaddr_ipx *)addr)->sipx_addr, sizeof(IPXaddr));
net_ipx.c:	if (IPX_GetLocalTarget(&ipxaddr, lma->socketbuffer[handle][0].ecb.immediateAddress) != 0)
net_ipx.c:		return -1;
net_ipx.c:	if (net_acceptsocket == -1)
net_ipx.c:		return -1;
net_ipx.c:		if (lma->socketbuffer[net_acceptsocket][n].ecb.inUse == 0)
net_ipx.c:	return -1;
net_ipx.c:	readlist[handle] = ecb->link;
net_ipx.c:	if (ecb->completionCode != 0)
net_ipx.c:		Con_Printf("Warning: IPX_Read error %02x\n", ecb->completionCode);	
net_ipx.c:		ecb->fragSize = sizeof(IPXheader) + sizeof(int) + NET_DATAGRAMSIZE;
net_ipx.c:	copylen = ntohs(rcvbuf->header.length) - (sizeof(int) + sizeof(IPXheader));
net_ipx.c:	Q_memcpy(buf, rcvbuf->data, copylen);
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_family = AF_NETWARE;
net_ipx.c:		Q_memcpy(&((struct sockaddr_ipx *)addr)->sipx_addr, rcvbuf->header.source.network, sizeof(IPXaddr));
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_zero[0] = 0;
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_zero[1] = 0;
net_ipx.c:	Q_memcpy(lma->socketbuffer[handle][0].ecb.immediateAddress, rcvbuf->ecb.immediateAddress, 6);
net_ipx.c:	rcvbuf->ecb.fragSize = sizeof(IPXheader) + sizeof(int) + NET_DATAGRAMSIZE;
net_ipx.c:	IPX_ListenForPacket(&rcvbuf->ecb);
net_ipx.c:	Q_memset(lma->socketbuffer[handle][0].ecb.immediateAddress, 0xff, 6);
net_ipx.c:	while (lma->socketbuffer[handle][0].ecb.inUse != 0)
net_ipx.c:	switch (lma->socketbuffer[handle][0].ecb.completionCode)
net_ipx.c:			Con_Printf("IPX driver send failure: %02x\n", lma->socketbuffer[handle][0].ecb.completionCode);
net_ipx.c:			Con_Printf("IPX lost route, trying to re-establish\n");
net_ipx.c:			if (IPX_GetLocalTarget (&lma->socketbuffer[handle][0].header.destination, lma->socketbuffer[handle][0].ecb.immediateAddress) != 0)
net_ipx.c:				return -1;
net_ipx.c:			// re-send the one that failed
net_ipx.c:			regs.x.es = ptr2real(&lma->socketbuffer[handle][0].ecb) >> 4;
net_ipx.c:			regs.x.si = ptr2real(&lma->socketbuffer[handle][0].ecb) & 0xf;
net_ipx.c:	lma->socketbuffer[handle][0].ecb.fragSize = sizeof(IPXheader) + sizeof(int) + len;
net_ipx.c:	lma->socketbuffer[handle][0].header.type = PTYPE_IPX;
net_ipx.c:	Q_memcpy(&lma->socketbuffer[handle][0].header.destination, &((struct sockaddr_ipx *)addr)->sipx_addr, sizeof(IPXaddr));
net_ipx.c:	lma->socketbuffer[handle][0].sequence = sequence[handle];
net_ipx.c:	Q_memcpy(lma->socketbuffer[handle][0].data, buf, len);
net_ipx.c:	regs.x.es = ptr2real(&lma->socketbuffer[handle][0].ecb) >> 4;
net_ipx.c:	regs.x.si = ptr2real(&lma->socketbuffer[handle][0].ecb) & 0xf;
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.network[0],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.network[1],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.network[2],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.network[3],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.node[0],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.node[1],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.node[2],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.node[3],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.node[4],
net_ipx.c:		((struct sockaddr_ipx *)addr)->sipx_addr.node[5],
net_ipx.c:		ntohs(((struct sockaddr_ipx *)addr)->sipx_port)
net_ipx.c:	addr->sa_family = AF_NETWARE;
net_ipx.c:		return -1;	\
net_ipx.c:	((struct sockaddr_ipx *)addr)->sipx_addr.dest = val
net_ipx.c:	((struct sockaddr_ipx *)addr)->sipx_port = htons(val);
net_ipx.c:	addr->sa_family = AF_NETWARE;
net_ipx.c:	IPX_GetLocalAddress(&((struct sockaddr_ipx *)addr)->sipx_addr);
net_ipx.c:	((struct sockaddr_ipx *)addr)->sipx_port = ipxsocket[handle];
net_ipx.c:	return -1;
net_ipx.c:	if (addr1->sa_family != addr2->sa_family)
net_ipx.c:		return -1;
net_ipx.c:	if(Q_memcmp(&((struct sockaddr_ipx *)addr1)->sipx_addr, &((struct sockaddr_ipx *)addr2)->sipx_addr, 10))
net_ipx.c:		return -1;
net_ipx.c:	if (((struct sockaddr_ipx *)addr1)->sipx_port != ((struct sockaddr_ipx *)addr2)->sipx_port)
net_ipx.c:	return ntohs(((struct sockaddr_ipx *)addr)->sipx_port);
net_ipx.c:	((struct sockaddr_ipx *)addr)->sipx_port = htons(port);
net_ipx.h:Copyright (C) 1996-1997 Id Software, Inc.
net_ipx.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_loop.c:Copyright (C) 1996-1997 Id Software, Inc.
net_loop.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_loop.c:		return -1;
net_loop.c:		Q_strcpy (loop_client->address, "localhost");
net_loop.c:	loop_client->receiveMessageLength = 0;
net_loop.c:	loop_client->sendMessageLength = 0;
net_loop.c:	loop_client->canSend = true;
net_loop.c:		Q_strcpy (loop_server->address, "LOCAL");
net_loop.c:	loop_server->receiveMessageLength = 0;
net_loop.c:	loop_server->sendMessageLength = 0;
net_loop.c:	loop_server->canSend = true;
net_loop.c:	loop_client->driverdata = (void *)loop_server;
net_loop.c:	loop_server->driverdata = (void *)loop_client;
net_loop.c:	loop_server->sendMessageLength = 0;
net_loop.c:	loop_server->receiveMessageLength = 0;
net_loop.c:	loop_server->canSend = true;
net_loop.c:	loop_client->sendMessageLength = 0;
net_loop.c:	loop_client->receiveMessageLength = 0;
net_loop.c:	loop_client->canSend = true;
net_loop.c:	return (value + (sizeof(int) - 1)) & (~(sizeof(int) - 1));
net_loop.c:	if (sock->receiveMessageLength == 0)
net_loop.c:	ret = sock->receiveMessage[0];
net_loop.c:	length = sock->receiveMessage[1] + (sock->receiveMessage[2] << 8);
net_loop.c:	SZ_Write (&net_message, &sock->receiveMessage[4], length);
net_loop.c:	sock->receiveMessageLength -= length;
net_loop.c:	if (sock->receiveMessageLength)
net_loop.c:		Q_memcpy(sock->receiveMessage, &sock->receiveMessage[length], sock->receiveMessageLength);
net_loop.c:	if (sock->driverdata && ret == 1)
net_loop.c:		((qsocket_t *)sock->driverdata)->canSend = true;
net_loop.c:	if (!sock->driverdata)
net_loop.c:		return -1;
net_loop.c:	bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
net_loop.c:	if ((*bufferLength + data->cursize + 4) > NET_MAXMESSAGE)
net_loop.c:	buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
net_loop.c:	*buffer++ = data->cursize & 0xff;
net_loop.c:	*buffer++ = data->cursize >> 8;
net_loop.c:	Q_memcpy(buffer, data->data, data->cursize);
net_loop.c:	*bufferLength = IntAlign(*bufferLength + data->cursize + 4);
net_loop.c:	sock->canSend = false;
net_loop.c:	if (!sock->driverdata)
net_loop.c:		return -1;
net_loop.c:	bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
net_loop.c:	if ((*bufferLength + data->cursize + sizeof(byte) + sizeof(short)) > NET_MAXMESSAGE)
net_loop.c:	buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
net_loop.c:	*buffer++ = data->cursize & 0xff;
net_loop.c:	*buffer++ = data->cursize >> 8;
net_loop.c:	Q_memcpy(buffer, data->data, data->cursize);
net_loop.c:	*bufferLength = IntAlign(*bufferLength + data->cursize + 4);
net_loop.c:	if (!sock->driverdata)
net_loop.c:	return sock->canSend;
net_loop.c:	if (sock->driverdata)
net_loop.c:		((qsocket_t *)sock->driverdata)->driverdata = NULL;
net_loop.c:	sock->receiveMessageLength = 0;
net_loop.c:	sock->sendMessageLength = 0;
net_loop.c:	sock->canSend = true;
net_loop.h:Copyright (C) 1996-1997 Id Software, Inc.
net_loop.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_main.c:Copyright (C) 1996-1997 Id Software, Inc.
net_main.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_main.c:int	vcrFile = -1;
net_main.c:#define sfunc	net_drivers[sock->driver]
net_main.c:	net_freeSockets = sock->next;
net_main.c:	sock->next = net_activeSockets;
net_main.c:	sock->disconnected = false;
net_main.c:	sock->connecttime = net_time;
net_main.c:	Q_strcpy (sock->address,"UNSET ADDRESS");
net_main.c:	sock->driver = net_driverlevel;
net_main.c:	sock->socket = 0;
net_main.c:	sock->driverdata = NULL;
net_main.c:	sock->canSend = true;
net_main.c:	sock->sendNext = false;
net_main.c:	sock->lastMessageTime = net_time;
net_main.c:	sock->ackSequence = 0;
net_main.c:	sock->sendSequence = 0;
net_main.c:	sock->unreliableSendSequence = 0;
net_main.c:	sock->sendMessageLength = 0;
net_main.c:	sock->receiveSequence = 0;
net_main.c:	sock->unreliableReceiveSequence = 0;
net_main.c:	sock->receiveMessageLength = 0;
net_main.c:		net_activeSockets = net_activeSockets->next;
net_main.c:		for (s = net_activeSockets; s; s = s->next)
net_main.c:			if (s->next == sock)
net_main.c:				s->next = sock->next;
net_main.c:	sock->next = net_freeSockets;
net_main.c:	sock->disconnected = true;
net_main.c:	Con_Printf("--------------- --------------- -----\n");
net_main.c:			Con_Printf("%-15.15s %-15.15s %2u/%2u\n", hostcache[n].name, hostcache[n].map, hostcache[n].users, hostcache[n].maxusers);
net_main.c:			Con_Printf("%-15.15s %-15.15s\n", hostcache[n].name, hostcache[n].map);
net_main.c:	if ((Sys_FloatTime() - slistStartTime) < 0.5)
net_main.c:	if ((Sys_FloatTime() - slistStartTime) < 1.5)
net_main.c:				Sys_FileWrite (vcrFile, ret->address, NET_NAMELEN);
net_main.c:	if (sock->disconnected)
net_main.c:returns -1 if connection is invalid
net_main.c:		return -1;
net_main.c:	if (sock->disconnected)
net_main.c:		return -1;
net_main.c:	if (ret == 0 && sock->driver)
net_main.c:		if (net_time - sock->lastMessageTime > net_messagetimeout.value)
net_main.c:			return -1;
net_main.c:		if (sock->driver)
net_main.c:			sock->lastMessageTime = net_time;
net_main.c:returns -1 if the connection died
net_main.c:		return -1;
net_main.c:	if (sock->disconnected)
net_main.c:		return -1;
net_main.c:	if (r == 1 && sock->driver)
net_main.c:		return -1;
net_main.c:	if (sock->disconnected)
net_main.c:		return -1;
net_main.c:	if (r == 1 && sock->driver)
net_main.c:	if (sock->disconnected)
net_main.c:		if (!host_client->netconnection)
net_main.c:		if (host_client->active)
net_main.c:			if (host_client->netconnection->driver == 0)
net_main.c:				NET_SendMessage(host_client->netconnection, data);
net_main.c:				if (NET_CanSendMessage (host_client->netconnection))
net_main.c:					NET_SendMessage(host_client->netconnection, data);
net_main.c:					NET_GetMessage (host_client->netconnection);
net_main.c:				if (NET_CanSendMessage (host_client->netconnection))
net_main.c:					NET_GetMessage (host_client->netconnection);
net_main.c:		if ((Sys_FloatTime() - start) > blocktime)
net_main.c:	if (COM_CheckParm("-playback"))
net_main.c:	if (COM_CheckParm("-record"))
net_main.c:	i = COM_CheckParm ("-port");
net_main.c:		i = COM_CheckParm ("-udpport");
net_main.c:		i = COM_CheckParm ("-ipxport");
net_main.c:		if (i < com_argc-1)
net_main.c:			Sys_Error ("NET_Init: you must specify a number after -port");
net_main.c:	if (COM_CheckParm("-listen") || cls.state == ca_dedicated)
net_main.c:		s->next = net_freeSockets;
net_main.c:		s->disconnected = true;
net_main.c:		if (controlSocket == -1)
net_main.c:	for (sock = net_activeSockets; sock; sock = sock->next)
net_main.c:	if (vcrFile != -1)
net_main.c:	for (pp = pollProcedureList; pp; pp = pp->next)
net_main.c:		if (pp->nextTime > net_time)
net_main.c:		pollProcedureList = pp->next;
net_main.c:		pp->procedure(pp->arg);
net_main.c:	proc->nextTime = Sys_FloatTime() + timeOffset;
net_main.c:	for (pp = pollProcedureList, prev = NULL; pp; pp = pp->next)
net_main.c:		if (pp->nextTime >= proc->nextTime)
net_main.c:		proc->next = pollProcedureList;
net_main.c:	proc->next = pp;
net_main.c:	prev->next = proc;
net_main.c:	if (addr->sa_family != 2)
net_main.c:	if ((BigLong(*(int *)&addr->sa_data[2]) & 0xffffff00) == IDNET)
net_mp.c:Copyright (C) 1996-1997 Id Software, Inc.
net_mp.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_mp.c:static int net_acceptsocket = -1;		// socket for fielding new connections
net_mp.c:	if (COM_CheckParm ("-mpath") == 0)
net_mp.c:		return -1;
net_mp.c:   if (flat_selector == -1) {
net_mp.c:      return -1;
net_mp.c:   if (__dpmi_set_segment_base_address(flat_selector, 0) == -1) {
net_mp.c:      return -1;
net_mp.c:   if (__dpmi_set_segment_limit(flat_selector, 0xffffffff) == -1) {
net_mp.c:      return -1;
net_mp.c:		myAddr = *(int *)local->h_addr_list[0];
net_mp.c:	if ((net_controlsocket = MPATH_OpenSocket (0)) == -1)
net_mp.c:	((struct sockaddr_in *)&broadcastaddr)->sin_family = AF_INET;
net_mp.c:	((struct sockaddr_in *)&broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST;
net_mp.c:	((struct sockaddr_in *)&broadcastaddr)->sin_port = htons(net_hostport);
net_mp.c:		if (net_acceptsocket != -1)
net_mp.c:		if ((net_acceptsocket = MPATH_OpenSocket (net_hostport)) == -1)
net_mp.c:	if (net_acceptsocket == -1)
net_mp.c:	net_acceptsocket = -1;
net_mp.c:	if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
net_mp.c:		return -1;
net_mp.c:	if (ioctlsocket (newsocket, FIONBIO, &_true) == -1)
net_mp.c:	if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
net_mp.c:	return -1;
net_mp.c:	mask=-1;
net_mp.c:		  num = num*10 + *b++ - '0';
net_mp.c:		  	return -1;
net_mp.c:			return -1;
net_mp.c:			return -1;
net_mp.c:	hostaddr->sa_family = AF_INET;
net_mp.c:	((struct sockaddr_in *)hostaddr)->sin_port = htons((short)port);	
net_mp.c:	((struct sockaddr_in *)hostaddr)->sin_addr.s_addr = (myAddr & htonl(mask)) | htonl(addr);
net_mp.c:	if (net_acceptsocket == -1)
net_mp.c:		return -1;
net_mp.c:	return -1;
net_mp.c:	if (ret == -1)
net_mp.c:		return -1;
net_mp.c:		if (ret == -1)
net_mp.c:	if (ret == -1)
net_mp.c:	haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr);
net_mp.c:	sprintf(buffer, "%d.%d.%d.%d:%d", (haddr >> 24) & 0xff, (haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff, ntohs(((struct sockaddr_in *)addr)->sin_port));
net_mp.c:	addr->sa_family = AF_INET;
net_mp.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr);
net_mp.c:	((struct sockaddr_in *)addr)->sin_port = htons(hp);
net_mp.c:	a = ((struct sockaddr_in *)addr)->sin_addr.s_addr;
net_mp.c:		((struct sockaddr_in *)addr)->sin_addr.s_addr = myAddr;
net_mp.c:	hostentry = gethostbyaddr ((char *)&((struct sockaddr_in *)addr)->sin_addr, sizeof(struct in_addr), AF_INET);
net_mp.c:		Q_strncpy (name, (char *)hostentry->h_name, NET_NAMELEN - 1);
net_mp.c:		return -1;
net_mp.c:	addr->sa_family = AF_INET;
net_mp.c:	((struct sockaddr_in *)addr)->sin_port = htons(net_hostport);	
net_mp.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = *(int *)hostentry->h_addr_list[0];
net_mp.c:	if (addr1->sa_family != addr2->sa_family)
net_mp.c:		return -1;
net_mp.c:	if (((struct sockaddr_in *)addr1)->sin_addr.s_addr != ((struct sockaddr_in *)addr2)->sin_addr.s_addr)
net_mp.c:		return -1;
net_mp.c:	if (((struct sockaddr_in *)addr1)->sin_port != ((struct sockaddr_in *)addr2)->sin_port)
net_mp.c:	return ntohs(((struct sockaddr_in *)addr)->sin_port);
net_mp.c:	((struct sockaddr_in *)addr)->sin_port = htons(port);
net_mp.h:Copyright (C) 1996-1997 Id Software, Inc.
net_mp.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_none.c:Copyright (C) 1996-1997 Id Software, Inc.
net_none.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_ser.c:Copyright (C) 1996-1997 Id Software, Inc.
net_ser.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_ser.c:// a one byte message type (MTYPE_xxx), data, and a 16-bit checksum.  All
net_ser.c:// multi-byte fields are sent in network byte order.  There are currently 4
net_ser.c:// sequence is an 8-bit unsigned value starting from 0
net_ser.c:// data_length is a 16-bit unsigned value; it is the length of the data only
net_ser.c:// the checksum is a 16-bit value.  the CRC formula used is defined in crc.h.
net_ser.c:	p->connected = false;
net_ser.c:	p->connecting = false;
net_ser.c:	p->currState = STATE_READY;
net_ser.c:	p->prevState = STATE_READY;
net_ser.c:	p->lengthFound = 0;
net_ser.c:		b = TTY_ReadByte(p->tty);
net_ser.c:			p->currState = STATE_ABORT;
net_ser.c:			p->currState = STATE_ABORT;
net_ser.c:			return -1;
net_ser.c:			if (p->currState != STATE_ESCAPE)
net_ser.c:				p->prevState = p->currState;
net_ser.c:				p->currState = STATE_ESCAPE;
net_ser.c:		if (p->currState == STATE_ESCAPE)
net_ser.c:				if (p->prevState == STATE_ABORT)
net_ser.c:					p->currState = STATE_READY;
net_ser.c:					p->lengthFound = 0;
net_ser.c:				if (p->prevState != STATE_EOM)
net_ser.c:					p->currState = STATE_READY;
net_ser.c:					p->lengthFound = 0;
net_ser.c:				switch (p->mtype)
net_ser.c:						Con_DPrintf("Serial: sending ack %u\n", p->sequence);
net_ser.c:						Serial_SendACK (p, p->sequence);
net_ser.c:						if (p->sequence == p->sock->receiveSequence)
net_ser.c:							p->sock->receiveSequence = (p->sequence + 1) & 0xff;
net_ser.c:							p->sock->receiveMessageLength += p->lengthFound;
net_ser.c:							Con_DPrintf("Serial: reliable out of order; got %u wanted %u\n", p->sequence, p->sock->receiveSequence);
net_ser.c:						p->sock->unreliableReceiveSequence = (p->sequence + 1) & 0xff;
net_ser.c:						p->sock->receiveMessageLength += p->lengthFound;
net_ser.c:						Con_DPrintf("Serial: got ack %u\n", p->sequence);
net_ser.c:						if (p->sequence == p->sock->sendSequence)
net_ser.c:							p->sock->sendSequence = (p->sock->sendSequence + 1) & 0xff;
net_ser.c:							p->sock->canSend = true;
net_ser.c:							Con_DPrintf("Serial: ack out of order; got %u wanted %u\n",p->sequence, p->sock->sendSequence);
net_ser.c:						p->sock->receiveMessageLength += p->lengthFound;
net_ser.c:				p->currState = STATE_READY;
net_ser.c:				p->lengthFound = 0;
net_ser.c:				p->currState = STATE_ABORT;
net_ser.c:			p->currState = p->prevState;
net_ser.c:		p->prevState = p->currState;
net_ser.c:		if (p->sock->receiveMessageLength + p->lengthFound > NET_MAXMESSAGE)
net_ser.c:			Con_DPrintf("Serial blew out receive buffer: %u\n", p->sock->receiveMessageLength + p->lengthFound);
net_ser.c:			p->currState = STATE_ABORT;
net_ser.c:		if (p->sock->receiveMessageLength + p->lengthFound == NET_MAXMESSAGE)
net_ser.c:			Con_DPrintf("Serial hit receive buffer limit: %u\n", p->sock->receiveMessageLength + p->lengthFound);
net_ser.c:			p->currState = STATE_ABORT;
net_ser.c:		switch (p->currState)
net_ser.c:				CRC_Init(&p->crcValue);
net_ser.c:				CRC_ProcessByte(&p->crcValue, b);
net_ser.c:				if (p->client)
net_ser.c:						p->currState = STATE_ABORT;
net_ser.c:						p->currState = STATE_ABORT;
net_ser.c:				p->mtype = b;
net_ser.c:					p->currState = STATE_SEQUENCE;
net_ser.c:					p->currState = STATE_LENGTH1;
net_ser.c:				if (p->mtype < MTYPE_ACK)
net_ser.c:					p->sock->receiveMessage[p->sock->receiveMessageLength] = b;
net_ser.c:					p->lengthFound++;
net_ser.c:				p->sequence = b;
net_ser.c:				CRC_ProcessByte(&p->crcValue, b);
net_ser.c:				if (p->mtype != MTYPE_ACK)
net_ser.c:					p->currState = STATE_LENGTH1;
net_ser.c:					p->currState = STATE_CRC1;
net_ser.c:				p->lengthStated = b * 256;
net_ser.c:				CRC_ProcessByte(&p->crcValue, b);
net_ser.c:				p->currState = STATE_LENGTH2;
net_ser.c:				p->lengthStated += b;
net_ser.c:				CRC_ProcessByte(&p->crcValue, b);
net_ser.c:				if (p->mtype == MTYPE_RELIABLE && p->lengthStated > MAX_MSGLEN)
net_ser.c:					p->currState = STATE_ABORT;
net_ser.c:					Con_DPrintf("Serial: bad reliable message length %u\n", p->lengthStated);
net_ser.c:				else if (p->mtype == MTYPE_UNRELIABLE && p->lengthStated > MAX_DATAGRAM)
net_ser.c:					p->currState = STATE_ABORT;
net_ser.c:					Con_DPrintf("Serial: bad unreliable message length %u\n", p->lengthStated);
net_ser.c:					p->currState = STATE_DATA;
net_ser.c:					if (p->mtype < MTYPE_ACK)
net_ser.c:						*(short *)&p->sock->receiveMessage [p->sock->receiveMessageLength + 1] = p->lengthStated;
net_ser.c:						p->lengthFound += 2;
net_ser.c:				p->sock->receiveMessage[p->sock->receiveMessageLength + p->lengthFound] = b;
net_ser.c:				p->lengthFound++;
net_ser.c:				CRC_ProcessByte(&p->crcValue, b);
net_ser.c:				if (p->lengthFound == p->lengthStated + 3)
net_ser.c:					p->currState = STATE_CRC1;
net_ser.c:				p->crcStated = b * 256;
net_ser.c:				p->currState = STATE_CRC2;
net_ser.c:				p->crcStated += b;
net_ser.c:				if (p->crcStated == CRC_Value(p->crcValue))
net_ser.c:					p->currState = STATE_EOM;
net_ser.c:					p->currState = STATE_ABORT;
net_ser.c:				p->currState = STATE_ABORT;
net_ser.c:	return -1;
net_ser.c:	if (COM_CheckParm("-nolan"))
net_ser.c:		return -1;
net_ser.c:	if (COM_CheckParm ("-noserial"))
net_ser.c:		return -1;
net_ser.c:		return -1;
net_ser.c:	return sock->canSend;
net_ser.c:	return TTY_OutputQueueIsEmpty(((SerialLine *)sock->driverdata)->tty);
net_ser.c:	p = (SerialLine *)sock->driverdata;
net_ser.c:	if (p->client)
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:	b = p->sock->sendSequence;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	b = message->cursize >> 8;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	b = message->cursize & 0xff;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	for (n = 0; n < message->cursize; n++)
net_ser.c:		b = message->data[n];
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:			TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_COMMAND);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_EOM);
net_ser.c:	TTY_Flush(p->tty);
net_ser.c:	sock->canSend = false;
net_ser.c:	Q_memcpy(sock->sendMessage, message->data, message->cursize);
net_ser.c:	sock->sendMessageLength = message->cursize;
net_ser.c:	sock->lastSendTime = net_time;
net_ser.c:	Con_DPrintf("Serial: re-sending reliable\n");
net_ser.c:	temp.data = sock->sendMessage;
net_ser.c:	temp.maxsize = sock->sendMessageLength;
net_ser.c:	temp.cursize = sock->sendMessageLength;
net_ser.c:	p = (SerialLine *)sock->driverdata;
net_ser.c:	if (!TTY_OutputQueueIsEmpty(p->tty))
net_ser.c:		TTY_Flush(p->tty);
net_ser.c:	if (p->client)
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:	b = p->sock->unreliableSendSequence;
net_ser.c:	p->sock->unreliableSendSequence = (b + 1) & 0xff;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	b = message->cursize >> 8;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	b = message->cursize & 0xff;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	for (n = 0; n < message->cursize; n++)
net_ser.c:		b = message->data[n];
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:			TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_COMMAND);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_EOM);
net_ser.c:	TTY_Flush(p->tty);
net_ser.c:	if (p->client)
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_COMMAND);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_EOM);
net_ser.c:	TTY_Flush(p->tty);
net_ser.c:	if (p->client)
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:	b = message->cursize >> 8;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	b = message->cursize & 0xff;
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	for (n = 0; n < message->cursize; n++)
net_ser.c:		b = message->data[n];
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:			TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, b);
net_ser.c:		TTY_WriteByte(p->tty, b);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_COMMAND);
net_ser.c:	TTY_WriteByte(p->tty, ESCAPE_EOM);
net_ser.c:	TTY_Flush(p->tty);
net_ser.c:		return -1;
net_ser.c:	if (p->sock->receiveMessageLength == 0)
net_ser.c:	ret = p->sock->receiveMessage[0];
net_ser.c:	length = *(short *)&p->sock->receiveMessage[1];
net_ser.c:	SZ_Write (&net_message, &p->sock->receiveMessage[3], length);
net_ser.c:	p->sock->receiveMessageLength -= length;
net_ser.c:	if (p->sock->receiveMessageLength + p->lengthFound)
net_ser.c:		Q_memcpy(p->sock->receiveMessage, &p->sock->receiveMessage[length], p->sock->receiveMessageLength + p->lengthFound);
net_ser.c:	p = (SerialLine *)sock->driverdata;
net_ser.c:	if (!sock->canSend)
net_ser.c:		if ((net_time - sock->lastSendTime) > 1.0)
net_ser.c:			sock->lastSendTime = net_time;
net_ser.c:	SerialLine *p = (SerialLine *)sock->driverdata;
net_ser.c:	TTY_Close(p->tty);
net_ser.c:	if (TTY_IsModem(p->tty))
net_ser.c:	p->client = true;
net_ser.c:	if (TTY_Connect(p->tty, host))
net_ser.c:	p->sock = NET_NewQSocket ();
net_ser.c:	p->sock->driver = myDriverLevel;
net_ser.c:	if (p->sock == NULL)
net_ser.c:	p->sock->driverdata = p;
net_ser.c:		if ((net_time - last_time) >= 1.0)
net_ser.c:	while (ret == 0 && (net_time - start_time) < 5.0);
net_ser.c:	if (ret == -1)
net_ser.c:	p->connected = true;
net_ser.c:	p->sock->lastMessageTime = net_time;
net_ser.c:	return p->sock;
net_ser.c:	TTY_Disconnect(p->tty);
net_ser.c:	p->client = false;
net_ser.c:	if (!TTY_CheckForConnection(p->tty))
net_ser.c:	if (TTY_IsModem(p->tty))
net_ser.c:		if (!p->connecting)
net_ser.c:			p->connecting = true;
net_ser.c:			p->connect_time = net_time;
net_ser.c:		else if ((net_time - p->connect_time) > 15.0)
net_ser.c:			p->connecting = false;
net_ser.c:			TTY_Disconnect(p->tty);
net_ser.c:	p->sock = NET_NewQSocket ();
net_ser.c:	p->sock->driver = myDriverLevel;
net_ser.c:	if (p->sock == NULL)
net_ser.c:	p->sock->driverdata = p;
net_ser.c:		NET_FreeQSocket(p->sock);
net_ser.c:	p->connected = true;
net_ser.c:	p->connecting = false;
net_ser.c:	p->sock->lastMessageTime = net_time;
net_ser.c:	sprintf(p->sock->address, "COM%u", (int)((p - serialLine) + 1));
net_ser.c:	return p->sock;
net_ser.h:Copyright (C) 1996-1997 Id Software, Inc.
net_ser.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_udp.c:Copyright (C) 1996-1997 Id Software, Inc.
net_udp.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_udp.c:static int net_acceptsocket = -1;		// socket for fielding new connections
net_udp.c:	if (COM_CheckParm ("-noudp"))
net_udp.c:		return -1;
net_udp.c:	myAddr = *(int *)local->h_addr_list[0];
net_udp.c:	if ((net_controlsocket = UDP_OpenSocket (0)) == -1)
net_udp.c:	((struct sockaddr_in *)&broadcastaddr)->sin_family = AF_INET;
net_udp.c:	((struct sockaddr_in *)&broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST;
net_udp.c:	((struct sockaddr_in *)&broadcastaddr)->sin_port = htons(net_hostport);
net_udp.c:		if (net_acceptsocket != -1)
net_udp.c:		if ((net_acceptsocket = UDP_OpenSocket (net_hostport)) == -1)
net_udp.c:	if (net_acceptsocket == -1)
net_udp.c:	net_acceptsocket = -1;
net_udp.c:	if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
net_udp.c:		return -1;
net_udp.c:	if (ioctl (newsocket, FIONBIO, (char *)&_true) == -1)
net_udp.c:	if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
net_udp.c:	return -1;
net_udp.c:	mask=-1;
net_udp.c:		  num = num*10 + *b++ - '0';
net_udp.c:		  	return -1;
net_udp.c:			return -1;
net_udp.c:			return -1;
net_udp.c:	hostaddr->sa_family = AF_INET;
net_udp.c:	((struct sockaddr_in *)hostaddr)->sin_port = htons((short)port);	
net_udp.c:	((struct sockaddr_in *)hostaddr)->sin_addr.s_addr = (myAddr & htonl(mask)) | htonl(addr);
net_udp.c:	if (net_acceptsocket == -1)
net_udp.c:		return -1;
net_udp.c:	if (ioctl (net_acceptsocket, FIONREAD, &available) == -1)
net_udp.c:	return -1;
net_udp.c:	if (ret == -1 && (errno == EWOULDBLOCK || errno == ECONNREFUSED))
net_udp.c:		return -1;
net_udp.c:		if (ret == -1)
net_udp.c:	if (ret == -1 && errno == EWOULDBLOCK)
net_udp.c:	haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr);
net_udp.c:	sprintf(buffer, "%d.%d.%d.%d:%d", (haddr >> 24) & 0xff, (haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff, ntohs(((struct sockaddr_in *)addr)->sin_port));
net_udp.c:	addr->sa_family = AF_INET;
net_udp.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr);
net_udp.c:	((struct sockaddr_in *)addr)->sin_port = htons(hp);
net_udp.c:	a = ((struct sockaddr_in *)addr)->sin_addr.s_addr;
net_udp.c:		((struct sockaddr_in *)addr)->sin_addr.s_addr = myAddr;
net_udp.c:	hostentry = gethostbyaddr ((char *)&((struct sockaddr_in *)addr)->sin_addr, sizeof(struct in_addr), AF_INET);
net_udp.c:		Q_strncpy (name, (char *)hostentry->h_name, NET_NAMELEN - 1);
net_udp.c:		return -1;
net_udp.c:	addr->sa_family = AF_INET;
net_udp.c:	((struct sockaddr_in *)addr)->sin_port = htons(net_hostport);	
net_udp.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = *(int *)hostentry->h_addr_list[0];
net_udp.c:	if (addr1->sa_family != addr2->sa_family)
net_udp.c:		return -1;
net_udp.c:	if (((struct sockaddr_in *)addr1)->sin_addr.s_addr != ((struct sockaddr_in *)addr2)->sin_addr.s_addr)
net_udp.c:		return -1;
net_udp.c:	if (((struct sockaddr_in *)addr1)->sin_port != ((struct sockaddr_in *)addr2)->sin_port)
net_udp.c:	return ntohs(((struct sockaddr_in *)addr)->sin_port);
net_udp.c:	((struct sockaddr_in *)addr)->sin_port = htons(port);
net_udp.h:Copyright (C) 1996-1997 Id Software, Inc.
net_udp.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_vcr.c:Copyright (C) 1996-1997 Id Software, Inc.
net_vcr.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_vcr.c:	if (host_time != next.time || next.op != VCR_OP_GETMESSAGE || next.session != *(long *)(&sock->driverdata))
net_vcr.c:	if (host_time != next.time || next.op != VCR_OP_SENDMESSAGE || next.session != *(long *)(&sock->driverdata))
net_vcr.c:	if (host_time != next.time || next.op != VCR_OP_CANSENDMESSAGE || next.session != *(long *)(&sock->driverdata))
net_vcr.c:	*(long *)(&sock->driverdata) = next.session;
net_vcr.c:	Sys_FileRead (vcrFile, sock->address, NET_NAMELEN);
net_vcr.h:Copyright (C) 1996-1997 Id Software, Inc.
net_vcr.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_win.c:Copyright (C) 1996-1997 Id Software, Inc.
net_win.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_wins.c:Copyright (C) 1996-1997 Id Software, Inc.
net_wins.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_wins.c:static int net_acceptsocket = -1;		// socket for fielding new connections
net_wins.c:	if ((Sys_FloatTime() - blocktime) > 2.0)
net_wins.c:	myAddr = *(int *)local->h_addr_list[0];
net_wins.c:		return -1;
net_wins.c:		return -1;
net_wins.c:	if (COM_CheckParm ("-noudp"))
net_wins.c:		return -1;
net_wins.c:			return -1;
net_wins.c:		if (--winsock_initialized == 0)
net_wins.c:		return -1;
net_wins.c:	i = COM_CheckParm ("-ip");
net_wins.c:		if (i < com_argc-1)
net_wins.c:			Sys_Error ("NET_Init: you must specify an IP address after -ip");
net_wins.c:	if ((net_controlsocket = WINS_OpenSocket (0)) == -1)
net_wins.c:		if (--winsock_initialized == 0)
net_wins.c:		return -1;
net_wins.c:	((struct sockaddr_in *)&broadcastaddr)->sin_family = AF_INET;
net_wins.c:	((struct sockaddr_in *)&broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST;
net_wins.c:	((struct sockaddr_in *)&broadcastaddr)->sin_port = htons((unsigned short)net_hostport);
net_wins.c:	if (--winsock_initialized == 0)
net_wins.c:		if (net_acceptsocket != -1)
net_wins.c:		if ((net_acceptsocket = WINS_OpenSocket (net_hostport)) == -1)
net_wins.c:	if (net_acceptsocket == -1)
net_wins.c:	net_acceptsocket = -1;
net_wins.c:	if ((newsocket = psocket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
net_wins.c:		return -1;
net_wins.c:	if (pioctlsocket (newsocket, FIONBIO, &_true) == -1)
net_wins.c:	return -1;
net_wins.c:	mask=-1;
net_wins.c:		  num = num*10 + *b++ - '0';
net_wins.c:		  	return -1;
net_wins.c:			return -1;
net_wins.c:			return -1;
net_wins.c:	hostaddr->sa_family = AF_INET;
net_wins.c:	((struct sockaddr_in *)hostaddr)->sin_port = htons((short)port);	
net_wins.c:	((struct sockaddr_in *)hostaddr)->sin_addr.s_addr = (myAddr & htonl(mask)) | htonl(addr);
net_wins.c:	if (net_acceptsocket == -1)
net_wins.c:		return -1;
net_wins.c:	return -1;
net_wins.c:	if (ret == -1)
net_wins.c:		return -1;
net_wins.c:		if (ret == -1)
net_wins.c:	if (ret == -1)
net_wins.c:	haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr);
net_wins.c:	sprintf(buffer, "%d.%d.%d.%d:%d", (haddr >> 24) & 0xff, (haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff, ntohs(((struct sockaddr_in *)addr)->sin_port));
net_wins.c:	addr->sa_family = AF_INET;
net_wins.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = htonl(ipaddr);
net_wins.c:	((struct sockaddr_in *)addr)->sin_port = htons((unsigned short)hp);
net_wins.c:	a = ((struct sockaddr_in *)addr)->sin_addr.s_addr;
net_wins.c:		((struct sockaddr_in *)addr)->sin_addr.s_addr = myAddr;
net_wins.c:	hostentry = pgethostbyaddr ((char *)&((struct sockaddr_in *)addr)->sin_addr, sizeof(struct in_addr), AF_INET);
net_wins.c:		Q_strncpy (name, (char *)hostentry->h_name, NET_NAMELEN - 1);
net_wins.c:		return -1;
net_wins.c:	addr->sa_family = AF_INET;
net_wins.c:	((struct sockaddr_in *)addr)->sin_port = htons((unsigned short)net_hostport);	
net_wins.c:	((struct sockaddr_in *)addr)->sin_addr.s_addr = *(int *)hostentry->h_addr_list[0];
net_wins.c:	if (addr1->sa_family != addr2->sa_family)
net_wins.c:		return -1;
net_wins.c:	if (((struct sockaddr_in *)addr1)->sin_addr.s_addr != ((struct sockaddr_in *)addr2)->sin_addr.s_addr)
net_wins.c:		return -1;
net_wins.c:	if (((struct sockaddr_in *)addr1)->sin_port != ((struct sockaddr_in *)addr2)->sin_port)
net_wins.c:	return ntohs(((struct sockaddr_in *)addr)->sin_port);
net_wins.c:	((struct sockaddr_in *)addr)->sin_port = htons((unsigned short)port);
net_wins.h:Copyright (C) 1996-1997 Id Software, Inc.
net_wins.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_wipx.c:Copyright (C) 1996-1997 Id Software, Inc.
net_wipx.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
net_wipx.c:static int net_acceptsocket = -1;		// socket for fielding new connections
net_wipx.c:	if (COM_CheckParm ("-noipx"))
net_wipx.c:		return -1;
net_wipx.c:		return -1;
net_wipx.c:			return -1;
net_wipx.c:	if ((net_controlsocket = WIPX_OpenSocket (0)) == -1)
net_wipx.c:		if (--winsock_initialized == 0)
net_wipx.c:		return -1;
net_wipx.c:	((struct sockaddr_ipx *)&broadcastaddr)->sa_family = AF_IPX;
net_wipx.c:	memset(((struct sockaddr_ipx *)&broadcastaddr)->sa_netnum, 0, 4);
net_wipx.c:	memset(((struct sockaddr_ipx *)&broadcastaddr)->sa_nodenum, 0xff, 6);
net_wipx.c:	((struct sockaddr_ipx *)&broadcastaddr)->sa_socket = htons((unsigned short)net_hostport);
net_wipx.c:	if (--winsock_initialized == 0)
net_wipx.c:		if (net_acceptsocket != -1)
net_wipx.c:		if ((net_acceptsocket = WIPX_OpenSocket (net_hostport)) == -1)
net_wipx.c:	if (net_acceptsocket == -1)
net_wipx.c:	net_acceptsocket = -1;
net_wipx.c:		return -1;
net_wipx.c:		return -1;
net_wipx.c:	if (pioctlsocket (newsocket, FIONBIO, &_true) == -1)
net_wipx.c:	return -1;
net_wipx.c:	if (net_acceptsocket == -1)
net_wipx.c:		return -1;
net_wipx.c:	if (pioctlsocket (ipxsocket[net_acceptsocket], FIONREAD, &available) == -1)
net_wipx.c:	return -1;
net_wipx.c:	if (ret == -1)
net_wipx.c:	ret -= 4;
net_wipx.c:	if (ret == -1)
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_netnum[0] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_netnum[1] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_netnum[2] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_netnum[3] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_nodenum[0] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_nodenum[1] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_nodenum[2] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_nodenum[3] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_nodenum[4] & 0xff,
net_wipx.c:		((struct sockaddr_ipx *)addr)->sa_nodenum[5] & 0xff,
net_wipx.c:		ntohs(((struct sockaddr_ipx *)addr)->sa_socket)
net_wipx.c:	addr->sa_family = AF_IPX;
net_wipx.c:		return -1;	\
net_wipx.c:	((struct sockaddr_ipx *)addr)->dest = val
net_wipx.c:	((struct sockaddr_ipx *)addr)->sa_socket = htons((unsigned short)val);
net_wipx.c:	return -1;
net_wipx.c:	if (addr1->sa_family != addr2->sa_family)
net_wipx.c:		return -1;
net_wipx.c:	if (*((struct sockaddr_ipx *)addr1)->sa_netnum && *((struct sockaddr_ipx *)addr2)->sa_netnum)
net_wipx.c:		if (memcmp(((struct sockaddr_ipx *)addr1)->sa_netnum, ((struct sockaddr_ipx *)addr2)->sa_netnum, 4) != 0)
net_wipx.c:			return -1;
net_wipx.c:	if (memcmp(((struct sockaddr_ipx *)addr1)->sa_nodenum, ((struct sockaddr_ipx *)addr2)->sa_nodenum, 6) != 0)
net_wipx.c:		return -1;
net_wipx.c:	if (((struct sockaddr_ipx *)addr1)->sa_socket != ((struct sockaddr_ipx *)addr2)->sa_socket)
net_wipx.c:	return ntohs(((struct sockaddr_ipx *)addr)->sa_socket);
net_wipx.c:	((struct sockaddr_ipx *)addr)->sa_socket = htons((unsigned short)port);
net_wipx.h:Copyright (C) 1996-1997 Id Software, Inc.
net_wipx.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
nonintel.c:Copyright (C) 1996-1997 Id Software, Inc.
nonintel.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
nonintel.c:// nonintel.c: code for non-Intel processors only
pr_cmds.c:Copyright (C) 1996-1997 Id Software, Inc.
pr_cmds.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
pr_cmds.c:						BUILT-IN FUNCTIONS
pr_cmds.c:	,pr_strings + pr_xfunction->s_name,s);
pr_cmds.c:	ed = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	,pr_strings + pr_xfunction->s_name,s);
pr_cmds.c:	ed = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	AngleVectors (G_VECTOR(OFS_PARM0), pr_global_struct->v_forward, pr_global_struct->v_right, pr_global_struct->v_up);
pr_cmds.c:	VectorCopy (org, e->v.origin);
pr_cmds.c:		angles = e->v.angles;
pr_cmds.c:		yvector[0] = -sin(a);
pr_cmds.c:		rmax[0] = rmax[1] = rmax[2] = -9999;
pr_cmds.c:	VectorCopy (rmin, e->v.mins);
pr_cmds.c:	VectorCopy (rmax, e->v.maxs);
pr_cmds.c:	VectorSubtract (max, min, e->v.size);
pr_cmds.c:	e->v.model = m - pr_strings;
pr_cmds.c:	e->v.modelindex = i; //SV_ModelIndex (m);
pr_cmds.c:	mod = sv.models[ (int)e->v.modelindex];  // Mod_ForName (m, true);
pr_cmds.c:		SetMinMaxSize (e, mod->mins, mod->maxs, true);
pr_cmds.c:		Con_Printf ("tried to sprint to a non-client\n");
pr_cmds.c:	client = &svs.clients[entnum-1];
pr_cmds.c:	MSG_WriteChar (&client->message,svc_print);
pr_cmds.c:	MSG_WriteString (&client->message, s );
pr_cmds.c:		Con_Printf ("tried to sprint to a non-client\n");
pr_cmds.c:	client = &svs.clients[entnum-1];
pr_cmds.c:	MSG_WriteChar (&client->message,svc_centerprint);
pr_cmds.c:	MSG_WriteString (&client->message, s );
pr_cmds.c:Channel 0 is an auto-allocate channel, the others override anything
pr_cmds.c:*(int *)-4 = 0;	// dump to debugger
pr_cmds.c:	pr_global_struct->trace_allsolid = trace.allsolid;
pr_cmds.c:	pr_global_struct->trace_startsolid = trace.startsolid;
pr_cmds.c:	pr_global_struct->trace_fraction = trace.fraction;
pr_cmds.c:	pr_global_struct->trace_inwater = trace.inwater;
pr_cmds.c:	pr_global_struct->trace_inopen = trace.inopen;
pr_cmds.c:	VectorCopy (trace.endpos, pr_global_struct->trace_endpos);
pr_cmds.c:	VectorCopy (trace.plane.normal, pr_global_struct->trace_plane_normal);
pr_cmds.c:	pr_global_struct->trace_plane_dist =  trace.plane.dist;	
pr_cmds.c:		pr_global_struct->trace_ent = EDICT_TO_PROG(trace.ent);
pr_cmds.c:		pr_global_struct->trace_ent = EDICT_TO_PROG(sv.edicts);
pr_cmds.c:	pr_global_struct->trace_allsolid = trace.allsolid;
pr_cmds.c:	pr_global_struct->trace_startsolid = trace.startsolid;
pr_cmds.c:	pr_global_struct->trace_fraction = trace.fraction;
pr_cmds.c:	pr_global_struct->trace_inwater = trace.inwater;
pr_cmds.c:	pr_global_struct->trace_inopen = trace.inopen;
pr_cmds.c:	VectorCopy (trace.endpos, pr_global_struct->trace_endpos);
pr_cmds.c:	VectorCopy (trace.plane.normal, pr_global_struct->trace_plane_normal);
pr_cmds.c:	pr_global_struct->trace_plane_dist =  trace.plane.dist;	
pr_cmds.c:		pr_global_struct->trace_ent = EDICT_TO_PROG(trace.ent);
pr_cmds.c:		pr_global_struct->trace_ent = EDICT_TO_PROG(sv.edicts);
pr_cmds.c:		if (ent->free)
pr_cmds.c:		if (ent->v.health <= 0)
pr_cmds.c:		if ((int)ent->v.flags & FL_NOTARGET)
pr_cmds.c:	VectorAdd (ent->v.origin, ent->v.view_ofs, org);
pr_cmds.c:	memcpy (checkpvs, pvs, (sv.worldmodel->numleafs+7)>>3 );
pr_cmds.c:	if (sv.time - sv.lastchecktime >= 0.1)
pr_cmds.c:	if (ent->free || ent->v.health <= 0)
pr_cmds.c:	self = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	VectorAdd (self->v.origin, self->v.view_ofs, view);
pr_cmds.c:	l = (leaf - sv.worldmodel->leafs) - 1;
pr_cmds.c:	host_client = &svs.clients[entnum-1];
pr_cmds.c:		if (ent->free)
pr_cmds.c:		if (ent->v.solid == SOLID_NOT)
pr_cmds.c:			eorg[j] = org[j] - (ent->v.origin[j] + (ent->v.mins[j] + ent->v.maxs[j])*0.5);			
pr_cmds.c:		ent->v.chain = EDICT_TO_PROG(chain);
pr_cmds.c:	G_INT(OFS_RETURN) = pr_string_temp - pr_strings;
pr_cmds.c:	G_INT(OFS_RETURN) = pr_string_temp - pr_strings;
pr_cmds.c:	G_INT(OFS_RETURN) = pr_string_temp - pr_strings;
pr_cmds.c:		if (ed->free)
pr_cmds.c:			ed->v.chain = EDICT_TO_PROG(last);
pr_cmds.c:			first->v.chain = last->v.chain;
pr_cmds.c:			first->v.chain = EDICT_TO_PROG(last);
pr_cmds.c:		last->v.chain = EDICT_TO_PROG((edict_t *)sv.edicts);
pr_cmds.c:			second->v.chain = EDICT_TO_PROG(last);
pr_cmds.c:		if (ed->free)
pr_cmds.c:	ent = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	if ( !( (int)ent->v.flags & (FL_ONGROUND|FL_FLY|FL_SWIM) ) )
pr_cmds.c:	oldself = pr_global_struct->self;
pr_cmds.c:	pr_global_struct->self = oldself;
pr_cmds.c:	ent = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	VectorCopy (ent->v.origin, end);
pr_cmds.c:	end[2] -= 256;
pr_cmds.c:	trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, false, ent);
pr_cmds.c:		VectorCopy (trace.endpos, ent->v.origin);
pr_cmds.c:		ent->v.flags = (int)ent->v.flags | FL_ONGROUND;
pr_cmds.c:		ent->v.groundentity = EDICT_TO_PROG(trace.ent);
pr_cmds.c:		if (client->active || client->spawned)
pr_cmds.c:			MSG_WriteChar (&client->message, svc_lightstyle);
pr_cmds.c:			MSG_WriteChar (&client->message,style);
pr_cmds.c:			MSG_WriteString (&client->message, val);
pr_cmds.c:		G_FLOAT(OFS_RETURN) = (int)(f - 0.5);
pr_cmds.c:		if (!ent->free)
pr_cmds.c:	VectorCopy (ent->v.origin, start);
pr_cmds.c:	VectorCopy (pr_global_struct->v_forward, dir);
pr_cmds.c:	if (tr.ent && tr.ent->v.takedamage == DAMAGE_AIM
pr_cmds.c:	&& (!teamplay.value || ent->v.team <=0 || ent->v.team != tr.ent->v.team) )
pr_cmds.c:		VectorCopy (pr_global_struct->v_forward, G_VECTOR(OFS_RETURN));
pr_cmds.c:		if (check->v.takedamage != DAMAGE_AIM)
pr_cmds.c:		if (teamplay.value && ent->v.team > 0 && ent->v.team == check->v.team)
pr_cmds.c:			end[j] = check->v.origin[j]
pr_cmds.c:			+ 0.5*(check->v.mins[j] + check->v.maxs[j]);
pr_cmds.c:		dist = DotProduct (dir, pr_global_struct->v_forward);
pr_cmds.c:		VectorSubtract (bestent->v.origin, ent->v.origin, dir);
pr_cmds.c:		dist = DotProduct (dir, pr_global_struct->v_forward);
pr_cmds.c:		VectorScale (pr_global_struct->v_forward, dist, end);
pr_cmds.c:	ent = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	current = anglemod( ent->v.angles[1] );
pr_cmds.c:	ideal = ent->v.ideal_yaw;
pr_cmds.c:	speed = ent->v.yaw_speed;
pr_cmds.c:	move = ideal - current;
pr_cmds.c:			move = move - 360;
pr_cmds.c:		if (move <= -180)
pr_cmds.c:		if (move < -speed)
pr_cmds.c:			move = -speed;
pr_cmds.c:	ent->v.angles[1] = anglemod (current + move);
pr_cmds.c:	current = anglemod( ent->v.angles[0] );
pr_cmds.c:	ideal = ent->v.idealpitch;
pr_cmds.c:	speed = ent->v.pitch_speed;
pr_cmds.c:	move = ideal - current;
pr_cmds.c:			move = move - 360;
pr_cmds.c:		if (move <= -180)
pr_cmds.c:		if (move < -speed)
pr_cmds.c:			move = -speed;
pr_cmds.c:	ent->v.angles[0] = anglemod (current + move);
pr_cmds.c:		ent = PROG_TO_EDICT(pr_global_struct->msg_entity);
pr_cmds.c:		return &svs.clients[entnum-1].message;
pr_cmds.c:	MSG_WriteByte (&sv.signon, SV_ModelIndex(pr_strings + ent->v.model));
pr_cmds.c:	MSG_WriteByte (&sv.signon, ent->v.frame);
pr_cmds.c:	MSG_WriteByte (&sv.signon, ent->v.colormap);
pr_cmds.c:	MSG_WriteByte (&sv.signon, ent->v.skin);
pr_cmds.c:		MSG_WriteCoord(&sv.signon, ent->v.origin[i]);
pr_cmds.c:		MSG_WriteAngle(&sv.signon, ent->v.angles[i]);
pr_cmds.c:	client = svs.clients + (i-1);
pr_cmds.c:		(&pr_global_struct->parm1)[i] = client->spawn_parms[i];
pr_cmds.c:	if ((int)pr_global_struct->serverflags & (SFL_NEW_UNIT | SFL_NEW_EPISODE))
pr_cmds.c:#define	CONTENT_WATER	-3
pr_cmds.c:#define CONTENT_SLIME	-4
pr_cmds.c:#define CONTENT_LAVA	-5
pr_cmds.c:	self = PROG_TO_EDICT(pr_global_struct->self);
pr_cmds.c:	if (self->v.movetype == MOVETYPE_NOCLIP)
pr_cmds.c:		self->v.air_finished = sv.time + 12;
pr_cmds.c:	if (self->v.health < 0)
pr_cmds.c:	if (self->v.deadflag == DEAD_NO)
pr_cmds.c:	flags = (int)self->v.flags;
pr_cmds.c:	waterlevel = (int)self->v.waterlevel;
pr_cmds.c:	watertype = (int)self->v.watertype;
pr_cmds.c:			if (self->v.air_finished < sv.time)
pr_cmds.c:				if (self->v.pain_finished < sv.time)
pr_cmds.c:					self->v.dmg = self->v.dmg + 2;
pr_cmds.c:					if (self->v.dmg > 15)
pr_cmds.c:						self->v.dmg = 10;
pr_cmds.c:					damage = self->v.dmg;
pr_cmds.c:					self->v.pain_finished = sv.time + 1.0;
pr_cmds.c:			if (self->v.air_finished < sv.time)
pr_cmds.c:			else if (self->v.air_finished < sv.time + 9)
pr_cmds.c:			self->v.air_finished = sv.time + 12.0;
pr_cmds.c:			self->v.dmg = 2;
pr_cmds.c:			self->v.flags = (float)(flags &~FL_INWATER);
pr_cmds.c:		self->v.air_finished = sv.time + 12.0;
pr_cmds.c:			if (self->v.dmgtime < sv.time)
pr_cmds.c:				if (self->v.radsuit_finished < sv.time)
pr_cmds.c:					self->v.dmgtime = sv.time + 0.2;
pr_cmds.c:					self->v.dmgtime = sv.time + 1.0;
pr_cmds.c:			if (self->v.dmgtime < sv.time && self->v.radsuit_finished < sv.time)
pr_cmds.c:				self->v.dmgtime = sv.time + 1.0;
pr_cmds.c:		self->v.flags = (float)(flags | FL_INWATER);
pr_cmds.c:		self->v.dmgtime = 0;
pr_cmds.c://		self.velocity = self.velocity - 0.8*self.waterlevel*frametime*self.velocity;
pr_cmds.c:		VectorMA (self->v.velocity, -0.8 * self->v.waterlevel * host_frametime, self->v.velocity, self->v.velocity);
pr_comp.h:Copyright (C) 1996-1997 Id Software, Inc.
pr_comp.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
pr_edict.c:Copyright (C) 1996-1997 Id Software, Inc.
pr_edict.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
pr_edict.c:// sv_edict.c -- entity dictionary
pr_edict.c:	memset (&e->v, 0, progs->entityfields * 4);
pr_edict.c:	e->free = false;
pr_edict.c:		if (e->free && ( e->freetime < 2 || sv.time - e->freetime > 0.5 ) )
pr_edict.c:	ed->free = true;
pr_edict.c:	ed->v.model = 0;
pr_edict.c:	ed->v.takedamage = 0;
pr_edict.c:	ed->v.modelindex = 0;
pr_edict.c:	ed->v.colormap = 0;
pr_edict.c:	ed->v.skin = 0;
pr_edict.c:	ed->v.frame = 0;
pr_edict.c:	VectorCopy (vec3_origin, ed->v.origin);
pr_edict.c:	VectorCopy (vec3_origin, ed->v.angles);
pr_edict.c:	ed->v.nextthink = -1;
pr_edict.c:	ed->v.solid = 0;
pr_edict.c:	ed->freetime = sv.time;
pr_edict.c:	for (i=0 ; i<progs->numglobaldefs ; i++)
pr_edict.c:		if (def->ofs == ofs)
pr_edict.c:	for (i=0 ; i<progs->numfielddefs ; i++)
pr_edict.c:		if (def->ofs == ofs)
pr_edict.c:	for (i=0 ; i<progs->numfielddefs ; i++)
pr_edict.c:		if (!strcmp(pr_strings + def->s_name,name) )
pr_edict.c:	for (i=0 ; i<progs->numglobaldefs ; i++)
pr_edict.c:		if (!strcmp(pr_strings + def->s_name,name) )
pr_edict.c:	for (i=0 ; i<progs->numfunctions ; i++)
pr_edict.c:		if (!strcmp(pr_strings + func->s_name,name) )
pr_edict.c:	return (eval_t *)((char *)&ed->v + def->ofs*4);
pr_edict.c:		sprintf (line, "%s", pr_strings + val->string);
pr_edict.c:		sprintf (line, "entity %i", NUM_FOR_EDICT(PROG_TO_EDICT(val->edict)) );
pr_edict.c:		f = pr_functions + val->function;
pr_edict.c:		sprintf (line, "%s()", pr_strings + f->s_name);
pr_edict.c:		def = ED_FieldAtOfs ( val->_int );
pr_edict.c:		sprintf (line, ".%s", pr_strings + def->s_name);
pr_edict.c:		sprintf (line, "%5.1f", val->_float);
pr_edict.c:		sprintf (line, "'%5.1f %5.1f %5.1f'", val->vector[0], val->vector[1], val->vector[2]);
pr_edict.c:		sprintf (line, "%s", pr_strings + val->string);
pr_edict.c:		sprintf (line, "%i", NUM_FOR_EDICT(PROG_TO_EDICT(val->edict)));
pr_edict.c:		f = pr_functions + val->function;
pr_edict.c:		sprintf (line, "%s", pr_strings + f->s_name);
pr_edict.c:		def = ED_FieldAtOfs ( val->_int );
pr_edict.c:		sprintf (line, "%s", pr_strings + def->s_name);
pr_edict.c:		sprintf (line, "%f", val->_float);
pr_edict.c:		sprintf (line, "%f %f %f", val->vector[0], val->vector[1], val->vector[2]);
pr_edict.c:		s = PR_ValueString (def->type, val);
pr_edict.c:		sprintf (line,"%i(%s)%s", ofs, pr_strings + def->s_name, s);
pr_edict.c:		sprintf (line,"%i(%s)", ofs, pr_strings + def->s_name);
pr_edict.c:	if (ed->free)
pr_edict.c:	for (i=1 ; i<progs->numfielddefs ; i++)
pr_edict.c:		name = pr_strings + d->s_name;
pr_edict.c:		if (name[strlen(name)-2] == '_')
pr_edict.c:		v = (int *)((char *)&ed->v + d->ofs*4);
pr_edict.c:		type = d->type & ~DEF_SAVEGLOBAL;
pr_edict.c:		Con_Printf ("%s\n", PR_ValueString(d->type, (eval_t *)v));		
pr_edict.c:	if (ed->free)
pr_edict.c:	for (i=1 ; i<progs->numfielddefs ; i++)
pr_edict.c:		name = pr_strings + d->s_name;
pr_edict.c:		if (name[strlen(name)-2] == '_')
pr_edict.c:		v = (int *)((char *)&ed->v + d->ofs*4);
pr_edict.c:		type = d->type & ~DEF_SAVEGLOBAL;
pr_edict.c:		fprintf (f,"\"%s\"\n", PR_UglyValueString(d->type, (eval_t *)v));		
pr_edict.c:		if (ent->free)
pr_edict.c:		if (ent->v.solid)
pr_edict.c:		if (ent->v.model)
pr_edict.c:		if (ent->v.movetype == MOVETYPE_STEP)
pr_edict.c:	for (i=0 ; i<progs->numglobaldefs ; i++)
pr_edict.c:		type = def->type;
pr_edict.c:		if ( !(def->type & DEF_SAVEGLOBAL) )
pr_edict.c:		name = pr_strings + def->s_name;		
pr_edict.c:		fprintf (f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));		
pr_edict.c:		if (string[i] == '\\' && i < l-1)
pr_edict.c:	d = (void *)((int *)base + key->ofs);
pr_edict.c:	switch (key->type & ~DEF_SAVEGLOBAL)
pr_edict.c:		*(string_t *)d = ED_NewString (s) - pr_strings;
pr_edict.c:		*(int *)d = G_INT(def->ofs);
pr_edict.c:		*(func_t *)d = func - pr_functions;
pr_edict.c:		memset (&ent->v, 0, progs->entityfields * 4);
pr_edict.c:		while (n && keyname[n-1] == ' ')
pr_edict.c:			keyname[n-1] = 0;
pr_edict.c:			n--;
pr_edict.c:		if (!ED_ParseEpair ((void *)&ent->v, key, com_token))
pr_edict.c:		ent->free = true;
pr_edict.c:	pr_global_struct->time = sv.time;
pr_edict.c:			if (((int)ent->v.spawnflags & SPAWNFLAG_NOT_DEATHMATCH))
pr_edict.c:		else if ((current_skill == 0 && ((int)ent->v.spawnflags & SPAWNFLAG_NOT_EASY))
pr_edict.c:				|| (current_skill == 1 && ((int)ent->v.spawnflags & SPAWNFLAG_NOT_MEDIUM))
pr_edict.c:				|| (current_skill >= 2 && ((int)ent->v.spawnflags & SPAWNFLAG_NOT_HARD)) )
pr_edict.c:		if (!ent->v.classname)
pr_edict.c:		func = ED_FindFunction ( pr_strings + ent->v.classname );
pr_edict.c:		pr_global_struct->self = EDICT_TO_PROG(ent);
pr_edict.c:		PR_ExecuteProgram (func - pr_functions);
pr_edict.c:// flush the non-C variable lookup cache
pr_edict.c:	if (progs->version != PROG_VERSION)
pr_edict.c:		Sys_Error ("progs.dat has wrong version number (%i should be %i)", progs->version, PROG_VERSION);
pr_edict.c:	if (progs->crc != PROGHEADER_CRC)
pr_edict.c:	pr_functions = (dfunction_t *)((byte *)progs + progs->ofs_functions);
pr_edict.c:	pr_strings = (char *)progs + progs->ofs_strings;
pr_edict.c:	pr_globaldefs = (ddef_t *)((byte *)progs + progs->ofs_globaldefs);
pr_edict.c:	pr_fielddefs = (ddef_t *)((byte *)progs + progs->ofs_fielddefs);
pr_edict.c:	pr_statements = (dstatement_t *)((byte *)progs + progs->ofs_statements);
pr_edict.c:	pr_global_struct = (globalvars_t *)((byte *)progs + progs->ofs_globals);
pr_edict.c:	pr_edict_size = progs->entityfields * 4 + sizeof (edict_t) - sizeof(entvars_t);
pr_edict.c:	for (i=0 ; i<progs->numstatements ; i++)
pr_edict.c:	for (i=0 ; i<progs->numfunctions; i++)
pr_edict.c:	for (i=0 ; i<progs->numglobaldefs ; i++)
pr_edict.c:	for (i=0 ; i<progs->numfielddefs ; i++)
pr_edict.c:	for (i=0 ; i<progs->numglobals ; i++)
pr_edict.c:	b = (byte *)e - (byte *)sv.edicts;
pr_exec.c:Copyright (C) 1996-1997 Id Software, Inc.
pr_exec.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
pr_exec.c:	if ( (unsigned)s->op < sizeof(pr_opnames)/sizeof(pr_opnames[0]))
pr_exec.c:		Con_Printf ("%s ",  pr_opnames[s->op]);
pr_exec.c:		i = strlen(pr_opnames[s->op]);
pr_exec.c:	if (s->op == OP_IF || s->op == OP_IFNOT)
pr_exec.c:		Con_Printf ("%sbranch %i",PR_GlobalString(s->a),s->b);
pr_exec.c:	else if (s->op == OP_GOTO)
pr_exec.c:		Con_Printf ("branch %i",s->a);
pr_exec.c:	else if ( (unsigned)(s->op - OP_STORE_F) < 6)
pr_exec.c:		Con_Printf ("%s",PR_GlobalString(s->a));
pr_exec.c:		Con_Printf ("%s", PR_GlobalStringNoContents(s->b));
pr_exec.c:		if (s->a)
pr_exec.c:			Con_Printf ("%s",PR_GlobalString(s->a));
pr_exec.c:		if (s->b)
pr_exec.c:			Con_Printf ("%s",PR_GlobalString(s->b));
pr_exec.c:		if (s->c)
pr_exec.c:			Con_Printf ("%s", PR_GlobalStringNoContents(s->c));
pr_exec.c:	for (i=pr_depth ; i>=0 ; i--)
pr_exec.c:			Con_Printf ("%12s : %s\n", pr_strings + f->s_file, pr_strings + f->s_name);		
pr_exec.c:		for (i=0 ; i<progs->numfunctions ; i++)
pr_exec.c:			if (f->profile > max)
pr_exec.c:				max = f->profile;
pr_exec.c:				Con_Printf ("%7i %s\n", best->profile, pr_strings+best->s_name);
pr_exec.c:			best->profile = 0;
pr_exec.c:	c = f->locals;
pr_exec.c:		localstack[localstack_used+i] = ((int *)pr_globals)[f->parm_start + i];
pr_exec.c:	o = f->parm_start;
pr_exec.c:	for (i=0 ; i<f->numparms ; i++)
pr_exec.c:		for (j=0 ; j<f->parm_size[i] ; j++)
pr_exec.c:	return f->first_statement - 1;	// offset the s++
pr_exec.c:	c = pr_xfunction->locals;
pr_exec.c:	localstack_used -= c;
pr_exec.c:		((int *)pr_globals)[pr_xfunction->parm_start + i] = localstack[localstack_used+i];
pr_exec.c:	pr_depth--;
pr_exec.c:	if (!fnum || fnum >= progs->numfunctions)
pr_exec.c:		if (pr_global_struct->self)
pr_exec.c:			ED_Print (PROG_TO_EDICT(pr_global_struct->self));
pr_exec.c:	a = (eval_t *)&pr_globals[st->a];
pr_exec.c:	b = (eval_t *)&pr_globals[st->b];
pr_exec.c:	c = (eval_t *)&pr_globals[st->c];
pr_exec.c:	if (!--runaway)
pr_exec.c:	pr_xfunction->profile++;
pr_exec.c:	switch (st->op)
pr_exec.c:		c->_float = a->_float + b->_float;
pr_exec.c:		c->vector[0] = a->vector[0] + b->vector[0];
pr_exec.c:		c->vector[1] = a->vector[1] + b->vector[1];
pr_exec.c:		c->vector[2] = a->vector[2] + b->vector[2];
pr_exec.c:		c->_float = a->_float - b->_float;
pr_exec.c:		c->vector[0] = a->vector[0] - b->vector[0];
pr_exec.c:		c->vector[1] = a->vector[1] - b->vector[1];
pr_exec.c:		c->vector[2] = a->vector[2] - b->vector[2];
pr_exec.c:		c->_float = a->_float * b->_float;
pr_exec.c:		c->_float = a->vector[0]*b->vector[0]
pr_exec.c:				+ a->vector[1]*b->vector[1]
pr_exec.c:				+ a->vector[2]*b->vector[2];
pr_exec.c:		c->vector[0] = a->_float * b->vector[0];
pr_exec.c:		c->vector[1] = a->_float * b->vector[1];
pr_exec.c:		c->vector[2] = a->_float * b->vector[2];
pr_exec.c:		c->vector[0] = b->_float * a->vector[0];
pr_exec.c:		c->vector[1] = b->_float * a->vector[1];
pr_exec.c:		c->vector[2] = b->_float * a->vector[2];
pr_exec.c:		c->_float = a->_float / b->_float;
pr_exec.c:		c->_float = (int)a->_float & (int)b->_float;
pr_exec.c:		c->_float = (int)a->_float | (int)b->_float;
pr_exec.c:		c->_float = a->_float >= b->_float;
pr_exec.c:		c->_float = a->_float <= b->_float;
pr_exec.c:		c->_float = a->_float > b->_float;
pr_exec.c:		c->_float = a->_float < b->_float;
pr_exec.c:		c->_float = a->_float && b->_float;
pr_exec.c:		c->_float = a->_float || b->_float;
pr_exec.c:		c->_float = !a->_float;
pr_exec.c:		c->_float = !a->vector[0] && !a->vector[1] && !a->vector[2];
pr_exec.c:		c->_float = !a->string || !pr_strings[a->string];
pr_exec.c:		c->_float = !a->function;
pr_exec.c:		c->_float = (PROG_TO_EDICT(a->edict) == sv.edicts);
pr_exec.c:		c->_float = a->_float == b->_float;
pr_exec.c:		c->_float = (a->vector[0] == b->vector[0]) &&
pr_exec.c:					(a->vector[1] == b->vector[1]) &&
pr_exec.c:					(a->vector[2] == b->vector[2]);
pr_exec.c:		c->_float = !strcmp(pr_strings+a->string,pr_strings+b->string);
pr_exec.c:		c->_float = a->_int == b->_int;
pr_exec.c:		c->_float = a->function == b->function;
pr_exec.c:		c->_float = a->_float != b->_float;
pr_exec.c:		c->_float = (a->vector[0] != b->vector[0]) ||
pr_exec.c:					(a->vector[1] != b->vector[1]) ||
pr_exec.c:					(a->vector[2] != b->vector[2]);
pr_exec.c:		c->_float = strcmp(pr_strings+a->string,pr_strings+b->string);
pr_exec.c:		c->_float = a->_int != b->_int;
pr_exec.c:		c->_float = a->function != b->function;
pr_exec.c:		b->_int = a->_int;
pr_exec.c:		b->vector[0] = a->vector[0];
pr_exec.c:		b->vector[1] = a->vector[1];
pr_exec.c:		b->vector[2] = a->vector[2];
pr_exec.c:		ptr = (eval_t *)((byte *)sv.edicts + b->_int);
pr_exec.c:		ptr->_int = a->_int;
pr_exec.c:		ptr = (eval_t *)((byte *)sv.edicts + b->_int);
pr_exec.c:		ptr->vector[0] = a->vector[0];
pr_exec.c:		ptr->vector[1] = a->vector[1];
pr_exec.c:		ptr->vector[2] = a->vector[2];
pr_exec.c:		ed = PROG_TO_EDICT(a->edict);
pr_exec.c:		c->_int = (byte *)((int *)&ed->v + b->_int) - (byte *)sv.edicts;
pr_exec.c:		ed = PROG_TO_EDICT(a->edict);
pr_exec.c:		a = (eval_t *)((int *)&ed->v + b->_int);
pr_exec.c:		c->_int = a->_int;
pr_exec.c:		ed = PROG_TO_EDICT(a->edict);
pr_exec.c:		a = (eval_t *)((int *)&ed->v + b->_int);
pr_exec.c:		c->vector[0] = a->vector[0];
pr_exec.c:		c->vector[1] = a->vector[1];
pr_exec.c:		c->vector[2] = a->vector[2];
pr_exec.c:		if (!a->_int)
pr_exec.c:			s += st->b - 1;	// offset the s++
pr_exec.c:		if (a->_int)
pr_exec.c:			s += st->b - 1;	// offset the s++
pr_exec.c:		s += st->a - 1;	// offset the s++
pr_exec.c:		pr_argc = st->op - OP_CALL0;
pr_exec.c:		if (!a->function)
pr_exec.c:		newf = &pr_functions[a->function];
pr_exec.c:		if (newf->first_statement < 0)
pr_exec.c:			i = -newf->first_statement;
pr_exec.c:		pr_globals[OFS_RETURN] = pr_globals[st->a];
pr_exec.c:		pr_globals[OFS_RETURN+1] = pr_globals[st->a+1];
pr_exec.c:		pr_globals[OFS_RETURN+2] = pr_globals[st->a+2];
pr_exec.c:		ed = PROG_TO_EDICT(pr_global_struct->self);
pr_exec.c:		ed->v.nextthink = pr_global_struct->time + 0.05;
pr_exec.c:		ed->v.nextthink = pr_global_struct->time + 0.1;
pr_exec.c:		if (a->_float != ed->v.frame)
pr_exec.c:			ed->v.frame = a->_float;
pr_exec.c:		ed->v.think = b->function;
pr_exec.c:		PR_RunError ("Bad opcode %i", st->op);
progdefs.h:Copyright (C) 1996-1997 Id Software, Inc.
progdefs.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
progs.h:Copyright (C) 1996-1997 Id Software, Inc.
progs.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
progs.h://define NUM_FOR_EDICT(e) (((byte *)(e) - sv.edicts)/pr_edict_size)
progs.h:#define	EDICT_TO_PROG(e) ((byte *)e - (byte *)sv.edicts)
progs.h:#define	E_FLOAT(e,o) (((float*)&e->v)[o])
progs.h:#define	E_INT(e,o) (*(int *)&((float*)&e->v)[o])
progs.h:#define	E_VECTOR(e,o) (&((float*)&e->v)[o])
progs.h:#define	E_STRING(e,o) (pr_strings + *(string_t *)&((float*)&e->v)[o])
protocol.h:Copyright (C) 1996-1997 Id Software, Inc.
protocol.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
protocol.h:// protocol.h -- communications protocols
q.bat:dos\quake -basedir /quake -game test_gjc %1 %2 %3 %4 %5 %6 %7 %8 %9
qa.bat:dos\quake -nocdaudio -basedir /quake -game test_am %1 %2 %3 %4 %5 %6 %7 %8 %9
quake-data.spec.sh:# Generate quake-data.spec
quake-data.spec.sh:%define name quake-data
quake-data.spec.sh:%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
quake-data.spec.sh:Source:		quake-data-%{version}.tar.gz
quake-data.spec.sh:BuildRoot:	/var/tmp/%{name}-%{version}
quake-data.spec.sh:"Quake is the biggest, baddest, and bloodiest 3-D action game ever 
quake-data.spec.sh:conceived" - PC GAMER
quake-data.spec.sh:"The most important PC game ever" - PC ZONE
quake-data.spec.sh:""Quake": Bloody Amazing" - USA TODAY
quake-data.spec.sh:"The Vanguard of a terrifying new level of immersive interactivity" - 
quake-data.spec.sh:advanced 3-D experience ever captured on CD ROM.  Features free and fluid
quake-hipnotic.spec.sh:# Generate quake-hipnotic.spec
quake-hipnotic.spec.sh:%define name quake-hipnotic
quake-hipnotic.spec.sh:%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
quake-hipnotic.spec.sh:Source:		quake-hipnotic-%{version}.tar.gz
quake-hipnotic.spec.sh:BuildRoot:	/var/tmp/%{name}-%{version}
quake-hipnotic.spec.sh:monster-infested episodes. Fight your way through the intense Military 
quake-hipnotic.spec.sh:your friends apart in an all-new DeathMatch level: Edge of Oblivion.
quake-hipnotic.spec.sh:All-New Flesh-Ripping Demons
quake-hipnotic.spec.sh:Gremlins: Small, blood-thirsty creatures that attack in swarms and can even 
quake-hipnotic.spec.sh:Centroids: Armor-plated scorpion cyborgs with two nail guns fused to their 
quake-hipnotic.spec.sh:Never-Before-Seen Weapons
quake-rogue.spec.sh:# Generate quake-rogue.spec
quake-rogue.spec.sh:%define name quake-rogue
quake-rogue.spec.sh:%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
quake-rogue.spec.sh:URL:		http://www.rogue-ent.com/
quake-rogue.spec.sh:Source:		quake-rogue-%{version}.tar.gz
quake-rogue.spec.sh:BuildRoot:	/var/tmp/%{name}-%{version}
quake-rogue.spec.sh:8 new monsters! Quake is solid, hard-hitting action with a host of evil 
quake-rogue.spec.sh:that with the addition of extreme power-ups to make the arsenal more 
quake-rogue.spec.sh:Oh yeah, the Power-Ups! 
quake-rogue.spec.sh:Single player mode power-ups include:
quake-rogue.spec.sh:The Anti-Grav Belt. The theory here is simple. It counters the force of 
quake-rogue.spec.sh:Multi-player!
quake-rogue.spec.sh:dirty' devastation. CTF is one of the most exciting team multi-player 
quake-rogue.spec.sh:One Flag - It's a mad race for the flag, the loser gets a rocket up his 
quake-rogue.spec.sh:Three Team - Red, Blue, and the new Rogue (pun intended) Grey team. The good 
quake-rogue.spec.sh:The Pendulums - Set to slice the player to shreds when he least expects it! 
quake-rogue.spec.sh:Lightning Shooters - Well, they shoot lightning and can be directed at any 
quake-rogue.spec.sh:Lava Nail Shooters - Well, they shoot, you get the idea here! 
quake-rogue.spec.sh:Earthquakes - Earthshaking environments! Level areas that tremor with 
quake-rogue.spec.sh:Buzz Saws - Compact. Cordless. And completely gib-o-matic! These dreaded 
quake-shareware.spec.sh:# Generate quake-shareware.spec
quake-shareware.spec.sh:%define version ${1}-shareware
quake-shareware.spec.sh:%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
quake-shareware.spec.sh:Source:		quake-%{version}.tar.gz
quake-shareware.spec.sh:BuildRoot:	/var/tmp/%{name}-%{version}
quake-shareware.spec.sh:"Quake is the biggest, baddest, and bloodiest 3-D action game ever 
quake-shareware.spec.sh:conceived" - PC GAMER
quake-shareware.spec.sh:"The most important PC game ever" - PC ZONE
quake-shareware.spec.sh:""Quake": Bloody Amazing" - USA TODAY
quake-shareware.spec.sh:"The Vanguard of a terrifying new level of immersive interactivity" - 
quake-shareware.spec.sh:advanced 3-D experience ever captured on CD ROM.  Features free and fluid
quake-shareware.spec.sh:- SQuake for SVGALib Console Graphics
quake-shareware.spec.sh:- GLQuake for 3DFX and other glX based hardware OpenGL
quake-shareware.spec.sh:- Quake.X11 for running Quake under X11
Binary file quake.gif matches
quake.spec.sh:%define builddir \$RPM_BUILD_DIR/%{name}-%{version}
quake.spec.sh:Source:		quake-%{version}.tar.gz
quake.spec.sh:BuildRoot:	/var/tmp/%{name}-%{version}
quake.spec.sh:"Quake is the biggest, baddest, and bloodiest 3-D action game ever 
quake.spec.sh:conceived" - PC GAMER
quake.spec.sh:"The most important PC game ever" - PC ZONE
quake.spec.sh:""Quake": Bloody Amazing" - USA TODAY
quake.spec.sh:"The Vanguard of a terrifying new level of immersive interactivity" - 
quake.spec.sh:advanced 3-D experience ever captured on CD ROM.  Features free and fluid
quake.spec.sh:- SQuake for SVGALib Console Graphics
quake.spec.sh:- GLQuake for 3DFX and other glX based hardware OpenGL
quake.spec.sh:- Quake.X11 for running Quake under X11
quakeasm.h:Copyright (C) 1996-1997 Id Software, Inc.
quakeasm.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
quakedef.h:Copyright (C) 1996-1997 Id Software, Inc.
quakedef.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
quakedef.h:// quakedef.h -- primary header for client
quakedef.h:// per-level limits
quakedef.h:// Use for multiplayer testing only - VERY dangerous!!!
r_aclip.c:Copyright (C) 1996-1997 Id Software, Inc.
r_aclip.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_aclip.c:pfv0 is the unclipped vertex, pfv1 is the z-clipped vertex
r_aclip.c:	pav0 = &av[pfv0 - &fv[0][0]];
r_aclip.c:	pav1 = &av[pfv1 - &fv[0][0]];
r_aclip.c:	if (pfv0->v[1] >= pfv1->v[1])
r_aclip.c:		scale = (ALIAS_Z_CLIP_PLANE - pav0->fv[2]) /
r_aclip.c:				(pav1->fv[2] - pav0->fv[2]);
r_aclip.c:		avout.fv[0] = pav0->fv[0] + (pav1->fv[0] - pav0->fv[0]) * scale;
r_aclip.c:		avout.fv[1] = pav0->fv[1] + (pav1->fv[1] - pav0->fv[1]) * scale;
r_aclip.c:		out->v[2] =	pfv0->v[2] + (pfv1->v[2] - pfv0->v[2]) * scale;
r_aclip.c:		out->v[3] =	pfv0->v[3] + (pfv1->v[3] - pfv0->v[3]) * scale;
r_aclip.c:		out->v[4] =	pfv0->v[4] + (pfv1->v[4] - pfv0->v[4]) * scale;
r_aclip.c:		scale = (ALIAS_Z_CLIP_PLANE - pav1->fv[2]) /
r_aclip.c:				(pav0->fv[2] - pav1->fv[2]);
r_aclip.c:		avout.fv[0] = pav1->fv[0] + (pav0->fv[0] - pav1->fv[0]) * scale;
r_aclip.c:		avout.fv[1] = pav1->fv[1] + (pav0->fv[1] - pav1->fv[1]) * scale;
r_aclip.c:		out->v[2] =	pfv1->v[2] + (pfv0->v[2] - pfv1->v[2]) * scale;
r_aclip.c:		out->v[3] =	pfv1->v[3] + (pfv0->v[3] - pfv1->v[3]) * scale;
r_aclip.c:		out->v[4] =	pfv1->v[4] + (pfv0->v[4] - pfv1->v[4]) * scale;
r_aclip.c:	if (out->v[0] < r_refdef.aliasvrect.x)
r_aclip.c:		out->flags |= ALIAS_LEFT_CLIP;
r_aclip.c:	if (out->v[1] < r_refdef.aliasvrect.y)
r_aclip.c:		out->flags |= ALIAS_TOP_CLIP;
r_aclip.c:	if (out->v[0] > r_refdef.aliasvrectright)
r_aclip.c:		out->flags |= ALIAS_RIGHT_CLIP;
r_aclip.c:	if (out->v[1] > r_refdef.aliasvrectbottom)
r_aclip.c:		out->flags |= ALIAS_BOTTOM_CLIP;	
r_aclip.c:	if (pfv0->v[1] >= pfv1->v[1])
r_aclip.c:		scale = (float)(r_refdef.aliasvrect.x - pfv0->v[0]) /
r_aclip.c:				(pfv1->v[0] - pfv0->v[0]);
r_aclip.c:			out->v[i] = pfv0->v[i] + (pfv1->v[i] - pfv0->v[i])*scale + 0.5;
r_aclip.c:		scale = (float)(r_refdef.aliasvrect.x - pfv1->v[0]) /
r_aclip.c:				(pfv0->v[0] - pfv1->v[0]);
r_aclip.c:			out->v[i] = pfv1->v[i] + (pfv0->v[i] - pfv1->v[i])*scale + 0.5;
r_aclip.c:	if (pfv0->v[1] >= pfv1->v[1])
r_aclip.c:		scale = (float)(r_refdef.aliasvrectright - pfv0->v[0]) /
r_aclip.c:				(pfv1->v[0] - pfv0->v[0]);
r_aclip.c:			out->v[i] = pfv0->v[i] + (pfv1->v[i] - pfv0->v[i])*scale + 0.5;
r_aclip.c:		scale = (float)(r_refdef.aliasvrectright - pfv1->v[0]) /
r_aclip.c:				(pfv0->v[0] - pfv1->v[0]);
r_aclip.c:			out->v[i] = pfv1->v[i] + (pfv0->v[i] - pfv1->v[i])*scale + 0.5;
r_aclip.c:	if (pfv0->v[1] >= pfv1->v[1])
r_aclip.c:		scale = (float)(r_refdef.aliasvrect.y - pfv0->v[1]) /
r_aclip.c:				(pfv1->v[1] - pfv0->v[1]);
r_aclip.c:			out->v[i] = pfv0->v[i] + (pfv1->v[i] - pfv0->v[i])*scale + 0.5;
r_aclip.c:		scale = (float)(r_refdef.aliasvrect.y - pfv1->v[1]) /
r_aclip.c:				(pfv0->v[1] - pfv1->v[1]);
r_aclip.c:			out->v[i] = pfv1->v[i] + (pfv0->v[i] - pfv1->v[i])*scale + 0.5;
r_aclip.c:	if (pfv0->v[1] >= pfv1->v[1])
r_aclip.c:		scale = (float)(r_refdef.aliasvrectbottom - pfv0->v[1]) /
r_aclip.c:				(pfv1->v[1] - pfv0->v[1]);
r_aclip.c:			out->v[i] = pfv0->v[i] + (pfv1->v[i] - pfv0->v[i])*scale + 0.5;
r_aclip.c:		scale = (float)(r_refdef.aliasvrectbottom - pfv1->v[1]) /
r_aclip.c:				(pfv0->v[1] - pfv1->v[1]);
r_aclip.c:			out->v[i] = pfv1->v[i] + (pfv0->v[i] - pfv1->v[i])*scale + 0.5;
r_aclip.c:	j = count-1;
r_aclip.c:	if (ptri->facesfront)
r_aclip.c:		fv[0][0] = pfinalverts[ptri->vertindex[0]];
r_aclip.c:		fv[0][1] = pfinalverts[ptri->vertindex[1]];
r_aclip.c:		fv[0][2] = pfinalverts[ptri->vertindex[2]];
r_aclip.c:			fv[0][i] = pfinalverts[ptri->vertindex[i]];
r_aclip.c:			if (!ptri->facesfront && (fv[0][i].flags & ALIAS_ONSEAM) )
r_aclip.c:			av[i] = pauxverts[ptri->vertindex[i]];
r_aclip.c:	mtri.facesfront = ptri->facesfront;
r_aclip.c:	for (i=1 ; i<k-1 ; i++)
r_aclipa.s:Copyright (C) 1996-1997 Id Software, Inc.
r_aclipa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_aclipa.s:// x86 assembly-language Alias model transform and project code.
r_aclipa.s:	fsubr	%st(0),%st(4)	// fv0v0 | fv0v2 | fv1v1 | fv0v1 | fv1v0-fv0v0 |
r_aclipa.s:	fxch	%st(3)			// fv0v1 | fv0v2 | fv1v1 | fv0v0 | fv1v0-fv0v0 |
r_aclipa.s:	fsubr	%st(0),%st(2)	// fv0v1 | fv0v2 | fv1v1-fv0v1 | fv0v0 |
r_aclipa.s:							//  fv1v0-fv0v0 | fv1v2 | scale
r_aclipa.s:	fxch	%st(1)			// fv0v2 | fv0v1 | fv1v1-fv0v1 | fv0v0 |
r_aclipa.s:							//  fv1v0-fv0v0 | fv1v2 | scale
r_aclipa.s:	fsubr	%st(0),%st(5)	// fv0v2 | fv0v1 | fv1v1-fv0v1 | fv0v0 |
r_aclipa.s:							//  fv1v0-fv0v0 | fv1v2-fv0v2 | scale
r_aclipa.s:	fxch	%st(6)			// scale | fv0v1 | fv1v1-fv0v1 | fv0v0 |
r_aclipa.s:							//  fv1v0-fv0v0 | fv1v2-fv0v2 | fv0v2
r_aclipa.s:	fmul	%st(0),%st(4)	// scale | fv0v1 | fv1v1-fv0v1 | fv0v0 |
r_aclipa.s:							//  (fv1v0-fv0v0)*scale | fv1v2-fv0v2 | fv0v2
r_aclipa.s:	fmul	%st(0),%st(2)	// scale | fv0v1 | (fv1v1-fv0v1)*scale | fv0v0 |
r_aclipa.s:							//  (fv1v0-fv0v0)*scale | fv1v2-fv0v2 | fv0v2
r_aclipa.s:	fmul	%st(0),%st(5)	// scale | fv0v1 | (fv1v1-fv0v1)*scale | fv0v0 |
r_aclipa.s:							//  (fv1v0-fv0v0)*scale | (fv1v2-fv0v2)*scale |
r_aclipa.s:	fxch	%st(3)			// fv0v0 | fv0v1 | (fv1v1-fv0v1)*scale | scale |
r_aclipa.s:							//  (fv1v0-fv0v0)*scale | (fv1v2-fv0v2)*scale |
r_aclipa.s:	faddp	%st(0),%st(4)	// fv0v1 | (fv1v1-fv0v1)*scale | scale |
r_aclipa.s:							//  fv0v0+(fv1v0-fv0v0)*scale |
r_aclipa.s:							//  (fv1v2-fv0v2)*scale | fv0v2
r_aclipa.s:	faddp	%st(0),%st(1)	// fv0v1+(fv1v1-fv0v1)*scale | scale |
r_aclipa.s:							//  fv0v0+(fv1v0-fv0v0)*scale |
r_aclipa.s:							//  (fv1v2-fv0v2)*scale | fv0v2
r_aclipa.s:	fxch	%st(4)			// fv0v2 | scale | fv0v0+(fv1v0-fv0v0)*scale |
r_aclipa.s:							//  (fv1v2-fv0v2)*scale | fv0v1+(fv1v1-fv0v1)*scale
r_aclipa.s:	faddp	%st(0),%st(3)	// scale | fv0v0+(fv1v0-fv0v0)*scale |
r_aclipa.s:							//  fv0v2+(fv1v2-fv0v2)*scale |
r_aclipa.s:							//  fv0v1+(fv1v1-fv0v1)*scale
r_aclipa.s:	fxch	%st(1)			// fv0v0+(fv1v0-fv0v0)*scale | scale | 
r_aclipa.s:							//  fv0v2+(fv1v2-fv0v2)*scale |
r_aclipa.s:							//  fv0v1+(fv1v1-fv0v1)*scale
r_aclipa.s:	fxch	%st(3)			// fv0v1+(fv1v1-fv0v1)*scale | scale | 
r_aclipa.s:							//  fv0v2+(fv1v2-fv0v2)*scale |
r_aclipa.s:							//  fv0v0+(fv1v0-fv0v0)*scale
r_aclipa.s:	fxch	%st(2)			// fv0v2+(fv1v2-fv0v2)*scale | scale | 
r_aclipa.s:							//  fv0v1+(fv1v1-fv0v1)*scale |
r_aclipa.s:							//  fv0v0+(fv1v0-fv0v0)*scale
r_aclipa.s:	fxch	%st(3)			// fv0v0+(fv1v0-fv0v0)*scale | scale | 
r_aclipa.s:							//  fv0v1+(fv1v1-fv0v1)*scale |
r_aclipa.s:							//  fv0v2+(fv1v2-fv0v2)*scale
r_aclipa.s:	fistpl	fv_v+0-12(%edx)	// scale | fv0v1+(fv1v1-fv0v1)*scale |
r_aclipa.s:							//  fv0v2+(fv1v2-fv0v2)*scale
r_aclipa.s:	fxch	%st(1)			// fv0v1+(fv1v1-fv0v1)*scale | scale |
r_aclipa.s:							//  fv0v2+(fv1v2-fv0v2)*scale | scale
r_aclipa.s:	fistpl	fv_v+4-12(%edx)	// scale | fv0v2+(fv1v2-fv0v2)*scale
r_aclipa.s:	fxch	%st(1)			// fv0v2+(fv1v2-fv0v2)*sc | scale
r_aclipa.s:	fistpl	fv_v+8-12(%edx)	// scale
r_alias.c:Copyright (C) 1996-1997 Id Software, Inc.
r_alias.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_alias.c:							//  need for inner-loop light clamping
r_alias.c:	currententity->trivial_accept = 0;
r_alias.c:	pmodel = currententity->model;
r_alias.c:	pmdl = (mdl_t *)((byte *)pahdr + pahdr->model);
r_alias.c:	frame = currententity->frame;
r_alias.c:	if ((frame >= pmdl->numframes) || (frame < 0))
r_alias.c:				pmodel->name);
r_alias.c:	pframedesc = &pahdr->frames[frame];
r_alias.c:			(float)pframedesc->bboxmin.v[0];
r_alias.c:			(float)pframedesc->bboxmax.v[0];
r_alias.c:			(float)pframedesc->bboxmin.v[1];
r_alias.c:			(float)pframedesc->bboxmax.v[1];
r_alias.c:			(float)pframedesc->bboxmin.v[2];
r_alias.c:			(float)pframedesc->bboxmax.v[2];
r_alias.c:		return false;	// everything was near-z-clipped
r_alias.c:			if (pv0->flags ^ pv1->flags)
r_alias.c:				frac = (ALIAS_Z_CLIP_PLANE - pa0->fv[2]) /
r_alias.c:					   (pa1->fv[2] - pa0->fv[2]);
r_alias.c:				viewaux[numv].fv[0] = pa0->fv[0] +
r_alias.c:						(pa1->fv[0] - pa0->fv[0]) * frac;
r_alias.c:				viewaux[numv].fv[1] = pa0->fv[1] +
r_alias.c:						(pa1->fv[1] - pa0->fv[1]) * frac;
r_alias.c:	// we don't need to bother with vertices that were z-clipped
r_alias.c:	currententity->trivial_accept = !anyclip & !zclipped;
r_alias.c:	if (currententity->trivial_accept)
r_alias.c:		if (minz > (r_aliastransition + (pmdl->size * r_resfudge)))
r_alias.c:			currententity->trivial_accept |= 2;
r_alias.c:	pstverts = (stvert_t *)((byte *)paliashdr + paliashdr->stverts);
r_alias.c:	r_anumverts = pmdl->numverts;
r_alias.c:		if (av->fv[2] < ALIAS_Z_CLIP_PLANE)
r_alias.c:			fv->flags |= ALIAS_Z_CLIP;
r_alias.c:			if (fv->v[0] < r_refdef.aliasvrect.x)
r_alias.c:				fv->flags |= ALIAS_LEFT_CLIP;
r_alias.c:			if (fv->v[1] < r_refdef.aliasvrect.y)
r_alias.c:				fv->flags |= ALIAS_TOP_CLIP;
r_alias.c:			if (fv->v[0] > r_refdef.aliasvrectright)
r_alias.c:				fv->flags |= ALIAS_RIGHT_CLIP;
r_alias.c:			if (fv->v[1] > r_refdef.aliasvrectbottom)
r_alias.c:				fv->flags |= ALIAS_BOTTOM_CLIP;	
r_alias.c:	ptri = (mtriangle_t *)((byte *)paliashdr + paliashdr->triangles);
r_alias.c:	for (i=0 ; i<pmdl->numtris ; i++, ptri++)
r_alias.c:		pfv[0] = &pfinalverts[ptri->vertindex[0]];
r_alias.c:		pfv[1] = &pfinalverts[ptri->vertindex[1]];
r_alias.c:		pfv[2] = &pfinalverts[ptri->vertindex[2]];
r_alias.c:		if ( pfv[0]->flags & pfv[1]->flags & pfv[2]->flags & (ALIAS_XY_CLIP_MASK | ALIAS_Z_CLIP) )
r_alias.c:		if ( ! ( (pfv[0]->flags | pfv[1]->flags | pfv[2]->flags) &
r_alias.c:// TODO: should use a look-up table
r_alias.c:	angles[ROLL] = currententity->angles[ROLL];
r_alias.c:	angles[PITCH] = -currententity->angles[PITCH];
r_alias.c:	angles[YAW] = currententity->angles[YAW];
r_alias.c:	tmatrix[0][0] = pmdl->scale[0];
r_alias.c:	tmatrix[1][1] = pmdl->scale[1];
r_alias.c:	tmatrix[2][2] = pmdl->scale[2];
r_alias.c:	tmatrix[0][3] = pmdl->scale_origin[0];
r_alias.c:	tmatrix[1][3] = pmdl->scale_origin[1];
r_alias.c:	tmatrix[2][3] = pmdl->scale_origin[2];
r_alias.c:		t2matrix[i][1] = -alias_right[i];
r_alias.c:	t2matrix[0][3] = -modelorg[0];
r_alias.c:	t2matrix[1][3] = -modelorg[1];
r_alias.c:	t2matrix[2][3] = -modelorg[2];
r_alias.c:	av->fv[0] = DotProduct(pverts->v, aliastransform[0]) +
r_alias.c:	av->fv[1] = DotProduct(pverts->v, aliastransform[1]) +
r_alias.c:	av->fv[2] = DotProduct(pverts->v, aliastransform[2]) +
r_alias.c:	fv->v[2] = pstverts->s;
r_alias.c:	fv->v[3] = pstverts->t;
r_alias.c:	fv->flags = pstverts->onseam;
r_alias.c:	plightnormal = r_avertexnormals[pverts->lightnormalindex];
r_alias.c:	fv->v[4] = temp;
r_alias.c:		zi = 1.0 / (DotProduct(pverts->v, aliastransform[2]) +
r_alias.c:		fv->v[5] = zi;
r_alias.c:		fv->v[0] = ((DotProduct(pverts->v, aliastransform[0]) +
r_alias.c:		fv->v[1] = ((DotProduct(pverts->v, aliastransform[1]) +
r_alias.c:		fv->v[2] = pstverts->s;
r_alias.c:		fv->v[3] = pstverts->t;
r_alias.c:		fv->flags = pstverts->onseam;
r_alias.c:		plightnormal = r_avertexnormals[pverts->lightnormalindex];
r_alias.c:		fv->v[4] = temp;
r_alias.c:	zi = 1.0 / av->fv[2];
r_alias.c:	fv->v[5] = zi * ziscale;
r_alias.c:	fv->v[0] = (av->fv[0] * aliasxscale * zi) + aliasxcenter;
r_alias.c:	fv->v[1] = (av->fv[1] * aliasyscale * zi) + aliasycenter;
r_alias.c:	pstverts = (stvert_t *)((byte *)paliashdr + paliashdr->stverts);
r_alias.c:	r_anumverts = pmdl->numverts;
r_alias.c:			((byte *)paliashdr + paliashdr->triangles);
r_alias.c:	r_affinetridesc.numtriangles = pmdl->numtris;
r_alias.c:	skinnum = currententity->skinnum;
r_alias.c:	if ((skinnum >= pmdl->numskins) || (skinnum < 0))
r_alias.c:			((byte *)paliashdr + paliashdr->skindesc)) + skinnum;
r_alias.c:	a_skinwidth = pmdl->skinwidth;
r_alias.c:	if (pskindesc->type == ALIAS_SKIN_GROUP)
r_alias.c:				pskindesc->skin);
r_alias.c:				((byte *)paliashdr + paliasskingroup->intervals);
r_alias.c:		numskins = paliasskingroup->numskins;
r_alias.c:		fullskininterval = pskinintervals[numskins-1];
r_alias.c:		skintime = cl.time + currententity->syncbase;
r_alias.c:		skintargettime = skintime -
r_alias.c:		for (i=0 ; i<(numskins-1) ; i++)
r_alias.c:		pskindesc = &paliasskingroup->skindescs[i];
r_alias.c:	r_affinetridesc.pskin = (void *)((byte *)paliashdr + pskindesc->skin);
r_alias.c:	r_affinetridesc.skinheight = pmdl->skinheight;
r_alias.c:	r_ambientlight = plighting->ambientlight;
r_alias.c:	r_ambientlight = (255 - r_ambientlight) << VID_CBITS;
r_alias.c:	r_shadelight = plighting->shadelight;
r_alias.c:	r_plightvec[0] = DotProduct (plighting->plightvec, alias_forward);
r_alias.c:	r_plightvec[1] = -DotProduct (plighting->plightvec, alias_right);
r_alias.c:	r_plightvec[2] = DotProduct (plighting->plightvec, alias_up);
r_alias.c:	frame = currententity->frame;
r_alias.c:	if ((frame >= pmdl->numframes) || (frame < 0))
r_alias.c:	if (paliashdr->frames[frame].type == ALIAS_SINGLE)
r_alias.c:				((byte *)paliashdr + paliashdr->frames[frame].frame);
r_alias.c:				((byte *)paliashdr + paliashdr->frames[frame].frame);
r_alias.c:	pintervals = (float *)((byte *)paliashdr + paliasgroup->intervals);
r_alias.c:	numframes = paliasgroup->numframes;
r_alias.c:	fullinterval = pintervals[numframes-1];
r_alias.c:	time = cl.time + currententity->syncbase;
r_alias.c:	targettime = time - ((int)(time / fullinterval)) * fullinterval;
r_alias.c:	for (i=0 ; i<(numframes-1) ; i++)
r_alias.c:				((byte *)paliashdr + paliasgroup->frames[i].frame);
r_alias.c:						((CACHE_SIZE - 1) / sizeof(finalvert_t)) + 1];
r_alias.c:			(((long)&finalverts[0] + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
r_alias.c:	paliashdr = (aliashdr_t *)Mod_Extradata (currententity->model);
r_alias.c:	pmdl = (mdl_t *)((byte *)paliashdr + paliashdr->model);
r_alias.c:	R_AliasSetUpTransform (currententity->trivial_accept);
r_alias.c:	if (!currententity->colormap)
r_alias.c:		Sys_Error ("R_AliasDrawModel: !currententity->colormap");
r_alias.c:	r_affinetridesc.drawtype = (currententity->trivial_accept == 3) &&
r_alias.c:		D_Aff8Patch (currententity->colormap);
r_alias.c:	acolormap = currententity->colormap;
r_alias.c:	if (currententity->trivial_accept)
r_aliasa.s:Copyright (C) 1996-1997 Id Software, Inc.
r_aliasa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_aliasa.s:// x86 assembly-language Alias model transform and project code.
r_aliasa.s://		zi = 1.0 / (DotProduct(pverts->v, aliastransform[2]) +
r_aliasa.s://		plightnormal = r_avertexnormals[pverts->lightnormalindex];
r_aliasa.s://		fv->v[2] = pstverts->s;
r_aliasa.s://		fv->v[3] = pstverts->t;
r_aliasa.s://		fv->flags = pstverts->onseam;
r_aliasa.s:// FIXME: fast float->int conversion?
r_aliasa.s://		fv->v[4] = temp;
r_aliasa.s://		fv->v[0] = ((DotProduct(pverts->v, aliastransform[0]) +
r_aliasa.s://		fv->v[1] = ((DotProduct(pverts->v, aliastransform[1]) +
r_aliasa.s://		fv->v[5] = zi;
r_aliasa.s:// FIXME: fast float->int conversion?
r_bsp.c:Copyright (C) 1996-1997 Id Software, Inc.
r_bsp.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_bsp.c:// TODO: should use a look-up table
r_bsp.c:	angle = currententity->angles[YAW];		
r_bsp.c:	temp1[1][0] = -s;
r_bsp.c:	angle = currententity->angles[PITCH];		
r_bsp.c:	temp2[0][2] = -s;
r_bsp.c:	angle = currententity->angles[ROLL];		
r_bsp.c:	temp1[2][1] = -s;
r_bsp.c:	splitplane = pnode->plane;
r_bsp.c:	tplane.dist = splitplane->dist -
r_bsp.c:			DotProduct(r_entorigin, splitplane->normal);
r_bsp.c:	tplane.normal[0] = DotProduct (entity_rotation[0], splitplane->normal);
r_bsp.c:	tplane.normal[1] = DotProduct (entity_rotation[1], splitplane->normal);
r_bsp.c:	tplane.normal[2] = DotProduct (entity_rotation[2], splitplane->normal);
r_bsp.c:		pnextedge = pedges->pnext;
r_bsp.c:		plastvert = pedges->v[0];
r_bsp.c:		lastdist = DotProduct (plastvert->position, tplane.normal) -
r_bsp.c:		pvert = pedges->v[1];
r_bsp.c:		dist = DotProduct (pvert->position, tplane.normal) - tplane.dist;
r_bsp.c:			frac = lastdist / (lastdist - dist);
r_bsp.c:			ptvert->position[0] = plastvert->position[0] +
r_bsp.c:					frac * (pvert->position[0] -
r_bsp.c:					plastvert->position[0]);
r_bsp.c:			ptvert->position[1] = plastvert->position[1] +
r_bsp.c:					frac * (pvert->position[1] -
r_bsp.c:					plastvert->position[1]);
r_bsp.c:			ptvert->position[2] = plastvert->position[2] +
r_bsp.c:					frac * (pvert->position[2] -
r_bsp.c:					plastvert->position[2]);
r_bsp.c:			if (numbedges >= (MAX_BMODEL_EDGES - 1))
r_bsp.c:			ptedge->pnext = psideedges[lastside];
r_bsp.c:			ptedge->v[0] = plastvert;
r_bsp.c:			ptedge->v[1] = ptvert;
r_bsp.c:			ptedge->pnext = psideedges[side];
r_bsp.c:			ptedge->v[0] = ptvert;
r_bsp.c:			ptedge->v[1] = pvert;
r_bsp.c:			pedges->pnext = psideedges[side];
r_bsp.c:		if (numbedges >= (MAX_BMODEL_EDGES - 2))
r_bsp.c:		ptedge->pnext = psideedges[0];
r_bsp.c:		ptedge->v[0] = pfrontexit;
r_bsp.c:		ptedge->v[1] = pfrontenter;
r_bsp.c:		ptedge->pnext = psideedges[1];
r_bsp.c:		ptedge->v[0] = pfrontenter;
r_bsp.c:		ptedge->v[1] = pfrontexit;
r_bsp.c:		// draw if we've reached a non-solid leaf, done if all that's left is a
r_bsp.c:			pn = pnode->children[i];
r_bsp.c:			if (pn->visframe == r_visframecount)
r_bsp.c:				if (pn->contents < 0)
r_bsp.c:					if (pn->contents != CONTENTS_SOLID)
r_bsp.c:						r_currentbkey = ((mleaf_t *)pn)->key;
r_bsp.c:					R_RecursiveClipBPoly (psideedges[i], pnode->children[i],
r_bsp.c:// FIXME: use bounding-box-based frustum clipping info?
r_bsp.c:	psurf = &pmodel->surfaces[pmodel->firstmodelsurface];
r_bsp.c:	numsurfaces = pmodel->nummodelsurfaces;
r_bsp.c:	pedges = pmodel->edges;
r_bsp.c:		pplane = psurf->plane;
r_bsp.c:		dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
r_bsp.c:		if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
r_bsp.c:			(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
r_bsp.c:		// FIXME: use bounding-box-based frustum clipping info?
r_bsp.c:			if (psurf->numedges > 0)
r_bsp.c:				numbedges += psurf->numedges;
r_bsp.c:				for (j=0 ; j<psurf->numedges ; j++)
r_bsp.c:				   lindex = pmodel->surfedges[psurf->firstedge+j];
r_bsp.c:						pbedge[j].v[0] = &r_pcurrentvertbase[pedge->v[0]];
r_bsp.c:						pbedge[j].v[1] = &r_pcurrentvertbase[pedge->v[1]];
r_bsp.c:						lindex = -lindex;
r_bsp.c:						pbedge[j].v[0] = &r_pcurrentvertbase[pedge->v[1]];
r_bsp.c:						pbedge[j].v[1] = &r_pcurrentvertbase[pedge->v[0]];
r_bsp.c:				pbedge[j-1].pnext = NULL;	// mark end of edges
r_bsp.c:				R_RecursiveClipBPoly (pbedge, currententity->topnode, psurf);
r_bsp.c:// FIXME: use bounding-box-based frustum clipping info?
r_bsp.c:	psurf = &pmodel->surfaces[pmodel->firstmodelsurface];
r_bsp.c:	numsurfaces = pmodel->nummodelsurfaces;
r_bsp.c:		pplane = psurf->plane;
r_bsp.c:		dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
r_bsp.c:		if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
r_bsp.c:			(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
r_bsp.c:			r_currentkey = ((mleaf_t *)currententity->topnode)->key;
r_bsp.c:		// FIXME: use bounding-box-based frustum clipping info?
r_bsp.c:	if (node->contents == CONTENTS_SOLID)
r_bsp.c:	if (node->visframe != r_visframecount)
r_bsp.c:		// FIXME: do with fast look-ups or integer tests based on the sign bit
r_bsp.c:			rejectpt[0] = (float)node->minmaxs[pindex[0]];
r_bsp.c:			rejectpt[1] = (float)node->minmaxs[pindex[1]];
r_bsp.c:			rejectpt[2] = (float)node->minmaxs[pindex[2]];
r_bsp.c:			d -= view_clipplanes[i].dist;
r_bsp.c:			acceptpt[0] = (float)node->minmaxs[pindex[3+0]];
r_bsp.c:			acceptpt[1] = (float)node->minmaxs[pindex[3+1]];
r_bsp.c:			acceptpt[2] = (float)node->minmaxs[pindex[3+2]];
r_bsp.c:			d -= view_clipplanes[i].dist;
r_bsp.c:	if (node->contents < 0)
r_bsp.c:		mark = pleaf->firstmarksurface;
r_bsp.c:		c = pleaf->nummarksurfaces;
r_bsp.c:				(*mark)->visframe = r_framecount;
r_bsp.c:			} while (--c);
r_bsp.c:		if (pleaf->efrags)
r_bsp.c:			R_StoreEfrags (&pleaf->efrags);
r_bsp.c:		pleaf->key = r_currentkey;
r_bsp.c:		plane = node->plane;
r_bsp.c:		switch (plane->type)
r_bsp.c:			dot = modelorg[0] - plane->dist;
r_bsp.c:			dot = modelorg[1] - plane->dist;
r_bsp.c:			dot = modelorg[2] - plane->dist;
r_bsp.c:			dot = DotProduct (modelorg, plane->normal) - plane->dist;
r_bsp.c:		R_RecursiveWorldNode (node->children[side], clipflags);
r_bsp.c:		c = node->numsurfaces;
r_bsp.c:			surf = cl.worldmodel->surfaces + node->firstsurface;
r_bsp.c:			if (dot < -BACKFACE_EPSILON)
r_bsp.c:					if ((surf->flags & SURF_PLANEBACK) &&
r_bsp.c:						(surf->visframe == r_framecount))
r_bsp.c:				} while (--c);
r_bsp.c:					if (!(surf->flags & SURF_PLANEBACK) &&
r_bsp.c:						(surf->visframe == r_framecount))
r_bsp.c:				} while (--c);
r_bsp.c:		R_RecursiveWorldNode (node->children[!side], clipflags);
r_bsp.c:	clmodel = currententity->model;
r_bsp.c:	r_pcurrentvertbase = clmodel->vertexes;
r_bsp.c:	R_RecursiveWorldNode (clmodel->nodes, 15);
r_bsp.c:		for (i=numbtofpolys-1 ; i>=0 ; i--)
r_draw.c:Copyright (C) 1996-1997 Id Software, Inc.
r_draw.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_draw.c:		world = &pv0->position[0];
r_draw.c:		v0 = (ycenter - scale*transformed[1]);
r_draw.c:	world = &pv1->position[0];
r_draw.c:	r_v1 = (ycenter - scale*transformed[1]);
r_draw.c:	edge->owner = r_pedge;
r_draw.c:	edge->nearzi = lzi0;
r_draw.c:		v2 = r_ceilv1 - 1;
r_draw.c:		edge->surfs[0] = surface_p - surfaces;
r_draw.c:		edge->surfs[1] = 0;
r_draw.c:		u_step = ((r_u1 - u0) / (r_v1 - v0));
r_draw.c:		u = u0 + ((float)v - v0) * u_step;
r_draw.c:		v2 = ceilv0 - 1;
r_draw.c:		edge->surfs[0] = 0;
r_draw.c:		edge->surfs[1] = surface_p - surfaces;
r_draw.c:		u_step = ((u0 - r_u1) / (v0 - r_v1));
r_draw.c:		u = r_u1 + ((float)v - r_v1) * u_step;
r_draw.c:	edge->u_step = u_step*0x100000;
r_draw.c:	edge->u = u*0x100000 + 0xFFFFF;
r_draw.c:	if (edge->u < r_refdef.vrect_x_adj_shift20)
r_draw.c:		edge->u = r_refdef.vrect_x_adj_shift20;
r_draw.c:	if (edge->u > r_refdef.vrectright_adj_shift20)
r_draw.c:		edge->u = r_refdef.vrectright_adj_shift20;
r_draw.c:	u_check = edge->u;
r_draw.c:	if (edge->surfs[0])
r_draw.c:	if (!newedges[v] || newedges[v]->u >= u_check)
r_draw.c:		edge->next = newedges[v];
r_draw.c:		while (pcheck->next && pcheck->next->u < u_check)
r_draw.c:			pcheck = pcheck->next;
r_draw.c:		edge->next = pcheck->next;
r_draw.c:		pcheck->next = edge;
r_draw.c:	edge->nextremove = removeedges[v2];
r_draw.c:			d0 = DotProduct (pv0->position, clip->normal) - clip->dist;
r_draw.c:			d1 = DotProduct (pv1->position, clip->normal) - clip->dist;
r_draw.c:				f = d0 / (d0 - d1);
r_draw.c:				clipvert.position[0] = pv0->position[0] +
r_draw.c:						f * (pv1->position[0] - pv0->position[0]);
r_draw.c:				clipvert.position[1] = pv0->position[1] +
r_draw.c:						f * (pv1->position[1] - pv0->position[1]);
r_draw.c:				clipvert.position[2] = pv0->position[2] +
r_draw.c:						f * (pv1->position[2] - pv0->position[2]);
r_draw.c:				if (clip->leftedge)
r_draw.c:				else if (clip->rightedge)
r_draw.c:				R_ClipEdge (pv0, &clipvert, clip->next);
r_draw.c:				f = d0 / (d0 - d1);
r_draw.c:				clipvert.position[0] = pv0->position[0] +
r_draw.c:						f * (pv1->position[0] - pv0->position[0]);
r_draw.c:				clipvert.position[1] = pv0->position[1] +
r_draw.c:						f * (pv1->position[1] - pv0->position[1]);
r_draw.c:				clipvert.position[2] = pv0->position[2] +
r_draw.c:						f * (pv1->position[2] - pv0->position[2]);
r_draw.c:				if (clip->leftedge)
r_draw.c:				else if (clip->rightedge)
r_draw.c:				R_ClipEdge (&clipvert, pv1, clip->next);
r_draw.c:		} while ((clip = clip->next) != NULL);
r_draw.c:	pedge_t = (edge_t *)((unsigned long)r_edges + r_pedge->cachededgeoffset);
r_draw.c:	if (!pedge_t->surfs[0])
r_draw.c:		pedge_t->surfs[0] = surface_p - surfaces;
r_draw.c:		pedge_t->surfs[1] = surface_p - surfaces;
r_draw.c:	if (pedge_t->nearzi > r_nearzi)	// for mipmap finding
r_draw.c:		r_nearzi = pedge_t->nearzi;
r_draw.c:	if ((edge_p + fa->numedges + 4) >= edge_max)
r_draw.c:		r_outofedges += fa->numedges;
r_draw.c:	for (i=3, mask = 0x08 ; i>=0 ; i--, mask >>= 1)
r_draw.c:	pedges = currententity->model->edges;
r_draw.c:	for (i=0 ; i<fa->numedges ; i++)
r_draw.c:		lindex = currententity->model->surfedges[fa->firstedge + i];
r_draw.c:				if (r_pedge->cachededgeoffset & FULLY_CLIPPED_CACHED)
r_draw.c:					if ((r_pedge->cachededgeoffset & FRAMECOUNT_MASK) ==
r_draw.c:					if ((((unsigned long)edge_p - (unsigned long)r_edges) >
r_draw.c:						 r_pedge->cachededgeoffset) &&
r_draw.c:						 r_pedge->cachededgeoffset))->owner == r_pedge))
r_draw.c:			cacheoffset = (byte *)edge_p - (byte *)r_edges;
r_draw.c:			R_ClipEdge (&r_pcurrentvertbase[r_pedge->v[0]],
r_draw.c:						&r_pcurrentvertbase[r_pedge->v[1]],
r_draw.c:			r_pedge->cachededgeoffset = cacheoffset;
r_draw.c:			lindex = -lindex;
r_draw.c:				if (r_pedge->cachededgeoffset & FULLY_CLIPPED_CACHED)
r_draw.c:					if ((r_pedge->cachededgeoffset & FRAMECOUNT_MASK) ==
r_draw.c:					if ((((unsigned long)edge_p - (unsigned long)r_edges) >
r_draw.c:						 r_pedge->cachededgeoffset) &&
r_draw.c:						 r_pedge->cachededgeoffset))->owner == r_pedge))
r_draw.c:			cacheoffset = (byte *)edge_p - (byte *)r_edges;
r_draw.c:			R_ClipEdge (&r_pcurrentvertbase[r_pedge->v[1]],
r_draw.c:						&r_pcurrentvertbase[r_pedge->v[0]],
r_draw.c:			r_pedge->cachededgeoffset = cacheoffset;
r_draw.c:		R_ClipEdge (&r_leftexit, &r_leftenter, pclip->next);
r_draw.c:	surface_p->data = (void *)fa;
r_draw.c:	surface_p->nearzi = r_nearzi;
r_draw.c:	surface_p->flags = fa->flags;
r_draw.c:	surface_p->insubmodel = insubmodel;
r_draw.c:	surface_p->spanstate = 0;
r_draw.c:	surface_p->entity = currententity;
r_draw.c:	surface_p->key = r_currentkey++;
r_draw.c:	surface_p->spans = NULL;
r_draw.c:	pplane = fa->plane;
r_draw.c:	TransformVector (pplane->normal, p_normal);
r_draw.c:	distinv = 1.0 / (pplane->dist - DotProduct (modelorg, pplane->normal));
r_draw.c:	surface_p->d_zistepu = p_normal[0] * xscaleinv * distinv;
r_draw.c:	surface_p->d_zistepv = -p_normal[1] * yscaleinv * distinv;
r_draw.c:	surface_p->d_ziorigin = p_normal[2] * distinv -
r_draw.c:			xcenter * surface_p->d_zistepu -
r_draw.c:			ycenter * surface_p->d_zistepv;
r_draw.c://JDC	VectorCopy (r_worldmodelorg, surface_p->modelorg);
r_draw.c:	if ((edge_p + psurf->numedges + 4) >= edge_max)
r_draw.c:		r_outofedges += psurf->numedges;
r_draw.c:	for (i=3, mask = 0x08 ; i>=0 ; i--, mask >>= 1)
r_draw.c:	for ( ; pedges ; pedges = pedges->pnext)
r_draw.c:		R_ClipEdge (pedges->v[0], pedges->v[1], pclip);
r_draw.c:		R_ClipEdge (&r_leftexit, &r_leftenter, pclip->next);
r_draw.c:	surface_p->data = (void *)psurf;
r_draw.c:	surface_p->nearzi = r_nearzi;
r_draw.c:	surface_p->flags = psurf->flags;
r_draw.c:	surface_p->insubmodel = true;
r_draw.c:	surface_p->spanstate = 0;
r_draw.c:	surface_p->entity = currententity;
r_draw.c:	surface_p->key = r_currentbkey;
r_draw.c:	surface_p->spans = NULL;
r_draw.c:	pplane = psurf->plane;
r_draw.c:	TransformVector (pplane->normal, p_normal);
r_draw.c:	distinv = 1.0 / (pplane->dist - DotProduct (modelorg, pplane->normal));
r_draw.c:	surface_p->d_zistepu = p_normal[0] * xscaleinv * distinv;
r_draw.c:	surface_p->d_zistepv = -p_normal[1] * yscaleinv * distinv;
r_draw.c:	surface_p->d_ziorigin = p_normal[2] * distinv -
r_draw.c:			xcenter * surface_p->d_zistepu -
r_draw.c:			ycenter * surface_p->d_zistepv;
r_draw.c://JDC	VectorCopy (r_worldmodelorg, surface_p->modelorg);
r_draw.c:	for (i=3, mask = 0x08 ; i>=0 ; i--, mask >>= 1)
r_draw.c:	pedges = currententity->model->edges;
r_draw.c:	lnumverts = fa->numedges;
r_draw.c:		lindex = currententity->model->surfedges[fa->firstedge + i];
r_draw.c:			verts[0][i] = r_pcurrentvertbase[r_pedge->v[0]];
r_draw.c:			r_pedge = &pedges[-lindex];
r_draw.c:			verts[0][i] = r_pcurrentvertbase[r_pedge->v[1]];
r_draw.c:		lastvert = lnumverts - 1;
r_draw.c:							   pclip->normal) - pclip->dist;
r_draw.c:			dist = DotProduct (verts[vertpage][i].position, pclip->normal) -
r_draw.c:					pclip->dist;
r_draw.c:				frac = dist / (dist - lastdist);
r_draw.c:						((verts[vertpage][lastvert].position[0] -
r_draw.c:						((verts[vertpage][lastvert].position[1] -
r_draw.c:						((verts[vertpage][lastvert].position[2] -
r_draw.c:		pclip = pclip->next;
r_draw.c:	pplane = fa->plane;
r_draw.c:	switch (pplane->type)
r_draw.c:		v = (ycenter - scale*transformed[1]);
r_draw.c:	psurf = &pmodel->surfaces[pmodel->firstmodelsurface];
r_draw.c:	numsurfaces = pmodel->nummodelsurfaces;
r_draw.c:		pplane = psurf->plane;
r_draw.c:		dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
r_draw.c:		if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
r_draw.c:			(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
r_draw.c:		// FIXME: use bounding-box-based frustum clipping info?
r_drawa.s:Copyright (C) 1996-1997 Id Software, Inc.
r_drawa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_drawa.s:// x86 assembly-language edge clipping and emission code
r_drawa.s://----------------------------------------------------------------------
r_drawa.s://----------------------------------------------------------------------
r_drawa.s://			d0 = DotProduct (pv0->position, clip->normal) - clip->dist;
r_drawa.s://			d1 = DotProduct (pv1->position, clip->normal) - clip->dist;
r_drawa.s://				R_ClipEdge (&clipvert, pv1, clip->next);
r_drawa.s://		} while ((clip = clip->next) != NULL);
r_drawa.s://		world = &pv0->position[0];
r_drawa.s://		ceilv0 = (int)(v0 - 2000) + 2000; // ceil(v0);
r_drawa.s://	world = &pv1->position[0];
r_drawa.s://	r_ceilv1 = (int)(r_v1 - 2000) + 2000; // ceil(r_v1);
r_drawa.s:	fldcw	single_cw				// put back normal floating-point state
r_drawa.s://	edge->nearzi = lzi0;
r_drawa.s://		u_step = ((u0 - r_u1) / (v0 - r_v1));
r_drawa.s:	fsubrp	%st(0),%st(3)		// v0 | v1 | u0-u1
r_drawa.s:	fsub	%st(1),%st(0)		// v0-v1 | v1 | u0-u1
r_drawa.s://		v2 = ceilv0 - 1;
r_drawa.s:	leal	-1(%ebx),%ecx
r_drawa.s://		edge->surfs[0] = 0;
r_drawa.s://		edge->surfs[1] = surface_p - surfaces;
r_drawa.s://		u = r_u1 + ((float)v - r_v1) * u_step;
r_drawa.s:	fsubp	%st(0),%st(1)		// v-v1 | ustep
r_drawa.s:	fmul	%st(1),%st(0)		// (v-v1)*ustep | ustep
r_drawa.s://		u_step = ((r_u1 - u0) / (r_v1 - v0));
r_drawa.s:	fsub	%st(3),%st(0)		// u1-u0 | v0 | v1 | u0
r_drawa.s:	fxch	%st(2)				// v1 | v0 | u1-u0 | u0
r_drawa.s:	fsub	%st(1),%st(0)		// v1-v0 | v0 | u1-u0 | u0
r_drawa.s://		v2 = r_ceilv1 - 1;
r_drawa.s://		edge->surfs[0] = surface_p - surfaces;
r_drawa.s://		edge->surfs[1] = 0;
r_drawa.s://		u = u0 + ((float)v - v0) * u_step;
r_drawa.s:	fsubp	%st(0),%st(1)		// v-v0 | ustep | u0
r_drawa.s:	fmul	%st(1),%st(0)		// (v-v0)*ustep | ustep | u0
r_drawa.s://	edge->u_step = u_step*0x100000;
r_drawa.s://	edge->u = u*0x100000 + 0xFFFFF;
r_drawa.s://	if (edge->u < r_refdef.vrect_x_adj_shift20)
r_drawa.s://		edge->u = r_refdef.vrect_x_adj_shift20;
r_drawa.s://	if (edge->u > r_refdef.vrectright_adj_shift20)
r_drawa.s://		edge->u = r_refdef.vrectright_adj_shift20;
r_drawa.s://	u_check = edge->u;
r_drawa.s://	if (edge->surfs[0])
r_drawa.s://	if (!newedges[v] || newedges[v]->u >= u_check)
r_drawa.s://		edge->next = newedges[v];
r_drawa.s://		while (pcheck->next && pcheck->next->u < u_check)
r_drawa.s://			pcheck = pcheck->next;
r_drawa.s://		edge->next = pcheck->next;
r_drawa.s://		pcheck->next = edge;
r_drawa.s://	edge->nextremove = removeedges[v2];
r_drawa.s://						r_pedge->framecount = r_framecount;
r_drawa.s://				f = d0 / (d0 - d1);
r_drawa.s://				clipvert.position[0] = pv0->position[0] +
r_drawa.s://						f * (pv1->position[0] - pv0->position[0]);
r_drawa.s://				clipvert.position[1] = pv0->position[1] +
r_drawa.s://						f * (pv1->position[1] - pv0->position[1]);
r_drawa.s://				clipvert.position[2] = pv0->position[2] +
r_drawa.s://						f * (pv1->position[2] - pv0->position[2]);
r_drawa.s://				if (clip->leftedge)
r_drawa.s://				else if (clip->rightedge)
r_drawa.s://				R_ClipEdge (pv0, &clipvert, clip->next);
r_drawa.s://				f = d0 / (d0 - d1);
r_drawa.s://				clipvert.position[0] = pv0->position[0] +
r_drawa.s://						f * (pv1->position[0] - pv0->position[0]);
r_drawa.s://				clipvert.position[1] = pv0->position[1] +
r_drawa.s://						f * (pv1->position[1] - pv0->position[1]);
r_drawa.s://				clipvert.position[2] = pv0->position[2] +
r_drawa.s://						f * (pv1->position[2] - pv0->position[2]);
r_drawa.s://				if (clip->leftedge)
r_drawa.s://				else if (clip->rightedge)
r_drawa.s://		v0 = (ycenter - scale*transformed[1]);
r_edge.c:Copyright (C) 1996-1997 Id Software, Inc.
r_edge.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_edge.c:low depth complexity -- 1 to 3 or so
r_edge.c:		for (s=surface_p-1 ; s>&surfaces[1] ; s--)
r_edge.c:			if (!s->spans)
r_edge.c:			if (!(s->flags & SURF_DRAWBACKGROUND))
r_edge.c:				pface = (msurface_t *)s->data;
r_edge.c:			if (!s->spans)
r_edge.c:			if (!(s->flags & SURF_DRAWBACKGROUND))
r_edge.c:				pface = (msurface_t *)s->data;
r_edge.c:linked list edgelist.  edgestoadd is assumed to be sorted on u, and non-empty (this is actually newedges[v]).  edgelist is assumed to be sorted on u, with a
r_edge.c:		next_edge = edgestoadd->next;
r_edge.c:		if (edgelist->u >= edgestoadd->u)
r_edge.c:		edgelist=edgelist->next;
r_edge.c:		if (edgelist->u >= edgestoadd->u)
r_edge.c:		edgelist=edgelist->next;
r_edge.c:		if (edgelist->u >= edgestoadd->u)
r_edge.c:		edgelist=edgelist->next;
r_edge.c:		if (edgelist->u >= edgestoadd->u)
r_edge.c:		edgelist=edgelist->next;
r_edge.c:		edgestoadd->next = edgelist;
r_edge.c:		edgestoadd->prev = edgelist->prev;
r_edge.c:		edgelist->prev->next = edgestoadd;
r_edge.c:		edgelist->prev = edgestoadd;
r_edge.c:		pedge->next->prev = pedge->prev;
r_edge.c:		pedge->prev->next = pedge->next;
r_edge.c:	} while ((pedge = pedge->nextremove) != NULL);
r_edge.c:		pedge->u += pedge->u_step;
r_edge.c:		if (pedge->u < pedge->prev->u)
r_edge.c:		pedge = pedge->next;
r_edge.c:		pedge->u += pedge->u_step;
r_edge.c:		if (pedge->u < pedge->prev->u)
r_edge.c:		pedge = pedge->next;
r_edge.c:		pedge->u += pedge->u_step;
r_edge.c:		if (pedge->u < pedge->prev->u)
r_edge.c:		pedge = pedge->next;
r_edge.c:		pedge->u += pedge->u_step;
r_edge.c:		if (pedge->u < pedge->prev->u)
r_edge.c:		pedge = pedge->next;
r_edge.c:		pnext_edge = pedge->next;
r_edge.c:		pedge->next->prev = pedge->prev;
r_edge.c:		pedge->prev->next = pedge->next;
r_edge.c:		pwedge = pedge->prev->prev;
r_edge.c:		while (pwedge->u > pedge->u)
r_edge.c:			pwedge = pwedge->prev;
r_edge.c:		pedge->next = pwedge->next;
r_edge.c:		pedge->prev = pwedge;
r_edge.c:		pedge->next->prev = pedge;
r_edge.c:		pwedge->next = pedge;
r_edge.c:	if (iu > surf->last_u)
r_edge.c:		span->u = surf->last_u;
r_edge.c:		span->count = iu - span->u;
r_edge.c:		span->v = current_iv;
r_edge.c:		span->pnext = surf->spans;
r_edge.c:		surf->spans = span;
r_edge.c:		surf->spanstate = 0;
r_edge.c:		surf = surf->next;
r_edge.c:	surf = &surfaces[edge->surfs[1]];
r_edge.c:	if (++surf->spanstate == 1)
r_edge.c:		if (surf->key > surf2->key)
r_edge.c:		if (surf->insubmodel && (surf->key == surf2->key))
r_edge.c:			surf2 = surf2->next;
r_edge.c:		} while (surf->key < surf2->key);
r_edge.c:		if (surf->key == surf2->key)
r_edge.c:			if (!surf->insubmodel)
r_edge.c:		iu = edge->u >> 20;
r_edge.c:		if (iu > surf2->last_u)
r_edge.c:			span->u = surf2->last_u;
r_edge.c:			span->count = iu - span->u;
r_edge.c:			span->v = current_iv;
r_edge.c:			span->pnext = surf2->spans;
r_edge.c:			surf2->spans = span;
r_edge.c:		surf->last_u = iu;
r_edge.c:		surf->next = surf2;
r_edge.c:		surf->prev = surf2->prev;
r_edge.c:		surf2->prev->next = surf;
r_edge.c:		surf2->prev = surf;
r_edge.c:	if (--surf->spanstate == 0)
r_edge.c:		if (surf->insubmodel)
r_edge.c:			r_bmodelactive--;
r_edge.c:			iu = edge->u >> 20;
r_edge.c:			if (iu > surf->last_u)
r_edge.c:				span->u = surf->last_u;
r_edge.c:				span->count = iu - span->u;
r_edge.c:				span->v = current_iv;
r_edge.c:				span->pnext = surf->spans;
r_edge.c:				surf->spans = span;
r_edge.c:			surf->next->last_u = iu;
r_edge.c:		surf->prev->next = surf->next;
r_edge.c:		surf->next->prev = surf->prev;
r_edge.c:	if (edge->surfs[1])
r_edge.c:		surf = &surfaces[edge->surfs[1]];
r_edge.c:		if (++surf->spanstate == 1)
r_edge.c:			if (surf->insubmodel)
r_edge.c:			if (surf->key < surf2->key)
r_edge.c:			if (surf->insubmodel && (surf->key == surf2->key))
r_edge.c:				fu = (float)(edge->u - 0xFFFFF) * (1.0 / 0x100000);
r_edge.c:				newzi = surf->d_ziorigin + fv*surf->d_zistepv +
r_edge.c:						fu*surf->d_zistepu;
r_edge.c:				testzi = surf2->d_ziorigin + fv*surf2->d_zistepv +
r_edge.c:						fu*surf2->d_zistepu;
r_edge.c:					if (surf->d_zistepu >= surf2->d_zistepu)
r_edge.c:				surf2 = surf2->next;
r_edge.c:			} while (surf->key > surf2->key);
r_edge.c:			if (surf->key == surf2->key)
r_edge.c:				if (!surf->insubmodel)
r_edge.c:				fu = (float)(edge->u - 0xFFFFF) * (1.0 / 0x100000);
r_edge.c:				newzi = surf->d_ziorigin + fv*surf->d_zistepv +
r_edge.c:						fu*surf->d_zistepu;
r_edge.c:				testzi = surf2->d_ziorigin + fv*surf2->d_zistepv +
r_edge.c:						fu*surf2->d_zistepu;
r_edge.c:					if (surf->d_zistepu >= surf2->d_zistepu)
r_edge.c:			iu = edge->u >> 20;
r_edge.c:			if (iu > surf2->last_u)
r_edge.c:				span->u = surf2->last_u;
r_edge.c:				span->count = iu - span->u;
r_edge.c:				span->v = current_iv;
r_edge.c:				span->pnext = surf2->spans;
r_edge.c:				surf2->spans = span;
r_edge.c:			surf->last_u = iu;
r_edge.c:			surf->next = surf2;
r_edge.c:			surf->prev = surf2->prev;
r_edge.c:			surf2->prev->next = surf;
r_edge.c:			surf2->prev = surf;
r_edge.c:	for (edge=edge_head.next ; edge != &edge_tail; edge=edge->next)
r_edge.c:		if (edge->surfs[0])
r_edge.c:			surf = &surfaces[edge->surfs[0]];
r_edge.c:			if (!edge->surfs[1])
r_edge.c:	for (edge=edge_head.next ; edge != &edge_tail; edge=edge->next)
r_edge.c:		if (edge->surfs[0])
r_edge.c:			R_TrailingEdge (&surfaces[edge->surfs[0]], edge);
r_edge.c:		if (edge->surfs[1])
r_edge.c:			((long)(basespans + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
r_edge.c:	max_span_p = &basespan_p[MAXSPANS - r_refdef.vrect.width];
r_edge.c:	edge_aftertail.u = -1;		// force a move
r_edge.c:	bottom = r_refdef.vrectbottom - 1;
r_edge.c:	// mark that the head (background start) span is pre-included
r_edge.c:				s->spans = NULL;
r_edge.c:// mark that the head (background start) span is pre-included
r_edgea.s:Copyright (C) 1996-1997 Id Software, Inc.
r_edgea.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_edgea.s:// x86 assembly-language edge-processing code.
r_edgea.s://--------------------------------------------------------------------
r_edgea.s://--------------------------------------------------------------------
r_edgea.s://--------------------------------------------------------------------
r_edgea.s:// done if the -1 in edge_aftertail triggered this
r_edgea.s://--------------------------------------------------------------------
r_edgea.s:	jle		LNoEmit2				// iu <= surf->last_u, so nothing to emit
r_edgea.s:	movl	%eax,st_last_u(%ecx)	// surf->next->last_u = iu;
r_edgea.s:	movl	%edx,espan_t_u(%ebp)		// span->u = surf->last_u;
r_edgea.s:	movl	%eax,espan_t_count(%ebp)	// span->count = iu - span->u;
r_edgea.s:	movl	%eax,espan_t_v(%ebp)		// span->v = current_iv;
r_edgea.s:	movl	%eax,espan_t_pnext(%ebp)	// span->pnext = surf->spans;
r_edgea.s:	movl	%ebp,st_spans(%esi)			// surf->spans = span;
r_edgea.s:	movl	%eax,st_last_u(%ecx)	// surf->next->last_u = iu;
r_edgea.s://--------------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:	shrl	$16-SURF_T_SHIFT,%edi
r_edgea.s:// handle a leading non-bmodel edge
r_edgea.s:// if (surf->key < surf2->key)
r_edgea.s:// 		surf2 = surf2->next;
r_edgea.s:// } while (surf->key >= surf2->key);
r_edgea.s:// if (surf->key < surf2->key)
r_edgea.s:// if ((surf->key == surf2->key) && surf->insubmodel)
r_edgea.s:// 		surf2 = surf2->next;
r_edgea.s:// } while (surf->key > surf2->key);
r_edgea.s:	fmuls	float_1_div_0100000h // fu = (float)(edge->u - 0xFFFFF) *
r_edgea.s:	fmuls	st_d_zistepu(%edi)	// fu*surf->d_zistepu | fu
r_edgea.s:	flds	C(fv)					// fv | fu*surf->d_zistepu | fu
r_edgea.s:	fmuls	st_d_zistepv(%edi)	// fv*surf->d_zistepv | fu*surf->d_zistepu | fu
r_edgea.s:	fxch	%st(1)				// fu*surf->d_zistepu | fv*surf->d_zistepv | fu
r_edgea.s:	fadds	st_d_ziorigin(%edi)	// fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	flds	st_d_zistepu(%esi)	// surf2->d_zistepu |
r_edgea.s:								//  fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	fmul	%st(3),%st(0)		// fu*surf2->d_zistepu |
r_edgea.s:								//  fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	fxch	%st(1)				// fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fu*surf2->d_zistepu |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	faddp	%st(0),%st(2)		// fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	flds	C(fv)					// fv | fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fmuls	st_d_zistepv(%esi)	// fv*surf2->d_zistepv |
r_edgea.s:								//  fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fld		%st(2)				// newzi | fv*surf2->d_zistepv |
r_edgea.s:								//  fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fmuls	float_point_999		// newzibottom | fv*surf2->d_zistepv |
r_edgea.s:								//  fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fxch	%st(2)				// fu*surf2->d_zistepu | fv*surf2->d_zistepv |
r_edgea.s:	fadds	st_d_ziorigin(%esi)	// fu*surf2->d_zistepu + surf2->d_ziorigin |
r_edgea.s:								//  fv*surf2->d_zistepv | newzibottom | newzi |
r_edgea.s:// if (surf->d_zistepu >= surf2->d_zistepu)
r_edgea.s:	flds	st_d_zistepu(%edi)	// surf->d_zistepu | newzitop| fu
r_edgea.s:	movl	%eax,st_last_u(%edi)	// surf->last_u = iu;
r_edgea.s:	jle		LInsertAndExit			// iu <= surf->last_u, so nothing to emit
r_edgea.s:	movl	%edx,espan_t_u(%ebp)		// span->u = surf->last_u;
r_edgea.s:	movl	%eax,espan_t_count(%ebp)	// span->count = iu - span->u;
r_edgea.s:	movl	%eax,espan_t_v(%ebp)		// span->v = current_iv;
r_edgea.s:	movl	%eax,espan_t_pnext(%ebp)	// span->pnext = surf->spans;
r_edgea.s:	movl	%ebp,st_spans(%esi)			// surf->spans = span;
r_edgea.s:	movl	%esi,st_next(%edi)		// surf->next = surf2;
r_edgea.s:	movl	%eax,st_prev(%edi)		// surf->prev = surf2->prev;
r_edgea.s:	movl	%edi,st_prev(%esi)		// surf2->prev = surf;
r_edgea.s:	movl	%edi,st_next(%eax)		// surf2->prev->next = surf;
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:// ---------------------------------------------------------------
r_edgea.s:	fmuls	float_1_div_0100000h // fu = (float)(edge->u - 0xFFFFF) *
r_edgea.s:	fmuls	st_d_zistepu(%edi)	// fu*surf->d_zistepu | fu
r_edgea.s:	flds	C(fv)				// fv | fu*surf->d_zistepu | fu
r_edgea.s:	fmuls	st_d_zistepv(%edi)	// fv*surf->d_zistepv | fu*surf->d_zistepu | fu
r_edgea.s:	fxch	%st(1)				// fu*surf->d_zistepu | fv*surf->d_zistepv | fu
r_edgea.s:	fadds	st_d_ziorigin(%edi)	// fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	flds	st_d_zistepu(%esi)	// surf2->d_zistepu |
r_edgea.s:								//  fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	fmul	%st(3),%st(0)		// fu*surf2->d_zistepu |
r_edgea.s:								//  fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	fxch	%st(1)				// fu*surf->d_zistepu + surf->d_ziorigin |
r_edgea.s:								//  fu*surf2->d_zistepu |
r_edgea.s:								//  fv*surf->d_zistepv | fu
r_edgea.s:	faddp	%st(0),%st(2)		// fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	flds	C(fv)				// fv | fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fmuls	st_d_zistepv(%esi)	// fv*surf2->d_zistepv |
r_edgea.s:								//  fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fld		%st(2)				// newzi | fv*surf2->d_zistepv |
r_edgea.s:								//  fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fmuls	float_point_999		// newzibottom | fv*surf2->d_zistepv |
r_edgea.s:								//  fu*surf2->d_zistepu | newzi | fu
r_edgea.s:	fxch	%st(2)				// fu*surf2->d_zistepu | fv*surf2->d_zistepv |
r_edgea.s:	fadds	st_d_ziorigin(%esi)	// fu*surf2->d_zistepu + surf2->d_ziorigin |
r_edgea.s:								//  fv*surf2->d_zistepv | newzibottom | newzi |
r_edgea.s:// if (surf->d_zistepu >= surf2->d_zistepu)
r_edgea.s:	flds	st_d_zistepu(%edi)	// surf->d_zistepu | newzitop | fu
r_edgea.s://----------------------------------------------------------------------
r_edgea.s://----------------------------------------------------------------------
r_edgea.s:	movl	%eax,LPatch4-4
r_edgea.s:	movl	%eax,LPatch0-4
r_edgea.s:	movl	%eax,LPatch2-4
r_edgea.s:	movl	%eax,LPatch3-4
r_efrag.c:Copyright (C) 1996-1997 Id Software, Inc.
r_efrag.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_efrag.c:	ef = ent->efrag;
r_efrag.c:		prev = &ef->leaf->efrags;
r_efrag.c:				*prev = ef->leafnext;
r_efrag.c:				prev = &walk->leafnext;
r_efrag.c:		ef = ef->entnext;
r_efrag.c:		old->entnext = cl.free_efrags;
r_efrag.c:	ent->efrag = NULL; 
r_efrag.c:	if (node->contents == CONTENTS_SOLID)
r_efrag.c:	if ( node->contents < 0)
r_efrag.c:		cl.free_efrags = cl.free_efrags->entnext;
r_efrag.c:		ef->entity = r_addent;
r_efrag.c:		lastlink = &ef->entnext;
r_efrag.c:		ef->entnext = NULL;
r_efrag.c:		ef->leaf = leaf;
r_efrag.c:		ef->leafnext = leaf->efrags;
r_efrag.c:		leaf->efrags = ef;
r_efrag.c:	splitplane = node->plane;
r_efrag.c:		R_SplitEntityOnNode (node->children[0]);
r_efrag.c:		R_SplitEntityOnNode (node->children[1]);
r_efrag.c:	if (node->visframe != r_visframecount)
r_efrag.c:	if (node->contents < 0)
r_efrag.c:		if (node->contents != CONTENTS_SOLID)
r_efrag.c:			r_pefragtopnode = node; // we've reached a non-solid leaf, so it's
r_efrag.c:	splitplane = node->plane;
r_efrag.c:		R_SplitEntityOnNode2 (node->children[0]);
r_efrag.c:		R_SplitEntityOnNode2 (node->children[1]);
r_efrag.c:	if (!ent->model)
r_efrag.c:	lastlink = &ent->efrag;
r_efrag.c:	entmodel = ent->model;
r_efrag.c:		r_emins[i] = ent->origin[i] + entmodel->mins[i];
r_efrag.c:		r_emaxs[i] = ent->origin[i] + entmodel->maxs[i];
r_efrag.c:	R_SplitEntityOnNode (cl.worldmodel->nodes);
r_efrag.c:	ent->topnode = r_pefragtopnode;
r_efrag.c:// FIXME: a lot of this goes away with edge-based
r_efrag.c:		pent = pefrag->entity;
r_efrag.c:		clmodel = pent->model;
r_efrag.c:		switch (clmodel->type)
r_efrag.c:			pent = pefrag->entity;
r_efrag.c:			if ((pent->visframe != r_framecount) &&
r_efrag.c:				pent->visframe = r_framecount;
r_efrag.c:			ppefrag = &pefrag->leafnext;
r_efrag.c:			Sys_Error ("R_StoreEfrags: Bad entity type %d\n", clmodel->type);
r_light.c:Copyright (C) 1996-1997 Id Software, Inc.
r_light.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_light.c:		k = cl_lightstyle[j].map[k] - 'a';
r_light.c:	if (node->contents < 0)
r_light.c:	splitplane = node->plane;
r_light.c:	dist = DotProduct (light->origin, splitplane->normal) - splitplane->dist;
r_light.c:	if (dist > light->radius)
r_light.c:		R_MarkLights (light, bit, node->children[0]);
r_light.c:	if (dist < -light->radius)
r_light.c:		R_MarkLights (light, bit, node->children[1]);
r_light.c:	surf = cl.worldmodel->surfaces + node->firstsurface;
r_light.c:	for (i=0 ; i<node->numsurfaces ; i++, surf++)
r_light.c:		if (surf->dlightframe != r_dlightframecount)
r_light.c:			surf->dlightbits = 0;
r_light.c:			surf->dlightframe = r_dlightframecount;
r_light.c:		surf->dlightbits |= bit;
r_light.c:	R_MarkLights (light, bit, node->children[0]);
r_light.c:	R_MarkLights (light, bit, node->children[1]);
r_light.c:		if (l->die < cl.time || !l->radius)
r_light.c:		R_MarkLights ( l, 1<<i, cl.worldmodel->nodes );
r_light.c:	if (node->contents < 0)
r_light.c:		return -1;		// didn't hit anything
r_light.c:	plane = node->plane;
r_light.c:	front = DotProduct (start, plane->normal) - plane->dist;
r_light.c:	back = DotProduct (end, plane->normal) - plane->dist;
r_light.c:		return RecursiveLightPoint (node->children[side], start, end);
r_light.c:	frac = front / (front-back);
r_light.c:	mid[0] = start[0] + (end[0] - start[0])*frac;
r_light.c:	mid[1] = start[1] + (end[1] - start[1])*frac;
r_light.c:	mid[2] = start[2] + (end[2] - start[2])*frac;
r_light.c:	r = RecursiveLightPoint (node->children[side], start, mid);
r_light.c:		return -1;		// didn't hit anuthing
r_light.c:	surf = cl.worldmodel->surfaces + node->firstsurface;
r_light.c:	for (i=0 ; i<node->numsurfaces ; i++, surf++)
r_light.c:		if (surf->flags & SURF_DRAWTILED)
r_light.c:		tex = surf->texinfo;
r_light.c:		s = DotProduct (mid, tex->vecs[0]) + tex->vecs[0][3];
r_light.c:		t = DotProduct (mid, tex->vecs[1]) + tex->vecs[1][3];;
r_light.c:		if (s < surf->texturemins[0] ||
r_light.c:		t < surf->texturemins[1])
r_light.c:		ds = s - surf->texturemins[0];
r_light.c:		dt = t - surf->texturemins[1];
r_light.c:		if ( ds > surf->extents[0] || dt > surf->extents[1] )
r_light.c:		if (!surf->samples)
r_light.c:		lightmap = surf->samples;
r_light.c:			lightmap += dt * ((surf->extents[0]>>4)+1) + ds;
r_light.c:			for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
r_light.c:				scale = d_lightstylevalue[surf->styles[maps]];
r_light.c:				lightmap += ((surf->extents[0]>>4)+1) *
r_light.c:						((surf->extents[1]>>4)+1);
r_light.c:	return RecursiveLightPoint (node->children[!side], mid, end);
r_light.c:	if (!cl.worldmodel->lightdata)
r_light.c:	end[2] = p[2] - 2048;
r_light.c:	r = RecursiveLightPoint (cl.worldmodel->nodes, p, end);
r_light.c:	if (r == -1)
r_local.h:Copyright (C) 1996-1997 Id Software, Inc.
r_local.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_local.h:// r_local.h -- private refresh defs
r_main.c:Copyright (C) 1996-1997 Id Software, Inc.
r_main.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_main.c:	r_notexture_mip->width = r_notexture_mip->height = 16;
r_main.c:	r_notexture_mip->offsets[0] = sizeof(texture_t);
r_main.c:	r_notexture_mip->offsets[1] = r_notexture_mip->offsets[0] + 16*16;
r_main.c:	r_notexture_mip->offsets[2] = r_notexture_mip->offsets[1] + 8*8;
r_main.c:	r_notexture_mip->offsets[3] = r_notexture_mip->offsets[2] + 4*4;
r_main.c:		dest = (byte *)r_notexture_mip + r_notexture_mip->offsets[m];
r_main.c:	// don't need this -- it's precomputed in a header file -- Alex
r_main.c:// TODO: collect 386-specific code in one place
r_main.c:					     (long)R_EdgeCodeEnd - (long)R_EdgeCodeStart);
r_main.c:	for (i=0 ; i<cl.worldmodel->numleafs ; i++)
r_main.c:		cl.worldmodel->leafs[i].efrags = NULL;
r_main.c:		surfaces--;
r_main.c:	h = pvrectin->height - lineadj;
r_main.c:	pvrect->width = pvrectin->width * size;
r_main.c:	if (pvrect->width < 96)
r_main.c:		size = 96.0 / pvrectin->width;
r_main.c:		pvrect->width = 96;	// min for icons
r_main.c:	pvrect->width &= ~7;
r_main.c:	pvrect->height = pvrectin->height * size;
r_main.c:	if (pvrect->height > pvrectin->height - lineadj)
r_main.c:		pvrect->height = pvrectin->height - lineadj;
r_main.c:	pvrect->height &= ~1;
r_main.c:	pvrect->x = (pvrectin->width - pvrect->width)/2;
r_main.c:	pvrect->y = (h - pvrect->height)/2;
r_main.c:			pvrect->y >>= 1;
r_main.c:			pvrect->height >>= 1;
r_main.c:	r_refdef.fvrectx_adj = (float)r_refdef.vrect.x - 0.5;
r_main.c:	r_refdef.vrect_x_adj_shift20 = (r_refdef.vrect.x<<20) + (1<<19) - 1;
r_main.c:	r_refdef.fvrecty_adj = (float)r_refdef.vrect.y - 0.5;
r_main.c:	r_refdef.vrectright_adj_shift20 = (r_refdef.vrectright<<20) + (1<<19) - 1;
r_main.c:	r_refdef.fvrectright_adj = (float)r_refdef.vrectright - 0.5;
r_main.c:	r_refdef.vrectrightedge = (float)r_refdef.vrectright - 0.99;
r_main.c:	r_refdef.fvrectbottom_adj = (float)r_refdef.vrectbottom - 0.5;
r_main.c:			r_refdef.vrect.x - 0.5;
r_main.c:			r_refdef.vrect.y - 0.5;
r_main.c:	xscaleshrink = (r_refdef.vrect.width-6)/r_refdef.horizontalFieldOfView;
r_main.c:	screenedge[0].normal[0] = -1.0 / (xOrigin*r_refdef.horizontalFieldOfView);
r_main.c:			1.0 / ((1.0-xOrigin)*r_refdef.horizontalFieldOfView);
r_main.c:	screenedge[2].normal[1] = -1.0 / (yOrigin*verticalFieldOfView);
r_main.c:	screenedge[3].normal[1] = 1.0 / ((1.0-yOrigin)*verticalFieldOfView);
r_main.c:// TODO: collect 386-specific code in one place
r_main.c:						     (long)R_Surf8End - (long)R_Surf8Start);
r_main.c:						     (long)R_Surf16End - (long)R_Surf16Start);
r_main.c:	for (i=0 ; i<cl.worldmodel->numleafs ; i++)
r_main.c:			node = (mnode_t *)&cl.worldmodel->leafs[i+1];
r_main.c:				if (node->visframe == r_visframecount)
r_main.c:				node->visframe = r_visframecount;
r_main.c:				node = node->parent;
r_main.c:	float		lightvec[3] = {-1, 0, 0};
r_main.c:		switch (currententity->model->type)
r_main.c:			VectorCopy (currententity->origin, r_entorigin);
r_main.c:			VectorCopy (currententity->origin, r_entorigin);
r_main.c:				j = R_LightPoint (currententity->origin);
r_main.c:						VectorSubtract (currententity->origin,
r_main.c:						add = cl_dlights[lnum].radius - Length(dist);
r_main.c:					lighting.shadelight = 192 - lighting.ambientlight;
r_main.c:	float		lightvec[3] = {-1, 0, 0};
r_main.c:	if (!currententity->model)
r_main.c:	VectorCopy (currententity->origin, r_entorigin);
r_main.c:	j = R_LightPoint (currententity->origin);
r_main.c:		if (!dl->radius)
r_main.c:		if (!dl->radius)
r_main.c:		if (dl->die < cl.time)
r_main.c:		VectorSubtract (currententity->origin, dl->origin, dist);
r_main.c:		add = dl->radius - Length(dist);
r_main.c:		r_viewlighting.shadelight = 192 - r_viewlighting.ambientlight;
r_main.c:	if (currententity->angles[0] || currententity->angles[1]
r_main.c:		|| currententity->angles[2])
r_main.c:			d = DotProduct (currententity->origin, view_clipplanes[i].normal);
r_main.c:			d -= view_clipplanes[i].dist;
r_main.c:			if (d <= -clmodel->radius)
r_main.c:			if (d <= clmodel->radius)
r_main.c:		// FIXME: do with fast look-ups or integer tests based on the sign bit
r_main.c:			d -= view_clipplanes[i].dist;
r_main.c:			d -= view_clipplanes[i].dist;
r_main.c:		switch (currententity->model->type)
r_main.c:			clmodel = currententity->model;
r_main.c:				minmaxs[j] = currententity->origin[j] +
r_main.c:						clmodel->mins[j];
r_main.c:				minmaxs[3+j] = currententity->origin[j] +
r_main.c:						clmodel->maxs[j];
r_main.c:				VectorCopy (currententity->origin, r_entorigin);
r_main.c:				r_pcurrentvertbase = clmodel->vertexes;
r_main.c:				if (clmodel->firstmodelsurface != 0)
r_main.c:							clmodel->nodes + clmodel->hulls[0].firstclipnode);
r_main.c:			// if the driver wants polygons, deliver those. Z-buffering is on
r_main.c:					R_SplitEntityOnNode2 (cl.worldmodel->nodes);
r_main.c:						currententity->topnode = r_pefragtopnode;
r_main.c:						if (r_pefragtopnode->contents >= 0)
r_main.c:						currententity->topnode = NULL;
r_main.c:				((CACHE_SIZE - 1) / sizeof(edge_t)) + 1];
r_main.c:				((CACHE_SIZE - 1) / sizeof(surf_t)) + 1];
r_main.c:				(((long)&ledges[0] + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
r_main.c:				(((long)&lsurfs[0] + CACHE_SIZE - 1) & ~(CACHE_SIZE - 1));
r_main.c:		surfaces--;
r_main.c:	V_SetContentsColor (r_viewleaf->contents);
r_main.c:// back to high floating-point precision
r_main.c:	delta = (byte *)&dummy - r_stack_start;
r_main.c:	if (delta < -10000 || delta > 10000)
r_misc.c:Copyright (C) 1996-1997 Id Software, Inc.
r_misc.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_misc.c:	time = stop-start;
r_misc.c:// FIXME: should be disabled on no-buffer adapters, or should be in the driver
r_misc.c:	for (i=0 ; i<h ; i++, dest -= vid.rowbytes*2)
r_misc.c:		*(dest-vid.rowbytes) = 0x30;
r_misc.c:	for ( ; i<s ; i++, dest -= vid.rowbytes*2)
r_misc.c:		*(dest-vid.rowbytes) = 0x30;
r_misc.c:	a = (r_time2-r_time1)/0.01;
r_misc.c:		x = r_refdef.vrect.width-1;
r_misc.c:		x = r_refdef.vrect.width -
r_misc.c:				(r_refdef.vrect.width - MAX_TIMINGS)/2;
r_misc.c:		R_LineGraph (x, r_refdef.vrect.height-2, r_timings[a]);
r_misc.c:		x--;
r_misc.c:		a--;
r_misc.c:		if (a == -1)
r_misc.c:			a = MAX_TIMINGS-1;
r_misc.c:	ms = 1000* (r_time2 - r_time1);
r_misc.c:	dp_time = (dp_time2 - dp_time1) * 1000;
r_misc.c:	rw_time = (rw_time2 - rw_time1) * 1000;
r_misc.c:	db_time = (db_time2 - db_time1) * 1000;
r_misc.c:	se_time = (se_time2 - se_time1) * 1000;
r_misc.c:	de_time = (de_time2 - de_time1) * 1000;
r_misc.c:	dv_time = (dv_time2 - dv_time1) * 1000;
r_misc.c:	ms = (r_time2 - r_time1) * 1000;
r_misc.c:		v[1] = -screenedge[i].normal[0];
r_misc.c:	d = DotProduct (r_origin, p->normal);
r_misc.c:	*dist = p->dist - d;
r_misc.c:	TransformVector (p->normal, normal);
r_misc.c:		if ((surface_p - surfaces) > r_maxsurfsseen)
r_misc.c:			r_maxsurfsseen = surface_p - surfaces;
r_misc.c:		Con_Printf ("Used %d of %d surfs; %d max\n", surface_p - surfaces,
r_misc.c:				surf_max - surfaces, r_maxsurfsseen);
r_misc.c:		edgecount = edge_p - r_edges;
r_misc.c:	r_dowarp = r_waterwarp.value && (r_viewleaf->contents <= CONTENTS_WATER);
r_part.c:Copyright (C) 1996-1997 Id Software, Inc.
r_part.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_part.c:	i = COM_CheckParm ("-particles");
r_part.c:	org[0] = ent->origin[0];
r_part.c:	org[1] = ent->origin[1];
r_part.c:	org[2] = ent->origin[2];
r_part.c:	for (i=-16 ; i<16 ; i+=8)
r_part.c:		for (j=-16 ; j<16 ; j+=8)
r_part.c:				free_particles = p->next;
r_part.c:				p->next = active_particles;
r_part.c:				p->die = cl.time + 0.2 + (rand()&7) * 0.02;
r_part.c:				p->color = 150 + rand()%6;
r_part.c:				p->type = pt_slowgrav;
r_part.c:				p->org[0] = org[0] + i + (rand()&3);
r_part.c:				p->org[1] = org[1] + j + (rand()&3);
r_part.c:				p->org[2] = org[2] + k + (rand()&3);
r_part.c:				VectorScale (dir, vel, p->vel);
r_part.c:		forward[2] = -sp;
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:		p->die = cl.time + 0.01;
r_part.c:		p->color = 0x6f;
r_part.c:		p->type = pt_explode;
r_part.c:		p->org[0] = ent->origin[0] + r_avertexnormals[i][0]*dist + forward[0]*beamlength;			
r_part.c:		p->org[1] = ent->origin[1] + r_avertexnormals[i][1]*dist + forward[1]*beamlength;			
r_part.c:		p->org[2] = ent->origin[2] + r_avertexnormals[i][2]*dist + forward[2]*beamlength;			
r_part.c:	particles[r_numparticles-1].next = NULL;
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:		p->die = 99999;
r_part.c:		p->color = (-c)&15;
r_part.c:		p->type = pt_static;
r_part.c:		VectorCopy (vec3_origin, p->vel);
r_part.c:		VectorCopy (org, p->org);
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:		p->die = cl.time + 5;
r_part.c:		p->color = ramp1[0];
r_part.c:		p->ramp = rand()&3;
r_part.c:			p->type = pt_explode;
r_part.c:				p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:				p->vel[j] = (rand()%512)-256;
r_part.c:			p->type = pt_explode2;
r_part.c:				p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:				p->vel[j] = (rand()%512)-256;
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:		p->die = cl.time + 0.3;
r_part.c:		p->color = colorStart + (colorMod % colorLength);
r_part.c:		p->type = pt_blob;
r_part.c:			p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:			p->vel[j] = (rand()%512)-256;
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:		p->die = cl.time + 1 + (rand()&8)*0.05;
r_part.c:			p->type = pt_blob;
r_part.c:			p->color = 66 + rand()%6;
r_part.c:				p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:				p->vel[j] = (rand()%512)-256;
r_part.c:			p->type = pt_blob2;
r_part.c:			p->color = 150 + rand()%6;
r_part.c:				p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:				p->vel[j] = (rand()%512)-256;
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:			p->die = cl.time + 5;
r_part.c:			p->color = ramp1[0];
r_part.c:			p->ramp = rand()&3;
r_part.c:				p->type = pt_explode;
r_part.c:					p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:					p->vel[j] = (rand()%512)-256;
r_part.c:				p->type = pt_explode2;
r_part.c:					p->org[j] = org[j] + ((rand()%32)-16);
r_part.c:					p->vel[j] = (rand()%512)-256;
r_part.c:			p->die = cl.time + 0.1*(rand()%5);
r_part.c:			p->color = (color&~7) + (rand()&7);
r_part.c:			p->type = pt_slowgrav;
r_part.c:				p->org[j] = org[j] + ((rand()&15)-8);
r_part.c:				p->vel[j] = dir[j]*15;// + (rand()%300)-150;
r_part.c:	for (i=-16 ; i<16 ; i++)
r_part.c:		for (j=-16 ; j<16 ; j++)
r_part.c:				free_particles = p->next;
r_part.c:				p->next = active_particles;
r_part.c:				p->die = cl.time + 2 + (rand()&31) * 0.02;
r_part.c:				p->color = 224 + (rand()&7);
r_part.c:				p->type = pt_slowgrav;
r_part.c:				p->org[0] = org[0] + dir[0];
r_part.c:				p->org[1] = org[1] + dir[1];
r_part.c:				p->org[2] = org[2] + (rand()&63);
r_part.c:				VectorScale (dir, vel, p->vel);
r_part.c:	for (i=-16 ; i<16 ; i+=4)
r_part.c:		for (j=-16 ; j<16 ; j+=4)
r_part.c:			for (k=-24 ; k<32 ; k+=4)
r_part.c:				free_particles = p->next;
r_part.c:				p->next = active_particles;
r_part.c:				p->die = cl.time + 0.2 + (rand()&7) * 0.02;
r_part.c:				p->color = 7 + (rand()&7);
r_part.c:				p->type = pt_slowgrav;
r_part.c:				p->org[0] = org[0] + i + (rand()&3);
r_part.c:				p->org[1] = org[1] + j + (rand()&3);
r_part.c:				p->org[2] = org[2] + k + (rand()&3);
r_part.c:				VectorScale (dir, vel, p->vel);
r_part.c:		type -= 128;
r_part.c:		len -= dec;
r_part.c:		free_particles = p->next;
r_part.c:		p->next = active_particles;
r_part.c:		VectorCopy (vec3_origin, p->vel);
r_part.c:		p->die = cl.time + 2;
r_part.c:				p->ramp = (rand()&3);
r_part.c:				p->color = ramp3[(int)p->ramp];
r_part.c:				p->type = pt_fire;
r_part.c:					p->org[j] = start[j] + ((rand()%6)-3);
r_part.c:				p->ramp = (rand()&3) + 2;
r_part.c:				p->color = ramp3[(int)p->ramp];
r_part.c:				p->type = pt_fire;
r_part.c:					p->org[j] = start[j] + ((rand()%6)-3);
r_part.c:				p->type = pt_grav;
r_part.c:				p->color = 67 + (rand()&3);
r_part.c:					p->org[j] = start[j] + ((rand()%6)-3);
r_part.c:				p->die = cl.time + 0.5;
r_part.c:				p->type = pt_static;
r_part.c:					p->color = 52 + ((tracercount&4)<<1);
r_part.c:					p->color = 230 + ((tracercount&4)<<1);
r_part.c:				VectorCopy (start, p->org);
r_part.c:					p->vel[0] = 30*vec[1];
r_part.c:					p->vel[1] = 30*-vec[0];
r_part.c:					p->vel[0] = 30*-vec[1];
r_part.c:					p->vel[1] = 30*vec[0];
r_part.c:				p->type = pt_grav;
r_part.c:				p->color = 67 + (rand()&3);
r_part.c:					p->org[j] = start[j] + ((rand()%6)-3);
r_part.c:				len -= 3;
r_part.c:				p->color = 9*16 + 8 + (rand()&3);
r_part.c:				p->type = pt_static;
r_part.c:				p->die = cl.time + 0.3;
r_part.c:					p->org[j] = start[j] + ((rand()&15)-8);
r_shared.h:Copyright (C) 1996-1997 Id Software, Inc.
r_shared.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_shared.h:// r_shared.h: general refresh-related stuff shared between the refresh and the
r_shared.h:									// -1 = in inverted span (end before
r_sky.c:Copyright (C) 1996-1997 Id Software, Inc.
r_sky.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_sky.c:							//  of topsky on the right, because the low-level
r_sky.c:							//  drawers need 256-byte scan widths
r_sky.c:	src = (byte *)mt + mt->offsets[0];
r_sky.c:	static int	xlast = -1, ylast = -1;
r_sky.c:	skytime = cl.time - ((int)(cl.time / temp) * temp);
r_sprite.c:Copyright (C) 1996-1997 Id Software, Inc.
r_sprite.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_sprite.c:	VectorScale (r_spritedesc.vpn, -beamlength, vec);
r_sprite.c:	clipdist = pclipplane->dist;
r_sprite.c:	pclipnormal = pclipplane->normal;
r_sprite.c:		dists[i] = DotProduct (instep, pclipnormal) - clipdist;
r_sprite.c:		frac = dists[i] / (dists[i] - dists[i+1]);
r_sprite.c:		outstep[0] = instep[0] + frac*(vert2[0] - instep[0]);
r_sprite.c:		outstep[1] = instep[1] + frac*(vert2[1] - instep[1]);
r_sprite.c:		outstep[2] = instep[2] + frac*(vert2[2] - instep[2]);
r_sprite.c:		outstep[3] = instep[3] + frac*(vert2[3] - instep[3]);
r_sprite.c:		outstep[4] = instep[4] + frac*(vert2[4] - instep[4]);
r_sprite.c:	VectorScale (r_spritedesc.vright, r_spritedesc.pspriteframe->right, right);
r_sprite.c:	VectorScale (r_spritedesc.vup, r_spritedesc.pspriteframe->up, up);
r_sprite.c:	VectorScale (r_spritedesc.vright, r_spritedesc.pspriteframe->left, left);
r_sprite.c:	VectorScale (r_spritedesc.vup, r_spritedesc.pspriteframe->down, down);
r_sprite.c:	r_spritedesc.nearzi = -999999;
r_sprite.c:		pout->zi = 1.0 / transformed[2];
r_sprite.c:		if (pout->zi > r_spritedesc.nearzi)
r_sprite.c:			r_spritedesc.nearzi = pout->zi;
r_sprite.c:		pout->s = pv[3];
r_sprite.c:		pout->t = pv[4];
r_sprite.c:		scale = xscale * pout->zi;
r_sprite.c:		pout->u = (xcenter + scale * transformed[0]);
r_sprite.c:		scale = yscale * pout->zi;
r_sprite.c:		pout->v = (ycenter - scale * transformed[1]);
r_sprite.c:	frame = currententity->frame;
r_sprite.c:	if ((frame >= psprite->numframes) || (frame < 0))
r_sprite.c:	if (psprite->frames[frame].type == SPR_SINGLE)
r_sprite.c:		pspriteframe = psprite->frames[frame].frameptr;
r_sprite.c:		pspritegroup = (mspritegroup_t *)psprite->frames[frame].frameptr;
r_sprite.c:		pintervals = pspritegroup->intervals;
r_sprite.c:		numframes = pspritegroup->numframes;
r_sprite.c:		fullinterval = pintervals[numframes-1];
r_sprite.c:		time = cl.time + currententity->syncbase;
r_sprite.c:		targettime = time - ((int)(time / fullinterval)) * fullinterval;
r_sprite.c:		for (i=0 ; i<(numframes-1) ; i++)
r_sprite.c:		pspriteframe = pspritegroup->frames[i];
r_sprite.c:	psprite = currententity->model->cache.data;
r_sprite.c:	sprite_width = r_spritedesc.pspriteframe->width;
r_sprite.c:	sprite_height = r_spritedesc.pspriteframe->height;
r_sprite.c:// TODO: make this caller-selectable
r_sprite.c:	if (psprite->type == SPR_FACING_UPRIGHT)
r_sprite.c:		tvec[0] = -modelorg[0];
r_sprite.c:		tvec[1] = -modelorg[1];
r_sprite.c:		tvec[2] = -modelorg[2];
r_sprite.c:		if ((dot > 0.999848) || (dot < -0.999848))	// cos(1 degree) = 0.999848
r_sprite.c:								// CrossProduct(r_spritedesc.vup, -modelorg,
r_sprite.c:		r_spritedesc.vright[1] = -tvec[0];
r_sprite.c:		r_spritedesc.vpn[0] = -r_spritedesc.vright[1];
r_sprite.c:	else if (psprite->type == SPR_VP_PARALLEL)
r_sprite.c:	else if (psprite->type == SPR_VP_PARALLEL_UPRIGHT)
r_sprite.c:		if ((dot > 0.999848) || (dot < -0.999848))	// cos(1 degree) = 0.999848
r_sprite.c:		r_spritedesc.vright[1] = -vpn[0];	//  r_spritedesc.vright)
r_sprite.c:		r_spritedesc.vpn[0] = -r_spritedesc.vright[1];
r_sprite.c:	else if (psprite->type == SPR_ORIENTED)
r_sprite.c:		AngleVectors (currententity->angles, r_spritedesc.vpn,
r_sprite.c:	else if (psprite->type == SPR_VP_PARALLEL_ORIENTED)
r_sprite.c:		angle = currententity->angles[ROLL] * (M_PI*2 / 360);
r_sprite.c:			r_spritedesc.vup[i] = vright[i] * -sr + vup[i] * cr;
r_sprite.c:		Sys_Error ("R_DrawSprite: Bad sprite type %d", psprite->type);
r_sprite.c:	R_RotateSprite (psprite->beamlength);
r_surf.c:Copyright (C) 1996-1997 Id Software, Inc.
r_surf.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_surf.c:// r_surf.c: surface-related refresh code
r_surf.c:	smax = (surf->extents[0]>>4)+1;
r_surf.c:	tmax = (surf->extents[1]>>4)+1;
r_surf.c:	tex = surf->texinfo;
r_surf.c:		if ( !(surf->dlightbits & (1<<lnum) ) )
r_surf.c:		dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
r_surf.c:				surf->plane->dist;
r_surf.c:		rad -= fabs(dist);
r_surf.c:		minlight = rad - minlight;
r_surf.c:			impact[i] = cl_dlights[lnum].origin[i] -
r_surf.c:					surf->plane->normal[i]*dist;
r_surf.c:		local[0] = DotProduct (impact, tex->vecs[0]) + tex->vecs[0][3];
r_surf.c:		local[1] = DotProduct (impact, tex->vecs[1]) + tex->vecs[1][3];
r_surf.c:		local[0] -= surf->texturemins[0];
r_surf.c:		local[1] -= surf->texturemins[1];
r_surf.c:			td = local[1] - t*16;
r_surf.c:				td = -td;
r_surf.c:				sd = local[0] - s*16;
r_surf.c:					sd = -sd;
r_surf.c:					temp = (rad - dist)*256;
r_surf.c:							blocklights[i] -= temp;
r_surf.c:					blocklights[t*smax + s] += (rad - dist)*256;
r_surf.c:	smax = (surf->extents[0]>>4)+1;
r_surf.c:	tmax = (surf->extents[1]>>4)+1;
r_surf.c:	lightmap = surf->samples;
r_surf.c:	if (r_fullbright.value || !cl.worldmodel->lightdata)
r_surf.c:		for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
r_surf.c:	if (surf->dlightframe == r_framecount)
r_surf.c:		t = (255*256 - (int)blocklights[i]) >> (8 - VID_CBITS);
r_surf.c:	if (currententity->frame)
r_surf.c:		if (base->alternate_anims)
r_surf.c:			base = base->alternate_anims;
r_surf.c:	if (!base->anim_total)
r_surf.c:	reletive = (int)(cl.time*10) % base->anim_total;
r_surf.c:	while (base->anim_min > reletive || base->anim_max <= reletive)
r_surf.c:		base = base->anim_next;
r_surf.c:	r_source = (byte *)mt + mt->offsets[r_drawsurf.surfmip];
r_surf.c:// the fractional light values should range from 0 to (VID_GRADES - 1) << 16
r_surf.c:// from a source range of 0 - 255
r_surf.c:	texwidth = mt->width >> r_drawsurf.surfmip;
r_surf.c:	blockdivshift = 4 - r_drawsurf.surfmip;
r_surf.c:	blockdivmask = (1 << blockdivshift) - 1;
r_surf.c:	r_lightwidth = (r_drawsurf.surf->extents[0]>>4)+1;
r_surf.c:	smax = mt->width >> r_drawsurf.surfmip;
r_surf.c:	tmax = mt->height >> r_drawsurf.surfmip;
r_surf.c:	soffset = r_drawsurf.surf->texturemins[0];
r_surf.c:	basetoffset = r_drawsurf.surf->texturemins[1];
r_surf.c:		lightleftstep = (r_lightptr[0] - lightleft) >> 4;
r_surf.c:		lightrightstep = (r_lightptr[1] - lightright) >> 4;
r_surf.c:			lighttemp = lightleft - lightright;
r_surf.c:			for (b=15; b>=0; b--)
r_surf.c:			psource -= r_stepback;
r_surf.c:		lightleftstep = (r_lightptr[0] - lightleft) >> 3;
r_surf.c:		lightrightstep = (r_lightptr[1] - lightright) >> 3;
r_surf.c:			lighttemp = lightleft - lightright;
r_surf.c:			for (b=7; b>=0; b--)
r_surf.c:			psource -= r_stepback;
r_surf.c:		lightleftstep = (r_lightptr[0] - lightleft) >> 2;
r_surf.c:		lightrightstep = (r_lightptr[1] - lightright) >> 2;
r_surf.c:			lighttemp = lightleft - lightright;
r_surf.c:			for (b=3; b>=0; b--)
r_surf.c:			psource -= r_stepback;
r_surf.c:		lightleftstep = (r_lightptr[0] - lightleft) >> 1;
r_surf.c:		lightrightstep = (r_lightptr[1] - lightright) >> 1;
r_surf.c:			lighttemp = lightleft - lightright;
r_surf.c:			for (b=1; b>=0; b--)
r_surf.c:			psource -= r_stepback;
r_surf.c:		lighttemp = lightright - lightleft;
r_surf.c:	turb = sintable + ((int)(cl.time*SPEED)&(CYCLE-1));
r_surf.c:			s = (((j << 16) + turb[i & (CYCLE-1)]) >> 16) & 63;
r_surf.c:			t = (((i << 16) + turb[j & (CYCLE-1)]) >> 16) & 63;
r_surf.c:	turb = sintable + ((int)(cl.time*SPEED)&(CYCLE-1));
r_surf.c:			s = (((j << 16) + turb[i & (CYCLE-1)]) >> 16) & 63;
r_surf.c:			t = (((i << 16) + turb[j & (CYCLE-1)]) >> 16) & 63;
r_surf.c:	if (psurf->flags & SURF_DRAWTURB)
r_surf.c:				((byte *)psurf->texinfo->texture + psurf->texinfo->texture->offsets[0]), pdest);
r_surf.c:				((byte *)psurf->texinfo->texture + psurf->texinfo->texture->offsets[0]), pdest);
r_surf.c:	else if (psurf->flags & SURF_DRAWSKY)
r_vars.c:Copyright (C) 1996-1997 Id Software, Inc.
r_vars.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_vars.c://-------------------------------------------------------
r_vars.c://-------------------------------------------------------
r_varsa.s:Copyright (C) 1996-1997 Id Software, Inc.
r_varsa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
r_varsa.s://-------------------------------------------------------
r_varsa.s:// ASM-only variables
r_varsa.s://-------------------------------------------------------
r_varsa.s:float_minus_1:	.single	-1.0
render.h:Copyright (C) 1996-1997 Id Software, Inc.
render.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
render.h:// refresh.h -- public interface to refresh functions
render.h:	float					syncbase;		// for client-side animations
render.h:	float		fvrectx, fvrecty;		// for floating-point compares
render.h:	int			vrect_x_adj_shift20;	// (vrect.x + 0.5 - epsilon) << 20
render.h:	int			vrectright_adj_shift20;	// (vrectright + 0.5 - epsilon) << 20
sbar.c:Copyright (C) 1996-1997 Id Software, Inc.
sbar.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sbar.c:// sbar.c -- status bar code
sbar.c:#define STAT_MINUS		10	// num frame for '-' stats digit
sbar.c:qpic_t      *sb_weapons[7][8];   // 0 is active, 1 is owned, 2-5 are flashes
sbar.c:qpic_t	*sb_faces[7][2];		// 0 is gibbed, 1 is dead, 2-6 are alive
sbar.c:qpic_t      *rsb_teambord;		// PGM 01/19/97 - team color border
sbar.c:qpic_t      *hsb_weapons[7][5];   // 0 is active, 1 is owned, 2-5 are flashes
sbar.c:	Cmd_AddCommand ("-showscores", Sbar_DontShowScores);
sbar.c:// PGM 01/19/97 - team color border
sbar.c:// PGM 01/19/97 - team color border
sbar.c:		Draw_Pic (x /* + ((vid.width - 320)>>1)*/, y + (vid.height-SBAR_HEIGHT), pic);
sbar.c:		Draw_Pic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
sbar.c:		Draw_TransPic (x /*+ ((vid.width - 320)>>1)*/, y + (vid.height-SBAR_HEIGHT), pic);
sbar.c:		Draw_TransPic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
sbar.c:		Draw_Character ( x /*+ ((vid.width - 320)>>1) */ + 4 , y + vid.height-SBAR_HEIGHT, num);
sbar.c:		Draw_Character ( x + ((vid.width - 320)>>1) + 4 , y + vid.height-SBAR_HEIGHT, num);
sbar.c:		Draw_String (x /*+ ((vid.width - 320)>>1)*/, y+ vid.height-SBAR_HEIGHT, str);
sbar.c:		Draw_String (x + ((vid.width - 320)>>1), y+ vid.height-SBAR_HEIGHT, str);
sbar.c:		*str++ = '-';
sbar.c:		num = -num;
sbar.c:		num -= dig*pow10;
sbar.c:	return str-buf;
sbar.c:		ptr += (l-digits);
sbar.c:		x += (digits-l)*24;
sbar.c:		if (*ptr == '-')
sbar.c:			frame = *ptr -'0';
sbar.c:		for (j=0 ; j<scoreboardlines-1-i ; j++)
sbar.c:		sprintf (&scoreboardtext[i][1], "%3i %s", s->frags, s->name);
sbar.c:		top = s->colors & 0xf0;
sbar.c:		bottom = (s->colors & 15) <<4;
sbar.c:	seconds = cl.time - 60*minutes;
sbar.c:	units = seconds - 10*tens;
sbar.c:	Sbar_DrawString (232 - l*4, 12, cl.levelname);
sbar.c:		if (!s->name[0])
sbar.c:		top = s->colors & 0xf0;
sbar.c:		bottom = (s->colors & 15)<<4;
sbar.c:		Draw_Fill ( x*8+10 + ((vid.width - 320)>>1), y + vid.height - SBAR_HEIGHT, 28, 4, top);
sbar.c:		Draw_Fill ( x*8+10 + ((vid.width - 320)>>1), y+4 + vid.height - SBAR_HEIGHT, 28, 4, bottom);
sbar.c:			Sbar_DrawPic (0, -24, rsb_invbar[0]);
sbar.c:			Sbar_DrawPic (0, -24, rsb_invbar[1]);
sbar.c:		Sbar_DrawPic (0, -24, sb_ibar);
sbar.c:			flashon = (int)((cl.time - time)*10);
sbar.c:         Sbar_DrawPic (i*24, -16, sb_weapons[flashon][i]);
sbar.c:            flashon = (int)((cl.time - time)*10);
sbar.c:                     Sbar_DrawPic (96, -16, hsb_weapons[flashon][2]);
sbar.c:                     Sbar_DrawPic (96, -16, hsb_weapons[flashon][3]);
sbar.c:                     Sbar_DrawPic (96, -16, hsb_weapons[0][3]);
sbar.c:                  Sbar_DrawPic (96, -16, hsb_weapons[flashon][4]);
sbar.c:               Sbar_DrawPic (176 + (i*24), -16, hsb_weapons[flashon][i]);
sbar.c:					Sbar_DrawPic ((i+2)*24, -16, rsb_weapons[i]);
sbar.c:			Sbar_DrawCharacter ( (6*i+1)*8 - 2, -24, 18 + num[0] - '0');
sbar.c:			Sbar_DrawCharacter ( (6*i+2)*8 - 2, -24, 18 + num[1] - '0');
sbar.c:			Sbar_DrawCharacter ( (6*i+3)*8 - 2, -24, 18 + num[2] - '0');
sbar.c:         if (time && time > cl.time - 2 && flashon )
sbar.c:               Sbar_DrawPic (192 + i*16, -16, sb_items[i]);
sbar.c:         if (time && time > cl.time - 2)
sbar.c:            if (time && time > cl.time - 2 && flashon )
sbar.c:               Sbar_DrawPic (288 + i*16, -16, hsb_items[i]);
sbar.c:            if (time && time > cl.time - 2)
sbar.c:				if (time &&	time > cl.time - 2 && flashon )
sbar.c:					Sbar_DrawPic (288 + i*16, -16, rsb_items[i]);
sbar.c:				if (time &&	time > cl.time - 2)
sbar.c:				if (time &&	time > cl.time - 2 && flashon )
sbar.c:					Sbar_DrawPic (320-32 + i*8, -16, sb_sigil[i]);
sbar.c:				if (time &&	time > cl.time - 2)
sbar.c:		xofs = (vid.width - 320)>>1;
sbar.c:	y = vid.height - SBAR_HEIGHT - 23;
sbar.c:		if (!s->name[0])
sbar.c:		top = s->colors & 0xf0;
sbar.c:		bottom = (s->colors & 15)<<4;
sbar.c:		f = s->frags;
sbar.c:		Sbar_DrawCharacter ( (x+1)*8 , -24, num[0]);
sbar.c:		Sbar_DrawCharacter ( (x+2)*8 , -24, num[1]);
sbar.c:		Sbar_DrawCharacter ( (x+3)*8 , -24, num[2]);
sbar.c:		if (k == cl.viewentity - 1)
sbar.c:			Sbar_DrawCharacter (x*8+2, -24, 16);
sbar.c:			Sbar_DrawCharacter ( (x+4)*8-4, -24, 17);
sbar.c:// PGM 01/19/97 - team color drawing
sbar.c:// PGM 03/02/97 - fixed so color swatch only appears in CTF modes
sbar.c:		s = &cl.scores[cl.viewentity - 1];
sbar.c:		top = s->colors & 0xf0;
sbar.c:		bottom = (s->colors & 15)<<4;
sbar.c:			xofs = ((vid.width - 320)>>1) + 113;
sbar.c:		Draw_Fill (xofs, vid.height-SBAR_HEIGHT+3, 22, 9, top);
sbar.c:		Draw_Fill (xofs, vid.height-SBAR_HEIGHT+12, 22, 9, bottom);
sbar.c:		f = s->frags;
sbar.c:				Sbar_DrawCharacter(109, 3, 18 + num[0] - '0');
sbar.c:				Sbar_DrawCharacter(116, 3, 18 + num[1] - '0');
sbar.c:				Sbar_DrawCharacter(123, 3, 18 + num[2] - '0');
sbar.c:// PGM 01/19/97 - team color drawing
sbar.c:		Draw_TileClear (0, vid.height - sb_lines, vid.width, sb_lines);
sbar.c:		ptr += (l-digits);
sbar.c:		x += (digits-l)*24;
sbar.c:		if (*ptr == '-')
sbar.c:			frame = *ptr -'0';
sbar.c:	M_DrawPic ((320-pic->width)/2, 8, pic);
sbar.c:	x = 80 + ((vid.width - 320)>>1);
sbar.c:		if (!s->name[0])
sbar.c:		top = s->colors & 0xf0;
sbar.c:		bottom = (s->colors & 15)<<4;
sbar.c:		f = s->frags;
sbar.c:		if (k == cl.viewentity - 1)
sbar.c:			Draw_Character ( x - 8, y, 12);
sbar.c:		total = cl.completed_time - s->entertime;
sbar.c:		n = total - minutes*60;
sbar.c:		Draw_String (x+64, y, s->name);
sbar.c:	y = vid.height - sb_lines;
sbar.c:		if (fragsort[i] == cl.viewentity - 1)
sbar.c:            i = i - numlines/2;
sbar.c:    if (i > scoreboardlines - numlines)
sbar.c:            i = scoreboardlines - numlines;
sbar.c:	for (/* */; i < scoreboardlines && y < vid.height - 8 ; i++)
sbar.c:		if (!s->name[0])
sbar.c:		top = s->colors & 0xf0;
sbar.c:		bottom = (s->colors & 15)<<4;
sbar.c:		f = s->frags;
sbar.c:		if (k == cl.viewentity - 1) {
sbar.c:		total = cl.completed_time - s->entertime;
sbar.c:		n = total - minutes*60;
sbar.c:		Draw_String (x+48, y, s->name);
sbar.c:	num = cl.completed_time - dig*60;
sbar.c:	Draw_TransPic ( (vid.width-pic->width)/2, 16, pic);
sbar.h:Copyright (C) 1996-1997 Id Software, Inc.
sbar.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
screen.c:Copyright (C) 1996-1997 Id Software, Inc.
screen.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
screen.c:// screen.c -- master for refresh, status bar, console, chat, notify, etc
screen.c:cvar_t		scr_fov = {"fov","90"};	// 10 - 170
screen.c:	strncpy (scr_centerstring, str, sizeof(scr_centerstring)-1);
screen.c:		remaining = scr_printspeed.value * (cl.time - scr_centertime_start);
screen.c:		x = (vid.width - l*8)/2;
screen.c:			if (!remaining--)
screen.c:	scr_centertime_off -= host_frametime;
screen.c:	Cvar_SetValue ("viewsize",scr_viewsize.value-10);
screen.c:	if (realtime - cl.last_received_message < 0.3)
screen.c:	Draw_Pic ( (vid.width - pic->width)/2, 
screen.c:		(vid.height - 48 - pic->height)/2, pic);
screen.c:	Draw_Pic ( (vid.width - pic->width)/2, 
screen.c:		(vid.height - 48 - pic->height)/2, pic);
screen.c:		scr_con_current -= scr_conspeed.value*host_frametime;
screen.c:		Draw_TileClear (0,(int)scr_con_current,vid.width, vid.height - (int)scr_con_current);
screen.c:	pcx->manufacturer = 0x0a;	// PCX id
screen.c:	pcx->version = 5;			// 256 color
screen.c: 	pcx->encoding = 1;		// uncompressed
screen.c:	pcx->bits_per_pixel = 8;		// 256 color
screen.c:	pcx->xmin = 0;
screen.c:	pcx->ymin = 0;
screen.c:	pcx->xmax = LittleShort((short)(width-1));
screen.c:	pcx->ymax = LittleShort((short)(height-1));
screen.c:	pcx->hres = LittleShort((short)width);
screen.c:	pcx->vres = LittleShort((short)height);
screen.c:	Q_memset (pcx->palette,0,sizeof(pcx->palette));
screen.c:	pcx->color_planes = 1;		// chunky image
screen.c:	pcx->bytes_per_line = LittleShort((short)width);
screen.c:	pcx->palette_type = LittleShort(2);		// not a grey scale
screen.c:	Q_memset (pcx->filler,0,sizeof(pcx->filler));
screen.c:	pack = &pcx->data;
screen.c:		data += rowbytes - width;
screen.c:	length = pack - (byte *)pcx;
screen.c:		if (Sys_FileTime(checkname) == -1)
screen.c:		x = (vid.width - l*8)/2;
screen.c:		key_count = -1;		// wait for a key down and up
screen.c:		if (realtime - scr_disabled_time > 60)
screen.c:		vrect.height = vid.height - sb_lines;
screen.h:Copyright (C) 1996-1997 Id Software, Inc.
screen.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
server.h:Copyright (C) 1996-1997 Id Software, Inc.
server.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
server.h:// edict->movetype values
server.h:// edict->solid values
server.h:// edict->deadflag values
server.h:// edict->flags
snd_dma.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_dma.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_dma.c:// snd_dma.c -- main control for any streaming sound output device
snd_dma.c:// User-setable variables
snd_dma.c:    Con_Printf("%5d stereo\n", shm->channels - 1);
snd_dma.c:    Con_Printf("%5d samples\n", shm->samples);
snd_dma.c:    Con_Printf("%5d samplepos\n", shm->samplepos);
snd_dma.c:    Con_Printf("%5d samplebits\n", shm->samplebits);
snd_dma.c:    Con_Printf("%5d submission_chunk\n", shm->submission_chunk);
snd_dma.c:    Con_Printf("%5d speed\n", shm->speed);
snd_dma.c:    Con_Printf("0x%x dma buffer\n", shm->buffer);
snd_dma.c:	if (COM_CheckParm("-nosound"))
snd_dma.c:	if (COM_CheckParm("-simsound"))
snd_dma.c:		shm->splitbuffer = 0;
snd_dma.c:		shm->samplebits = 16;
snd_dma.c:		shm->speed = 22050;
snd_dma.c:		shm->channels = 2;
snd_dma.c:		shm->samples = 32768;
snd_dma.c:		shm->samplepos = 0;
snd_dma.c:		shm->soundalive = true;
snd_dma.c:		shm->gamealive = true;
snd_dma.c:		shm->submission_chunk = 1;
snd_dma.c:		shm->buffer = Hunk_AllocName(1<<16, "shmbuf");
snd_dma.c:	Con_Printf ("Sound sampling rate: %i\n", shm->speed);
snd_dma.c://	if (shm->buffer)
snd_dma.c://		shm->buffer[4] = shm->buffer[5] = 0x7f;	// force a pop for debugging
snd_dma.c:		shm->gamealive = 0;
snd_dma.c:	strcpy (sfx->name, name);
snd_dma.c:	Cache_Check (&sfx->cache);
snd_dma.c:    first_to_die = -1;
snd_dma.c:		&& (channels[ch_idx].entchannel == entchannel || entchannel == -1) )
snd_dma.c:		if (channels[ch_idx].end - paintedtime < life_left)
snd_dma.c:			life_left = channels[ch_idx].end - paintedtime;
snd_dma.c:	if (first_to_die == -1)
snd_dma.c:	if (ch->entnum == cl.viewentity)
snd_dma.c:		ch->leftvol = ch->master_vol;
snd_dma.c:		ch->rightvol = ch->master_vol;
snd_dma.c:	snd = ch->sfx;
snd_dma.c:	VectorSubtract(ch->origin, listener_origin, source_vec);
snd_dma.c:	dist = VectorNormalize(source_vec) * ch->dist_mult;
snd_dma.c:	if (shm->channels == 1)
snd_dma.c:		lscale = 1.0 - dot;
snd_dma.c:	scale = (1.0 - dist) * rscale;
snd_dma.c:	ch->rightvol = (int) (ch->master_vol * scale);
snd_dma.c:	if (ch->rightvol < 0)
snd_dma.c:		ch->rightvol = 0;
snd_dma.c:	scale = (1.0 - dist) * lscale;
snd_dma.c:	ch->leftvol = (int) (ch->master_vol * scale);
snd_dma.c:	if (ch->leftvol < 0)
snd_dma.c:		ch->leftvol = 0;
snd_dma.c:	VectorCopy(origin, target_chan->origin);
snd_dma.c:	target_chan->dist_mult = attenuation / sound_nominal_clip_dist;
snd_dma.c:	target_chan->master_vol = vol;
snd_dma.c:	target_chan->entnum = entnum;
snd_dma.c:	target_chan->entchannel = entchannel;
snd_dma.c:	if (!target_chan->leftvol && !target_chan->rightvol)
snd_dma.c:		target_chan->sfx = NULL;
snd_dma.c:	target_chan->sfx = sfx;
snd_dma.c:	target_chan->pos = 0.0;
snd_dma.c:    target_chan->end = paintedtime + sc->length;	
snd_dma.c:		if (check->sfx == sfx && !check->pos)
snd_dma.c:			skip = rand () % (int)(0.1*shm->speed);
snd_dma.c:			if (skip >= target_chan->end)
snd_dma.c:				skip = target_chan->end - 1;
snd_dma.c:			target_chan->pos += skip;
snd_dma.c:			target_chan->end -= skip;
snd_dma.c:	if (!sound_started || !shm || (!shm->buffer && !pDSBuf))
snd_dma.c:	if (!sound_started || !shm || !shm->buffer)
snd_dma.c:	if (shm->samplebits == 8)
snd_dma.c:		while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pData, &dwSize, NULL, NULL, 0)) != DS_OK)
snd_dma.c:		Q_memset(pData, clear, shm->samples * shm->samplebits/8);
snd_dma.c:		pDSBuf->lpVtbl->Unlock(pDSBuf, pData, dwSize, NULL, 0);
snd_dma.c:		Q_memset(shm->buffer, clear, shm->samples * shm->samplebits/8);
snd_dma.c:	if (sc->loopstart == -1)
snd_dma.c:		Con_Printf ("Sound %s not looped\n", sfx->name);
snd_dma.c:	ss->sfx = sfx;
snd_dma.c:	VectorCopy (origin, ss->origin);
snd_dma.c:	ss->master_vol = vol;
snd_dma.c:	ss->dist_mult = (attenuation/64) / sound_nominal_clip_dist;
snd_dma.c:    ss->end = paintedtime + sc->length;	
snd_dma.c:		chan->sfx = ambient_sfx[ambient_channel];
snd_dma.c:		vol = ambient_level.value * l->ambient_sound_level[ambient_channel];
snd_dma.c:		if (chan->master_vol < vol)
snd_dma.c:			chan->master_vol += host_frametime * ambient_fade.value;
snd_dma.c:			if (chan->master_vol > vol)
snd_dma.c:				chan->master_vol = vol;
snd_dma.c:		else if (chan->master_vol > vol)
snd_dma.c:			chan->master_vol -= host_frametime * ambient_fade.value;
snd_dma.c:			if (chan->master_vol < vol)
snd_dma.c:				chan->master_vol = vol;
snd_dma.c:		chan->leftvol = chan->rightvol = chan->master_vol;
snd_dma.c:		if (!ch->sfx)
snd_dma.c:		if (!ch->leftvol && !ch->rightvol)
snd_dma.c:			if (combine && combine->sfx == ch->sfx)
snd_dma.c:				combine->leftvol += ch->leftvol;
snd_dma.c:				combine->rightvol += ch->rightvol;
snd_dma.c:				ch->leftvol = ch->rightvol = 0;
snd_dma.c:				if (combine->sfx == ch->sfx)
snd_dma.c:					combine->leftvol += ch->leftvol;
snd_dma.c:					combine->rightvol += ch->rightvol;
snd_dma.c:					ch->leftvol = ch->rightvol = 0;
snd_dma.c:			if (ch->sfx && (ch->leftvol || ch->rightvol) )
snd_dma.c:				//Con_Printf ("%3i %3i %s\n", ch->leftvol, ch->rightvol, ch->sfx->name);
snd_dma.c:		Con_Printf ("----(%i)----\n", total);
snd_dma.c:	fullsamples = shm->samples / shm->channels;
snd_dma.c:	soundtime = buffers*fullsamples + samplepos/shm->channels;
snd_dma.c:	endtime = soundtime + _snd_mixahead.value * shm->speed;
snd_dma.c:	samps = shm->samples >> (shm->channels-1);
snd_dma.c:	if (endtime - soundtime > samps)
snd_dma.c:			if (pDSBuf->lpVtbl->GetStatus (pDSBuf, &dwStatus) != DD_OK)
snd_dma.c:				pDSBuf->lpVtbl->Restore (pDSBuf);
snd_dma.c:				pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
snd_dma.c:		sc = Cache_Check (&sfx->cache);
snd_dma.c:		size = sc->length*sc->width*(sc->stereo+1);
snd_dma.c:		if (sc->loopstart >= 0)
snd_dma.c:		Con_Printf("(%2db) %6i : %s\n",sc->width*8,  size, sfx->name);
snd_dma.c:	S_StartSound (cl.viewentity, -1, sfx, vec3_origin, 1, 1);
snd_dos.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_dos.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_dos.c:int timeconstant=-1;
snd_dos.c:		str[i] = '0' + ((b & (1<<(7-i))) > 0);
snd_dos.c:	if (timeconstant != -1)
snd_dos.c:	for (i=65536 ; i ; i--) ;
snd_dos.c:	for (i=65536 ; i ; i--)
snd_dos.c:		WriteDSP(shm->speed>>8);
snd_dos.c:		WriteDSP(shm->speed&0xff);
snd_dos.c:		WriteDSP(0xb6);	// 16-bit output
snd_dos.c:		WriteDSP((shm->samples-1) & 0xff);	// # of samples - 1
snd_dos.c:		WriteDSP((shm->samples-1) >> 8);
snd_dos.c:		timeconstant = 65536-(256000000/(shm->channels*shm->speed));
snd_dos.c:		WriteDSP((shm->samples-1) & 0xff);	// # of samples - 1
snd_dos.c:		WriteDSP((shm->samples-1) >> 8);
snd_dos.c:		timeconstant = 65536-(256000000/(shm->channels*shm->speed));
snd_dos.c:		WriteDSP((shm->samples-1) & 0xff);	// # of samples - 1
snd_dos.c:		WriteDSP((shm->samples-1) >> 8);
snd_dos.c:	// set mode- see "undocumented pc", p.876
snd_dos.c:	mode =	(1<<6)	// single-cycle
snd_dos.c:		+(1<<4)		// auto-init dma
snd_dos.c:		dos_outportb(flipflop_reg, 0);		// prepare to send 16-bit value
snd_dos.c:		dos_outportb(flipflop_reg, 0);		// prepare to send 16-bit value
snd_dos.c:		dos_outportb(count_reg[dma], ((dma_size>>1)-1) & 0xff);
snd_dos.c:		dos_outportb(count_reg[dma], ((dma_size>>1)-1) >> 8);
snd_dos.c:		dos_outportb(flipflop_reg, 0);		// prepare to send 16-bit value
snd_dos.c:		dos_outportb(flipflop_reg, 0);		// prepare to send 16-bit value
snd_dos.c:		dos_outportb(count_reg[dma], (dma_size-1) & 0xff);
snd_dos.c:		dos_outportb(count_reg[dma], (dma_size-1) >> 8);
snd_dos.c:// we need at least v2 for auto-init dma
snd_dos.c:	p = COM_CheckParm ("-dsp");
snd_dos.c:	if (p && p < com_argc - 1)
snd_dos.c:			Con_Printf ("-dsp parameter can only be 2, 3, or 4\n");
snd_dos.c:			Con_Printf ("Can't -dsp %i on v%i hardware\n", p, dsp_version);
snd_dos.c:	shm->speed = 11025;
snd_dos.c:	rc = COM_CheckParm("-sspeed");
snd_dos.c:		shm->speed = Q_atoi(com_argv[rc+1]);
snd_dos.c:		shm->channels = 2;
snd_dos.c:		shm->samplebits = 16;
snd_dos.c:		shm->channels = 2;
snd_dos.c:		shm->samplebits = 8;	
snd_dos.c:		shm->channels = 1;
snd_dos.c:		shm->samplebits = 8;	
snd_dos.c:// allocate 8k and get a 4k-aligned buffer from it
snd_dos.c:	realaddr = (realaddr + size) & ~(size-1);
snd_dos.c:	shm->soundalive = true;
snd_dos.c:	shm->splitbuffer = false;
snd_dos.c:	shm->samples = size/(shm->samplebits/8);
snd_dos.c:	shm->samplepos = 0;
snd_dos.c:	shm->submission_chunk = 1;
snd_dos.c:	shm->buffer = (unsigned char *) dma_buffer;
snd_dos.c:	shm->samples = size/(shm->samplebits/8);
snd_dos.c:// clear 16-bit reg flip-flop
snd_dos.c:		if (shm->samplebits == 16)
snd_dos.c:		count = shm->samples - (count+1);
snd_dos.c:		count = dos_inportb(0xc0+(dma-4)*4+2);
snd_dos.c:		count += dos_inportb(0xc0+(dma-4)*4+2) << 8;
snd_dos.c:		if (shm->samplebits == 8)
snd_dos.c:		count = shm->samples - (count+1);
snd_dos.c:	shm->samplepos = count & (shm->samples-1);
snd_dos.c:	return shm->samplepos;
snd_gus.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_gus.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_gus.c:// Author(s): Jayeson Lee-Steere
snd_gus.c:// Author(s): Jayeson Lee-Steere
snd_gus.c:// Author(s): Jayeson Lee-Steere
snd_gus.c:      c-=('a'-'A');
snd_gus.c:   while (i>0 && out[i-1]==' ')
snd_gus.c:      i--;
snd_gus.c:   while (i>0 && out[i-1]==' ')
snd_gus.c:      i--;
snd_gus.c:   while (in[0]!=13 && in[0]!=10 && in[0]!=0 && i<(INI_STRING_SIZE-1))
snd_gus.c:// GUS-only variables
snd_gus.c:   // Get chip revision - can not be zero
snd_gus.c:   // Get chip revision - can not be zero
snd_gus.c:// Programs the DMA controller to start DMAing in Auto-init mode
snd_gus.c:   // set mode- see "undocumented pc", p.876
snd_gus.c:   mode = (1<<6)	        // single-cycle
snd_gus.c:	  +(1<<4)	        // auto-init dma
snd_gus.c:      dos_outportb(0x0C, 0);		// prepare to send 16-bit value
snd_gus.c:      dos_outportb(0x0C, 0);		// prepare to send 16-bit value
snd_gus.c:      dos_outportb(CountReg, (count-1) & 0xff);
snd_gus.c:      dos_outportb(CountReg, (count-1) >> 8);
snd_gus.c:      dos_outportb(0xD8, 0);	        // prepare to send 16-bit value
snd_gus.c:      dos_outportb(0xD8, 0);		// prepare to send 16-bit value
snd_gus.c:      dos_outportb(CountReg, ((count>>1)-1) & 0xff);
snd_gus.c:      dos_outportb(CountReg, ((count>>1)-1) >> 8);
snd_gus.c:   // Routine 1 to counter CODEC bug - wait for init bit to clear and then a
snd_gus.c:   // Routine 2 to counter CODEC bug - this is from Forte's code. For me it
snd_gus.c:   // Clear MCE bit - this makes ACAL happen
snd_gus.c:   SetGf18(SET_VOICES,0xC0 | (Voices-1));
snd_gus.c:   EndAddressL=ConvertTo16(count-2-2);
snd_gus.c:   EndAddressR=ConvertTo16(count-2);
snd_gus.c:		shm->speed = 11025;
snd_gus.c:		rc = COM_CheckParm("-sspeed");
snd_gus.c:			shm->speed = Q_atoi(com_argv[rc+1]);
snd_gus.c:			if (shm->speed>48000)
snd_gus.c:				shm->speed=48000;
snd_gus.c:			for (CodecRate=CodecRates;CodecRate->Rate!=0;CodecRate++)
snd_gus.c:				if (shm->speed <= CodecRate->Rate)
snd_gus.c:					shm->speed=CodecRate->Rate;
snd_gus.c:					FSVal=CodecRate->FSVal;
snd_gus.c:		shm->channels = 2;
snd_gus.c:		shm->samplebits = 16;
snd_gus.c:		RealAddr = (RealAddr + BUFFER_SIZE) & ~(BUFFER_SIZE-1);
snd_gus.c:		shm->soundalive = true;
snd_gus.c:		shm->splitbuffer = false;
snd_gus.c:		shm->samplepos = 0;
snd_gus.c:		shm->submission_chunk = 1;
snd_gus.c:		shm->buffer = (unsigned char *) dma_buffer;
snd_gus.c:		shm->samples = BUFFER_SIZE/(shm->samplebits/8);
snd_gus.c:		shm->speed = 19293;
snd_gus.c:		rc = COM_CheckParm("-sspeed");
snd_gus.c:			shm->speed = Q_atoi(com_argv[rc+1]);
snd_gus.c:			if (shm->speed>44100)
snd_gus.c:				shm->speed=44100;
snd_gus.c:			for (Gf1Rate=Gf1Rates;Gf1Rate->Rate!=0;Gf1Rate++)
snd_gus.c:				if (shm->speed <= Gf1Rate->Rate)
snd_gus.c:					shm->speed=Gf1Rate->Rate;
snd_gus.c:					Voices=Gf1Rate->Voices;
snd_gus.c:		shm->channels = 2;
snd_gus.c:		shm->samplebits = 16;
snd_gus.c:		RealAddr = (RealAddr + BUFFER_SIZE) & ~(BUFFER_SIZE-1);
snd_gus.c:		shm->soundalive = true;
snd_gus.c:		shm->splitbuffer = false;
snd_gus.c:		shm->samplepos = 0;
snd_gus.c:		shm->submission_chunk = 1;
snd_gus.c:		shm->buffer = (unsigned char *) dma_buffer;
snd_gus.c:		shm->samples = BUFFER_SIZE/(shm->samplebits/8);
snd_gus.c:	   // clear 16-bit reg flip-flop
snd_gus.c: 	     if (shm->samplebits == 16)
snd_gus.c: 	     count = shm->samples - (count+1);
snd_gus.c: 	     if (shm->samplebits == 8)
snd_gus.c: 	     count = shm->samples - (count+1);
snd_gus.c:   shm->samplepos = count & (shm->samples-1);
snd_gus.c:   return(shm->samplepos);
snd_linux.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_linux.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_linux.c:	if (ioctl(audio_fd, SNDCTL_DSP_GETCAPS, &caps)==-1)
snd_linux.c:    if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1)
snd_linux.c:    shm->splitbuffer = 0;
snd_linux.c:    if (s) shm->samplebits = atoi(s);
snd_linux.c:	else if ((i = COM_CheckParm("-sndbits")) != 0)
snd_linux.c:		shm->samplebits = atoi(com_argv[i+1]);
snd_linux.c:	if (shm->samplebits != 16 && shm->samplebits != 8)
snd_linux.c:        if (fmt & AFMT_S16_LE) shm->samplebits = 16;
snd_linux.c:        else if (fmt & AFMT_U8) shm->samplebits = 8;
snd_linux.c:    if (s) shm->speed = atoi(s);
snd_linux.c:	else if ((i = COM_CheckParm("-sndspeed")) != 0)
snd_linux.c:		shm->speed = atoi(com_argv[i+1]);
snd_linux.c:        shm->speed = tryrates[i];
snd_linux.c:    if (s) shm->channels = atoi(s);
snd_linux.c:	else if ((i = COM_CheckParm("-sndmono")) != 0)
snd_linux.c:		shm->channels = 1;
snd_linux.c:	else if ((i = COM_CheckParm("-sndstereo")) != 0)
snd_linux.c:		shm->channels = 2;
snd_linux.c:    else shm->channels = 2;
snd_linux.c:	shm->samples = info.fragstotal * info.fragsize / (shm->samplebits/8);
snd_linux.c:	shm->submission_chunk = 1;
snd_linux.c:	shm->buffer = (unsigned char *) mmap(NULL, info.fragstotal
snd_linux.c:	if (!shm->buffer || shm->buffer == (unsigned char *)-1)
snd_linux.c:	if (shm->channels == 2)
snd_linux.c:        Con_Printf("Could not set /dev/dsp to stereo=%d", shm->channels);
snd_linux.c:		shm->channels = 2;
snd_linux.c:		shm->channels = 1;
snd_linux.c:    rc = ioctl(audio_fd, SNDCTL_DSP_SPEED, &shm->speed);
snd_linux.c:        Con_Printf("Could not set /dev/dsp speed to %d", shm->speed);
snd_linux.c:    if (shm->samplebits == 16)
snd_linux.c:			Con_Printf("Could not support 16-bit data.  Try 8-bit.\n");
snd_linux.c:    else if (shm->samplebits == 8)
snd_linux.c:			Con_Printf("Could not support 8-bit data.\n");
snd_linux.c:		Con_Printf("%d-bit sound not supported.", shm->samplebits);
snd_linux.c:	shm->samplepos = 0;
snd_linux.c:	if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &count)==-1)
snd_linux.c://	shm->samplepos = (count.bytes / (shm->samplebits / 8)) & (shm->samples-1);
snd_linux.c:	shm->samplepos = count.ptr / (shm->samplebits / 8);
snd_linux.c:	return shm->samplepos;
snd_mem.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_mem.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_mem.c:	sc = Cache_Check (&sfx->cache);
snd_mem.c:	stepscale = (float)inrate / shm->speed;	// this is usually 0.5, 1, or 2
snd_mem.c:	outcount = sc->length / stepscale;
snd_mem.c:	sc->length = outcount;
snd_mem.c:	if (sc->loopstart != -1)
snd_mem.c:		sc->loopstart = sc->loopstart / stepscale;
snd_mem.c:	sc->speed = shm->speed;
snd_mem.c:		sc->width = 1;
snd_mem.c:		sc->width = inwidth;
snd_mem.c:	sc->stereo = 0;
snd_mem.c:	if (stepscale == 1 && inwidth == 1 && sc->width == 1)
snd_mem.c:			((signed char *)sc->data)[i]
snd_mem.c:			= (int)( (unsigned char)(data[i]) - 128);
snd_mem.c:				sample = (int)( (unsigned char)(data[srcsample]) - 128) << 8;
snd_mem.c:			if (sc->width == 2)
snd_mem.c:				((short *)sc->data)[i] = sample;
snd_mem.c:				((signed char *)sc->data)[i] = sample >> 8;
snd_mem.c:	sc = Cache_Check (&s->cache);
snd_mem.c:    Q_strcat(namebuffer, s->name);
snd_mem.c:	info = GetWavinfo (s->name, data, com_filesize);
snd_mem.c:		Con_Printf ("%s is a stereo sample\n",s->name);
snd_mem.c:	stepscale = (float)info.rate / shm->speed;	
snd_mem.c:	sc = Cache_Alloc ( &s->cache, len + sizeof(sfxcache_t), s->name);
snd_mem.c:	sc->length = info.samples;
snd_mem.c:	sc->loopstart = info.loopstart;
snd_mem.c:	sc->speed = info.rate;
snd_mem.c:	sc->width = info.width;
snd_mem.c:	sc->stereo = info.channels;
snd_mem.c:	ResampleSfx (s, sc->speed, sc->width, data + info.dataofs);
snd_mem.c:		data_p -= 8;
snd_mem.c:		Con_Printf ("0x%x : %s (%d)\n", (int)(data_p - 4), str, iff_chunk_len);
snd_mem.c://		Con_Printf("loopstart=%d\n", sfx->loopstart);
snd_mem.c:		info.loopstart = -1;
snd_mem.c:	info.dataofs = data_p - wav;
snd_mix.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_mix.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_mix.c:// snd_mix.c -- portable code to mix sounds for snd_dma.c
snd_mix.c:		while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize, 
snd_mix.c:		pbuf = (DWORD *)shm->buffer;
snd_mix.c:		lpos = lpaintedtime & ((shm->samples>>1)-1);
snd_mix.c:		snd_linear_count = (shm->samples>>1) - lpos;
snd_mix.c:			snd_linear_count = endtime - lpaintedtime;
snd_mix.c:		pDSBuf->lpVtbl->Unlock(pDSBuf, pbuf, dwSize, NULL, 0);
snd_mix.c:	if (shm->samplebits == 16 && shm->channels == 2)
snd_mix.c:	count = (endtime - paintedtime) * shm->channels;
snd_mix.c:	out_mask = shm->samples - 1; 
snd_mix.c:	out_idx = paintedtime * shm->channels & out_mask;
snd_mix.c:	step = 3 - shm->channels;
snd_mix.c:		while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize, 
snd_mix.c:		pbuf = (DWORD *)shm->buffer;
snd_mix.c:	if (shm->samplebits == 16)
snd_mix.c:		while (count--)
snd_mix.c:	else if (shm->samplebits == 8)
snd_mix.c:		while (count--)
snd_mix.c:		int ir = endtime - paintedtime;
snd_mix.c:		pDSBuf->lpVtbl->Unlock(pDSBuf, pbuf, dwSize, NULL, 0);
snd_mix.c:		pDSBuf->lpVtbl->GetCurrentPosition(pDSBuf, &dwNewpos, &dwWrite);
snd_mix.c://			Con_Printf("%d-%d p %d c\n", il, ir, dwNewpos);
snd_mix.c:		if (endtime - paintedtime > PAINTBUFFER_SIZE)
snd_mix.c:		Q_memset(paintbuffer, 0, (end - paintedtime) * sizeof(portable_samplepair_t));
snd_mix.c:			if (!ch->sfx)
snd_mix.c:			if (!ch->leftvol && !ch->rightvol)
snd_mix.c:			sc = S_LoadSound (ch->sfx);
snd_mix.c:				if (ch->end < end)
snd_mix.c:					count = ch->end - ltime;
snd_mix.c:					count = end - ltime;
snd_mix.c:					if (sc->width == 1)
snd_mix.c:				if (ltime >= ch->end)
snd_mix.c:					if (sc->loopstart >= 0)
snd_mix.c:						ch->pos = sc->loopstart;
snd_mix.c:						ch->end = ltime + sc->length - ch->pos;
snd_mix.c:						ch->sfx = NULL;
snd_mix.c:	if (ch->leftvol > 255)
snd_mix.c:		ch->leftvol = 255;
snd_mix.c:	if (ch->rightvol > 255)
snd_mix.c:		ch->rightvol = 255;
snd_mix.c:	lscale = snd_scaletable[ch->leftvol >> 3];
snd_mix.c:	rscale = snd_scaletable[ch->rightvol >> 3];
snd_mix.c:	sfx = (signed char *)sc->data + ch->pos;
snd_mix.c:	ch->pos += count;
snd_mix.c:	leftvol = ch->leftvol;
snd_mix.c:	rightvol = ch->rightvol;
snd_mix.c:	sfx = (signed short *)sc->data + ch->pos;
snd_mix.c:	ch->pos += count;
snd_mixa.s:Copyright (C) 1996-1997 Id Software, Inc.
snd_mixa.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_mixa.s:// x86 assembly-language sound code
snd_mixa.s://----------------------------------------------------------------------
snd_mixa.s:// 8-bit sound-mixing code
snd_mixa.s://----------------------------------------------------------------------
snd_mixa.s://	if (ch->leftvol > 255)
snd_mixa.s://		ch->leftvol = 255;
snd_mixa.s://	if (ch->rightvol > 255)
snd_mixa.s://		ch->rightvol = 255;
snd_mixa.s://	lscale = snd_scaletable[ch->leftvol >> 3];
snd_mixa.s://	rscale = snd_scaletable[ch->rightvol >> 3];
snd_mixa.s://	sfx = (signed char *)sc->data + ch->pos;
snd_mixa.s://	ch->pos += count;
snd_mixa.s:	movb	-1(%esi,%ecx,1),%bl
snd_mixa.s:	addl	C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size),%edi
snd_mixa.s:	addl	C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size),%ebp
snd_mixa.s:	movl	%edi,C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size)
snd_mixa.s:	movl	%ebp,C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size)
snd_mixa.s:	movb	-2(%esi,%ecx,1),%bl
snd_mixa.s:	addl	C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size),%edi
snd_mixa.s:	addl	C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size),%ebp
snd_mixa.s:	movb	-2(%esi,%ecx,1),%bl
snd_mixa.s:	movl	%edi,C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size)
snd_mixa.s:	movl	%ebp,C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size)
snd_mixa.s:	movb	-3(%esi,%ecx,1),%bl
snd_mixa.s:	addl	C(paintbuffer)+psp_left-psp_size*2(,%ecx,psp_size),%edi
snd_mixa.s:	addl	C(paintbuffer)+psp_right-psp_size*2(,%ecx,psp_size),%ebp
snd_mixa.s:	movl	%edi,C(paintbuffer)+psp_left-psp_size*2(,%ecx,psp_size)
snd_mixa.s:	movl	%ebp,C(paintbuffer)+psp_right-psp_size*2(,%ecx,psp_size)
snd_mixa.s://----------------------------------------------------------------------
snd_mixa.s:// Transfer of stereo buffer to 16-bit DMA buffer code
snd_mixa.s://----------------------------------------------------------------------
snd_mixa.s:	movl	-8(%ebx,%ecx,4),%eax
snd_mixa.s:	movl	-4(%ebx,%ecx,4),%edx
snd_mixa.s:	movl	%edx,-4(%edi,%ecx,2)
snd_next.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_next.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_next.c:	shm->buffer = (char*)shm + sizeof(dma_t);
snd_next.c:	shm->channels = 2;
snd_next.c:	shm->speed = desired_speed;
snd_next.c:	shm->samplebits = desired_bits;
snd_next.c:	shm->samples = 16384 / (desired_bits / 8);
snd_next.c:	shm->submission_chunk = 1;
snd_next.c:	shm->samplepos = (int)(realtime*shm->speed*shm->channels) & (shm->samples-1);
snd_next.c:	return shm->samplepos;
snd_null.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_null.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_null.c:// snd_null.c -- include this instead of all the other snd_* files to have
snd_sun.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_sun.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_sun.c:	shm->splitbuffer = 0;
snd_sun.c:	shm->speed = 11025;
snd_sun.c:		shm->samplebits = 16;
snd_sun.c:		shm->channels = 1;
snd_sun.c:		shm->samplebits = 16;
snd_sun.c:		shm->channels = 2;
snd_sun.c:	shm->soundalive = true;
snd_sun.c:	shm->samples = sizeof(dma_buffer) / (shm->samplebits/8);
snd_sun.c:	shm->samplepos = 0;
snd_sun.c:	shm->submission_chunk = 1;
snd_sun.c:	shm->buffer = (unsigned char *)dma_buffer;
snd_sun.c:	return ((info.play.samples*shm->channels) % shm->samples);
snd_sun.c:	bsize = shm->channels * (shm->samplebits/8);
snd_sun.c:	bytes = (paintedtime - wbufp) * bsize;
snd_sun.c:	idx = (wbufp*bsize) & (BUFFER_SIZE - 1);
snd_sun.c:	for (b = bytes; b; b--) {
snd_sun.c:		idx = (idx + 1) & (BUFFER_SIZE - 1);
snd_win.c:Copyright (C) 1996-1997 Id Software, Inc.
snd_win.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
snd_win.c:// 64K is > 1 second at 16-bit, 22050 Hz
snd_win.c: * Global variables. Must be visible to window-procedure function 
snd_win.c:		snd_blocked--;
snd_win.c:		pDSBuf->lpVtbl->Stop(pDSBuf);
snd_win.c:		pDSBuf->lpVtbl->Release(pDSBuf);
snd_win.c:		pDSPBuf->lpVtbl->Release(pDSPBuf);
snd_win.c:		pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, DSSCL_NORMAL);
snd_win.c:		pDS->lpVtbl->Release(pDS);
snd_win.c:Direct-Sound support
snd_win.c:	shm->channels = 2;
snd_win.c:	shm->samplebits = 16;
snd_win.c:	shm->speed = 11025;
snd_win.c:    format.nChannels = shm->channels;
snd_win.c:    format.wBitsPerSample = shm->samplebits;
snd_win.c:    format.nSamplesPerSec = shm->speed;
snd_win.c:	if (DS_OK != pDS->lpVtbl->GetCaps (pDS, &dscaps))
snd_win.c:	if (DS_OK != pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, DSSCL_EXCLUSIVE))
snd_win.c:	if (!COM_CheckParm ("-snoforceformat"))
snd_win.c:		if (DS_OK == pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSPBuf, NULL))
snd_win.c:			if (DS_OK != pDSPBuf->lpVtbl->SetFormat (pDSPBuf, &pformat))
snd_win.c:	if (!primary_format_set || !COM_CheckParm ("-primarysound"))
snd_win.c:		if (DS_OK != pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSBuf, NULL))
snd_win.c:		shm->channels = format.nChannels;
snd_win.c:		shm->samplebits = format.wBitsPerSample;
snd_win.c:		shm->speed = format.nSamplesPerSec;
snd_win.c:		if (DS_OK != pDSBuf->lpVtbl->GetCaps (pDSBuf, &dsbcaps))
snd_win.c:		if (DS_OK != pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, DSSCL_WRITEPRIMARY))
snd_win.c:		if (DS_OK != pDSPBuf->lpVtbl->GetCaps (pDSPBuf, &dsbcaps))
snd_win.c:	pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
snd_win.c:					   shm->channels, shm->samplebits, shm->speed);
snd_win.c:	while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &lpData, &dwSize, NULL, NULL, 0)) != DS_OK)
snd_win.c:	pDSBuf->lpVtbl->Unlock(pDSBuf, lpData, dwSize, NULL, 0);
snd_win.c:	pDSBuf->lpVtbl->Stop(pDSBuf);
snd_win.c:	pDSBuf->lpVtbl->GetCurrentPosition(pDSBuf, &mmstarttime.u.sample, &dwWrite);
snd_win.c:	pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
snd_win.c:	shm->soundalive = true;
snd_win.c:	shm->splitbuffer = false;
snd_win.c:	shm->samples = gSndBufSize/(shm->samplebits/8);
snd_win.c:	shm->samplepos = 0;
snd_win.c:	shm->submission_chunk = 1;
snd_win.c:	shm->buffer = (unsigned char *) lpData;
snd_win.c:	sample16 = (shm->samplebits/8) - 1;
snd_win.c:	shm->channels = 2;
snd_win.c:	shm->samplebits = 16;
snd_win.c:	shm->speed = 11025;
snd_win.c:	format.nChannels = shm->channels;
snd_win.c:	format.wBitsPerSample = shm->samplebits;
snd_win.c:	format.nSamplesPerSec = shm->speed;
snd_win.c:	shm->soundalive = true;
snd_win.c:	shm->splitbuffer = false;
snd_win.c:	shm->samples = gSndBufSize/(shm->samplebits/8);
snd_win.c:	shm->samplepos = 0;
snd_win.c:	shm->submission_chunk = 1;
snd_win.c:	shm->buffer = (unsigned char *) lpData;
snd_win.c:	sample16 = (shm->samplebits/8) - 1;
snd_win.c:	if (COM_CheckParm ("-wavonly"))
snd_win.c:		pDSBuf->lpVtbl->GetCurrentPosition(pDSBuf, &mmtime.u.sample, &dwWrite);
snd_win.c:		s = mmtime.u.sample - mmstarttime.u.sample;
snd_win.c:	s &= (shm->samples-1);
snd_win.c:	while (((snd_sent - snd_completed) >> sample16) < 4)
sound.h:Copyright (C) 1996-1997 Id Software, Inc.
sound.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sound.h:// sound.h -- client sound i/o functions
sound.h:	int		leftvol;		// 0-255 volume
sound.h:	int		rightvol;		// 0-255 volume
sound.h:	int		looping;		// where to loop, -1 = no looping
sound.h:	int		master_vol;		// 0-255 master volume
sound.h:// User-setable variables
sound.h:// 0 to MAX_DYNAMIC_CHANNELS-1	= normal entity sounds
sound.h:// MAX_DYNAMIC_CHANNELS to MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS -1 = water, etc
spritegn.h:Copyright (C) 1996-1997 Id Software, Inc.
spritegn.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
spritegn.h://-------------------------------------------------------
spritegn.h://-------------------------------------------------------
spritegn.h:														// little-endian "IDSP"
surf16.s:Copyright (C) 1996-1997 Id Software, Inc.
surf16.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
surf16.s:// x86 assembly-language 16 bpp surface block drawing code.
surf16.s://----------------------------------------------------------------------
surf16.s://----------------------------------------------------------------------
surf16.s:	movl	blockjumptable16-4(,%eax,2),%ecx
surf16.s://----------------------------------------------------------------------
surf16.s://----------------------------------------------------------------------
surf16.s:	.long	LBPatch0-4
surf16.s:	.long	LBPatch1-4
surf16.s:	.long	LBPatch2-4
surf16.s:	.long	LBPatch3-4
surf16.s:	.long	LBPatch4-4
surf16.s:	.long	LBPatch5-4
surf16.s:	.long	LBPatch6-4
surf16.s:	.long	LBPatch7-4
surf16.s:	.long	LBPatch8-4
surf16.s:	.long	LBPatch9-4
surf16.s:	.long	LBPatch10-4
surf16.s:	.long	LBPatch11-4
surf16.s:	.long	LBPatch12-4
surf16.s:	.long	LBPatch13-4
surf16.s:	.long	LBPatch14-4
surf16.s:	.long	LBPatch15-4
surf8.s:Copyright (C) 1996-1997 Id Software, Inc.
surf8.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
surf8.s:// x86 assembly-language 8 bpp surface block drawing code.
surf8.s://----------------------------------------------------------------------
surf8.s://----------------------------------------------------------------------
surf8.s://			lightdelta = (lightleft - lightright) & 0xFFFFF;
surf8.s://			lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
surf8.s://			lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
surf8.s://			lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
surf8.s://				pbasesource -= stepback;
surf8.s://----------------------------------------------------------------------
surf8.s://----------------------------------------------------------------------
surf8.s://			lightdelta = (lightleft - lightright) & 0xFFFFF;
surf8.s://			lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
surf8.s://			lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
surf8.s://			lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
surf8.s://				pbasesource -= stepback;
surf8.s://----------------------------------------------------------------------
surf8.s://----------------------------------------------------------------------
surf8.s://			lightdelta = (lightleft - lightright) & 0xFFFFF;
surf8.s://			lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
surf8.s://			lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
surf8.s://			lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
surf8.s://				pbasesource -= stepback;
surf8.s://----------------------------------------------------------------------
surf8.s://----------------------------------------------------------------------
surf8.s://			lightdelta = (lightleft - lightright) & 0xFFFFF;
surf8.s://			lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
surf8.s://			lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
surf8.s://			lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
surf8.s://				pbasesource -= stepback;
surf8.s://----------------------------------------------------------------------
surf8.s://----------------------------------------------------------------------
surf8.s:	.long	LBPatch0-4
surf8.s:	.long	LBPatch1-4
surf8.s:	.long	LBPatch2-4
surf8.s:	.long	LBPatch3-4
surf8.s:	.long	LBPatch4-4
surf8.s:	.long	LBPatch5-4
surf8.s:	.long	LBPatch6-4
surf8.s:	.long	LBPatch7-4
surf8.s:	.long	LBPatch8-4
surf8.s:	.long	LBPatch9-4
surf8.s:	.long	LBPatch10-4
surf8.s:	.long	LBPatch11-4
surf8.s:	.long	LBPatch12-4
surf8.s:	.long	LBPatch13-4
surf8.s:	.long	LBPatch14-4
surf8.s:	.long	LBPatch15-4
surf8.s:	.long	LBPatch16-4
surf8.s:	.long	LBPatch17-4
surf8.s:	.long	LBPatch18-4
surf8.s:	.long	LBPatch19-4
surf8.s:	.long	LBPatch20-4
surf8.s:	.long	LBPatch21-4
surf8.s:	.long	LBPatch22-4
surf8.s:	.long	LBPatch23-4
surf8.s:	.long	LBPatch24-4
surf8.s:	.long	LBPatch25-4
surf8.s:	.long	LBPatch26-4
surf8.s:	.long	LBPatch27-4
surf8.s:	.long	LBPatch28-4
surf8.s:	.long	LBPatch29-4
surf8.s:	.long	LBPatch30-4
surf8.s:	.long	LBPatch31-4
sv_main.c:Copyright (C) 1996-1997 Id Software, Inc.
sv_main.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sv_main.c:// sv_main.c -- server main program
sv_main.c:	if (sv.datagram.cursize > MAX_DATAGRAM-16)
sv_main.c:		else if (v < -128)
sv_main.c:			v = -128;
sv_main.c:Channel 0 is an auto-allocate channel, the others override anything
sv_main.c:	if (sv.datagram.cursize > MAX_DATAGRAM-16)
sv_main.c:		MSG_WriteCoord (&sv.datagram, entity->v.origin[i]+0.5*(entity->v.mins[i]+entity->v.maxs[i]));
sv_main.c:	MSG_WriteByte (&client->message, svc_print);
sv_main.c:	MSG_WriteString (&client->message,message);
sv_main.c:	MSG_WriteByte (&client->message, svc_serverinfo);
sv_main.c:	MSG_WriteLong (&client->message, PROTOCOL_VERSION);
sv_main.c:	MSG_WriteByte (&client->message, svs.maxclients);
sv_main.c:		MSG_WriteByte (&client->message, GAME_DEATHMATCH);
sv_main.c:		MSG_WriteByte (&client->message, GAME_COOP);
sv_main.c:	sprintf (message, pr_strings+sv.edicts->v.message);
sv_main.c:	MSG_WriteString (&client->message,message);
sv_main.c:		MSG_WriteString (&client->message, *s);
sv_main.c:	MSG_WriteByte (&client->message, 0);
sv_main.c:		MSG_WriteString (&client->message, *s);
sv_main.c:	MSG_WriteByte (&client->message, 0);
sv_main.c:	MSG_WriteByte (&client->message, svc_cdtrack);
sv_main.c:	MSG_WriteByte (&client->message, sv.edicts->v.sounds);
sv_main.c:	MSG_WriteByte (&client->message, sv.edicts->v.sounds);
sv_main.c:	MSG_WriteByte (&client->message, svc_setview);
sv_main.c:	MSG_WriteShort (&client->message, NUM_FOR_EDICT(client->edict));
sv_main.c:	MSG_WriteByte (&client->message, svc_signonnum);
sv_main.c:	MSG_WriteByte (&client->message, 1);
sv_main.c:	client->sendsignon = true;
sv_main.c:	client->spawned = false;		// need prespawn, spawn, etc
sv_main.c:	Con_DPrintf ("Client %s connected\n", client->netconnection->address);
sv_main.c:	netconnection = client->netconnection;
sv_main.c:		memcpy (spawn_parms, client->spawn_parms, sizeof(spawn_parms));
sv_main.c:	client->netconnection = netconnection;
sv_main.c:	strcpy (client->name, "unconnected");
sv_main.c:	client->active = true;
sv_main.c:	client->spawned = false;
sv_main.c:	client->edict = ent;
sv_main.c:	client->message.data = client->msgbuf;
sv_main.c:	client->message.maxsize = sizeof(client->msgbuf);
sv_main.c:	client->message.allowoverflow = true;		// we can catch it
sv_main.c:	client->privileged = IsID(&client->netconnection->addr);
sv_main.c:	client->privileged = false;				
sv_main.c:		memcpy (client->spawn_parms, spawn_parms, sizeof(spawn_parms));
sv_main.c:		PR_ExecuteProgram (pr_global_struct->SetNewParms);
sv_main.c:			client->spawn_parms[i] = (&pr_global_struct->parm1)[i];
sv_main.c:		if (node->contents < 0)
sv_main.c:			if (node->contents != CONTENTS_SOLID)
sv_main.c:		plane = node->plane;
sv_main.c:		d = DotProduct (org, plane->normal) - plane->dist;
sv_main.c:			node = node->children[0];
sv_main.c:		else if (d < -8)
sv_main.c:			node = node->children[1];
sv_main.c:			SV_AddToFatPVS (org, node->children[0]);
sv_main.c:			node = node->children[1];
sv_main.c:	fatbytes = (sv.worldmodel->numleafs+31)>>3;
sv_main.c:	SV_AddToFatPVS (org, sv.worldmodel->nodes);
sv_main.c:	VectorAdd (clent->v.origin, clent->v.view_ofs, org);
sv_main.c:		if (ent->v.effects == EF_NODRAW)
sv_main.c:			if (!ent->v.modelindex || !pr_strings[ent->v.model])
sv_main.c:			for (i=0 ; i < ent->num_leafs ; i++)
sv_main.c:				if (pvs[ent->leafnums[i] >> 3] & (1 << (ent->leafnums[i]&7) ))
sv_main.c:			if (i == ent->num_leafs)
sv_main.c:		if (msg->maxsize - msg->cursize < 16)
sv_main.c:			miss = ent->v.origin[i] - ent->baseline.origin[i];
sv_main.c:			if ( miss < -0.1 || miss > 0.1 )
sv_main.c:		if ( ent->v.angles[0] != ent->baseline.angles[0] )
sv_main.c:		if ( ent->v.angles[1] != ent->baseline.angles[1] )
sv_main.c:		if ( ent->v.angles[2] != ent->baseline.angles[2] )
sv_main.c:		if (ent->v.movetype == MOVETYPE_STEP)
sv_main.c:		if (ent->baseline.colormap != ent->v.colormap)
sv_main.c:		if (ent->baseline.skin != ent->v.skin)
sv_main.c:		if (ent->baseline.frame != ent->v.frame)
sv_main.c:		if (ent->baseline.effects != ent->v.effects)
sv_main.c:		if (ent->baseline.modelindex != ent->v.modelindex)
sv_main.c:			MSG_WriteByte (msg,	ent->v.modelindex);
sv_main.c:			MSG_WriteByte (msg, ent->v.frame);
sv_main.c:			MSG_WriteByte (msg, ent->v.colormap);
sv_main.c:			MSG_WriteByte (msg, ent->v.skin);
sv_main.c:			MSG_WriteByte (msg, ent->v.effects);
sv_main.c:			MSG_WriteCoord (msg, ent->v.origin[0]);		
sv_main.c:			MSG_WriteAngle(msg, ent->v.angles[0]);
sv_main.c:			MSG_WriteCoord (msg, ent->v.origin[1]);
sv_main.c:			MSG_WriteAngle(msg, ent->v.angles[1]);
sv_main.c:			MSG_WriteCoord (msg, ent->v.origin[2]);
sv_main.c:			MSG_WriteAngle(msg, ent->v.angles[2]);
sv_main.c:		ent->v.effects = (int)ent->v.effects & ~EF_MUZZLEFLASH;
sv_main.c:	if (ent->v.dmg_take || ent->v.dmg_save)
sv_main.c:		other = PROG_TO_EDICT(ent->v.dmg_inflictor);
sv_main.c:		MSG_WriteByte (msg, ent->v.dmg_save);
sv_main.c:		MSG_WriteByte (msg, ent->v.dmg_take);
sv_main.c:			MSG_WriteCoord (msg, other->v.origin[i] + 0.5*(other->v.mins[i] + other->v.maxs[i]));
sv_main.c:		ent->v.dmg_take = 0;
sv_main.c:		ent->v.dmg_save = 0;
sv_main.c:	if ( ent->v.fixangle )
sv_main.c:			MSG_WriteAngle (msg, ent->v.angles[i] );
sv_main.c:		ent->v.fixangle = 0;
sv_main.c:	if (ent->v.view_ofs[2] != DEFAULT_VIEWHEIGHT)
sv_main.c:	if (ent->v.idealpitch)
sv_main.c:	items = (int)ent->v.items | ((int)ent->v.items2 << 23);
sv_main.c:		items = (int)ent->v.items | ((int)val->_float << 23);
sv_main.c:		items = (int)ent->v.items | ((int)pr_global_struct->serverflags << 28);
sv_main.c:	if ( (int)ent->v.flags & FL_ONGROUND)
sv_main.c:	if ( ent->v.waterlevel >= 2)
sv_main.c:		if (ent->v.punchangle[i])
sv_main.c:		if (ent->v.velocity[i])
sv_main.c:	if (ent->v.weaponframe)
sv_main.c:	if (ent->v.armorvalue)
sv_main.c://	if (ent->v.weapon)
sv_main.c:		MSG_WriteChar (msg, ent->v.view_ofs[2]);
sv_main.c:		MSG_WriteChar (msg, ent->v.idealpitch);
sv_main.c:			MSG_WriteChar (msg, ent->v.punchangle[i]);
sv_main.c:			MSG_WriteChar (msg, ent->v.velocity[i]/16);
sv_main.c:		MSG_WriteByte (msg, ent->v.weaponframe);
sv_main.c:		MSG_WriteByte (msg, ent->v.armorvalue);
sv_main.c:		MSG_WriteByte (msg, SV_ModelIndex(pr_strings+ent->v.weaponmodel));
sv_main.c:	MSG_WriteShort (msg, ent->v.health);
sv_main.c:	MSG_WriteByte (msg, ent->v.currentammo);
sv_main.c:	MSG_WriteByte (msg, ent->v.ammo_shells);
sv_main.c:	MSG_WriteByte (msg, ent->v.ammo_nails);
sv_main.c:	MSG_WriteByte (msg, ent->v.ammo_rockets);
sv_main.c:	MSG_WriteByte (msg, ent->v.ammo_cells);
sv_main.c:		MSG_WriteByte (msg, ent->v.weapon);
sv_main.c:			if ( ((int)ent->v.weapon) & (1<<i) )
sv_main.c:	SV_WriteClientdataToMessage (client->edict, &msg);
sv_main.c:	SV_WriteEntitiesToClient (client->edict, &msg);
sv_main.c:	if (NET_SendUnreliableMessage (client->netconnection, &msg) == -1)
sv_main.c:		if (host_client->old_frags != host_client->edict->v.frags)
sv_main.c:				if (!client->active)
sv_main.c:				MSG_WriteByte (&client->message, svc_updatefrags);
sv_main.c:				MSG_WriteByte (&client->message, i);
sv_main.c:				MSG_WriteShort (&client->message, host_client->edict->v.frags);
sv_main.c:			host_client->old_frags = host_client->edict->v.frags;
sv_main.c:		if (!client->active)
sv_main.c:		SZ_Write (&client->message, sv.reliable_datagram.data, sv.reliable_datagram.cursize);
sv_main.c:	if (NET_SendUnreliableMessage (client->netconnection, &msg) == -1)
sv_main.c:	client->last_message = realtime;
sv_main.c:		if (!host_client->active)
sv_main.c:		if (host_client->spawned)
sv_main.c:			if (!host_client->sendsignon)
sv_main.c:				if (realtime - host_client->last_message > 5)
sv_main.c:				continue;	// don't send out non-signon messages
sv_main.c:		if (host_client->message.overflowed)
sv_main.c:			host_client->message.overflowed = false;
sv_main.c:		if (host_client->message.cursize || host_client->dropasap)
sv_main.c:			if (!NET_CanSendMessage (host_client->netconnection))
sv_main.c:			if (host_client->dropasap)
sv_main.c:				if (NET_SendMessage (host_client->netconnection
sv_main.c:				, &host_client->message) == -1)
sv_main.c:				SZ_Clear (&host_client->message);
sv_main.c:				host_client->last_message = realtime;
sv_main.c:				host_client->sendsignon = false;
sv_main.c:		if (svent->free)
sv_main.c:		if (entnum > svs.maxclients && !svent->v.modelindex)
sv_main.c:		VectorCopy (svent->v.origin, svent->baseline.origin);
sv_main.c:		VectorCopy (svent->v.angles, svent->baseline.angles);
sv_main.c:		svent->baseline.frame = svent->v.frame;
sv_main.c:		svent->baseline.skin = svent->v.skin;
sv_main.c:			svent->baseline.colormap = entnum;
sv_main.c:			svent->baseline.modelindex = SV_ModelIndex("progs/player.mdl");
sv_main.c:			svent->baseline.colormap = 0;
sv_main.c:			svent->baseline.modelindex =
sv_main.c:				SV_ModelIndex(pr_strings + svent->v.model);
sv_main.c:		MSG_WriteByte (&sv.signon, svent->baseline.modelindex);
sv_main.c:		MSG_WriteByte (&sv.signon, svent->baseline.frame);
sv_main.c:		MSG_WriteByte (&sv.signon, svent->baseline.colormap);
sv_main.c:		MSG_WriteByte (&sv.signon, svent->baseline.skin);
sv_main.c:			MSG_WriteCoord(&sv.signon, svent->baseline.origin[i]);
sv_main.c:			MSG_WriteAngle(&sv.signon, svent->baseline.angles[i]);
sv_main.c:	svs.serverflags = pr_global_struct->serverflags;
sv_main.c:		if (!host_client->active)
sv_main.c:		pr_global_struct->self = EDICT_TO_PROG(host_client->edict);
sv_main.c:		PR_ExecuteProgram (pr_global_struct->SetChangeParms);
sv_main.c:			host_client->spawn_parms[j] = (&pr_global_struct->parm1)[j];
sv_main.c:	for (i=1 ; i<sv.worldmodel->numsubmodels ; i++)
sv_main.c:	memset (&ent->v, 0, progs->entityfields * 4);
sv_main.c:	ent->free = false;
sv_main.c:	ent->v.model = sv.worldmodel->name - pr_strings;
sv_main.c:	ent->v.modelindex = 1;		// world model
sv_main.c:	ent->v.solid = SOLID_BSP;
sv_main.c:	ent->v.movetype = MOVETYPE_PUSH;
sv_main.c:		pr_global_struct->coop = coop.value;
sv_main.c:		pr_global_struct->deathmatch = deathmatch.value;
sv_main.c:	pr_global_struct->mapname = sv.name - pr_strings;
sv_main.c:	pr_global_struct->startspot = sv.startspot - pr_strings;
sv_main.c:	pr_global_struct->serverflags = svs.serverflags;
sv_main.c:	ED_LoadFromFile (sv.worldmodel->entities);
sv_main.c:		if (host_client->active)
sv_move.c:Copyright (C) 1996-1997 Id Software, Inc.
sv_move.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sv_move.c:// sv_move.c -- monster movement
sv_move.c:	VectorAdd (ent->v.origin, ent->v.mins, mins);
sv_move.c:	VectorAdd (ent->v.origin, ent->v.maxs, maxs);
sv_move.c:	start[2] = mins[2] - 1;
sv_move.c:	stop[2] = start[2] - 2*STEPSIZE;
sv_move.c:			if (trace.fraction == 1.0 || mid - trace.endpos[2] > STEPSIZE)
sv_move.c:pr_global_struct->trace_normal is set to the normal of the blocking wall
sv_move.c:	VectorCopy (ent->v.origin, oldorg);
sv_move.c:	VectorAdd (ent->v.origin, move, neworg);
sv_move.c:	if ( (int)ent->v.flags & (FL_SWIM | FL_FLY) )
sv_move.c:			VectorAdd (ent->v.origin, move, neworg);
sv_move.c:			enemy = PROG_TO_EDICT(ent->v.enemy);
sv_move.c:				dz = ent->v.origin[2] - PROG_TO_EDICT(ent->v.enemy)->v.origin[2];
sv_move.c:					neworg[2] -= 8;
sv_move.c:			trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, neworg, false, ent);
sv_move.c:				if ( ((int)ent->v.flags & FL_SWIM) && SV_PointContents(trace.endpos) == CONTENTS_EMPTY )
sv_move.c:				VectorCopy (trace.endpos, ent->v.origin);
sv_move.c:	end[2] -= STEPSIZE*2;
sv_move.c:	trace = SV_Move (neworg, ent->v.mins, ent->v.maxs, end, false, ent);
sv_move.c:		neworg[2] -= STEPSIZE;
sv_move.c:		trace = SV_Move (neworg, ent->v.mins, ent->v.maxs, end, false, ent);
sv_move.c:		if ( (int)ent->v.flags & FL_PARTIALGROUND )
sv_move.c:			VectorAdd (ent->v.origin, move, ent->v.origin);
sv_move.c:			ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
sv_move.c:	VectorCopy (trace.endpos, ent->v.origin);
sv_move.c:		if ( (int)ent->v.flags & FL_PARTIALGROUND )
sv_move.c:		VectorCopy (oldorg, ent->v.origin);
sv_move.c:	if ( (int)ent->v.flags & FL_PARTIALGROUND )
sv_move.c:		ent->v.flags = (int)ent->v.flags & ~FL_PARTIALGROUND;
sv_move.c:	ent->v.groundentity = EDICT_TO_PROG(trace.ent);
sv_move.c:	ent->v.ideal_yaw = yaw;
sv_move.c:	VectorCopy (ent->v.origin, oldorigin);
sv_move.c:		delta = ent->v.angles[YAW] - ent->v.ideal_yaw;
sv_move.c:			VectorCopy (oldorigin, ent->v.origin);
sv_move.c:	ent->v.flags = (int)ent->v.flags | FL_PARTIALGROUND;
sv_move.c:#define	DI_NODIR	-1
sv_move.c:	olddir = anglemod( (int)(actor->v.ideal_yaw/45)*45 );
sv_move.c:	turnaround = anglemod(olddir - 180);
sv_move.c:	deltax = enemy->v.origin[0] - actor->v.origin[0];
sv_move.c:	deltay = enemy->v.origin[1] - actor->v.origin[1];
sv_move.c:	else if (deltax<-10)
sv_move.c:	if (deltay<-10)
sv_move.c:		for (tdir=315 ; tdir >=0 ; tdir -= 45)
sv_move.c:	actor->v.ideal_yaw = olddir;		// can't move
sv_move.c:		if (goal->v.absmin[i] > ent->v.absmax[i] + dist)
sv_move.c:		if (goal->v.absmax[i] < ent->v.absmin[i] - dist)
sv_move.c:	ent = PROG_TO_EDICT(pr_global_struct->self);
sv_move.c:	goal = PROG_TO_EDICT(ent->v.goalentity);
sv_move.c:	if ( !( (int)ent->v.flags & (FL_ONGROUND|FL_FLY|FL_SWIM) ) )
sv_move.c:	enemy = PROG_TO_EDICT(ent->v.enemy);
sv_move.c:	if ( PROG_TO_EDICT(ent->v.enemy) != sv.edicts &&  SV_CloseEnough (ent, goal, dist) )
sv_move.c:	!SV_StepDirection (ent, ent->v.ideal_yaw, dist))
sv_phys.c:Copyright (C) 1996-1997 Id Software, Inc.
sv_phys.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sv_phys.c:		if (check->free)
sv_phys.c:		if (check->v.movetype == MOVETYPE_PUSH
sv_phys.c:		|| check->v.movetype == MOVETYPE_NONE
sv_phys.c:		|| check->v.movetype == MOVETYPE_FOLLOW
sv_phys.c:		|| check->v.movetype == MOVETYPE_NOCLIP)
sv_phys.c:		if (IS_NAN(ent->v.velocity[i]))
sv_phys.c:			Con_Printf ("Got a NaN velocity on %s\n", pr_strings + ent->v.classname);
sv_phys.c:			ent->v.velocity[i] = 0;
sv_phys.c:		if (IS_NAN(ent->v.origin[i]))
sv_phys.c:			Con_Printf ("Got a NaN origin on %s\n", pr_strings + ent->v.classname);
sv_phys.c:			ent->v.origin[i] = 0;
sv_phys.c:		if (ent->v.velocity[i] > sv_maxvelocity.value)
sv_phys.c:			ent->v.velocity[i] = sv_maxvelocity.value;
sv_phys.c:		else if (ent->v.velocity[i] < -sv_maxvelocity.value)
sv_phys.c:			ent->v.velocity[i] = -sv_maxvelocity.value;
sv_phys.c:	thinktime = ent->v.nextthink;
sv_phys.c:	ent->v.nextthink = 0;
sv_phys.c:	pr_global_struct->time = thinktime;
sv_phys.c:	pr_global_struct->self = EDICT_TO_PROG(ent);
sv_phys.c:	pr_global_struct->other = EDICT_TO_PROG(sv.edicts);
sv_phys.c:	PR_ExecuteProgram (ent->v.think);
sv_phys.c:	return !ent->free;
sv_phys.c:	old_self = pr_global_struct->self;
sv_phys.c:	old_other = pr_global_struct->other;
sv_phys.c:	pr_global_struct->time = sv.time;
sv_phys.c:	if (e1->v.touch && e1->v.solid != SOLID_NOT)
sv_phys.c:		pr_global_struct->self = EDICT_TO_PROG(e1);
sv_phys.c:		pr_global_struct->other = EDICT_TO_PROG(e2);
sv_phys.c:		PR_ExecuteProgram (e1->v.touch);
sv_phys.c:	if (e2->v.touch && e2->v.solid != SOLID_NOT)
sv_phys.c:		pr_global_struct->self = EDICT_TO_PROG(e2);
sv_phys.c:		pr_global_struct->other = EDICT_TO_PROG(e1);
sv_phys.c:		PR_ExecuteProgram (e2->v.touch);
sv_phys.c:	pr_global_struct->self = old_self;
sv_phys.c:	pr_global_struct->other = old_other;
sv_phys.c:		out[i] = in[i] - change;
sv_phys.c:		if (out[i] > -STOP_EPSILON && out[i] < STOP_EPSILON)
sv_phys.c:	VectorCopy (ent->v.velocity, original_velocity);
sv_phys.c:	VectorCopy (ent->v.velocity, primal_velocity);
sv_phys.c:		if (!ent->v.velocity[0] && !ent->v.velocity[1] && !ent->v.velocity[2])
sv_phys.c:			end[i] = ent->v.origin[i] + time_left * ent->v.velocity[i];
sv_phys.c:		trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, false, ent);
sv_phys.c:			VectorCopy (vec3_origin, ent->v.velocity);
sv_phys.c:			VectorCopy (trace.endpos, ent->v.origin);
sv_phys.c:			VectorCopy (ent->v.velocity, original_velocity);
sv_phys.c:			if (trace.ent->v.solid == SOLID_BSP)
sv_phys.c:				ent->v.flags =	(int)ent->v.flags | FL_ONGROUND;
sv_phys.c:				ent->v.groundentity = EDICT_TO_PROG(trace.ent);
sv_phys.c:		if (ent->free)
sv_phys.c:		time_left -= time_left * trace.fraction;
sv_phys.c:			VectorCopy (vec3_origin, ent->v.velocity);
sv_phys.c:			VectorCopy (new_velocity, ent->v.velocity);
sv_phys.c:				VectorCopy (vec3_origin, ent->v.velocity);
sv_phys.c:			d = DotProduct (dir, ent->v.velocity);
sv_phys.c:			VectorScale (dir, d, ent->v.velocity);
sv_phys.c:		if (DotProduct (ent->v.velocity, primal_velocity) <= 0)
sv_phys.c:			VectorCopy (vec3_origin, ent->v.velocity);
sv_phys.c:	if (ent->v.gravity)
sv_phys.c:		ent_gravity = ent->v.gravity;
sv_phys.c:	if (val && val->_float)
sv_phys.c:		ent_gravity = val->_float;
sv_phys.c:	ent->v.velocity[2] -= ent_gravity * sv_gravity.value * host_frametime;
sv_phys.c:	VectorAdd (ent->v.origin, push, end);
sv_phys.c:	if (ent->v.movetype == MOVETYPE_FLYMISSILE)
sv_phys.c:		trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, MOVE_MISSILE, ent);
sv_phys.c:	else if (ent->v.solid == SOLID_TRIGGER || ent->v.solid == SOLID_NOT)
sv_phys.c:		trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, MOVE_NOMONSTERS, ent);
sv_phys.c:		trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, end, MOVE_NORMAL, ent);	
sv_phys.c:	VectorCopy (trace.endpos, ent->v.origin);
sv_phys.c:	if (!pusher->v.velocity[0] && !pusher->v.velocity[1] && !pusher->v.velocity[2])
sv_phys.c:		pusher->v.ltime += movetime;
sv_phys.c:		move[i] = pusher->v.velocity[i] * movetime;
sv_phys.c:		mins[i] = pusher->v.absmin[i] + move[i];
sv_phys.c:		maxs[i] = pusher->v.absmax[i] + move[i];
sv_phys.c:	VectorCopy (pusher->v.origin, pushorig);
sv_phys.c:	VectorAdd (pusher->v.origin, move, pusher->v.origin);
sv_phys.c:	pusher->v.ltime += movetime;
sv_phys.c:		if (check->free)
sv_phys.c:		if (check->v.movetype == MOVETYPE_PUSH
sv_phys.c:		|| check->v.movetype == MOVETYPE_NONE
sv_phys.c:		|| check->v.movetype == MOVETYPE_FOLLOW
sv_phys.c:		|| check->v.movetype == MOVETYPE_NOCLIP)
sv_phys.c:		if ( ! ( ((int)check->v.flags & FL_ONGROUND)
sv_phys.c:		&& PROG_TO_EDICT(check->v.groundentity) == pusher) )
sv_phys.c:			if ( check->v.absmin[0] >= maxs[0]
sv_phys.c:			|| check->v.absmin[1] >= maxs[1]
sv_phys.c:			|| check->v.absmin[2] >= maxs[2]
sv_phys.c:			|| check->v.absmax[0] <= mins[0]
sv_phys.c:			|| check->v.absmax[1] <= mins[1]
sv_phys.c:			|| check->v.absmax[2] <= mins[2] )
sv_phys.c:	// remove the onground flag for non-players
sv_phys.c:		if (check->v.movetype != MOVETYPE_WALK)
sv_phys.c:			check->v.flags = (int)check->v.flags & ~FL_ONGROUND;
sv_phys.c:		VectorCopy (check->v.origin, entorig);
sv_phys.c:		VectorCopy (check->v.origin, moved_from[num_moved]);
sv_phys.c:		pusher->v.solid = SOLID_NOT;
sv_phys.c:		pusher->v.solid = SOLID_BSP;
sv_phys.c:			if (check->v.mins[0] == check->v.maxs[0])
sv_phys.c:			if (check->v.solid == SOLID_NOT || check->v.solid == SOLID_TRIGGER)
sv_phys.c:				check->v.mins[0] = check->v.mins[1] = 0;
sv_phys.c:				VectorCopy (check->v.mins, check->v.maxs);
sv_phys.c:			VectorCopy (entorig, check->v.origin);
sv_phys.c:			VectorCopy (pushorig, pusher->v.origin);
sv_phys.c:			pusher->v.ltime -= movetime;
sv_phys.c:			if (pusher->v.blocked)
sv_phys.c:				pr_global_struct->self = EDICT_TO_PROG(pusher);
sv_phys.c:				pr_global_struct->other = EDICT_TO_PROG(check);
sv_phys.c:				PR_ExecuteProgram (pusher->v.blocked);
sv_phys.c:				VectorCopy (moved_from[i], moved_edict[i]->v.origin);
sv_phys.c:	if (!pusher->v.avelocity[0] && !pusher->v.avelocity[1] && !pusher->v.avelocity[2])
sv_phys.c:		pusher->v.ltime += movetime;
sv_phys.c:		amove[i] = pusher->v.avelocity[i] * movetime;
sv_phys.c:	VectorCopy (pusher->v.angles, pushorig);
sv_phys.c:	VectorAdd (pusher->v.angles, amove, pusher->v.angles);
sv_phys.c:	pusher->v.ltime += movetime;
sv_phys.c:		if (check->free)
sv_phys.c:		if (check->v.movetype == MOVETYPE_PUSH
sv_phys.c:		|| check->v.movetype == MOVETYPE_NONE
sv_phys.c:		|| check->v.movetype == MOVETYPE_FOLLOW
sv_phys.c:		|| check->v.movetype == MOVETYPE_NOCLIP)
sv_phys.c:		if ( ! ( ((int)check->v.flags & FL_ONGROUND)
sv_phys.c:		&& PROG_TO_EDICT(check->v.groundentity) == pusher) )
sv_phys.c:			if ( check->v.absmin[0] >= pusher->v.absmax[0]
sv_phys.c:			|| check->v.absmin[1] >= pusher->v.absmax[1]
sv_phys.c:			|| check->v.absmin[2] >= pusher->v.absmax[2]
sv_phys.c:			|| check->v.absmax[0] <= pusher->v.absmin[0]
sv_phys.c:			|| check->v.absmax[1] <= pusher->v.absmin[1]
sv_phys.c:			|| check->v.absmax[2] <= pusher->v.absmin[2] )
sv_phys.c:	// remove the onground flag for non-players
sv_phys.c:		if (check->v.movetype != MOVETYPE_WALK)
sv_phys.c:			check->v.flags = (int)check->v.flags & ~FL_ONGROUND;
sv_phys.c:		VectorCopy (check->v.origin, entorig);
sv_phys.c:		VectorCopy (check->v.origin, moved_from[num_moved]);
sv_phys.c:		VectorSubtract (check->v.origin, pusher->v.origin, org);
sv_phys.c:		org2[1] = -DotProduct (org, right);
sv_phys.c:		pusher->v.solid = SOLID_NOT;
sv_phys.c:		pusher->v.solid = SOLID_BSP;
sv_phys.c:			if (check->v.mins[0] == check->v.maxs[0])
sv_phys.c:			if (check->v.solid == SOLID_NOT || check->v.solid == SOLID_TRIGGER)
sv_phys.c:				check->v.mins[0] = check->v.mins[1] = 0;
sv_phys.c:				VectorCopy (check->v.mins, check->v.maxs);
sv_phys.c:			VectorCopy (entorig, check->v.origin);
sv_phys.c:			VectorCopy (pushorig, pusher->v.angles);
sv_phys.c:			pusher->v.ltime -= movetime;
sv_phys.c:			if (pusher->v.blocked)
sv_phys.c:				pr_global_struct->self = EDICT_TO_PROG(pusher);
sv_phys.c:				pr_global_struct->other = EDICT_TO_PROG(check);
sv_phys.c:				PR_ExecuteProgram (pusher->v.blocked);
sv_phys.c:				VectorCopy (moved_from[i], moved_edict[i]->v.origin);
sv_phys.c:				VectorSubtract (moved_edict[i]->v.angles, amove, moved_edict[i]->v.angles);
sv_phys.c:			VectorAdd (check->v.angles, amove, check->v.angles);
sv_phys.c:	oldltime = ent->v.ltime;
sv_phys.c:	thinktime = ent->v.nextthink;
sv_phys.c:	if (thinktime < ent->v.ltime + host_frametime)
sv_phys.c:		movetime = thinktime - ent->v.ltime;
sv_phys.c:		if (ent->v.avelocity[0] || ent->v.avelocity[1] || ent->v.avelocity[2])
sv_phys.c:			SV_PushMove (ent, movetime);	// advances ent->v.ltime if not blocked
sv_phys.c:	if (thinktime > oldltime && thinktime <= ent->v.ltime)
sv_phys.c:		ent->v.nextthink = 0;
sv_phys.c:		pr_global_struct->time = sv.time;
sv_phys.c:		pr_global_struct->self = EDICT_TO_PROG(ent);
sv_phys.c:		pr_global_struct->other = EDICT_TO_PROG(sv.edicts);
sv_phys.c:		PR_ExecuteProgram (ent->v.think);
sv_phys.c:		if (ent->free)
sv_phys.c:		VectorCopy (ent->v.origin, ent->v.oldorigin);
sv_phys.c:	VectorCopy (ent->v.origin, org);
sv_phys.c:	VectorCopy (ent->v.oldorigin, ent->v.origin);
sv_phys.c:		for (i=-1 ; i <= 1 ; i++)
sv_phys.c:			for (j=-1 ; j <= 1 ; j++)
sv_phys.c:				ent->v.origin[0] = org[0] + i;
sv_phys.c:				ent->v.origin[1] = org[1] + j;
sv_phys.c:				ent->v.origin[2] = org[2] + z;
sv_phys.c:	VectorCopy (org, ent->v.origin);
sv_phys.c:	point[0] = ent->v.origin[0];
sv_phys.c:	point[1] = ent->v.origin[1];
sv_phys.c:	point[2] = ent->v.origin[2] + ent->v.mins[2] + 1;	
sv_phys.c:	ent->v.waterlevel = 0;
sv_phys.c:	ent->v.watertype = CONTENTS_EMPTY;
sv_phys.c:		ent->v.watertype = cont;
sv_phys.c:		ent->v.waterlevel = 1;
sv_phys.c:		point[2] = ent->v.origin[2] + (ent->v.mins[2] + ent->v.maxs[2])*0.5;
sv_phys.c:			ent->v.waterlevel = 2;
sv_phys.c:			point[2] = ent->v.origin[2] + ent->v.view_ofs[2];
sv_phys.c:				ent->v.waterlevel = 3;
sv_phys.c:				{-1, 0, 0},
sv_phys.c:				{0, -1, 0},
sv_phys.c:				{0, 0, -1}
sv_phys.c:			VectorMA (ent->v.basevelocity, 150.0*ent->v.waterlevel/3.0, current_table[CONTENTS_CURRENT_0 - truecont], ent->v.basevelocity);
sv_phys.c:	return ent->v.waterlevel > 1;
sv_phys.c:	AngleVectors (ent->v.v_angle, forward, right, up);
sv_phys.c:	d = DotProduct (trace->plane.normal, forward);
sv_phys.c:	i = DotProduct (trace->plane.normal, ent->v.velocity);
sv_phys.c:	VectorScale (trace->plane.normal, i, into);
sv_phys.c:	VectorSubtract (ent->v.velocity, into, side);
sv_phys.c:	ent->v.velocity[0] = side[0] * (1 + d);
sv_phys.c:	ent->v.velocity[1] = side[1] * (1 + d);
sv_phys.c:	VectorCopy (ent->v.origin, oldorg);
sv_phys.c:			case 2:	dir[0] = -2; dir[1] = 0; break;
sv_phys.c:			case 3:	dir[0] = 0; dir[1] = -2; break;
sv_phys.c:			case 5:	dir[0] = -2; dir[1] = 2; break;
sv_phys.c:			case 6:	dir[0] = 2; dir[1] = -2; break;
sv_phys.c:			case 7:	dir[0] = -2; dir[1] = -2; break;
sv_phys.c:		ent->v.velocity[0] = oldvel[0];
sv_phys.c:		ent->v. velocity[1] = oldvel[1];
sv_phys.c:		ent->v. velocity[2] = 0;
sv_phys.c:		if ( fabs(oldorg[1] - ent->v.origin[1]) > 4
sv_phys.c:		|| fabs(oldorg[0] - ent->v.origin[0]) > 4 )
sv_phys.c:		VectorCopy (oldorg, ent->v.origin);
sv_phys.c:	VectorCopy (vec3_origin, ent->v.velocity);
sv_phys.c:	oldonground = (int)ent->v.flags & FL_ONGROUND;
sv_phys.c:	ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
sv_phys.c:	VectorCopy (ent->v.origin, oldorg);
sv_phys.c:	VectorCopy (ent->v.velocity, oldvel);
sv_phys.c:	if (!oldonground && ent->v.waterlevel == 0)
sv_phys.c:	if (ent->v.movetype != MOVETYPE_WALK)
sv_phys.c:	if ( (int)sv_player->v.flags & FL_WATERJUMP )
sv_phys.c:	VectorCopy (ent->v.origin, nosteporg);
sv_phys.c:	VectorCopy (ent->v.velocity, nostepvel);
sv_phys.c:	VectorCopy (oldorg, ent->v.origin);	// back to start pos
sv_phys.c:	downmove[2] = -STEPSIZE + oldvel[2]*host_frametime;
sv_phys.c:	ent->v.velocity[0] = oldvel[0];
sv_phys.c:	ent->v. velocity[1] = oldvel[1];
sv_phys.c:	ent->v. velocity[2] = 0;
sv_phys.c:		if ( fabs(oldorg[1] - ent->v.origin[1]) < 0.03125
sv_phys.c:		&& fabs(oldorg[0] - ent->v.origin[0]) < 0.03125 )
sv_phys.c:		if (ent->v.solid == SOLID_BSP)
sv_phys.c:			ent->v.flags =	(int)ent->v.flags | FL_ONGROUND;
sv_phys.c:			ent->v.groundentity = EDICT_TO_PROG(downtrace.ent);
sv_phys.c:		VectorCopy (nosteporg, ent->v.origin);
sv_phys.c:		VectorCopy (nostepvel, ent->v.velocity);
sv_phys.c:	if ( ! svs.clients[num-1].active )
sv_phys.c:// call standard client pre-think
sv_phys.c:	pr_global_struct->time = sv.time;
sv_phys.c:	pr_global_struct->self = EDICT_TO_PROG(ent);
sv_phys.c:	PR_ExecuteProgram (pr_global_struct->PlayerPreThink);
sv_phys.c:	switch ((int)ent->v.movetype)
sv_phys.c:		if (!SV_CheckWater (ent) && ! ((int)ent->v.flags & FL_WATERJUMP) )
sv_phys.c:		VectorAdd (ent->v.velocity, ent->v.basevelocity, ent->v.velocity);
sv_phys.c:		VectorSubtract (ent->v.velocity, ent->v.basevelocity, ent->v.velocity);
sv_phys.c:		VectorMA (ent->v.origin, host_frametime, ent->v.velocity, ent->v.origin);
sv_phys.c:		Sys_Error ("SV_Physics_client: bad movetype %i", (int)ent->v.movetype);
sv_phys.c:// call standard player post-think
sv_phys.c:	pr_global_struct->time = sv.time;
sv_phys.c:	pr_global_struct->self = EDICT_TO_PROG(ent);
sv_phys.c:	PR_ExecuteProgram (pr_global_struct->PlayerPostThink);
sv_phys.c:	VectorAdd (PROG_TO_EDICT(ent->v.aiment)->v.origin, ent->v.v_angle, ent->v.origin);
sv_phys.c:	VectorMA (ent->v.angles, host_frametime, ent->v.avelocity, ent->v.angles);
sv_phys.c:	VectorMA (ent->v.origin, host_frametime, ent->v.velocity, ent->v.origin);
sv_phys.c:	point[0] = ent->v.origin[0];
sv_phys.c:	point[1] = ent->v.origin[1];
sv_phys.c:	point[2] = ent->v.origin[2] + ent->v.mins[2] + 1;	
sv_phys.c:	cont = SV_PointContents (ent->v.origin);
sv_phys.c:	if (!ent->v.watertype)
sv_phys.c:		ent->v.watertype = cont;
sv_phys.c:		ent->v.waterlevel = 1;
sv_phys.c:		if (ent->v.watertype == CONTENTS_EMPTY)
sv_phys.c:		ent->v.watertype = cont;
sv_phys.c:		ent->v.waterlevel = 1;
sv_phys.c:		if (ent->v.watertype != CONTENTS_EMPTY)
sv_phys.c:		ent->v.watertype = CONTENTS_EMPTY;
sv_phys.c:		ent->v.waterlevel = cont;
sv_phys.c:	groundentity = PROG_TO_EDICT(ent->v.groundentity);
sv_phys.c:	if ((int)groundentity->v.flags & FL_CONVEYOR)
sv_phys.c:		VectorScale(groundentity->v.movedir, groundentity->v.speed, ent->v.basevelocity);
sv_phys.c:		VectorCopy(vec_origin, ent->v.basevelocity);
sv_phys.c:	if (ent->v.velocity[2] > 0)
sv_phys.c:		ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
sv_phys.c:	if ( ((int)ent->v.flags & FL_ONGROUND) )
sv_phys.c:		if (VectorCompare(ent->v.basevelocity, vec_origin))
sv_phys.c:	if (! ((int)ent->v.flags & FL_ONGROUND)
sv_phys.c:		&& ent->v.movetype != MOVETYPE_FLY
sv_phys.c:		&& ent->v.movetype != MOVETYPE_BOUNCEMISSILE
sv_phys.c:		&& ent->v.movetype != MOVETYPE_FLYMISSILE)
sv_phys.c:	if ( ((int)ent->v.flags & FL_ONGROUND) )
sv_phys.c:	if (ent->v.movetype != MOVETYPE_FLY
sv_phys.c:	&& ent->v.movetype != MOVETYPE_FLYMISSILE)
sv_phys.c:	VectorMA (ent->v.angles, host_frametime, ent->v.avelocity, ent->v.angles);
sv_phys.c:	VectorAdd (ent->v.velocity, ent->v.basevelocity, ent->v.velocity);
sv_phys.c:	VectorScale (ent->v.velocity, host_frametime, move);
sv_phys.c:	VectorSubtract (ent->v.velocity, ent->v.basevelocity, ent->v.velocity);
sv_phys.c:	if (ent->free)
sv_phys.c:	if (ent->v.movetype == MOVETYPE_BOUNCE)
sv_phys.c:	else if (ent->v.movetype == MOVETYPE_BOUNCEMISSILE)
sv_phys.c:	ClipVelocity (ent->v.velocity, trace.plane.normal, ent->v.velocity, backoff);
sv_phys.c:		if (ent->v.velocity[2] < 60 || (ent->v.movetype != MOVETYPE_BOUNCE && ent->v.movetype != MOVETYPE_BOUNCEMISSILE))
sv_phys.c:		if (ent->v.velocity[2] < 60 || ent->v.movetype != MOVETYPE_BOUNCE)
sv_phys.c:			ent->v.flags = (int)ent->v.flags | FL_ONGROUND;
sv_phys.c:			ent->v.groundentity = EDICT_TO_PROG(trace.ent);
sv_phys.c:			VectorCopy (vec3_origin, ent->v.velocity);
sv_phys.c:			VectorCopy (vec3_origin, ent->v.avelocity);
sv_phys.c:	groundentity = PROG_TO_EDICT(ent->v.groundentity);
sv_phys.c:	if ((int)groundentity->v.flags & FL_CONVEYOR)
sv_phys.c:		VectorScale(groundentity->v.movedir, groundentity->v.speed, ent->v.basevelocity);
sv_phys.c:		VectorCopy(vec_origin, ent->v.basevelocity);
sv_phys.c:	pr_global_struct->time = sv.time;
sv_phys.c:	pr_global_struct->self = EDICT_TO_PROG(ent);
sv_phys.c:	wasonground = (int)ent->v.flags & FL_ONGROUND;
sv_phys.c://	ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
sv_phys.c:		if (!((int)ent->v.flags & FL_FLY))
sv_phys.c:			if (!(((int)ent->v.flags & FL_SWIM) && (ent->v.waterlevel > 0)))
sv_phys.c:				if (ent->v.velocity[2] < sv_gravity.value*-0.1)
sv_phys.c:	if (!VectorCompare(ent->v.velocity, vec_origin) || !VectorCompare(ent->v.basevelocity, vec_origin))
sv_phys.c:		ent->v.flags = (int)ent->v.flags & ~FL_ONGROUND;
sv_phys.c:			if (!(ent->v.health <= 0.0 && !SV_CheckBottom(ent)))
sv_phys.c:				vel = ent->v.velocity;
sv_phys.c:					newspeed = speed - host_frametime*control*friction;
sv_phys.c:		VectorAdd (ent->v.velocity, ent->v.basevelocity, ent->v.velocity);
sv_phys.c:		VectorSubtract (ent->v.velocity, ent->v.basevelocity, ent->v.velocity);
sv_phys.c:			VectorAdd (ent->v.origin, ent->v.mins, mins);
sv_phys.c:			VectorAdd (ent->v.origin, ent->v.maxs, maxs);
sv_phys.c:			point[2] = mins[2] - 1;
sv_phys.c:						ent->v.flags = (int)ent->v.flags | FL_ONGROUND;
sv_phys.c:		if ((int)ent->v.flags & FL_ONGROUND)
sv_phys.c:	if ( ! ((int)ent->v.flags & (FL_ONGROUND | FL_FLY | FL_SWIM) ) )
sv_phys.c:		if (ent->v.velocity[2] < sv_gravity.value*-0.1)
sv_phys.c:		if ( (int)ent->v.flags & FL_ONGROUND )	// just hit ground
sv_phys.c:	pr_global_struct->self = EDICT_TO_PROG(sv.edicts);
sv_phys.c:	pr_global_struct->other = EDICT_TO_PROG(sv.edicts);
sv_phys.c:	pr_global_struct->time = sv.time;
sv_phys.c:	PR_ExecuteProgram (pr_global_struct->StartFrame);
sv_phys.c:		if (ent->free)
sv_phys.c:		if (pr_global_struct->force_retouch)
sv_phys.c:		else if (ent->v.movetype == MOVETYPE_PUSH)
sv_phys.c:		else if (ent->v.movetype == MOVETYPE_NONE)
sv_phys.c:		else if (ent->v.movetype == MOVETYPE_FOLLOW)
sv_phys.c:		else if (ent->v.movetype == MOVETYPE_NOCLIP)
sv_phys.c:		else if (ent->v.movetype == MOVETYPE_STEP)
sv_phys.c:		else if (ent->v.movetype == MOVETYPE_TOSS 
sv_phys.c:		|| ent->v.movetype == MOVETYPE_BOUNCE
sv_phys.c:		|| ent->v.movetype == MOVETYPE_BOUNCEMISSILE
sv_phys.c:		|| ent->v.movetype == MOVETYPE_FLY
sv_phys.c:		|| ent->v.movetype == MOVETYPE_FLYMISSILE)
sv_phys.c:			Sys_Error ("SV_Physics: bad movetype %i", (int)ent->v.movetype);			
sv_phys.c:	if (pr_global_struct->force_retouch)
sv_phys.c:		pr_global_struct->force_retouch--;	
sv_phys.c:		VectorMA (tent->v.angles, host_frametime, tent->v.avelocity, tent->v.angles);
sv_phys.c:		VectorScale (tent->v.velocity, host_frametime, move);
sv_phys.c:		VectorAdd (tent->v.origin, move, end);
sv_phys.c:		trace = SV_Move (tent->v.origin, tent->v.mins, tent->v.maxs, end, MOVE_NORMAL, tent);	
sv_phys.c:		VectorCopy (trace.endpos, tent->v.origin);
sv_phys.c://			free_particles = p->next;
sv_phys.c://			p->next = active_particles;
sv_phys.c://			p->die = 256;
sv_phys.c://			p->color = 15;
sv_phys.c://			p->type = pt_static;
sv_phys.c://			VectorCopy (vec3_origin, p->vel);
sv_phys.c://			VectorCopy (tent->v.origin, p->org);
sv_phys.c://	p->color = 224;
sv_user.c:Copyright (C) 1996-1997 Id Software, Inc.
sv_user.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sv_user.c:// sv_user.c -- server code for moving users
sv_user.c:	if (!((int)sv_player->v.flags & FL_ONGROUND))
sv_user.c:	angleval = sv_player->v.angles[YAW] * M_PI*2 / 360;
sv_user.c:		top[0] = sv_player->v.origin[0] + cosval*(i+3)*12;
sv_user.c:		top[1] = sv_player->v.origin[1] + sinval*(i+3)*12;
sv_user.c:		top[2] = sv_player->v.origin[2] + sv_player->v.view_ofs[2];
sv_user.c:		bottom[2] = top[2] - 160;
sv_user.c:		z[i] = top[2] + tr.fraction*(bottom[2]-top[2]);
sv_user.c:		step = z[j] - z[j-1];
sv_user.c:		if (step > -ON_EPSILON && step < ON_EPSILON)
sv_user.c:		if (dir && ( step-dir > ON_EPSILON || step-dir < -ON_EPSILON ) )
sv_user.c:		sv_player->v.idealpitch = 0;
sv_user.c:	sv_player->v.idealpitch = -dir * sv_idealpitchscale.value;
sv_user.c:	start[2] = origin[2] + sv_player->v.mins[2];
sv_user.c:	stop[2] = start[2] - 34;
sv_user.c:	newspeed = speed - host_frametime*control*friction;
sv_user.c:	addspeed = wishspeed - currentspeed;
sv_user.c:	addspeed = wishspd - currentspeed;
sv_user.c:	len = VectorNormalize (sv_player->v.punchangle);
sv_user.c:	len -= 10*host_frametime;
sv_user.c:	VectorScale (sv_player->v.punchangle, len, sv_player->v.punchangle);
sv_user.c:	AngleVectors (sv_player->v.v_angle, forward, right, up);
sv_user.c:		wishvel[2] -= 60;		// drift towards bottom
sv_user.c:		newspeed = speed - host_frametime * speed * sv_friction.value;
sv_user.c:	addspeed = wishspeed - newspeed;
sv_user.c:	if (sv.time > sv_player->v.teleport_time
sv_user.c:	|| !sv_player->v.waterlevel)
sv_user.c:		sv_player->v.flags = (int)sv_player->v.flags & ~FL_WATERJUMP;
sv_user.c:		sv_player->v.teleport_time = 0;
sv_user.c:	sv_player->v.velocity[0] = sv_player->v.movedir[0];
sv_user.c:	sv_player->v.velocity[1] = sv_player->v.movedir[1];
sv_user.c:	AngleVectors (sv_player->v.angles, forward, right, up);
sv_user.c:	if (sv.time < sv_player->v.teleport_time && fmove < 0)
sv_user.c:	if ( (int)sv_player->v.movetype != MOVETYPE_WALK)
sv_user.c:	if ( sv_player->v.movetype == MOVETYPE_NOCLIP)
sv_user.c:	if (sv_player->v.movetype == MOVETYPE_NONE)
sv_user.c:	onground = (int)sv_player->v.flags & FL_ONGROUND;
sv_user.c:	origin = sv_player->v.origin;
sv_user.c:	velocity = sv_player->v.velocity;
sv_user.c:	if (sv_player->v.health <= 0)
sv_user.c:	cmd = host_client->cmd;
sv_user.c:	angles = sv_player->v.angles;
sv_user.c:	VectorAdd (sv_player->v.v_angle, sv_player->v.punchangle, v_angle);
sv_user.c:	angles[ROLL] = V_CalcRoll (sv_player->v.angles, sv_player->v.velocity)*4;
sv_user.c:	if (!sv_player->v.fixangle)
sv_user.c:		angles[PITCH] = -v_angle[PITCH]/3;
sv_user.c:	if ( (int)sv_player->v.flags & FL_WATERJUMP )
sv_user.c:	if ( (sv_player->v.waterlevel >= 2)
sv_user.c:	&& (sv_player->v.movetype != MOVETYPE_NOCLIP) )
sv_user.c:	host_client->ping_times[host_client->num_pings%NUM_PING_TIMES]
sv_user.c:		= sv.time - MSG_ReadFloat ();
sv_user.c:	host_client->num_pings++;
sv_user.c:	VectorCopy (angle, host_client->edict->v.v_angle);
sv_user.c:	move->forwardmove = MSG_ReadShort ();
sv_user.c:	move->sidemove = MSG_ReadShort ();
sv_user.c:	move->upmove = MSG_ReadShort ();
sv_user.c:	host_client->edict->v.button0 = bits & 1;
sv_user.c:	host_client->edict->v.button2 = (bits & 2)>>1;
sv_user.c:		host_client->edict->v.impulse = i;
sv_user.c:	host_client->edict->v.light_level = MSG_ReadByte ();
sv_user.c:		ret = NET_GetMessage (host_client->netconnection);
sv_user.c:		if (ret == -1)
sv_user.c:			if (!host_client->active)
sv_user.c:			case -1:
sv_user.c:				if (host_client->privileged)
sv_user.c:					Con_DPrintf("%s tried to %s\n", host_client->name, s);
sv_user.c:				SV_ReadClientMove (&host_client->cmd);
sv_user.c:		if (!host_client->active)
sv_user.c:		sv_player = host_client->edict;
sv_user.c:		if (!host_client->spawned)
sv_user.c:			memset (&host_client->cmd, 0, sizeof(host_client->cmd));
sys.h:Copyright (C) 1996-1997 Id Software, Inc.
sys.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys.h:// sys.h -- non-portable functions
sys.h:// return -1 if file is not present
sys_dos.c:Copyright (C) 1996-1997 Id Software, Inc.
sys_dos.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys_dos.c:	'7',    '8',    '9',    '0',    '-',    '=',    K_BACKSPACE, 9, // 0 
sys_dos.c:	K_UPARROW,K_PGUP,'-',K_LEFTARROW,'5',K_RIGHTARROW,'+',K_END, //4 
sys_dos.c:		Sys_Error("ctrl-c hit\n");
sys_dos.c:	keybuf_head = (keybuf_head + 1) & (KEYBUF_SIZE-1);
sys_dos.c:		lockunlockmem = COM_CheckParm ("-winlockunlock");
sys_dos.c:			lockmem = COM_CheckParm ("-winlock");
sys_dos.c:	info.size = last_locked - 4096;
sys_dos.c:		working_size = meminfo.largest_available_free_block_in_bytes -
sys_dos.c:		working_size -= 0x10000;		/* Decrease 64K and try again */
sys_dos.c:	} while (working_memory == (void *)-1);
sys_dos.c:	extra = 0xfffc - ((unsigned)sbrk(0) & 0xffff);
sys_dos.c:	    info.size = __djgpp_selector_limit + 1 - last_locked;
sys_dos.c:			info.size -= 0x1000;
sys_dos.c:			working_size -= 0x1000;
sys_dos.c:			sbrk(-0x1000);
sys_dos.c:		j = COM_CheckParm("-winmem");
sys_dos.c:			 j -= 0x100000)
sys_dos.c:		info.address -= __djgpp_base_address + 4; // ending point, malloc align
sys_dos.c:		working_size = info.address - (int)working_memory;
sys_dos.c:		sbrk(info.address-(int)sbrk(0));		// negative adjustment
sys_dos.c:// touch all the memory to make sure it's there. The 16-page skip is to
sys_dos.c:		for (m=0 ; m<(working_size - 16 * 0x1000) ; m += 4)
sys_dos.c:	working_size -= LOCKED_FOR_MALLOC;
sys_dos.c:	sbrk( -(LOCKED_FOR_MALLOC));
sys_dos.c:returns -1 if not present
sys_dos.c:	if (stat (path,&buf) == -1)
sys_dos.c:		return -1;
sys_dos.c:				len--;
sys_dos.c:					   end_of_memory - (int)&start_of_memory);
sys_dos.c:		keybuf_tail &= (KEYBUF_SIZE-1);
sys_dos.c:		next = keybuf[(keybuf_tail-2)&(KEYBUF_SIZE-1)];
sys_dos.c:			if ( keybuf[(keybuf_tail-2)&(KEYBUF_SIZE-1)]==0xe0 ) 
sys_dos.c:		if (k==0xc5 && keybuf[(keybuf_tail-2)&(KEYBUF_SIZE-1)] == 0x9d)
sys_dos.c:	if (h == -1)
sys_dos.c:		return -1;
sys_dos.c:	if (fstat (h,&fileinfo) == -1)
sys_dos.c:	if (handle == -1)
sys_dos.c:    r = (r-1) & 0xffff;
sys_dos.c:	ft = (double) (t+(65536-r)) / 1193200.0;
sys_dos.c:	time = ft - oldtime;
sys_dos.c:		if (time > -3000.0)
sys_dos.c:	j = COM_CheckParm("-starttime");
sys_dos.c:	j = COM_CheckParm("-mem");
sys_dos.c:	if (COM_CheckParm ("-heapsize"))
sys_dos.c:		tsize = Q_atoi (com_argv[COM_CheckParm("-heapsize") + 1]) * 1024;
sys_dos.c:						 end_of_memory - (int)&start_of_memory))
sys_dos.c:						 end_of_memory - (int)&start_of_memory);
sys_dos.c:				(end_of_memory - (int)&start_of_memory) / 0x100000);
sys_dos.c:				(end_of_memory - (int)&start_of_memory) / 0x100000);
sys_dos.c:				(end_of_memory - (int)&start_of_memory) / 0x100000);
sys_dos.c:// touch the entire image, doing the 16-page skip so Win95 doesn't think we're
sys_dos.c:		for(i=(int)&start_of_memory ; i<(end_of_memory - 16 * 0x1000) ; i += 4)
sys_dos.c:	printf ("\nError: Quake requires a floating-point processor\n");
sys_dos.c:	if (cwd[Q_strlen(cwd)-1] == '/') cwd[Q_strlen(cwd)-1] = 0;
sys_dos.c:	isDedicated = (COM_CheckParm ("-dedicated") != 0);
sys_dos.c:		time = newtime - oldtime;
sys_dosa.s:// x86 assembly-language DOS-dependent routines.
sys_dosa.s:	orb		$0x03,%ah	// round mode, 64-bit precision
sys_linux.c:// make sure everything goes through, even though we are non-blocking
sys_linux.c:            l -= r;
sys_linux.c:"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H                QUAKE: The Doomed Dimension \x1b[33mby \x1b[44mid\x1b[41m Software                      \x1b[2;1H  ----------------------------------------------------------------------------  \x1b[3;1H           CALL 1-800-IDGAMES TO ORDER OR FOR TECHNICAL SUPPORT                 \x1b[4;1H             PRICE: $45.00 (PRICES MAY VARY OUTSIDE THE US.)                    \x1b[5;1H                                                                                \x1b[6;1H  \x1b[37mYes! You only have one fourth of this incredible epic. That is because most   \x1b[7;1H   of you have paid us nothing or at most, very little. You could steal the     \x1b[8;1H   game from a friend. But we both know you'll be punished by God if you do.    \x1b[9;1H        \x1b[33mWHY RISK ETERNAL DAMNATION? CALL 1-800-IDGAMES AND BUY NOW!             \x1b[10;1H             \x1b[37mRemember, we love you almost as much as He does.                   \x1b[11;1H                                                                                \x1b[12;1H            \x1b[33mProgramming: \x1b[37mJohn Carmack, Michael Abrash, John Cash                \x1b[13;1H       \x1b[33mDesign: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits         \x1b[14;1H                     \x1b[33mArt: \x1b[37mAdrian Carmack, Kevin Cloud                           \x1b[15;1H               \x1b[33mBiz: \x1b[37mJay Wilbur, Mike Wilson, Donna Jackson                      \x1b[16;1H            \x1b[33mProjects: \x1b[37mShawn Green   \x1b[33mSupport: \x1b[37mBarrett Alexander                  \x1b[17;1H              \x1b[33mSound Effects: \x1b[37mTrent Reznor and Nine Inch Nails                   \x1b[18;1H  For other information or details on ordering outside the US, check out the    \x1b[19;1H     files accompanying QUAKE or our website at http://www.idsoftware.com.      \x1b[20;1H    \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc.        \x1b[21;1H     All rights reserved. NIN logo is a registered trademark licensed to        \x1b[22;1H                 Nothing Interactive, Inc. All rights reserved.                 \x1b[40m\x1b[23;1H\x1b[0m";
sys_linux.c:"\x1b[?7h\x1b[40m\x1b[2J\x1b[0;1;41m\x1b[1;1H        QUAKE \x1b[33mby \x1b[44mid\x1b[41m Software                                                    \x1b[2;1H -----------------------------------------------------------------------------  \x1b[3;1H        \x1b[37mWhy did you quit from the registered version of QUAKE? Did the          \x1b[4;1H        scary monsters frighten you? Or did Mr. Sandman tug at your             \x1b[5;1H        little lids? No matter! What is important is you love our               \x1b[6;1H        game, and gave us your money. Congratulations, you are probably         \x1b[7;1H        not a thief.                                                            \x1b[8;1H                                                           Thank You.           \x1b[9;1H        \x1b[33;44mid\x1b[41m Software is:                                                         \x1b[10;1H        PROGRAMMING: \x1b[37mJohn Carmack, Michael Abrash, John Cash                    \x1b[11;1H        \x1b[33mDESIGN: \x1b[37mJohn Romero, Sandy Petersen, American McGee, Tim Willits        \x1b[12;1H        \x1b[33mART: \x1b[37mAdrian Carmack, Kevin Cloud                                        \x1b[13;1H        \x1b[33mBIZ: \x1b[37mJay Wilbur, Mike Wilson     \x1b[33mPROJECTS MAN: \x1b[37mShawn Green              \x1b[14;1H        \x1b[33mBIZ ASSIST: \x1b[37mDonna Jackson        \x1b[33mSUPPORT: \x1b[37mBarrett Alexander             \x1b[15;1H        \x1b[33mSOUND EFFECTS AND MUSIC: \x1b[37mTrent Reznor and Nine Inch Nails               \x1b[16;1H                                                                                \x1b[17;1H        If you need help running QUAKE refer to the text files in the           \x1b[18;1H        QUAKE directory, or our website at http://www.idsoftware.com.           \x1b[19;1H        If all else fails, call our technical support at 1-800-IDGAMES.         \x1b[20;1H      \x1b[0;41mQuake is a trademark of Id Software, inc., (c)1996 Id Software, inc.      \x1b[21;1H        All rights reserved. NIN logo is a registered trademark licensed        \x1b[22;1H             to Nothing Interactive, Inc. All rights reserved.                  \x1b[23;1H\x1b[40m\x1b[0m";
sys_linux.c:returns -1 if not present
sys_linux.c:	if (stat (path,&buf) == -1)
sys_linux.c:		return -1;
sys_linux.c:	if (h == -1)
sys_linux.c:		return -1;
sys_linux.c:	if (fstat (h,&fileinfo) == -1)
sys_linux.c:	if (handle == -1)
sys_linux.c:		sprintf(cmd, "xterm -e %s %s", editor, filename);
sys_linux.c:    return (tp.tv_sec - secbase) + tp.tv_usec/1000000.0;
sys_linux.c:		if (select (1, &fdset, NULL, NULL, &timeout) == -1 || !FD_ISSET(0, &fdset))
sys_linux.c:		text[len-1] = 0;    // rip off the /n and terminate
sys_linux.c:	j = COM_CheckParm("-mem");
sys_linux.c:// caching is disabled by default, use -cachedir to enable
sys_linux.c:	if (COM_CheckParm("-nostdout"))
sys_linux.c:		printf ("Linux Quake -- Version %0.3f\n", LINUX_VERSION);
sys_linux.c:    oldtime = Sys_FloatTime () - 0.1;
sys_linux.c:        time = newtime - oldtime;
sys_linux.c:            if (time < sys_ticrate.value && (vcrFile == -1 || recording) )
sys_linux.c:	addr = (startaddr & ~(psize-1)) - psize;
sys_linux.c://	fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
sys_linux.c:	r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
sys_null.c:Copyright (C) 1996-1997 Id Software, Inc.
sys_null.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys_null.c:// sys_null.h -- null system driver to aid porting efforts
sys_null.c:	return -1;
sys_null.c:		*hndl = -1;
sys_null.c:		return -1;
sys_null.c:	return -1;
sys_sun.c:Copyright (C) 1996-1997 Id Software, Inc.
sys_sun.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys_sun.c:// sys_sun.h -- Sun system driver
sys_sun.c:    return -1;
sys_sun.c:	*hndl = -1;
sys_sun.c:	return -1;
sys_sun.c:    if (!sys_handles[i].pMap || (sys_handles[i].pMap == (char *)-1))
sys_sun.c:	    count = sys_handles[handle].nLen - nPos;
sys_sun.c:	Sys_Error( "Attempted to write to read-only file %d!\n", handle );
sys_sun.c:    return -1;
sys_sun.c:	addr = (startaddr & ~(psize-1)) - psize;
sys_sun.c://	fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
sys_sun.c:	r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
sys_sun.c:    return (tp.tv_sec - secbase) + tp.tv_usec/1000000.0;
sys_sun.c:		text[len-1] = 0;	// rip off the /n and terminate
sys_sun.c:		Host_Frame (newtime - oldtime);
sys_win.c:Copyright (C) 1996-1997 Id Software, Inc.
sys_win.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys_win.c:// sys_win.c -- Win32 system interface code
sys_win.c:// touch all the memory to make sure it's there. The 16-page skip is to
sys_win.c:		for (m=0 ; m<(size - 16 * 0x1000) ; m += 4)
sys_win.c:	return -1;
sys_win.c:		*hndl = -1;
sys_win.c:		retval = -1;
sys_win.c:		retval = -1;
sys_win.c:				((Sys_FloatTime () - starttime) < CONSOLE_ERROR_TIMEOUT))
sys_win.c:		   ((unsigned int)PerformanceCount.HighPart << (32 - lowshift));
sys_win.c:		if ((temp <= oldtime) && ((oldtime - temp) < 0x10000000))
sys_win.c:			t2 = temp - oldtime;
sys_win.c:	j = COM_CheckParm("-starttime");
sys_win.c:							len--;
sys_win.c:	if (cwd[Q_strlen(cwd)-1] == '/')
sys_win.c:		cwd[Q_strlen(cwd)-1] = 0;
sys_win.c:	isDedicated = (COM_CheckParm ("-dedicated") != 0);
sys_win.c:						(rect.left / 2) - ((rect.right - rect.left) / 2),
sys_win.c:	if (COM_CheckParm ("-heapsize"))
sys_win.c:		t = COM_CheckParm("-heapsize") + 1;
sys_win.c:		if ((t = COM_CheckParm ("-HFILE")) > 0)
sys_win.c:		if ((t = COM_CheckParm ("-HPARENT")) > 0)
sys_win.c:		if ((t = COM_CheckParm ("-HCHILD")) > 0)
sys_win.c:			time = newtime - oldtime;
sys_win.c:				time = newtime - oldtime;
sys_win.c:			time = newtime - oldtime;
sys_wina.s:Copyright (C) 1996-1997 Id Software, Inc.
sys_wina.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys_wina.s:// x86 assembly-language Win-dependent routines.
sys_wina.s:// LATER should be id386-dependent, and have an equivalent C path
sys_wina.s:	orb		$0x03,%ah	// round mode, 64-bit precision
sys_wind.c:Copyright (C) 1996-1997 Id Software, Inc.
sys_wind.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
sys_wind.c:// sys_null.h -- null system driver to aid porting efforts
sys_wind.c:	return -1;
sys_wind.c:		*hndl = -1;
sys_wind.c:		return -1;
sys_wind.c:	return -1;
sys_wind.c:	t = (tstruct.time-starttime) + tstruct.millitm*0.001;
sys_wind.c:			len--;
sys_wind.c:	if (cwd[Q_strlen(cwd)-1] == '\\')
sys_wind.c:		cwd[Q_strlen(cwd)-1] = 0;
sys_wind.c:	if (!COM_CheckParm ("-dedicated"))
sys_wind.c:		newargv[argc] = "-dedicated";
sys_wind.c:		if (time - oldtime < sys_ticrate.value )
sys_wind.c:		Host_Frame ( time - oldtime );
vgamodes.h:Copyright (C) 1996-1997 Id Software, Inc.
vgamodes.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:	VRS_BYTE_OUT, MISC_OUTPUT, 0xA3,	// 350-scan-line scan rate
vgamodes.h:// set the vertical counts for 350-scan-line mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:	VRS_BYTE_OUT, MISC_OUTPUT, 0xA7,	// 350-scan-line scan rate
vgamodes.h:// set the vertical counts for 350-scan-line mode and 360 pixels across
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// switch to linear, non-chain4 mode
vgamodes.h:// extra VGA-specific data for vgavidmodes
vgamodes.h:	"320x200", "    ***** Mode X-style modes *****    ",
vid.h:Copyright (C) 1996-1997 Id Software, Inc.
vid.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid.h:// vid.h -- video driver defs
vid.h:	float			aspect;		// width / height -- < 0 is taller than wide
vid.h:	int				recalc_refdef;	// if true, recalc vid-based stuff
vid_dos.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_dos.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_dos.c:// vid_dos.c: DOS-specific video routines
vid_dos.c:	if (!COM_CheckParm ("-stdvid"))
vid_dos.c:	while (modenum--)
vid_dos.c:		pv = pv->pnext;
vid_dos.c:			*ppheader = pv->header;
vid_dos.c:		return pv->name;
vid_dos.c:	vid.width = pcurrentmode->width;
vid_dos.c:	vid.height = pcurrentmode->height;
vid_dos.c:	vid.aspect = pcurrentmode->aspect;
vid_dos.c:	vid.rowbytes = pcurrentmode->rowbytes;
vid_dos.c:	stat = (*pcurrentmode->setmode) (&vid, pcurrentmode);
vid_dos.c:		else if (stat == -1)
vid_dos.c:			vid.width = pcurrentmode->width;
vid_dos.c:			vid.height = pcurrentmode->height;
vid_dos.c:			vid.aspect = pcurrentmode->aspect;
vid_dos.c:			vid.rowbytes = pcurrentmode->rowbytes;
vid_dos.c:	(*pcurrentmode->setpalette) (&vid, pcurrentmode, palette);
vid_dos.c:	(*pcurrentmode->setpalette)(&vid, pcurrentmode, vid_current_palette);
vid_dos.c:	(*pcurrentmode->swapbuffers)(&vid, pcurrentmode, rects);
vid_dos.c:		if (VGA_CheckAdequateMem (pv->width, pv->height, pv->rowbytes,
vid_dos.c:			(pv->numpages == 1) || vid_nopageflip.value))
vid_dos.c:	if (VGA_CheckAdequateMem (pv->width, pv->height, pv->rowbytes,
vid_dos.c:		(pv->numpages == 1) || vid_nopageflip.value))
vid_dos.c:	(*pcurrentmode->begindirectrect) (&vid, pcurrentmode, x, y, pbitmap, width,
vid_dos.c:	(*pcurrentmode->enddirectrect) (&vid, pcurrentmode, x, y, width, height);
vid_dos.c:	M_DrawPic ( (320-p->width)/2, 4, p);
vid_dos.c:		if ((i % vid_column_size) == (vid_column_size - 1))
vid_dos.c:		vid_line--;
vid_dos.c:			vid_line = vid_wmodes - 1;
vid_dos.c:		vid_line -= vid_column_size;
vid_dos.c:			vid_line += ((vid_wmodes + (vid_column_size - 1)) /
vid_dos.c:				vid_line -= vid_column_size;
vid_dos.c:			vid_line -= ((vid_wmodes + (vid_column_size - 1)) /
vid_dos.h:Copyright (C) 1996-1997 Id Software, Inc.
vid_dos.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_dos.h:// vid_dos.h: header file for DOS-specific video stuff
vid_ext.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_ext.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_ext.c:// in this implementation, VESA-specific DOS video stuff
vid_ext.c:	if (!lvid->direct)
vid_ext.c:	if (!lvid->direct)
vid_ext.c:	} while ((time - starttime) < 0.1);
vid_ext.c:	*(long *)pinfoblock->VbeSignature = 'V' + ('B'<<8) + ('E'<<16) + ('2'<<24);
vid_ext.c:	if (pinfoblock->VbeVersion[1] < 0x02)
vid_ext.c:				VID_ExtraFarToLinear (*(byte **)&pinfoblock->OemStringPtr[0]));
vid_ext.c:	totalvidmem = *(unsigned short *)&pinfoblock->TotalMemory[0] << 16;
vid_ext.c:			VID_ExtraFarToLinear (*(byte **)&pinfoblock->VideoModePtr[0]);
vid_ext.c:	while ((*pmodenums != -1) && (nummodes < MAX_VESA_MODES))
vid_ext.c:		vesa_modes[nummodes-1].pnext = pvidmodes;
vid_ext.c:	// we do only 8-bpp in software
vid_ext.c:	// than that, no matter how much memory it has--it may not have hardware
vid_ext.c:	pextra = pcurrentmode->pextradata;
vid_ext.c:		lvid->numpages = 1;
vid_ext.c:		lvid->numpages = pcurrentmode->numpages;
vid_ext.c:	if (!VGA_FreeAndAllocVidbuffer (lvid, lvid->numpages == 1))
vid_ext.c:		return -1;	// memory alloc failed
vid_ext.c:		VGA_ClearVideoMem (VGA_pcurmode->planar);
vid_ext.c:	regs.x.bx = pextra->vesamode;
vid_ext.c:	VID_banked = !(pextra->vesamode & LINEAR_MODE);
vid_ext.c:	VID_membase = pextra->plinearmem;
vid_ext.c:	VGA_width = lvid->width;
vid_ext.c:	VGA_height = lvid->height;
vid_ext.c:	VGA_rowbytes = lvid->rowbytes;
vid_ext.c:	lvid->colormap = host_colormap;
vid_ext.c:	VID_pagelist = &pextra->pages[0];
vid_ext.c:// wait for display enable by default only when triple-buffering on a VGA-
vid_ext.c:	if (!pextra->vga_incompatible  &&
vid_ext.c:		(lvid->numpages == 3)      &&
vid_ext.c:		if ((lvid->numpages == 1) && (_vid_wait_override.value == 0.0))
vid_ext.c:			if (lvid->numpages > 1)
vid_ext.c:	if (lvid->numpages > 1)
vid_ext.c:		lvid->buffer = VGA_pagebase;
vid_ext.c:		lvid->conbuffer = lvid->buffer;
vid_ext.c:		lvid->rowbytes = lvid->width;
vid_ext.c:	lvid->direct = VGA_pagebase;
vid_ext.c:	lvid->conrowbytes = lvid->rowbytes;
vid_ext.c:	lvid->conwidth = lvid->width;
vid_ext.c:	lvid->conheight = lvid->height;
vid_ext.c:	lvid->maxwarpwidth = WARP_WIDTH;
vid_ext.c:	lvid->maxwarpheight = WARP_HEIGHT;
vid_ext.c:	if (lvid->numpages > 1)
vid_ext.c:		if (++VID_currentpage >= lvid->numpages)
vid_ext.c:			lvid->direct = lvid->buffer;	// direct drawing goes to the
vid_ext.c:			lvid->buffer = VID_membase + VID_pagelist[VID_currentpage];
vid_ext.c:			lvid->conbuffer = lvid->buffer;
vid_ext.c:		VGA_pagebase = lvid->buffer;
vid_ext.c:	// non-page-flipped
vid_ext.c:					lvid->buffer + rects->x + (rects->y * lvid->rowbytes),
vid_ext.c:		 			VGA_pagebase + rects->x + (rects->y * VGA_rowbytes),
vid_ext.c:					rects->width,
vid_ext.c:					rects->height,
vid_ext.c:					lvid->rowbytes,
vid_ext.c:			rects = rects->pnext;
vid_null.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_null.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_null.c:// vid_null.c -- null video driver to aid porting efforts
vid_null.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
vid_sunx.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_sunx.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_sunx.c:// vid_x.c -- general x video driver
vid_sunx.c:    r_mask=x_vis->red_mask;
vid_sunx.c:    g_mask=x_vis->green_mask;
vid_sunx.c:    b_mask=x_vis->blue_mask;
vid_sunx.c:    for(r_shift=-8,x=1;x<r_mask;x=x<<1)r_shift++;
vid_sunx.c:    for(g_shift=-8,x=1;x<g_mask;x=x<<1)g_shift++;
vid_sunx.c:    for(b_shift=-8,x=1;x<b_mask;x=x<<1)b_shift++;
vid_sunx.c:        p=(r>>(-r_shift))&r_mask;
vid_sunx.c:        p|=(g>>(-g_shift))&g_mask;
vid_sunx.c:        p|=(b>>(-b_shift))&b_mask;
vid_sunx.c:        p=(r>>(-r_shift))&r_mask;
vid_sunx.c:        p|=(g>>(-g_shift))&g_mask;
vid_sunx.c:        p|=(b>>(-b_shift))&b_mask;
vid_sunx.c:		src = &framebuf->data [yi * framebuf->bytes_per_line];
vid_sunx.c:		dest = ((PIXEL16 *)src) + x+width - 1;
vid_sunx.c:		src += x+width - 1;
vid_sunx.c:		case 0:	do {	*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 7:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 6:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 5:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 4:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 3:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 2:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:		case 1:			*dest-- = st2d_8to16table[*src--];
vid_sunx.c:				} while (--n > 0);
vid_sunx.c://		for(xi = (x+width-1); xi >= x; xi--) {
vid_sunx.c:		src = &framebuf->data [yi * framebuf->bytes_per_line];
vid_sunx.c:		dest = ((PIXEL24 *)src) + x+width - 1;
vid_sunx.c:		src += x+width - 1;
vid_sunx.c:		case 0:	do {	*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 7:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 6:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 5:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 4:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 3:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 2:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:		case 1:			*dest-- = st2d_8to24table[*src--];
vid_sunx.c:				} while (--n > 0);
vid_sunx.c://		for(xi = (x+width-1); xi >= x; xi--) {
vid_sunx.c:		Z_Free(x_framebuffer[0]->data);
vid_sunx.c:	pwidth = x_visinfo->depth / 8;
vid_sunx.c:		x_visinfo->depth,
vid_sunx.c:						x_visinfo->depth,
vid_sunx.c:		size = x_framebuffer[frm]->bytes_per_line
vid_sunx.c:			* x_framebuffer[frm]->height;
vid_sunx.c:		if (x_shminfo[frm].shmid==-1)
vid_sunx.c:		x_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
vid_sunx.c:    M_DrawPic ( (320-p->width)/2, 4, p);
vid_sunx.c:// VID_SetWindowTitle - set the window and icon titles
vid_sunx.c:    wmHints->initial_state = NormalState;
vid_sunx.c:    wmHints->flags = StateHint;
vid_sunx.c:// VID_FullScreen - open the window in full screen mode
vid_sunx.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
vid_sunx.c:	verbose=COM_CheckParm("-verbose");
vid_sunx.c:// catch signals so i can turn on auto-repeat
vid_sunx.c:// we never run full-screen, so no auto-repeat nukage
vid_sunx.c:// check for command-line window size
vid_sunx.c:	if ((pnum=COM_CheckParm("-winsize")))
vid_sunx.c:		if (pnum >= com_argc-2)
vid_sunx.c:			Sys_Error("VID: -winsize <width> <height>\n");
vid_sunx.c:	if ((pnum=COM_CheckParm("-visualid")))
vid_sunx.c:		if (pnum >= com_argc-1)
vid_sunx.c:			Sys_Error("VID: -visualid <id#>\n");
vid_sunx.c:// pick a visual- warn if more than one was available
vid_sunx.c:			printf("	-visualid %d\n", (int)(x_visinfo[i].visualid));
vid_sunx.c:		printf("Using visualid %d:\n", (int)(x_visinfo->visualid));
vid_sunx.c:		printf("	class %d\n", x_visinfo->class);
vid_sunx.c:		printf("	screen %d\n", x_visinfo->screen);
vid_sunx.c:		printf("	depth %d\n", x_visinfo->depth);
vid_sunx.c:		printf("	red_mask 0x%x\n", (int)(x_visinfo->red_mask));
vid_sunx.c:		printf("	green_mask 0x%x\n", (int)(x_visinfo->green_mask));
vid_sunx.c:		printf("	blue_mask 0x%x\n", (int)(x_visinfo->blue_mask));
vid_sunx.c:		printf("	colormap_size %d\n", x_visinfo->colormap_size);
vid_sunx.c:		printf("	bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
vid_sunx.c:	x_vis = x_visinfo->visual;
vid_sunx.c:			x_visinfo->screen), x_vis, AllocNone);
vid_sunx.c:			XRootWindow(x_disp, x_visinfo->screen),
vid_sunx.c:			x_visinfo->depth,
vid_sunx.c:		if (x_visinfo->class != TrueColor)
vid_sunx.c:	if (x_visinfo->depth == 8)
vid_sunx.c:		if (x_visinfo->class == PseudoColor)
vid_sunx.c:	vid.rowbytes = x_framebuffer[0]->bytes_per_line;
vid_sunx.c:	vid.buffer = x_framebuffer[0]->data;
vid_sunx.c:	vid.conbuffer = x_framebuffer[0]->data;
vid_sunx.c:	if (x_visinfo->class == PseudoColor && x_visinfo->depth == 8)
vid_sunx.c:			Key_Event( K_MOUSE1 + x_event.xbutton.button - 1, true );
vid_sunx.c:			Key_Event( K_MOUSE1 + x_event.xbutton.button - 1, false );
vid_sunx.c:				mouse_x = (float) ((int)x_event.xmotion.x - (int)(vid.width/2));
vid_sunx.c:				mouse_y = (float) ((int)x_event.xmotion.y - (int)(vid.height/2));
vid_sunx.c:				mouse_x = (float) (x_event.xmotion.x-p_mouse_x);
vid_sunx.c:				mouse_y = (float) (x_event.xmotion.y-p_mouse_y);
vid_sunx.c:		printf("%lf frames/secs\n", 50.0/((double)(gethrtime()-s) / 1e9));
vid_sunx.c:		vid.rowbytes = x_framebuffer[0]->bytes_per_line;
vid_sunx.c:		vid.buffer = x_framebuffer[current_framebuffer]->data;
vid_sunx.c:printf("update: %d,%d (%d,%d)\n", rects->x, rects->y, rects->width, rects->height);
vid_sunx.c:			if (x_visinfo->depth == 16)
vid_sunx.c:					rects->x, rects->y, rects->width,
vid_sunx.c:					rects->height);
vid_sunx.c:			else if (x_visinfo->depth == 24)
vid_sunx.c:					rects->x, rects->y, rects->width,
vid_sunx.c:					rects->height);
vid_sunx.c:				x_framebuffer[current_framebuffer], rects->x, rects->y,
vid_sunx.c:				rects->x, rects->y, rects->width, rects->height, True))
vid_sunx.c:			rects = rects->pnext;
vid_sunx.c://		printf("%lf\n", (double)(gethrtime()-s)/1.0e9);
vid_sunx.c:		vid.buffer = x_framebuffer[current_framebuffer]->data;
vid_sunx.c:			if (x_visinfo->depth == 16)
vid_sunx.c:					rects->x, rects->y, rects->width,
vid_sunx.c:					rects->height);
vid_sunx.c:			else if (x_visinfo->depth == 24)
vid_sunx.c:					rects->x, rects->y, rects->width,
vid_sunx.c:					rects->height);
vid_sunx.c:			XPutImage(x_disp, x_win, x_gc, x_framebuffer[0], rects->x,
vid_sunx.c:				rects->y, rects->x, rects->y, rects->width, rects->height);
vid_sunx.c:			rects = rects->pnext;
vid_sunx.c:			text[len-1] = 0;	// rip off the /n and terminate
vid_sunx.c:	if ( COM_CheckParm ("-nomouse") )
vid_sunx.c:		cmd->sidemove += m_side.value * mouse_x;
vid_sunx.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
vid_sunx.c:		if (cl.viewangles[PITCH] < -70)
vid_sunx.c:			cl.viewangles[PITCH] = -70;
vid_sunx.c:			cmd->upmove -= m_forward.value * mouse_y;
vid_sunx.c:			cmd->forwardmove -= m_forward.value * mouse_y;
vid_sunxil.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_sunxil.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_sunxil.c:// vid_sunxil.c -- uses X to setup windows and XIL to copy images (scaled as needed) 
vid_sunxil.c:    M_DrawPic ( (320-p->width)/2, 4, p);
vid_sunxil.c:// VID_SetWindowTitle - set the window and icon titles
vid_sunxil.c:    wmHints->initial_state = NormalState;
vid_sunxil.c:    wmHints->flags = StateHint;
vid_sunxil.c:// VID_FullScreen - open the window in full screen mode
vid_sunxil.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
vid_sunxil.c:	verbose = COM_CheckParm("-verbose");
vid_sunxil.c:	count_frames = COM_CheckParm("-count_frames");
vid_sunxil.c:// check for command-line window size
vid_sunxil.c:	if ((pnum=COM_CheckParm("-winsize"))) {
vid_sunxil.c:		if (pnum >= com_argc-2)
vid_sunxil.c:			Sys_Error("VID: -winsize <width> <height>\n");
vid_sunxil.c:	if ((pnum=COM_CheckParm("-visualid"))) {
vid_sunxil.c:		if (pnum >= com_argc-1)
vid_sunxil.c:			Sys_Error("VID: -visualid <id#>\n");
vid_sunxil.c:// pick a visual- warn if more than one was available
vid_sunxil.c:			printf("	-visualid %d\n", (int)(x_visinfo[i].visualid));
vid_sunxil.c:		printf("Using visualid %d:\n", (int)(x_visinfo->visualid));
vid_sunxil.c:		printf("	screen %d\n", x_visinfo->screen);
vid_sunxil.c:		printf("	red_mask 0x%x\n", (int)(x_visinfo->red_mask));
vid_sunxil.c:		printf("	green_mask 0x%x\n", (int)(x_visinfo->green_mask));
vid_sunxil.c:		printf("	blue_mask 0x%x\n", (int)(x_visinfo->blue_mask));
vid_sunxil.c:		printf("	colormap_size %d\n", x_visinfo->colormap_size);
vid_sunxil.c:		printf("	bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
vid_sunxil.c:	x_vis = x_visinfo->visual;
vid_sunxil.c:	if(((sysconf(_SC_NPROCESSORS_ONLN) > 1) || COM_CheckParm("-mt")) &&  
vid_sunxil.c:		(COM_CheckParm("-no_mt") == 0)) {
vid_sunxil.c:			x_visinfo->screen), x_vis, AllocNone);
vid_sunxil.c:			XRootWindow(x_disp, x_visinfo->screen),
vid_sunxil.c:			x_visinfo->depth,
vid_sunxil.c:		if (x_visinfo->class != TrueColor)
vid_sunxil.c:	if (x_visinfo->depth == 8) {
vid_sunxil.c:		if (x_visinfo->class == PseudoColor) {
vid_sunxil.c:	if (x_visinfo->class == PseudoColor && x_visinfo->depth == 8) {
vid_sunxil.c:		case XK_F24: key = '-'; break;
vid_sunxil.c:		case XK_KP_Subtract: key = '-'; break;
vid_sunxil.c:				mouse_x = (float) ((int)x_event.xmotion.x - (int)(vid.width/2));
vid_sunxil.c:				mouse_y = (float) ((int)x_event.xmotion.y - (int)(vid.height/2));
vid_sunxil.c:				mouse_x = (float) (x_event.xmotion.x-p_mouse_x);
vid_sunxil.c:				mouse_y = (float) (x_event.xmotion.y-p_mouse_y);
vid_sunxil.c:			b=-1;
vid_sunxil.c:			b=-1;
vid_sunxil.c:			printf("%lf frames/secs\n", 200.0/((double)(n-s) / 1e9));
vid_sunxil.c:		rects = rects->pnext;
vid_sunxil.c:   if ( COM_CheckParm ("-nomouse") )
vid_sunxil.c:		cmd->sidemove += m_side.value * mouse_x;
vid_sunxil.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
vid_sunxil.c:		if (cl.viewangles[PITCH] < -70)
vid_sunxil.c:			cl.viewangles[PITCH] = -70;
vid_sunxil.c:			cmd->upmove -= m_forward.value * mouse_y;
vid_sunxil.c:			cmd->forwardmove -= m_forward.value * mouse_y;
vid_svgalib.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_svgalib.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_svgalib.c:	Con_Printf("%d: %d x %d - ",modenum,modes[modenum].width,modes[modenum].height);
vid_svgalib.c:			Con_Printf("%d: %d x %d - ", i, modes[i].width,modes[i].height);
vid_svgalib.c:		for (i=256*3 ; i ; i--)
vid_svgalib.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
vid_svgalib.c:	// interpret command-line params
vid_svgalib.c:		else if (COM_CheckParm("-mode"))
vid_svgalib.c:			current_mode = get_mode(com_argv[COM_CheckParm("-mode")+1], w, h, d);
vid_svgalib.c:		else if (COM_CheckParm("-w") || COM_CheckParm("-h")
vid_svgalib.c:			|| COM_CheckParm("-d"))
vid_svgalib.c:			if (COM_CheckParm("-w"))
vid_svgalib.c:				w = Q_atoi(com_argv[COM_CheckParm("-w")+1]);
vid_svgalib.c:			if (COM_CheckParm("-h"))
vid_svgalib.c:				h = Q_atoi(com_argv[COM_CheckParm("-h")+1]);
vid_svgalib.c:			if (COM_CheckParm("-d"))
vid_svgalib.c:				d = Q_atoi(com_argv[COM_CheckParm("-d")+1]);
vid_svgalib.c:	if (COM_CheckParm("-nokbd")) UseKeyboard = 0;
vid_svgalib.c:		scantokey[12] = '-';
vid_svgalib.c:					((total-offset>0x10000)?0x10000:(total-offset)));
vid_svgalib.c:			ycount = rects->height;
vid_svgalib.c:			offset = rects->y * vid.rowbytes + rects->x;
vid_svgalib.c:			while (ycount--)
vid_svgalib.c:				if (rects->width + i > 0x10000) {
vid_svgalib.c:							0x10000 - i);
vid_svgalib.c:							vid.buffer + offset + 0x10000 - i, 
vid_svgalib.c:							rects->width - 0x10000 + i);
vid_svgalib.c:							rects->width);
vid_svgalib.c:			rects = rects->pnext;
vid_svgalib.c:		if (COM_CheckParm("-mdev"))
vid_svgalib.c:			mousedev = com_argv[COM_CheckParm("-mdev")+1];
vid_svgalib.c:		if (COM_CheckParm("-mrate"))
vid_svgalib.c:			mouserate = atoi(com_argv[COM_CheckParm("-mrate")+1]);
vid_svgalib.c:		cmd->sidemove += m_side.value * mouse_x;
vid_svgalib.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
vid_svgalib.c:		if (cl.viewangles[PITCH] < -70)
vid_svgalib.c:			cl.viewangles[PITCH] = -70;
vid_svgalib.c:			cmd->upmove -= m_forward.value * mouse_y;
vid_svgalib.c:			cmd->forwardmove -= m_forward.value * mouse_y;
vid_vga.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_vga.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_vga.c:// vid_vga.c: VGA-specific DOS video stuff
vid_vga.c:// TODO: proper handling of page-swap failure
vid_vga.c:	if (!lvid->direct)
vid_vga.c:	if (lvid->aspect > 1.5)
vid_vga.c:	if (pcurrentmode->planar)
vid_vga.c:								lvid->direct[(y + i + k) * VGA_rowbytes +
vid_vga.c:						lvid->direct[(y + i + k) * VGA_rowbytes + (x>>2) + j] =
vid_vga.c:						lvid->direct + x + ((y << repshift) + i + j) *
vid_vga.c:				memcpy (lvid->direct + x + ((y << repshift) + i + j) *
vid_vga.c:	if (!lvid->direct)
vid_vga.c:	if (lvid->aspect > 1.5)
vid_vga.c:	if (pcurrentmode->planar)
vid_vga.c:						lvid->direct[(y + i + k) * VGA_rowbytes + (x>>2) + j] =
vid_vga.c:				memcpy (lvid->direct + x + ((y << repshift) + i + j) *
vid_vga.c:	for (i=0 ; i<(NUMVIDMODES - 1) ; i++)
vid_vga.c:	vgavidmodes[NUMVIDMODES-1].pnext = pvidmodes;
vid_vga.c:	// alloc an extra line in case we want to wrap, and allocate the z-buffer
vid_vga.c:		tbuffersize = (lvid->rowbytes * (lvid->height + 1)) +
vid_vga.c:				(lvid->width * lvid->height * sizeof (*d_pzbuffer));
vid_vga.c:	// just allocate the z-buffer
vid_vga.c:		tbuffersize = lvid->width * lvid->height * sizeof (*d_pzbuffer);
vid_vga.c:	tsize = D_SurfaceCacheForRes (lvid->width, lvid->height);
vid_vga.c:	if ((host_parms.memsize - tbuffersize + SURFCACHE_SIZE_AT_320X200 +
vid_vga.c:		+ lvid->width * lvid->height * sizeof (*d_pzbuffer);
vid_vga.c:		lvid->buffer = (void *)( (byte *)vid_surfcache + vid_surfcachesize);
vid_vga.c:		lvid->conbuffer = lvid->buffer;
vid_vga.c:	// alloc an extra line in case we want to wrap, and allocate the z-buffer
vid_vga.c:	if ((host_parms.memsize - tbuffersize + SURFCACHE_SIZE_AT_320X200 +
vid_vga.c:	pextra = pcurrentmode->pextradata;
vid_vga.c:	if (!VGA_FreeAndAllocVidbuffer (lvid, pextra->vidbuffer))
vid_vga.c:		return -1;	// memory alloc failed
vid_vga.c:		VGA_ClearVideoMem (VGA_pcurmode->planar);
vid_vga.c:// mode 0x13 is the base for all the Mode X-class mode sets
vid_vga.c:	lvid->direct = (pixel_t *)VGA_pagebase;
vid_vga.c:	VideoRegisterSet (pextra->pregset);
vid_vga.c:	lvid->numpages = VGA_numpages;
vid_vga.c:	VGA_width = (lvid->width + 0x1F) & ~0x1F;
vid_vga.c:	VGA_height = lvid->height;
vid_vga.c:	VGA_planar = pcurrentmode->planar;
vid_vga.c:		VGA_rowbytes = lvid->rowbytes / 4;
vid_vga.c:		VGA_rowbytes = lvid->rowbytes;
vid_vga.c:	VGA_bufferrowbytes = lvid->rowbytes;
vid_vga.c:	lvid->colormap = host_colormap;
vid_vga.c:	lvid->fullbright = 256 - LittleLong (*((int *)lvid->colormap + 2048));
vid_vga.c:	lvid->maxwarpwidth = WARP_WIDTH;
vid_vga.c:	lvid->maxwarpheight = WARP_HEIGHT;
vid_vga.c:	lvid->conbuffer = lvid->buffer;
vid_vga.c:	lvid->conrowbytes = lvid->rowbytes;
vid_vga.c:	lvid->conwidth = lvid->width;
vid_vga.c:	lvid->conheight = lvid->height;
vid_vga.c:	VGA_ClearVideoMem (pcurrentmode->planar);
vid_vga.c:		VGA_UpdatePlanarScreen (lvid->buffer);
vid_vga.c:					lvid->buffer + rects->x + (rects->y * lvid->rowbytes),
vid_vga.c:		 			VGA_pagebase + rects->x + (rects->y * VGA_rowbytes),
vid_vga.c:					rects->width,
vid_vga.c:					rects->height,
vid_vga.c:					lvid->rowbytes,
vid_vga.c:			rects = rects->pnext;
vid_win.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_win.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_win.c:// vid_win.c -- Win32 video driver
vid_win.c:#define NO_MODE					(MODE_WINDOWED - 1)
vid_win.c:	if (((int)vid_window_x.value > (GetSystemMetrics (SM_CXSCREEN) - 160)) ||
vid_win.c:		((int)vid_window_y.value > (GetSystemMetrics (SM_CYSCREEN) - 120)) ||
vid_win.c:	if ((host_parms.memsize - tbuffersize + SURFCACHE_SIZE_AT_320X200 +
vid_win.c:	if ((host_parms.memsize - tbuffersize + SURFCACHE_SIZE_AT_320X200 +
vid_win.c:	// fix the leftover Alt from any Alt-Tab or the like that switched us away
vid_win.c:		if (!COM_CheckParm ("-novbeaf"))
vid_win.c:	if (COM_CheckParm("-nowindirect") ||
vid_win.c:		COM_CheckParm("-nowd") ||
vid_win.c:		COM_CheckParm("-novesa") ||
vid_win.c:	if (COM_CheckParm("-nodirectdraw") || COM_CheckParm("-noddraw") || COM_CheckParm("-nodd"))
vid_win.c:	// find the lowest-res mode, or a mode we can stretch up to and get
vid_win.c:	// lowest-res that way
vid_win.c:				if (!COM_CheckParm("-noforcevga"))
vid_win.c:	// a lower-res mode than the lowest-res real but still at least 320x200, that
vid_win.c:	// build the mode list, leaving room for the low-res stretched mode, if any
vid_win.c:	if (!COM_CheckParm ("-notriplebuf"))
vid_win.c:	if (!forcemem && (MGL_surfaceAccessType(dc)) == MGL_LINEAR_ACCESS && (dc->mi.maxPage > 0))
vid_win.c:		vid.numpages = dc->mi.maxPage + 1;
vid_win.c:	if ((GetDeviceCaps(hdc, HORZRES) > 640) && !COM_CheckParm("-noautostretch"))
vid_win.c:			// is probably a dual-screen monitor
vid_win.c:				if (!COM_CheckParm("-noadjustaspect"))
vid_win.c:		Con_SafePrintf ("No 8-bpp fullscreen DIB modes found\n");
vid_win.c:				 (!COM_CheckParm("-noadjustaspect") &&
vid_win.c:				// is probably a dual-screen monitor
vid_win.c:					if (!COM_CheckParm("-noadjustaspect"))
vid_win.c:// see if there are any low-res modes that aren't being reported
vid_win.c:			// we only want the lowest-bpp version of each mode
vid_win.c:// now add the lowest stretch-by-2 pseudo-modes between 320-wide
vid_win.c:			cstretch = MAX_MODE_LIST - nummodes;
vid_win.c:			for (i=(nummodes-1) ; i>=originalnummodes ; i--)
vid_win.c:	pinfo = pv->modedesc;
vid_win.c:	if (VID_CheckAdequateMem (pv->width, pv->height))
vid_win.c:	pinfo = pv->modedesc;
vid_win.c:		sprintf(pinfo,"%s fullscreen", pv->modedesc);
vid_win.c:		sprintf(pinfo,"%s fullscreen", pv->modedesc);
vid_win.c:		sprintf(pinfo, "%s windowed", pv->modedesc);
vid_win.c:		sprintf(pinfo,"%s fullscreen %s",pv->modedesc,
vid_win.c:				MGL_modeDriverName(pv->modenum));
vid_win.c:		sprintf(pinfo,"%s fullscreen DIB", pv->modedesc);
vid_win.c:		sprintf(pinfo, "%s windowed", pv->modedesc);
vid_win.c:		if (COM_CheckParm ("-resetwinpos"))
vid_win.c:			 WindowRect.right - WindowRect.left,
vid_win.c:			 WindowRect.bottom - WindowRect.top,
vid_win.c:					   WindowRect.right - WindowRect.left,
vid_win.c:					   WindowRect.bottom - WindowRect.top,
vid_win.c:// (to avoid flickering when re-sizing the window on the desktop),
vid_win.c:	vid.buffer = vid.conbuffer = vid.direct = dibdc->surface;
vid_win.c:	vid.rowbytes = vid.conrowbytes = dibdc->mi.bytesPerLine;
vid_win.c:					   WindowRect.right - WindowRect.left,
vid_win.c:					   WindowRect.bottom - WindowRect.top,
vid_win.c:	// (to avoid flickering when re-sizing the window on the desktop), we
vid_win.c:	vid.buffer = vid.conbuffer = vid.direct = dibdc->surface;
vid_win.c:	vid.rowbytes = vid.conrowbytes = dibdc->mi.bytesPerLine;
vid_win.c:	vid_modenum = original_mode - 1;
vid_win.c:		vid_modenum = MODE_WINDOWED - 1;
vid_win.c:// fix the leftover Alt from any Alt-Tab or the like that switched us away
vid_win.c:		vid.buffer = vid.conbuffer = vid.direct = memdc->surface;
vid_win.c:		vid.rowbytes = vid.conrowbytes = memdc->mi.bytesPerLine;
vid_win.c:		vid.buffer = vid.conbuffer = vid.direct = mgldc->surface;
vid_win.c:		vid.rowbytes = vid.conrowbytes = mgldc->mi.bytesPerLine;
vid_win.c:	lockcount--;
vid_win.c:		if (VID_CheckAdequateMem (pv->width, pv->height))
vid_win.c:	if (COM_CheckParm ("-dibonly"))
vid_win.c:// if there are no non-windowed modes, or only windowed and mode 0x13, then use
vid_win.c:		!COM_CheckParm ("-nofulldib"))
vid_win.c:	vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
vid_win.c:		dr = palette[0] - palette[i*3];
vid_win.c:		dg = palette[1] - palette[i*3+1];
vid_win.c:		db = palette[2] - palette[i*3+2];
vid_win.c:	if (COM_CheckParm("-startwindowed"))
vid_win.c:									rects->x,
vid_win.c:									rects->y,
vid_win.c:									rects->x + rects->width,
vid_win.c:									rects->y + rects->height,
vid_win.c:									rects->x << 1,
vid_win.c:									rects->y << 1,
vid_win.c:									(rects->x + rects->width) << 1,
vid_win.c:									(rects->y + rects->height) << 1);
vid_win.c:									rects->x, rects->y,
vid_win.c:									(rects->x + rects->width),
vid_win.c:									(rects->y + rects->height),
vid_win.c:									rects->x, rects->y, MGL_REPLACE_MODE);
vid_win.c:					rects = rects->pnext;
vid_win.c:						rects->x, rects->y,
vid_win.c:						rects->x + rects->width, rects->y + rects->height,
vid_win.c:						rects->x << 1, rects->y << 1,
vid_win.c:						(rects->x + rects->width) << 1,
vid_win.c:						(rects->y + rects->height) << 1);
vid_win.c:						rects->x, rects->y,
vid_win.c:						rects->x + rects->width, rects->y + rects->height,
vid_win.c:						rects->x, rects->y, MGL_REPLACE_MODE);
vid_win.c:				rects = rects->pnext;
vid_win.c:				if (COM_CheckParm ("-resetwinpos"))
vid_win.c:			if (COM_CheckParm ("-resetwinpos"))
vid_win.c:						(byte *)mgldc->surface + x +
vid_win.c:						 ((y << repshift) + i + j) * mgldc->mi.bytesPerLine,
vid_win.c:				memcpy ((byte *)mgldc->surface + x +
vid_win.c:						 ((y << repshift) + i + j) * mgldc->mi.bytesPerLine,
vid_win.c:				memcpy ((byte *)mgldc->surface + x +
vid_win.c:						 ((y << repshift) + i + j) * mgldc->mi.bytesPerLine,
vid_win.c:	'7',    '8',    '9',    '0',    '-',    '=',    K_BACKSPACE, 9, // 0 
vid_win.c:	K_UPARROW,K_PGUP,'-',K_LEFTARROW,'5',K_RIGHTARROW,'+',K_END, //4 
vid_win.c:* Parameters:   fActive - True if app is activating
vid_win.c:// minimize/restore fulldib windows/mouse-capture normal windows on demand
vid_win.c:		// keep Alt-Space from happening
vid_win.c:		// fix the leftover Alt from any Alt-Tab or the like that switched us away
vid_win.c:		// this causes Close in the right-click task bar menu not to work, but right
vid_win.c:	M_DrawPic ( (320-p->width)/2, 4, p);
vid_win.c:	// 360-wide modes, because if there are 5 320-wide modes and
vid_win.c:	// 5 360-wide modes, we'll run out of space
vid_win.c:		if (ptr && ((pv->width != 360) || COM_CheckParm("-allow360")))
vid_win.c:				if (!dup || !modedescs[dupmode].ismode13 || COM_CheckParm("-noforcevga"))
vid_win.c:					modedescs[k].ismode13 = pv->mode13;
vid_win.c:					modedescs[k].width = pv->width;
vid_win.c:	for (i=3 ; i<(vid_wmodes-1) ; i++)
vid_win.c:			if (((i - 3) % VID_ROW_SIZE) == (VID_ROW_SIZE - 1))
vid_win.c:			vid_line = vid_wmodes - 1;
vid_win.c:		vid_line -= VID_ROW_SIZE;
vid_win.c:			vid_line += ((vid_wmodes + (VID_ROW_SIZE - 1)) /
vid_win.c:				vid_line -= VID_ROW_SIZE;
vid_win.c:			vid_line -= ((vid_wmodes + (VID_ROW_SIZE - 1)) /
vid_x.c:Copyright (C) 1996-1997 Id Software, Inc.
vid_x.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vid_x.c:// vid_x.c -- general x video driver
vid_x.c:    r_mask=x_vis->red_mask;
vid_x.c:    g_mask=x_vis->green_mask;
vid_x.c:    b_mask=x_vis->blue_mask;
vid_x.c:    for(r_shift=-8,x=1;x<r_mask;x=x<<1)r_shift++;
vid_x.c:    for(g_shift=-8,x=1;x<g_mask;x=x<<1)g_shift++;
vid_x.c:    for(b_shift=-8,x=1;x<b_mask;x=x<<1)b_shift++;
vid_x.c:        p=(r>>(-r_shift))&r_mask;
vid_x.c:        p|=(g>>(-g_shift))&g_mask;
vid_x.c:        p|=(b>>(-b_shift))&b_mask;
vid_x.c:        p=(r>>(-r_shift))&r_mask;
vid_x.c:        p|=(g>>(-g_shift))&g_mask;
vid_x.c:        p|=(b>>(-b_shift))&b_mask;
vid_x.c:		src = &framebuf->data [yi * framebuf->bytes_per_line];
vid_x.c:		dest = ((PIXEL16 *)src) + x+width - 1;
vid_x.c:		src += x+width - 1;
vid_x.c:		case 0:	do {	*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 7:			*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 6:			*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 5:			*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 4:			*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 3:			*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 2:			*dest-- = st2d_8to16table[*src--];
vid_x.c:		case 1:			*dest-- = st2d_8to16table[*src--];
vid_x.c:				} while (--n > 0);
vid_x.c://		for(xi = (x+width-1); xi >= x; xi--) {
vid_x.c:		src = &framebuf->data [yi * framebuf->bytes_per_line];
vid_x.c:		dest = ((PIXEL24 *)src) + x+width - 1;
vid_x.c:		src += x+width - 1;
vid_x.c:		case 0:	do {	*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 7:			*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 6:			*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 5:			*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 4:			*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 3:			*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 2:			*dest-- = st2d_8to24table[*src--];
vid_x.c:		case 1:			*dest-- = st2d_8to24table[*src--];
vid_x.c:				} while (--n > 0);
vid_x.c://		for(xi = (x+width-1); xi >= x; xi--) {
vid_x.c:		free(x_framebuffer[0]->data);
vid_x.c:// alloc an extra line in case we want to wrap, and allocate the z-buffer
vid_x.c:	pwidth = x_visinfo->depth / 8;
vid_x.c:		x_visinfo->depth,
vid_x.c:// alloc an extra line in case we want to wrap, and allocate the z-buffer
vid_x.c:						x_visinfo->depth,
vid_x.c:		size = x_framebuffer[frm]->bytes_per_line
vid_x.c:			* x_framebuffer[frm]->height;
vid_x.c:		if (x_shminfo[frm].shmid==-1)
vid_x.c:		x_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
vid_x.c:   vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
vid_x.c:	verbose=COM_CheckParm("-verbose");
vid_x.c:// catch signals so i can turn on auto-repeat
vid_x.c:// check for command-line window size
vid_x.c:	if ((pnum=COM_CheckParm("-winsize")))
vid_x.c:		if (pnum >= com_argc-2)
vid_x.c:			Sys_Error("VID: -winsize <width> <height>\n");
vid_x.c:	if ((pnum=COM_CheckParm("-width"))) {
vid_x.c:		if (pnum >= com_argc-1)
vid_x.c:			Sys_Error("VID: -width <width>\n");
vid_x.c:	if ((pnum=COM_CheckParm("-height"))) {
vid_x.c:		if (pnum >= com_argc-1)
vid_x.c:			Sys_Error("VID: -height <height>\n");
vid_x.c:	if ((pnum=COM_CheckParm("-visualid")))
vid_x.c:		if (pnum >= com_argc-1)
vid_x.c:			Sys_Error("VID: -visualid <id#>\n");
vid_x.c:// pick a visual- warn if more than one was available
vid_x.c:			printf("	-visualid %d\n", (int)(x_visinfo[i].visualid));
vid_x.c:		printf("Using visualid %d:\n", (int)(x_visinfo->visualid));
vid_x.c:		printf("	screen %d\n", x_visinfo->screen);
vid_x.c:		printf("	red_mask 0x%x\n", (int)(x_visinfo->red_mask));
vid_x.c:		printf("	green_mask 0x%x\n", (int)(x_visinfo->green_mask));
vid_x.c:		printf("	blue_mask 0x%x\n", (int)(x_visinfo->blue_mask));
vid_x.c:		printf("	colormap_size %d\n", x_visinfo->colormap_size);
vid_x.c:		printf("	bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
vid_x.c:	x_vis = x_visinfo->visual;
vid_x.c:							 x_visinfo->screen), x_vis, AllocNone);
vid_x.c:			XRootWindow(x_disp, x_visinfo->screen),
vid_x.c:			x_visinfo->depth,
vid_x.c:		if (x_visinfo->class != TrueColor)
vid_x.c:	if (x_visinfo->depth == 8)
vid_x.c:		if (x_visinfo->class == PseudoColor)
vid_x.c:	vid.rowbytes = x_framebuffer[0]->bytes_per_line;
vid_x.c:	vid.buffer = x_framebuffer[0]->data;
vid_x.c:	vid.conbuffer = x_framebuffer[0]->data;
vid_x.c:	if (x_visinfo->class == PseudoColor && x_visinfo->depth == 8)
vid_x.c:		case XK_KP_Subtract: key = '-'; break;
vid_x.c:		case 0x05f: key = '-';break;/* [_] */
vid_x.c:				key = key - 'A' + 'a';
vid_x.c:			mouse_x = (float) ((int)x_event.xmotion.x - (int)(vid.width/2));
vid_x.c:			mouse_y = (float) ((int)x_event.xmotion.y - (int)(vid.height/2));
vid_x.c:			mouse_x = (float) (x_event.xmotion.x-p_mouse_x);
vid_x.c:			mouse_y = (float) (x_event.xmotion.y-p_mouse_y);
vid_x.c:		b=-1;
vid_x.c:		b=-1;
vid_x.c:		vid.rowbytes = x_framebuffer[0]->bytes_per_line;
vid_x.c:		vid.buffer = x_framebuffer[current_framebuffer]->data;
vid_x.c:	if (x_visinfo->depth != 8) {
vid_x.c:			if (x_visinfo->depth == 16)
vid_x.c:					rects->x, rects->y, rects->width,
vid_x.c:					rects->height);
vid_x.c:			else if (x_visinfo->depth == 24)
vid_x.c:					rects->x, rects->y, rects->width,
vid_x.c:					rects->height);
vid_x.c:				x_framebuffer[current_framebuffer], rects->x, rects->y,
vid_x.c:				rects->x, rects->y, rects->width, rects->height, True))
vid_x.c:			rects = rects->pnext;
vid_x.c:		vid.buffer = x_framebuffer[current_framebuffer]->data;
vid_x.c:			if (x_visinfo->depth == 16)
vid_x.c:					rects->x, rects->y, rects->width,
vid_x.c:					rects->height);
vid_x.c:			else if (x_visinfo->depth == 24)
vid_x.c:					rects->x, rects->y, rects->width,
vid_x.c:					rects->height);
vid_x.c:			XPutImage(x_disp, x_win, x_gc, x_framebuffer[0], rects->x,
vid_x.c:				rects->y, rects->x, rects->y, rects->width, rects->height);
vid_x.c:			rects = rects->pnext;
vid_x.c:			text[len-1] = 0;	// rip off the /n and terminate
vid_x.c:   if ( COM_CheckParm ("-nomouse") )
vid_x.c:		cmd->sidemove += m_side.value * mouse_x;
vid_x.c:		cl.viewangles[YAW] -= m_yaw.value * mouse_x;
vid_x.c:		if (cl.viewangles[PITCH] < -70)
vid_x.c:			cl.viewangles[PITCH] = -70;
vid_x.c:			cmd->upmove -= m_forward.value * mouse_y;
vid_x.c:			cmd->forwardmove -= m_forward.value * mouse_y;
view.c:Copyright (C) 1996-1997 Id Software, Inc.
view.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
view.c:// view.c -- player eye positioning
view.c:	sign = side < 0 ? -1 : 1;
view.c:	cycle = cl.time - (int)(cl.time/cl_bobcycle.value)*cl_bobcycle.value;
view.c:		cycle = M_PI + M_PI*(cycle-cl_bobup.value)/(1.0 - cl_bobup.value);
view.c:	else if (bob < -7)
view.c:		bob = -7;
view.c:	delta = cl.idealpitch - cl.viewangles[PITCH];
view.c:		if (move > -delta)
view.c:			move = -delta;
view.c:		cl.viewangles[PITCH] -= move;
view.c:float		v_blend[4];		// rgba 0.0 - 1.0
view.c:	VectorSubtract (from, ent->origin, from);
view.c:	AngleVectors (ent->angles, forward, right, up);
view.c:		a = a + a2*(1-a);
view.c:		r = r*(1-a2) + cl.cshifts[j].destcolor[0]*a2;
view.c:		g = g*(1-a2) + cl.cshifts[j].destcolor[1]*a2;
view.c:		b = b*(1-a2) + cl.cshifts[j].destcolor[2]*a2;
view.c:	cl.cshifts[CSHIFT_DAMAGE].percent -= host_frametime*150;
view.c:	cl.cshifts[CSHIFT_BONUS].percent -= host_frametime*100;
view.c:	a = 1-a;
view.c:	cl.cshifts[CSHIFT_DAMAGE].percent -= host_frametime*150;
view.c:	cl.cshifts[CSHIFT_BONUS].percent -= host_frametime*100;
view.c:			r += (cl.cshifts[j].percent*(cl.cshifts[j].destcolor[0]-r))>>8;
view.c:			g += (cl.cshifts[j].percent*(cl.cshifts[j].destcolor[1]-g))>>8;
view.c:			b += (cl.cshifts[j].percent*(cl.cshifts[j].destcolor[2]-b))>>8;
view.c:		a -= 360;
view.c:	pitch = -r_refdef.viewangles[PITCH];
view.c:	yaw = angledelta(yaw - r_refdef.viewangles[YAW]) * 0.4;
view.c:	if (yaw < -10)
view.c:		yaw = -10;
view.c:	pitch = angledelta(-pitch - r_refdef.viewangles[PITCH]) * 0.4;
view.c:	if (pitch < -10)
view.c:		pitch = -10;
view.c:		if (oldyaw - move > yaw)
view.c:			yaw = oldyaw - move;
view.c:		if (oldpitch - move > pitch)
view.c:			pitch = oldpitch - move;
view.c:	cl.viewent.angles[PITCH] = - (r_refdef.viewangles[PITCH] + pitch);
view.c:	cl.viewent.angles[ROLL] -= v_idlescale.value * sin(cl.time*v_iroll_cycle.value) * v_iroll_level.value;
view.c:	cl.viewent.angles[PITCH] -= v_idlescale.value * sin(cl.time*v_ipitch_cycle.value) * v_ipitch_level.value;
view.c:	cl.viewent.angles[YAW] -= v_idlescale.value * sin(cl.time*v_iyaw_cycle.value) * v_iyaw_level.value;
view.c:	if (r_refdef.vieworg[0] < ent->origin[0] - 14)
view.c:		r_refdef.vieworg[0] = ent->origin[0] - 14;
view.c:	else if (r_refdef.vieworg[0] > ent->origin[0] + 14)
view.c:		r_refdef.vieworg[0] = ent->origin[0] + 14;
view.c:	if (r_refdef.vieworg[1] < ent->origin[1] - 14)
view.c:		r_refdef.vieworg[1] = ent->origin[1] - 14;
view.c:	else if (r_refdef.vieworg[1] > ent->origin[1] + 14)
view.c:		r_refdef.vieworg[1] = ent->origin[1] + 14;
view.c:	if (r_refdef.vieworg[2] < ent->origin[2] - 22)
view.c:		r_refdef.vieworg[2] = ent->origin[2] - 22;
view.c:	else if (r_refdef.vieworg[2] > ent->origin[2] + 30)
view.c:		r_refdef.vieworg[2] = ent->origin[2] + 30;
view.c:		v_dmg_time -= host_frametime;
view.c:	VectorCopy (ent->origin, r_refdef.vieworg);
view.c:	VectorCopy (ent->angles, r_refdef.viewangles);
view.c:	view->model = NULL;
view.c:	ent->angles[YAW] = cl.viewangles[YAW];	// the model should face
view.c:	ent->angles[PITCH] = -cl.viewangles[PITCH];	// the model should face
view.c:	VectorCopy (ent->origin, r_refdef.vieworg);
view.c:	angles[PITCH] = -ent->angles[PITCH];	// because entity pitches are
view.c:	angles[YAW] = ent->angles[YAW];
view.c:	angles[ROLL] = ent->angles[ROLL];
view.c:	VectorCopy (cl.viewangles, view->angles);
view.c:	VectorCopy (ent->origin, view->origin);
view.c:	view->origin[2] += cl.viewheight;
view.c:		view->origin[i] += forward[i]*bob*0.4;
view.c://		view->origin[i] += right[i]*bob*0.4;
view.c://		view->origin[i] += up[i]*bob*0.8;
view.c:	view->origin[2] += bob;
view.c:	if (cl.model_precache[cl.stats[STAT_WEAPON]] && strcmp (cl.model_precache[cl.stats[STAT_WEAPON]]->name,  "progs/v_shot2.mdl"))
view.c:		view->origin[2] += 1;
view.c:		view->origin[2] += 2;
view.c:		view->origin[2] += 1;
view.c:		view->origin[2] += 0.5;
view.c:	view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
view.c:	view->frame = cl.stats[STAT_WEAPONFRAME];
view.c:	view->colormap = vid.colormap;
view.c:if (cl.onground && ent->origin[2] - oldz > 0)
view.c:	steptime = cl.time - cl.oldtime;
view.c:	if (oldz > ent->origin[2])
view.c:		oldz = ent->origin[2];
view.c:	if (ent->origin[2] - oldz > 12)
view.c:		oldz = ent->origin[2] - 12;
view.c:	r_refdef.vieworg[2] += oldz - ent->origin[2];
view.c:	view->origin[2] += oldz - ent->origin[2];
view.c:	oldz = ent->origin[2];
view.c:The player's clipping box goes from (-16 -16 -24) to (16 16 32) from
view.c:		r_refdef.viewangles[YAW] -= lcd_yaw.value;
view.c:			r_refdef.vieworg[i] -= right[i]*lcd_x.value;
view.c:		vid.buffer -= vid.rowbytes>>1;
view.h:Copyright (C) 1996-1997 Id Software, Inc.
view.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vregset.c:Copyright (C) 1996-1997 Id Software, Inc.
vregset.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vregset.c:// vregset.c: video register-setting interpreter
vregset.h:Copyright (C) 1996-1997 Id Software, Inc.
vregset.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
vregset.h:// vregset.h: header file for video register-setting interpreter
vregset.h:// register-set commands
wad.c:Copyright (C) 1996-1997 Id Software, Inc.
wad.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
wad.c:lumpinfo_t->name.
wad.c:			c += ('a' - 'A');
wad.c:	if (header->identification[0] != 'W'
wad.c:	|| header->identification[1] != 'A'
wad.c:	|| header->identification[2] != 'D'
wad.c:	|| header->identification[3] != '2')
wad.c:	wad_numlumps = LittleLong(header->numlumps);
wad.c:	infotableofs = LittleLong(header->infotableofs);
wad.c:		lump_p->filepos = LittleLong(lump_p->filepos);
wad.c:		lump_p->size = LittleLong(lump_p->size);
wad.c:		W_CleanupName (lump_p->name, lump_p->name);
wad.c:		if (lump_p->type == TYP_QPIC)
wad.c:			SwapPic ( (qpic_t *)(wad_base + lump_p->filepos));
wad.c:		if (!strcmp(clean, lump_p->name))
wad.c:	return (void *)(wad_base + lump->filepos);
wad.c:	return (void *)(wad_base + lump->filepos);
wad.c:	pic->width = LittleLong(pic->width);
wad.c:	pic->height = LittleLong(pic->height);	
wad.h:Copyright (C) 1996-1997 Id Software, Inc.
wad.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
Binary file winquake.aps matches
winquake.h:Copyright (C) 1996-1997 Id Software, Inc.
winquake.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
winquake.h:// winquake.h: Win32-specific Quake header file
winquake.rc:    LTEXT           "Creating 15 bit inverse palette.  This is only done once, so just be patient for the next 30-60 seconds.",
world.c:Copyright (C) 1996-1997 Id Software, Inc.
world.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
world.c:// world.c -- world query functions
world.c:line of sight checks trace->crosscontent, but bullets don't
world.c:	if (ent->v.solid == SOLID_BSP)
world.c:		if (ent->v.movetype != MOVETYPE_PUSH)
world.c:		model = sv.models[ (int)ent->v.modelindex ];
world.c:		if (!model || model->type != mod_brush)
world.c:			hull = &model->hulls[0];
world.c:			hull = &model->hulls[1];
world.c:			hull = &model->hulls[2];
world.c:		VectorSubtract (hull->clip_mins, mins, offset);
world.c:		VectorAdd (offset, ent->v.origin, offset);
world.c:		VectorSubtract (ent->v.mins, maxs, hullmins);
world.c:		VectorSubtract (ent->v.maxs, mins, hullmaxs);
world.c:		VectorCopy (ent->v.origin, offset);
world.c:	int		axis;		// -1 = leaf node
world.c:	ClearLink (&anode->trigger_edicts);
world.c:	ClearLink (&anode->solid_edicts);
world.c:		anode->axis = -1;
world.c:		anode->children[0] = anode->children[1] = NULL;
world.c:		anode->axis = 0;
world.c:		anode->axis = 1;
world.c:	anode->dist = 0.5 * (maxs[anode->axis] + mins[anode->axis]);
world.c:	maxs1[anode->axis] = mins2[anode->axis] = anode->dist;
world.c:	anode->children[0] = SV_CreateAreaNode (depth+1, mins2, maxs2);
world.c:	anode->children[1] = SV_CreateAreaNode (depth+1, mins1, maxs1);
world.c:	SV_CreateAreaNode (0, sv.worldmodel->mins, sv.worldmodel->maxs);
world.c:	if (!ent->area.prev)
world.c:	RemoveLink (&ent->area);
world.c:	ent->area.prev = ent->area.next = NULL;
world.c:	for (l = node->trigger_edicts.next ; l != &node->trigger_edicts ; l = next)
world.c:		next = l->next;
world.c:		if (!touch->v.touch || touch->v.solid != SOLID_TRIGGER)
world.c:		if (ent->v.absmin[0] > touch->v.absmax[0]
world.c:		|| ent->v.absmin[1] > touch->v.absmax[1]
world.c:		|| ent->v.absmin[2] > touch->v.absmax[2]
world.c:		|| ent->v.absmax[0] < touch->v.absmin[0]
world.c:		|| ent->v.absmax[1] < touch->v.absmin[1]
world.c:		|| ent->v.absmax[2] < touch->v.absmin[2] )
world.c:		old_self = pr_global_struct->self;
world.c:		old_other = pr_global_struct->other;
world.c:		pr_global_struct->self = EDICT_TO_PROG(touch);
world.c:		pr_global_struct->other = EDICT_TO_PROG(ent);
world.c:		pr_global_struct->time = sv.time;
world.c:		PR_ExecuteProgram (touch->v.touch);
world.c:		pr_global_struct->self = old_self;
world.c:		pr_global_struct->other = old_other;
world.c:	if (node->axis == -1)
world.c:	if ( ent->v.absmax[node->axis] > node->dist )
world.c:		SV_TouchLinks ( ent, node->children[0] );
world.c:	if ( ent->v.absmin[node->axis] < node->dist )
world.c:		SV_TouchLinks ( ent, node->children[1] );
world.c:	if (node->contents == CONTENTS_SOLID)
world.c:	if ( node->contents < 0)
world.c:		if (ent->num_leafs == MAX_ENT_LEAFS)
world.c:		leafnum = leaf - sv.worldmodel->leafs - 1;
world.c:		ent->leafnums[ent->num_leafs] = leafnum;
world.c:		ent->num_leafs++;			
world.c:	splitplane = node->plane;
world.c:	sides = BOX_ON_PLANE_SIDE(ent->v.absmin, ent->v.absmax, splitplane);
world.c:		SV_FindTouchedLeafs (ent, node->children[0]);
world.c:		SV_FindTouchedLeafs (ent, node->children[1]);
world.c:	if (ent->area.prev)
world.c:	if (ent->free)
world.c:	if (ent->v.solid == SOLID_BSP && 
world.c:	(ent->v.angles[0] || ent->v.angles[1] || ent->v.angles[2]) )
world.c:			v =fabs( ent->v.mins[i]);
world.c:			v =fabs( ent->v.maxs[i]);
world.c:			ent->v.absmin[i] = ent->v.origin[i] - max;
world.c:			ent->v.absmax[i] = ent->v.origin[i] + max;
world.c:		VectorAdd (ent->v.origin, ent->v.mins, ent->v.absmin);	
world.c:		VectorAdd (ent->v.origin, ent->v.maxs, ent->v.absmax);
world.c:	if ((int)ent->v.flags & FL_ITEM)
world.c:		ent->v.absmin[0] -= 15;
world.c:		ent->v.absmin[1] -= 15;
world.c:		ent->v.absmax[0] += 15;
world.c:		ent->v.absmax[1] += 15;
world.c:		ent->v.absmin[0] -= 1;
world.c:		ent->v.absmin[1] -= 1;
world.c:		ent->v.absmin[2] -= 1;
world.c:		ent->v.absmax[0] += 1;
world.c:		ent->v.absmax[1] += 1;
world.c:		ent->v.absmax[2] += 1;
world.c:	ent->num_leafs = 0;
world.c:	if (ent->v.modelindex)
world.c:		SV_FindTouchedLeafs (ent, sv.worldmodel->nodes);
world.c:	if (ent->v.solid == SOLID_NOT)
world.c:		if (node->axis == -1)
world.c:		if (ent->v.absmin[node->axis] > node->dist)
world.c:			node = node->children[0];
world.c:		else if (ent->v.absmax[node->axis] < node->dist)
world.c:			node = node->children[1];
world.c:	if (ent->v.solid == SOLID_TRIGGER)
world.c:		InsertLinkBefore (&ent->area, &node->trigger_edicts);
world.c:		InsertLinkBefore (&ent->area, &node->solid_edicts);
world.c:		if (num < hull->firstclipnode || num > hull->lastclipnode)
world.c:		node = hull->clipnodes + num;
world.c:		plane = hull->planes + node->planenum;
world.c:		if (plane->type < 3)
world.c:			d = p[plane->type] - plane->dist;
world.c:			d = DotProduct (plane->normal, p) - plane->dist;
world.c:			num = node->children[1];
world.c:			num = node->children[0];
world.c:	cont = SV_HullPointContents (&sv.worldmodel->hulls[0], 0, p);
world.c:	return SV_HullPointContents (&sv.worldmodel->hulls[0], 0, p);
world.c:	trace = SV_Move (ent->v.origin, ent->v.mins, ent->v.maxs, ent->v.origin, 0, ent);
world.c:			trace->allsolid = false;
world.c:				trace->inopen = true;
world.c:				trace->inwater = true;
world.c:			trace->startsolid = true;
world.c:	if (num < hull->firstclipnode || num > hull->lastclipnode)
world.c:	node = hull->clipnodes + num;
world.c:	plane = hull->planes + node->planenum;
world.c:	if (plane->type < 3)
world.c:		t1 = p1[plane->type] - plane->dist;
world.c:		t2 = p2[plane->type] - plane->dist;
world.c:		t1 = DotProduct (plane->normal, p1) - plane->dist;
world.c:		t2 = DotProduct (plane->normal, p2) - plane->dist;
world.c:		return SV_RecursiveHullCheck (hull, node->children[0], p1f, p2f, p1, p2, trace);
world.c:		return SV_RecursiveHullCheck (hull, node->children[1], p1f, p2f, p1, p2, trace);
world.c:		return SV_RecursiveHullCheck (hull, node->children[0], p1f, p2f, p1, p2, trace);
world.c:	if ( (t1 <= -DIST_EPSILON && t2 <= -DIST_EPSILON) || (t2 < t1 && t1 <= 0) )
world.c:		return SV_RecursiveHullCheck (hull, node->children[1], p1f, p2f, p1, p2, trace);
world.c:		frac = (t1 + DIST_EPSILON)/(t1-t2);
world.c:		frac = (t1 - DIST_EPSILON)/(t1-t2);
world.c:	midf = p1f + (p2f - p1f)*frac;
world.c:		mid[i] = p1[i] + frac*(p2[i] - p1[i]);
world.c:	if (!SV_RecursiveHullCheck (hull, node->children[side], p1f, midf, p1, mid, trace) )
world.c:	if (SV_HullPointContents (sv_hullmodel, mid, node->children[side])
world.c:	if (SV_HullPointContents (hull, node->children[side^1], mid)
world.c:		return SV_RecursiveHullCheck (hull, node->children[side^1], midf, p2f, mid, p2, trace);
world.c:	if (trace->allsolid)
world.c:		VectorCopy (plane->normal, trace->plane.normal);
world.c:		trace->plane.dist = plane->dist;
world.c:		VectorSubtract (vec3_origin, plane->normal, trace->plane.normal);
world.c:		trace->plane.dist = -plane->dist;
world.c:	while (SV_HullPointContents (hull, hull->firstclipnode, mid)
world.c:		frac -= 0.1;
world.c:			trace->fraction = midf;
world.c:			VectorCopy (mid, trace->endpos);
world.c:		midf = p1f + (p2f - p1f)*frac;
world.c:			mid[i] = p1[i] + frac*(p2[i] - p1[i]);
world.c:	trace->fraction = midf;
world.c:	VectorCopy (mid, trace->endpos);
world.c:	if (ent->v.solid == SOLID_BSP && 
world.c:	(ent->v.angles[0] || ent->v.angles[1] || ent->v.angles[2]) )
world.c:		AngleVectors (ent->v.angles, forward, right, up);
world.c:		start_l[1] = -DotProduct (temp, right);
world.c:		end_l[1] = -DotProduct (temp, right);
world.c:	SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);
world.c:	if (ent->v.solid == SOLID_BSP && 
world.c:	(ent->v.angles[0] || ent->v.angles[1] || ent->v.angles[2]) )
world.c:			VectorSubtract (vec3_origin, ent->v.angles, a);
world.c:			trace.endpos[1] = -DotProduct (temp, right);
world.c:			trace.plane.normal[1] = -DotProduct (temp, right);
world.c:	for (l = node->solid_edicts.next ; l != &node->solid_edicts ; l = next)
world.c:		next = l->next;
world.c:		if (touch->v.solid == SOLID_NOT)
world.c:		if (touch == clip->passedict)
world.c:		if (touch->v.solid == SOLID_TRIGGER)
world.c:		if (clip->type == MOVE_NOMONSTERS && touch->v.solid != SOLID_BSP)
world.c:		if (clip->boxmins[0] > touch->v.absmax[0]
world.c:		|| clip->boxmins[1] > touch->v.absmax[1]
world.c:		|| clip->boxmins[2] > touch->v.absmax[2]
world.c:		|| clip->boxmaxs[0] < touch->v.absmin[0]
world.c:		|| clip->boxmaxs[1] < touch->v.absmin[1]
world.c:		|| clip->boxmaxs[2] < touch->v.absmin[2] )
world.c:		if (clip->passedict && clip->passedict->v.size[0] && !touch->v.size[0])
world.c:		if (clip->trace.allsolid)
world.c:		if (clip->passedict)
world.c:		 	if (PROG_TO_EDICT(touch->v.owner) == clip->passedict)
world.c:			if (PROG_TO_EDICT(clip->passedict->v.owner) == touch)
world.c:		if ((int)touch->v.flags & FL_MONSTER)
world.c:			trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins2, clip->maxs2, clip->end);
world.c:			trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins, clip->maxs, clip->end);
world.c:		trace.fraction < clip->trace.fraction)
world.c:		 	if (clip->trace.startsolid)
world.c:				clip->trace = trace;
world.c:				clip->trace.startsolid = true;
world.c:				clip->trace = trace;
world.c:			clip->trace.startsolid = true;
world.c:	if (node->axis == -1)
world.c:	if ( clip->boxmaxs[node->axis] > node->dist )
world.c:		SV_ClipToLinks ( node->children[0], clip );
world.c:	if ( clip->boxmins[node->axis] < node->dist )
world.c:		SV_ClipToLinks ( node->children[1], clip );
world.c:boxmins[0] = boxmins[1] = boxmins[2] = -9999;
world.c:			boxmins[i] = start[i] + mins[i] - 1;
world.c:			boxmins[i] = end[i] + mins[i] - 1;
world.c:			clip.mins2[i] = -15;
world.h:Copyright (C) 1996-1997 Id Software, Inc.
world.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
world.h:// flags ent->v.modified
world.h:// flags ent->v.modified
world.h:// sets ent->v.absmin and ent->v.absmax
world.h:// the non-true version remaps the water current contents to content_water
worlda.s:Copyright (C) 1996-1997 Id Software, Inc.
worlda.s:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
worlda.s:// x86 assembly-language server testing stuff
worlda.s://----------------------------------------------------------------------
worlda.s:// hull-point test
worlda.s://----------------------------------------------------------------------
worlda.s:// %edi: hull->clipnodes
worlda.s:// %ebp: hull->planes
worlda.s://		node = hull->clipnodes + num;
worlda.s://		plane = hull->planes + node->planenum;
worlda.s://		if (plane->type < 3)
worlda.s://			d = p[plane->type] - plane->dist;
worlda.s://			d = DotProduct (plane->normal, p) - plane->dist;
worlda.s://			num = node->children[1];
worlda.s://			num = node->children[0];
wq.bat:echo -------------------------------------------------------------------
wq.bat:echo -------------------------------------------------------------------
wq.bat:winquake -dinput %2 %3 %4 %5 %6 %7 %8 %9
wq.bat:winquake -wavonly %2 %3 %4 %5 %6 %7 %8 %9
wq.bat:winquake -nodirectdraw -nowindirect %2 %3 %4 %5 %6 %7 %8 %9
wq.bat:winquake -nodirectdraw -nowindirect -wavonly %2 %3 %4 %5 %6 %7 %8 %9
wq.bat:winquake -dibonly -nosound -nojoy %2 %3 %4 %5 %6 %7 %8 %9
wqreadme.txt:--------------------------
wqreadme.txt:--------------------------
wqreadme.txt:operating-system support for game functionality are not yet mature
wqreadme.txt:non-Windows-related matters concerning WinQuake; in terms of gameplay,
wqreadme.txt:WQ is the same as Quake.  This file contains Windows-related
wqreadme.txt:Video command-line switches
wqreadme.txt:Sound command-line switches
wqreadme.txt:-----------------------------------
wqreadme.txt:-----------------------------------
wqreadme.txt:graphics, fewer high-resolution modes, and delayed sound.  Or you
wqreadme.txt:which uses more conservative video modes, but low-latency sound.
wqreadme.txt:(One odd note is that DirectSound has much lower-latency sound than
wqreadme.txt:may find that "wq fastvid" is actually faster, by as much as 5-10%,
wqreadme.txt:don't. Worse, some BIOSes do have VESA VBE 2.0 built-in, but have
wqreadme.txt:Note that winquake -dedicated completely replaces the old winded
wqreadme.txt:override this with "-heapsize n", where n is the amount of memory to
wqreadme.txt:WinQuake at all, you can start WinQuake -nojoy to complete disable the
wqreadme.txt:-----------------------------------
wqreadme.txt:-----------------------------------
wqreadme.txt:-----------------------
wqreadme.txt:it using "wq safe" or "wq verysafe".  Or you can use command-line
wqreadme.txt:winquake -nodirectdraw -nowindirect -wavonly
wqreadme.txt:result in fewer or slower high-res video modes, and the mouse may be
wqreadme.txt:each of the command-line switches until you identify the one that
wqreadme.txt:winquake -dibonly -nosound
wqreadme.txt:which forces WQ into silent operation with bare-bones video support
wqreadme.txt:Microsoft-supplied version of DirectX, which you may be able to find
wqreadme.txt:DirectSound drivers from Microsoft, available via the above-mentioned
wqreadme.txt:----------------------------------------------------
wqreadme.txt:switch to windowed; if this is a problem, use the -startwindowed
wqreadme.txt:command-line switch.  More complete video control is available
wqreadme.txt:-----------------------------------------------------------
wqreadme.txt:you'll have to use the keyboard (Alt-Tab, the Windows key, Ctrl-Esc,
wqreadme.txt:Alt-Esc, or Shift-Alt-Tab) to switch away from WQ.
wqreadme.txt:----------------------------
wqreadme.txt:---------------------------------------------------------------
wqreadme.txt:------------------------------
wqreadme.txt:WQ crashes while switching modes or Alt-Tabbing
wqreadme.txt:-----------------------------------------------
wqreadme.txt:by not switching modes or Alt-Tabbing, or by running -wavonly to
wqreadme.txt:------------------------------------------
wqreadme.txt:doing vid_describemodes, then using vid_mode to select a non-VGA
wqreadme.txt:work on NT) by using the -primarysound command-line switch; this can
wqreadme.txt:Finally, you can use -wavonly to select wave sound; this will increase
wqreadme.txt:allows WQ to run 5-10% faster on some systems.  That's about all you
wqreadme.txt:lower than 640x480.  In order to support a lower-resolution 320x240
wqreadme.txt:result being that NT can seem sluggish on all but high-end Pentiums
wqreadme.txt:320x240-stretched on NT.)  One thing that can help on NT is switching
wqreadme.txt:run in 16- or 32-bpp mode.  WQ is an 8-bpp application, and it slows
wqreadme.txt:things down if pixels have to be translated from 8-bpp to 16- or
wqreadme.txt:32-bpp.  (Note that this is generally a problem only when running in a
wqreadme.txt:-----------------------
wqreadme.txt:do quick-response sound on NT.  When DirectSound drivers for NT
wqreadme.txt:---------------------------------------------------
wqreadme.txt:-------------------------------------------------------------
wqreadme.txt:-----------------------------------------------------
wqreadme.txt:-------------------------------------------------------
wqreadme.txt:apps that use wave sound (most non-game apps) will not be able to play
wqreadme.txt:DirectSound (either because -wavonly is used on the command line, or
wqreadme.txt:-------------------------------------------------------------------
wqreadme.txt:---------------------------------------------
wqreadme.txt:Sometimes Permedia boards crash unless -nowindirect is used
wqreadme.txt:-----------------------------------------------------------
wqreadme.txt:Right-click on WQ button in task bar to close doesnt work as expected
wqreadme.txt:----------------------------------------------------------------------
wqreadme.txt:In some modes, right-clicking on the WQ task bar button doesn't work
wqreadme.txt:problem, don't right-click.
wqreadme.txt:------------------------------------------------------
wqreadme.txt:screensaver.  If you use Alt-Tab to minimize WQ, the screensaver will
wqreadme.txt:then be enabled, so Alt-Tab away from WQ if you're leaving your
wqreadme.txt:WQ doesnt work in a window in 16-color mode
wqreadme.txt:--------------------------------------------
wqreadme.txt:Thats 16 *colors*, not 16-bpp.  If youre still running a 16-color
wqreadme.txt:----------------------------------------
wqreadme.txt:on Win95 you can Alt-Tab away from WQ, then use the mouse to
wqreadme.txt:---------------------------------------------------
wqreadme.txt:the mouse to play WQ), if you Alt-Tab away from WQ, then use the mouse
wqreadme.txt:------------------------------------------------
wqreadme.txt:can use the mouse to play WQ), if you Alt-Tab away, then click on the
wqreadme.txt:-------------------------------------------------
wqreadme.txt:keystroke (in which case Alt-Tab generally fixes things), or may hang
wqreadme.txt:------------------------------------
wqreadme.txt:------------------------------------------------------------------
wqreadme.txt:forced them to disable the joystick--even some people who didn't
wqreadme.txt:--------------------------------------------------
wqreadme.txt:try doing "joystick 0", or -nojoy on the command line, and see if
wqreadme.txt:-----------------------------------------
wqreadme.txt:-------------------------------------
wqreadme.txt:If "record" is used to record a client-side demo, bad things will
wqreadme.txt:Alt-Tab fullscreen only works sometimes
wqreadme.txt:---------------------------------------
wqreadme.txt:MS-DOS windows get scrunched on Alt-Tab
wqreadme.txt:---------------------------------------
wqreadme.txt:This is a quirk of Windows; when you run WinQuake in a low-res
wqreadme.txt:mode, sometimes when you exit WinQuake or Alt-Tab back to the
wqreadme.txt:desktop, any open MS-DOS windows will be scrunched down to the
wqreadme.txt:size of the low-res mode.  There is no known workaround.
wqreadme.txt:----------------------------
wqreadme.txt:--------------------------------------------------
wqreadme.txt:-------------------------------------------------------
wqreadme.txt:You'll have to use Ctrl-Esc, Alt-Tab, or Alt-Esc to switch away.
wqreadme.txt:---------------------------------------------------------
wqreadme.txt:run WQ with the -startwindowed command-line parameter.
wqreadme.txt:Some high-resolution video modes flicker or fail to initialize
wqreadme.txt:--------------------------------------------------------------
wqreadme.txt:do with triple-buffering in some modes on some DirectDraw drivers.
wqreadme.txt:or try using the -notriplebuf command-line parameter to turn off
wqreadme.txt:triple buffering.  Note, though, that turning off triple-buffering
wqreadme.txt:Right-click doesn't work right on minimized WinQuake
wqreadme.txt:----------------------------------------------------
wqreadme.txt:If you right-click on minimized WinQuake on the task bar, the
wqreadme.txt:Close selection in the right-click menu doesn't work; you have
wqreadme.txt:over the right-click menu, although it still works.
wqreadme.txt:------------------------------------------
wqreadme.txt:---------------------------------
wqreadme.txt:-----------------------
wqreadme.txt:-----------------------------------------------------
wqreadme.txt:drivers don't fix it, you can run -dibonly, which solves the
wqreadme.txt:------------------------------------------------
wqreadme.txt:-----------------------------------------------------------
wqreadme.txt:-wavonly makes the problem go away.
wqreadme.txt:-------------------------------
wqreadme.txt:---------------------------------
wqreadme.txt:---------------------------------------------------------
wqreadme.txt:Ctrl-Alt-Del on NT sometimes doesn't allow return to WQ
wqreadme.txt:-------------------------------------------------------
wqreadme.txt:to press Ctrl-Alt-Del while fullscreen; Alt-Tab away first.
wqreadme.txt:Many fast Alt-Tabs on Win95 sometimes disable WQ input
wqreadme.txt:------------------------------------------------------
wqreadme.txt:If you Alt-Tab fast lots of times on Win95 with WQ running
wqreadme.txt:Alt-Tabs (why you'd want to, I'm not sure).
wqreadme.txt:----------------------------------
wqreadme.txt:----------------------------------
wqreadme.txt:WQ has the built-in ability to draw into windows (both normal, framed 
wqreadme.txt:built- in support for VGA 320x200 graphics, and supports DirectDraw,
wqreadme.txt:----------------------
wqreadme.txt:2. It creates low-resolution modes on your graphics card.
wqreadme.txt:Low-resolution video modes (such as 320x240, 400x300 and 512x384)
wqreadme.txt:Chico, CA  95926-1989
wqreadme.txt:916-894-8400
wqreadme.txt:916-894-9069 FAX
wqreadme.txt:------------------------------
wqreadme.txt:3)  fullscreen high-resolution of some sort
wqreadme.txt:and VESA modes will be presented as high-res choices.  (320x200 will
wqreadme.txt:(However, the command-line switch -nowindirect can turn off VESA modes
wqreadme.txt:high-resolution modes will be provided by using fullscreen, borderless
wqreadme.txt:-----------------------------------
wqreadme.txt:2)  fullscreen high-resolution of some sort
wqreadme.txt:modes are available, then those will be the high-res choices;
wqreadme.txt:up.  Because there is normally no low-resolution mode such as 320x200
wqreadme.txt:or 320x240 on NT, a pseudo low-res mode is created by rendering at
wqreadme.txt:may need to use command-line switches (described next) to get the
wqreadme.txt:your machine given the command-line switches you've used.  Each mode
wqreadme.txt:a user-configurable mode.  By setting the following console variables,
wqreadme.txt:vid_stretch_by_2: whether to render at half-resolution in each
wqreadme.txt:by using the -resetwinpos command-line switch.  The window position
wqreadme.txt:-------------------------------
wqreadme.txt:| Video command-line switches |
wqreadme.txt:-------------------------------
wqreadme.txt:The full list of video-related command-line switches is:
wqreadme.txt:-dibonly: WQ will use only windows (both normal, framed windows on the
wqreadme.txt:mode.  This is the closest thing to a guaranteed-to-run fullscreen
wqreadme.txt:-nowindirect: WQ will not try to use VESA VBE 2.0 modes, or VBE/AF
wqreadme.txt:-nowindirect allows DirectDraw modes to be the preferred choice for
wqreadme.txt:-nodirectdraw: WQ will not try to use DirectDraw modes.  This can be
wqreadme.txt:-novbeaf: WQ will not try to use VBE/AF 1.0 or later modes.
wqreadme.txt:-startwindowed: WQ will come up in a windowed mode, without going
wqreadme.txt:-noforcevga: normally, WQ uses VGA mode 0x13 for the default 320x200
wqreadme.txt:bandwidth.  If you specify -noforcevga, the default 320x200 mode in
wqreadme.txt:320x200 is already your video mode, -noforcevga doesn't do anything
wqreadme.txt:-noforcevga, switch away to some other mode and then back to 320x200
wqreadme.txt:-noautostretch: don't stretch windowed modes selected with
wqreadme.txt:-startwindowed to double resolution.
wqreadme.txt:-nofulldib: don't use fullscreen, borderless windows, even if there
wqreadme.txt:-allow360: allow listing of 360-wide modes in the video mode menu.
wqreadme.txt:full, which could cause high-res modes not to be displayed.
wqreadme.txt:-notriplebuf: prevent triple-buffered page flipping (rather than double-
wqreadme.txt:----------------------------------
wqreadme.txt:----------------------------------
wqreadme.txt:lowest-latency sound; use it if you can, because you will be happier
wqreadme.txt:-------------------------------
wqreadme.txt:| Sound command-line switches |
wqreadme.txt:-------------------------------
wqreadme.txt:The full list of sound-related command-line switches is:
wqreadme.txt:-wavonly: dont use DirectSound, but use wave sound if available.
wqreadme.txt:-nosound: dont output any sound.
wqreadme.txt:-primarysound: use DirectSound primary buffer output.  This is
wqreadme.txt:-snoforceformat: WQ will not try to force the sound hardware to 11
wqreadme.txt:-----------------------
wqreadme.txt:-----------------------
wqreadme.txt:The winsock TCP/IP driver will not cause a dial-up internet connection
wqreadme.txt:For multi-homed machines (machines with more than one network adapter
wqreadme.txt:address.  There is a command line option "-ip" that takes an IP
wqreadme.txt:----------------------
wqreadme.txt:----------------------
wqreadme.txt:command-line switch -dinput.  If DirectInput is not available or is
wqreadme.txt:DirectInput on your system when you use -dinput by checking for
wqreadme.txt:-----------------------------------
wqreadme.txt:-----------------------------------
wqreadme.txt:Added DirectInput mouse support, and the -dinput command-line to
wqreadme.txt:Added -notriplebuf to disable triple buffering to work around
wqreadme.txt:Can be reset with the -resetwinpos command-line switch.
wqreadme.txt:Made it so WinQuake no longer gets suspended when Alt-Tab is used to
wqreadme.txt:switch away from a fullscreen session.  The means you can Alt-Tab
wqreadme.txt:Documented that Del-Ctrl-Alt (in that order) causes WinQuake to
wqreadme.txt:Fixed the winsock TCP/IP driver so it will not cause a dial-up
wqreadme.txt:For multi-homed machines (machines with more than one network
wqreadme.txt:specific IP adress.  There is a new command line option "-ip" that
wqreadme.txt:Documented scrunching of MS-DOS windows on Alt-Tab.
wqreadme.txt:Fixed bug where when low-res fullscreen DIB modes selected from
wqreadme.txt:Noted that even when BIOSes do have VESA 2.0 built-in, it's often
wqreadme.txt:Added note on Alt-Tab only working if Tab released first.
wqreadme.txt:Added description of -heapsize (how to change default memory
wqreadme.txt:Fixed bug where running -dedicated reset part of config.cfg to
wqreadme.txt:Fixed problem with pre-1.07 (DOS) clients connecting to WinQuake.
wqreadme.txt:Got rid of "Starting Quake..." dialog when running -dedicated.
wqreadme.txt:Added -novbeaf switch to turn off VBE/AF support in case of problems,
wqreadme.txt:------------------
wqreadme.txt:------------------
zone.c:Copyright (C) 1996-1997 Id Software, Inc.
zone.c:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
zone.c:The rover can be left pointing at a non-empty block
zone.c:	zone->blocklist.next = zone->blocklist.prev = block =
zone.c:	zone->blocklist.tag = 1;	// in use block
zone.c:	zone->blocklist.id = 0;
zone.c:	zone->blocklist.size = 0;
zone.c:	zone->rover = block;
zone.c:	block->prev = block->next = &zone->blocklist;
zone.c:	block->tag = 0;			// free block
zone.c:	block->id = ZONEID;
zone.c:	block->size = size - sizeof(memzone_t);
zone.c:	block = (memblock_t *) ( (byte *)ptr - sizeof(memblock_t));
zone.c:	if (block->id != ZONEID)
zone.c:	if (block->tag == 0)
zone.c:	block->tag = 0;		// mark as free
zone.c:	other = block->prev;
zone.c:	if (!other->tag)
zone.c:		other->size += block->size;
zone.c:		other->next = block->next;
zone.c:		other->next->prev = other;
zone.c:		if (block == mainzone->rover)
zone.c:			mainzone->rover = other;
zone.c:	other = block->next;
zone.c:	if (!other->tag)
zone.c:		block->size += other->size;
zone.c:		block->next = other->next;
zone.c:		block->next->prev = block;
zone.c:		if (other == mainzone->rover)
zone.c:			mainzone->rover = block;
zone.c:	size = (size + 7) & ~7;		// align to 8-byte boundary
zone.c:	base = rover = mainzone->rover;
zone.c:	start = base->prev;
zone.c:		if (rover->tag)
zone.c:			base = rover = rover->next;
zone.c:			rover = rover->next;
zone.c:	} while (base->tag || base->size < size);
zone.c:	extra = base->size - size;
zone.c:		new->size = extra;
zone.c:		new->tag = 0;			// free block
zone.c:		new->prev = base;
zone.c:		new->id = ZONEID;
zone.c:		new->next = base->next;
zone.c:		new->next->prev = new;
zone.c:		base->next = new;
zone.c:		base->size = size;
zone.c:	base->tag = tag;				// no longer a free block
zone.c:	mainzone->rover = base->next;	// next allocation will start looking here
zone.c:	base->id = ZONEID;
zone.c:	*(int *)((byte *)base + base->size - 4) = ZONEID;
zone.c:	Con_Printf ("zone size: %i  location: %p\n",mainzone->size,mainzone);
zone.c:	for (block = zone->blocklist.next ; ; block = block->next)
zone.c:			block, block->size, block->tag);
zone.c:		if (block->next == &zone->blocklist)
zone.c:		if ( (byte *)block + block->size != (byte *)block->next)
zone.c:		if ( block->next->prev != block)
zone.c:		if (!block->tag && !block->next->tag)
zone.c:	for (block = mainzone->blocklist.next ; ; block = block->next)
zone.c:		if (block->next == &mainzone->blocklist)
zone.c:		if ( (byte *)block + block->size != (byte *)block->next)
zone.c:		if ( block->next->prev != block)
zone.c:		if (!block->tag && !block->next->tag)
zone.c:	int		size;		// including sizeof(hunk_t), -1 = not allocated
zone.c:		if (h->sentinal != HUNK_SENTINAL)
zone.c:		if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
zone.c:		h = (hunk_t *)((byte *)h+h->size);
zone.c:	starthigh = (hunk_t *)(hunk_base + hunk_size - hunk_high_used);
zone.c:	Con_Printf ("-------------------------\n");
zone.c:			Con_Printf ("-------------------------\n");
zone.c:			Con_Printf ("          :%8i REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
zone.c:			Con_Printf ("-------------------------\n");
zone.c:		if (h->sentinal != HUNK_SENTINAL)
zone.c:		if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
zone.c:		next = (hunk_t *)((byte *)h+h->size);
zone.c:		sum += h->size;
zone.c:		memcpy (name, h->name, 8);
zone.c:			Con_Printf ("%8p :%8i %8s\n",h, h->size, name);
zone.c:		strncmp (h->name, next->name, 8) )
zone.c:	Con_Printf ("-------------------------\n");
zone.c:	if (hunk_size - hunk_low_used - hunk_high_used < size)
zone.c:	h->size = size;
zone.c:	h->sentinal = HUNK_SENTINAL;
zone.c:	Q_strncpy (h->name, name, 8);
zone.c:	memset (hunk_base + mark, 0, hunk_low_used - mark);
zone.c:	memset (hunk_base + hunk_size - hunk_high_used, 0, hunk_high_used - mark);
zone.c:	if (hunk_size - hunk_low_used - hunk_high_used < size)
zone.c:	h = (hunk_t *)(hunk_base + hunk_size - hunk_high_used);
zone.c:	h->size = size;
zone.c:	h->sentinal = HUNK_SENTINAL;
zone.c:	Q_strncpy (h->name, name, 8);
zone.c:	new = Cache_TryAlloc (c->size, true);
zone.c:		Q_memcpy ( new+1, c+1, c->size - sizeof(cache_system_t) );
zone.c:		new->user = c->user;
zone.c:		Q_memcpy (new->name, c->name, sizeof(new->name));
zone.c:		Cache_Free (c->user);
zone.c:		new->user->data = (void *)(new+1);
zone.c:		Cache_Free (c->user);		// tough luck...
zone.c:		if ( (byte *)c + c->size <= hunk_base + hunk_size - new_high_hunk)
zone.c:			Cache_Free (c->user);	// didn't move out of the way
zone.c:	if (!cs->lru_next || !cs->lru_prev)
zone.c:	cs->lru_next->lru_prev = cs->lru_prev;
zone.c:	cs->lru_prev->lru_next = cs->lru_next;
zone.c:	cs->lru_prev = cs->lru_next = NULL;
zone.c:	if (cs->lru_next || cs->lru_prev)
zone.c:	cache_head.lru_next->lru_prev = cs;
zone.c:	cs->lru_next = cache_head.lru_next;
zone.c:	cs->lru_prev = &cache_head;
zone.c:		if (hunk_size - hunk_high_used - hunk_low_used < size)
zone.c:		new->size = size;
zone.c:		new->prev = new->next = &cache_head;
zone.c:			if ( (byte *)cs - (byte *)new >= size)
zone.c:				new->size = size;
zone.c:				new->next = cs;
zone.c:				new->prev = cs->prev;
zone.c:				cs->prev->next = new;
zone.c:				cs->prev = new;
zone.c:		new = (cache_system_t *)((byte *)cs + cs->size);
zone.c:		cs = cs->next;
zone.c:	if ( hunk_base + hunk_size - hunk_high_used - (byte *)new >= size)
zone.c:		new->size = size;
zone.c:		new->next = &cache_head;
zone.c:		new->prev = cache_head.prev;
zone.c:		cache_head.prev->next = new;
zone.c:		Cache_Free ( cache_head.next->user );	// reclaim the space
zone.c:	for (cd = cache_head.next ; cd != &cache_head ; cd = cd->next)
zone.c:		Con_Printf ("%8i : %s\n", cd->size, cd->name);
zone.c:	Con_DPrintf ("%4.1f megabyte data cache\n", (hunk_size - hunk_high_used - hunk_low_used) / (float)(1024*1024) );
zone.c:	if (!c->data)
zone.c:	cs = ((cache_system_t *)c->data) - 1;
zone.c:	cs->prev->next = cs->next;
zone.c:	cs->next->prev = cs->prev;
zone.c:	cs->next = cs->prev = NULL;
zone.c:	c->data = NULL;
zone.c:	if (!c->data)
zone.c:	cs = ((cache_system_t *)c->data) - 1;
zone.c:	return c->data;
zone.c:	if (c->data)
zone.c:			strncpy (cs->name, name, sizeof(cs->name)-1);
zone.c:			c->data = (void *)(cs+1);
zone.c:			cs->user = c;
zone.c:		Cache_Free ( cache_head.lru_prev->user );
zone.c:	p = COM_CheckParm ("-zone");
zone.c:		if (p < com_argc-1)
zone.c:			Sys_Error ("Memory_Init: you must specify a size in KB after -zone");
zone.h:Copyright (C) 1996-1997 Id Software, Inc.
zone.h:Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
zone.h:------ Top of Memory -------
zone.h:<--- high hunk reset point held by vid
zone.h:<--- high hunk used
zone.h:<--- low hunk used
zone.h:<-- low hunk reset point held by host
zone.h:----- Bottom of Memory -----
