From 672cfbf16f83fb67f6ce9bb1d3571dc32a5b3083 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 5 Sep 2007 18:17:46 +0000 Subject: [PATCH] * Merge unified-sdl to trunk * Bump Q3_VERSION to 1.35 --- Makefile | 203 +- README | 40 +- TODO | 1 - code/{unix => asm}/ftola.s | 0 code/{unix => asm}/matha.s | 0 code/{unix => asm}/qasm.h | 0 code/{unix => asm}/snapvectora.s | 0 code/{unix => asm}/snd_mixa.s | 0 code/botlib/be_ai_chat.c | 6 +- code/botlib/be_ai_goal.c | 18 +- code/botlib/be_ai_move.c | 2 - code/botlib/be_ai_move.h | 2 - code/botlib/be_ai_weap.c | 2 +- code/botlib/be_interface.c | 10 +- code/botlib/l_memory.c | 2 +- code/botlib/l_precomp.c | 2 +- code/botlib/l_script.c | 4 +- code/cgame/cg_draw.c | 10 +- code/cgame/cg_drawtools.c | 8 +- code/cgame/cg_event.c | 2 +- code/cgame/cg_local.h | 2 +- code/cgame/cg_main.c | 6 +- code/cgame/cg_newdraw.c | 11 +- code/cgame/cg_players.c | 4 +- code/cgame/cg_servercmds.c | 4 +- code/client/cl_cgame.c | 32 +- code/client/cl_cin.c | 12 +- code/client/cl_console.c | 7 +- code/client/cl_curl.c | 44 +- code/client/cl_keys.c | 29 +- code/client/cl_main.c | 140 +- code/client/cl_scrn.c | 7 +- code/client/cl_ui.c | 2 + code/client/client.h | 7 +- code/client/qal.c | 43 +- code/client/snd_dma.c | 6 +- code/client/snd_main.c | 7 + code/client/snd_mix.c | 1 - code/game/ai_chat.c | 2 +- code/game/ai_dmq3.c | 1 - code/game/ai_main.c | 3 - code/game/bg_lib.c | 9 +- code/game/bg_misc.c | 2 +- code/game/g_arenas.c | 2 +- code/game/g_bot.c | 1 - code/game/g_client.c | 2 +- code/game/g_main.c | 4 +- code/game/g_mem.c | 2 +- code/game/g_session.c | 9 +- code/jpeg-6/jcdctmgr.c | 89 - code/jpeg-6/jcmainct.c | 3 - code/jpeg-6/jdmainct.c | 8 - code/libs/win32/libSDL.dll.a | Bin 0 -> 123944 bytes code/libs/win32/libSDL.la | 35 + code/libs/win32/libSDLmain.a | Bin 0 -> 207032 bytes code/null/null_client.c | 6 +- code/null/null_snddma.c | 1 - code/q3_ui/ui_atoms.c | 9 +- code/q3_ui/ui_connect.c | 18 +- code/q3_ui/ui_controls2.c | 5 +- code/q3_ui/ui_gameinfo.c | 7 +- code/q3_ui/ui_local.h | 4 +- code/q3_ui/ui_main.c | 4 +- code/q3_ui/ui_mods.c | 36 - code/q3_ui/ui_qmenu.c | 1 - code/q3_ui/ui_team.c | 10 - code/q3_ui/ui_video.c | 28 +- code/qcommon/cm_trace.c | 17 +- code/qcommon/common.c | 268 +- code/qcommon/cvar.c | 26 +- code/qcommon/files.c | 558 +- code/qcommon/net_ip.c | 16 +- code/qcommon/q_math.c | 9 +- code/qcommon/q_platform.h | 2 +- code/qcommon/q_shared.c | 34 +- code/qcommon/q_shared.h | 24 +- code/qcommon/qcommon.h | 104 +- code/qcommon/vm.c | 17 +- code/qcommon/vm_interpreted.c | 2 +- code/qcommon/vm_local.h | 1 - code/qcommon/vm_x86.c | 14 +- code/qcommon/vm_x86_64.c | 2 +- code/renderer/qgl.h | 816 +-- code/renderer/qgl_linked.h | 357 - code/renderer/tr_cmds.c | 2 +- code/renderer/tr_image.c | 17 +- code/renderer/tr_init.c | 15 - code/renderer/tr_light.c | 3 +- code/renderer/tr_shader.c | 4 +- code/renderer/tr_types.h | 29 - code/sdl/sdl_gamma.c | 84 + code/sdl/sdl_glimp.c | 804 +++ code/sdl/sdl_icon.h | 132 + code/sdl/sdl_input.c | 801 +++ code/{unix => sdl}/sdl_snd.c | 91 +- code/server/sv_bot.c | 6 +- code/server/sv_ccmds.c | 2 +- code/server/sv_client.c | 6 - code/server/sv_game.c | 2 +- code/server/sv_init.c | 5 + code/server/sv_main.c | 24 +- code/{win32/glw_win.h => sys/sys_loadlib.h} | 43 +- code/{unix/unix_glw.h => sys/sys_local.h} | 34 +- code/sys/sys_main.c | 646 ++ code/{unix/unix_shared.c => sys/sys_unix.c} | 437 +- code/sys/sys_win32.c | 510 ++ code/sys/tty_console.c | 440 ++ code/{win32/resource.h => sys/win_resource.h} | 0 code/{win32 => sys}/win_resource.rc | 8 +- code/ui/ui_atoms.c | 4 +- code/ui/ui_gameinfo.c | 2 +- code/ui/ui_main.c | 36 +- code/ui/ui_shared.c | 25 +- code/unix/LinuxSupport/CHANGES-1.32.txt | 150 - code/unix/LinuxSupport/INSTALL | 52 - code/unix/LinuxSupport/index.html | 283 - code/unix/LinuxSupport/udp_wide_README.txt | 20 - .../LinuxSupport/udp_wide_broadcast.patch | 57 - code/unix/MacSupport/SLA-dmg.sh | 30 - code/unix/MacSupport/SLA.r | 260 - code/unix/README.Linux | 352 - code/unix/README.Q3Test | 306 - code/unix/linux_glimp.c | 1851 ----- code/unix/linux_joystick.c | 211 - code/unix/linux_local.h | 49 - code/unix/linux_qgl.c | 4205 ------------ code/unix/linux_signals.c | 64 - code/unix/linux_snd.c | 294 - code/unix/sdl_glimp.c | 1814 ----- code/unix/unix_main.c | 1493 ---- code/win32/background.bmp | Bin 197688 -> 0 bytes code/win32/clear.bmp | Bin 5174 -> 0 bytes code/win32/icon2.ico | Bin 766 -> 0 bytes code/win32/msvc/botlib.vcproj | 1559 ----- code/win32/msvc/cgame.def | 3 - code/win32/msvc/cgame.vcproj | 1160 ---- code/win32/msvc/game.def | 3 - code/win32/msvc/game.vcproj | 2043 ------ code/win32/msvc/q3_ui.def | 3 - code/win32/msvc/q3_ui.vcproj | 1928 ------ code/win32/msvc/quake3.sln | 97 - code/win32/msvc/quake3.vcproj | 3419 --------- code/win32/msvc/ref_trin.def | 2 - code/win32/msvc/renderer.vcproj | 6111 ----------------- code/win32/msvc/ui.def | 3 - code/win32/msvc/ui.vcproj | 879 --- code/win32/win_gamma.c | 214 - code/win32/win_glimp.c | 1681 ----- code/win32/win_input.c | 1149 ---- code/win32/win_local.h | 94 - code/win32/win_main.c | 1264 ---- code/win32/win_qgl.c | 4386 ------------ code/win32/win_shared.c | 350 - code/win32/win_snd.c | 388 -- code/win32/win_syscon.c | 596 -- code/win32/win_wndproc.c | 456 -- make-macosx-ub.sh | 2 +- .../ioquake3.icns => misc/quake3.icns | Bin code/win32/qe3.ico => misc/quake3.ico | Bin {code/unix => misc}/quake3.png | Bin {code/unix => misc}/quake3.svg | 0 misc/setup/MacOSX/SLA-dmg.sh | 73 + {code/unix => misc}/setup/Makefile | 0 {code/unix => misc}/setup/Solaris_pkg.sh | 0 {code/unix => misc}/setup/doit | 0 {code/unix => misc}/setup/ioq3demo.sh | 0 {code/unix => misc}/setup/ioquake3.sh | 0 {code/unix => misc}/setup/pkg/ioq3ded.sh | 0 {code/unix => misc}/setup/pkg/ioquake3.sh | 0 {code/unix => misc}/setup/pkg/ioquake3/depend | 0 .../setup/pkg/ioquake3/pkginfo.template | 0 .../setup/pkg/ioquake3/postinstall | 0 .../setup/pkg/ioquake3/postremove | 0 .../setup/pkg/ioquake3/preinstall | 0 .../setup/pkg/ioquake3/preremove | 0 .../setup/pkg/ioquake3/prototype.template | 0 {code/unix => misc}/setup/pkg/ioquake3/space | 0 .../unix => misc}/setup/pkg/ioquake3d/depend | 0 .../setup/pkg/ioquake3d/pkginfo.template | 0 .../setup/pkg/ioquake3d/postinstall | 0 .../setup/pkg/ioquake3d/postremove | 0 .../setup/pkg/ioquake3d/preinstall | 0 .../setup/pkg/ioquake3d/preremove | 0 .../setup/pkg/ioquake3d/prototype.template | 0 {code/unix => misc}/setup/pkg/ioquake3d/space | 0 {code/unix => misc}/setup/preuninstall.sh | 0 {code/unix => misc}/setup/setup.xml | 0 {code/unix => misc}/setup/splash.xpm | 0 188 files changed, 5071 insertions(+), 41739 deletions(-) rename code/{unix => asm}/ftola.s (100%) rename code/{unix => asm}/matha.s (100%) rename code/{unix => asm}/qasm.h (100%) rename code/{unix => asm}/snapvectora.s (100%) rename code/{unix => asm}/snd_mixa.s (100%) create mode 100755 code/libs/win32/libSDL.dll.a create mode 100755 code/libs/win32/libSDL.la create mode 100644 code/libs/win32/libSDLmain.a delete mode 100644 code/renderer/qgl_linked.h create mode 100644 code/sdl/sdl_gamma.c create mode 100644 code/sdl/sdl_glimp.c create mode 100644 code/sdl/sdl_icon.h create mode 100644 code/sdl/sdl_input.c rename code/{unix => sdl}/sdl_snd.c (73%) rename code/{win32/glw_win.h => sys/sys_loadlib.h} (64%) rename code/{unix/unix_glw.h => sys/sys_local.h} (73%) create mode 100644 code/sys/sys_main.c rename code/{unix/unix_shared.c => sys/sys_unix.c} (50%) create mode 100644 code/sys/sys_win32.c create mode 100644 code/sys/tty_console.c rename code/{win32/resource.h => sys/win_resource.h} (100%) rename code/{win32 => sys}/win_resource.rc (89%) delete mode 100644 code/unix/LinuxSupport/CHANGES-1.32.txt delete mode 100644 code/unix/LinuxSupport/INSTALL delete mode 100644 code/unix/LinuxSupport/index.html delete mode 100644 code/unix/LinuxSupport/udp_wide_README.txt delete mode 100644 code/unix/LinuxSupport/udp_wide_broadcast.patch delete mode 100755 code/unix/MacSupport/SLA-dmg.sh delete mode 100644 code/unix/MacSupport/SLA.r delete mode 100644 code/unix/README.Linux delete mode 100644 code/unix/README.Q3Test delete mode 100644 code/unix/linux_glimp.c delete mode 100644 code/unix/linux_joystick.c delete mode 100644 code/unix/linux_local.h delete mode 100644 code/unix/linux_qgl.c delete mode 100644 code/unix/linux_signals.c delete mode 100644 code/unix/linux_snd.c delete mode 100644 code/unix/sdl_glimp.c delete mode 100644 code/unix/unix_main.c delete mode 100644 code/win32/background.bmp delete mode 100644 code/win32/clear.bmp delete mode 100644 code/win32/icon2.ico delete mode 100644 code/win32/msvc/botlib.vcproj delete mode 100644 code/win32/msvc/cgame.def delete mode 100644 code/win32/msvc/cgame.vcproj delete mode 100644 code/win32/msvc/game.def delete mode 100644 code/win32/msvc/game.vcproj delete mode 100644 code/win32/msvc/q3_ui.def delete mode 100644 code/win32/msvc/q3_ui.vcproj delete mode 100644 code/win32/msvc/quake3.sln delete mode 100644 code/win32/msvc/quake3.vcproj delete mode 100644 code/win32/msvc/ref_trin.def delete mode 100644 code/win32/msvc/renderer.vcproj delete mode 100644 code/win32/msvc/ui.def delete mode 100644 code/win32/msvc/ui.vcproj delete mode 100644 code/win32/win_gamma.c delete mode 100644 code/win32/win_glimp.c delete mode 100644 code/win32/win_input.c delete mode 100644 code/win32/win_local.h delete mode 100644 code/win32/win_main.c delete mode 100644 code/win32/win_qgl.c delete mode 100644 code/win32/win_shared.c delete mode 100644 code/win32/win_snd.c delete mode 100644 code/win32/win_syscon.c delete mode 100644 code/win32/win_wndproc.c rename code/unix/MacSupport/ioquake3.icns => misc/quake3.icns (100%) mode change 100755 => 100644 rename code/win32/qe3.ico => misc/quake3.ico (100%) rename {code/unix => misc}/quake3.png (100%) rename {code/unix => misc}/quake3.svg (100%) create mode 100755 misc/setup/MacOSX/SLA-dmg.sh rename {code/unix => misc}/setup/Makefile (100%) rename {code/unix => misc}/setup/Solaris_pkg.sh (100%) rename {code/unix => misc}/setup/doit (100%) rename {code/unix => misc}/setup/ioq3demo.sh (100%) rename {code/unix => misc}/setup/ioquake3.sh (100%) rename {code/unix => misc}/setup/pkg/ioq3ded.sh (100%) rename {code/unix => misc}/setup/pkg/ioquake3.sh (100%) rename {code/unix => misc}/setup/pkg/ioquake3/depend (100%) rename {code/unix => misc}/setup/pkg/ioquake3/pkginfo.template (100%) rename {code/unix => misc}/setup/pkg/ioquake3/postinstall (100%) rename {code/unix => misc}/setup/pkg/ioquake3/postremove (100%) rename {code/unix => misc}/setup/pkg/ioquake3/preinstall (100%) rename {code/unix => misc}/setup/pkg/ioquake3/preremove (100%) rename {code/unix => misc}/setup/pkg/ioquake3/prototype.template (100%) rename {code/unix => misc}/setup/pkg/ioquake3/space (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/depend (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/pkginfo.template (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/postinstall (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/postremove (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/preinstall (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/preremove (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/prototype.template (100%) rename {code/unix => misc}/setup/pkg/ioquake3d/space (100%) rename {code/unix => misc}/setup/preuninstall.sh (100%) rename {code/unix => misc}/setup/setup.xml (100%) rename {code/unix => misc}/setup/splash.xpm (100%) diff --git a/Makefile b/Makefile index 75f656be..74dde9a5 100644 --- a/Makefile +++ b/Makefile @@ -32,12 +32,8 @@ BUILD_SERVER = BUILD_GAME_SO = BUILD_GAME_QVM = -ifeq ($(V),1) -echo_cmd=@: -Q= -else -echo_cmd=@echo -Q=@ +ifneq ($(PLATFORM),darwin) + BUILD_CLIENT_SMP = 0 endif ############################################################################# @@ -96,10 +92,6 @@ USE_CCACHE=0 endif export USE_CCACHE -ifndef USE_SDL -USE_SDL=1 -endif - ifndef USE_OPENAL USE_OPENAL=1 endif @@ -136,8 +128,9 @@ CDIR=$(MOUNT_DIR)/client SDIR=$(MOUNT_DIR)/server RDIR=$(MOUNT_DIR)/renderer CMDIR=$(MOUNT_DIR)/qcommon -UDIR=$(MOUNT_DIR)/unix -W32DIR=$(MOUNT_DIR)/win32 +SDLDIR=$(MOUNT_DIR)/sdl +ASMDIR=$(MOUNT_DIR)/asm +SYSDIR=$(MOUNT_DIR)/sys GDIR=$(MOUNT_DIR)/game CGDIR=$(MOUNT_DIR)/cgame BLIBDIR=$(MOUNT_DIR)/botlib @@ -146,7 +139,7 @@ UIDIR=$(MOUNT_DIR)/ui Q3UIDIR=$(MOUNT_DIR)/q3_ui JPDIR=$(MOUNT_DIR)/jpeg-6 TOOLSDIR=$(MOUNT_DIR)/tools -LOKISETUPDIR=$(UDIR)/setup +LOKISETUPDIR=misc/setup SDLHDIR=$(MOUNT_DIR)/SDL12 LIBSDIR=$(MOUNT_DIR)/libs @@ -158,7 +151,7 @@ USE_SVN= ifeq ($(wildcard .svn),.svn) SVN_REV=$(shell LANG=C svnversion .) ifneq ($(SVN_REV),) - SVN_VERSION=$(VERSION)_SVN$(SVN_REV) + SVN_VERSION=$(SVN_REV) USE_SVN=1 endif endif @@ -195,7 +188,8 @@ ifeq ($(PLATFORM),linux) endif endif - BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe + BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ + -pipe -DUSE_ICON $(shell sdl-config --cflags) ifeq ($(USE_OPENAL),1) BASE_CFLAGS += -DUSE_OPENAL=1 @@ -215,12 +209,6 @@ ifeq ($(PLATFORM),linux) BASE_CFLAGS += -DUSE_CODEC_VORBIS=1 endif - ifeq ($(USE_SDL),1) - BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags) - else - BASE_CFLAGS += -I/usr/X11R6/include - endif - OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer ifeq ($(ARCH),x86_64) @@ -247,10 +235,6 @@ ifeq ($(PLATFORM),linux) BASE_CFLAGS += -DNO_VM_COMPILED endif - DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0 - - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE) - SHLIBEXT=so SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared $(LDFLAGS) @@ -258,18 +242,14 @@ ifeq ($(PLATFORM),linux) THREAD_LDFLAGS=-lpthread LDFLAGS=-ldl -lm - ifeq ($(USE_SDL),1) - CLIENT_LDFLAGS=$(shell sdl-config --libs) - else - CLIENT_LDFLAGS=-L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm - endif + CLIENT_LDFLAGS=$(shell sdl-config --libs) -lGL ifeq ($(USE_OPENAL),1) ifneq ($(USE_OPENAL_DLOPEN),1) CLIENT_LDFLAGS += -lopenal endif endif - + ifeq ($(USE_CURL),1) ifneq ($(USE_CURL_DLOPEN),1) CLIENT_LDFLAGS += -lcurl @@ -286,6 +266,9 @@ ifeq ($(PLATFORM),linux) LDFLAGS+=-m32 endif + DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0 + RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE) + else # ifeq Linux ############################################################################# @@ -384,19 +367,13 @@ ifeq ($(PLATFORM),darwin) CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg endif - ifeq ($(USE_SDL),1) - BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 -D_THREAD_SAFE=1 \ - -I$(SDLHDIR)/include - # We copy sdlmain before ranlib'ing it so that subversion doesn't think - # the file has been modified by each build. - LIBSDLMAIN=$(B)/libSDLmain.a - LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDLmain.a - CLIENT_LDFLAGS += -framework Cocoa -framework IOKit -framework OpenGL \ - $(LIBSDIR)/macosx/libSDL-1.2.0.dylib - else - # !!! FIXME: frameworks: OpenGL, Carbon, etc... - #CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lX11 -lXext -lXxf86dga -lXxf86vm - endif + BASE_CFLAGS += -D_THREAD_SAFE=1 -I$(SDLHDIR)/include + # We copy sdlmain before ranlib'ing it so that subversion doesn't think + # the file has been modified by each build. + LIBSDLMAIN=$(B)/libSDLmain.a + LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDLmain.a + CLIENT_LDFLAGS += -framework Cocoa -framework IOKit -framework OpenGL \ + $(LIBSDIR)/macosx/libSDL-1.2.0.dylib OPTIMIZE += -ffast-math -falign-loops=16 @@ -429,7 +406,8 @@ endif ARCH=x86 - BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes + BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ + -DUSE_ICON -I$(SDLHDIR)/include ifeq ($(USE_OPENAL),1) BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1 @@ -446,22 +424,19 @@ endif BASE_CFLAGS += -DUSE_CODEC_VORBIS=1 endif - OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math -falign-loops=2 \ - -funroll-loops -falign-jumps=2 -falign-functions=2 -fstrength-reduce + OPTIMIZE = -O3 -march=i586 -fno-omit-frame-pointer -ffast-math \ + -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \ + -fstrength-reduce HAVE_VM_COMPILED = true - DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0 - - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE) - SHLIBEXT=dll SHLIBCFLAGS= SHLIBLDFLAGS=-shared $(LDFLAGS) BINEXT=.exe - LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32 + LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32 -lopengl32 CLIENT_LDFLAGS= ifeq ($(USE_CURL),1) @@ -480,6 +455,14 @@ endif LDFLAGS+=-m32 endif + DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0 + RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE) + + # libmingw32 must be linked before libSDLmain + CLIENT_LDFLAGS += -lmingw32 \ + $(LIBSDIR)/win32/libSDLmain.a \ + $(LIBSDIR)/win32/libSDL.dll.a + BUILD_SERVER = 0 BUILD_CLIENT_SMP = 0 @@ -499,9 +482,7 @@ ifeq ($(PLATFORM),freebsd) BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ - -I/usr/X11R6/include - - DEBUG_CFLAGS=$(BASE_CFLAGS) -g + -DUSE_ICON $(shell sdl-config --cflags) ifeq ($(USE_OPENAL),1) BASE_CFLAGS += -DUSE_OPENAL=1 @@ -514,10 +495,6 @@ ifeq ($(PLATFORM),freebsd) BASE_CFLAGS += -DUSE_CODEC_VORBIS=1 endif - ifeq ($(USE_SDL),1) - BASE_CFLAGS += $(shell sdl-config --cflags) -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 - endif - ifeq ($(ARCH),axp) BASE_CFLAGS += -DNO_VM_COMPILED RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ @@ -534,6 +511,8 @@ ifeq ($(PLATFORM),freebsd) endif endif + DEBUG_CFLAGS=$(BASE_CFLAGS) -g + SHLIBEXT=so SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared $(LDFLAGS) @@ -544,11 +523,7 @@ ifeq ($(PLATFORM),freebsd) CLIENT_LDFLAGS = - ifeq ($(USE_SDL),1) - CLIENT_LDFLAGS += $(shell sdl-config --libs) - else - CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lGL -lX11 -lXext -lXxf86dga -lXxf86vm - endif + CLIENT_LDFLAGS += $(shell sdl-config --libs) -lGL ifeq ($(USE_OPENAL),1) ifneq ($(USE_OPENAL_DLOPEN),1) @@ -580,12 +555,13 @@ ifeq ($(PLATFORM),netbsd) THREAD_LDFLAGS=-lpthread BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes - DEBUG_CFLAGS=$(BASE_CFLAGS) -g ifneq ($(ARCH),i386) BASE_CFLAGS += -DNO_VM_COMPILED endif + DEBUG_CFLAGS=$(BASE_CFLAGS) -g + BUILD_CLIENT = 0 BUILD_GAME_QVM = 0 @@ -637,13 +613,8 @@ ifeq ($(PLATFORM),sunos) endif - BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe - - ifeq ($(USE_SDL),1) - BASE_CFLAGS += -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags) - else - BASE_CFLAGS += -I/usr/openwin/include - endif + BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ + -pipe -DUSE_ICON $(shell sdl-config --cflags) OPTIMIZE = -O3 -ffast-math -funroll-loops @@ -681,11 +652,7 @@ ifeq ($(PLATFORM),sunos) BOTCFLAGS=-O0 - ifeq ($(USE_SDL),1) - CLIENT_LDFLAGS=$(shell sdl-config --libs) -L/usr/X11/lib -lGLU -lX11 -lXext - else - CLIENT_LDFLAGS=-L/usr/openwin/$(LIB) -L/usr/X11/lib -lGLU -lX11 -lXext - endif + CLIENT_LDFLAGS=$(shell sdl-config --libs) -lGL else # ifeq sunos @@ -763,6 +730,14 @@ ifeq ($(USE_SVN),1) BASE_CFLAGS += -DSVN_VERSION=\\\"$(SVN_VERSION)\\\" endif +ifeq ($(V),1) +echo_cmd=@: +Q= +else +echo_cmd=@echo +Q=@ +endif + define DO_CC $(echo_cmd) "CC $<" $(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $< @@ -1049,6 +1024,12 @@ Q3OBJ = \ $(B)/client/tr_sky.o \ $(B)/client/tr_surface.o \ $(B)/client/tr_world.o \ + \ + $(B)/client/sdl_gamma.o \ + $(B)/client/sdl_input.o \ + $(B)/client/sdl_snd.o \ + \ + $(B)/client/sys_main.o ifeq ($(ARCH),i386) Q3OBJ += \ @@ -1082,44 +1063,19 @@ endif ifeq ($(PLATFORM),mingw32) Q3OBJ += \ - $(B)/client/win_gamma.o \ - $(B)/client/win_glimp.o \ - $(B)/client/win_input.o \ - $(B)/client/win_main.o \ - $(B)/client/win_qgl.o \ - $(B)/client/win_shared.o \ - $(B)/client/win_snd.o \ - $(B)/client/win_syscon.o \ - $(B)/client/win_wndproc.o \ - $(B)/client/win_resource.o + $(B)/client/win_resource.o \ + $(B)/client/sys_win32.o else Q3OBJ += \ - $(B)/client/unix_main.o \ - $(B)/client/unix_shared.o \ - $(B)/client/linux_signals.o \ - $(B)/client/linux_qgl.o \ - $(B)/client/linux_snd.o \ - $(B)/client/sdl_snd.o - - ifeq ($(PLATFORM),linux) - Q3OBJ += $(B)/client/linux_joystick.o - endif - - ifeq ($(USE_SDL),1) - ifneq ($(PLATFORM),darwin) - BUILD_CLIENT_SMP = 0 - endif - endif - - Q3POBJ = \ - $(B)/client/linux_glimp.o \ - $(B)/client/sdl_glimp.o - - Q3POBJ_SMP = \ - $(B)/clientsmp/linux_glimp.o \ - $(B)/clientsmp/sdl_glimp.o + $(B)/client/sys_unix.o endif +Q3POBJ += \ + $(B)/client/sdl_glimp.o + +Q3POBJ_SMP += \ + $(B)/clientsmp/sdl_glimp.o + $(B)/ioquake3.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN) $(echo_cmd) "LD $@" $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) \ @@ -1206,13 +1162,14 @@ Q3DOBJ = \ $(B)/ded/l_script.o \ $(B)/ded/l_struct.o \ \ - $(B)/ded/linux_signals.o \ - $(B)/ded/unix_main.o \ - $(B)/ded/unix_shared.o \ - \ $(B)/ded/null_client.o \ $(B)/ded/null_input.o \ - $(B)/ded/null_snddma.o + $(B)/ded/null_snddma.o \ + \ + $(B)/ded/tty_console.o \ + $(B)/ded/sys_unix.o \ + \ + $(B)/ded/sys_main.o ifeq ($(ARCH),i386) Q3DOBJ += \ @@ -1529,7 +1486,7 @@ $(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm ## CLIENT/SERVER RULES ############################################################################# -$(B)/client/%.o: $(UDIR)/%.s +$(B)/client/%.o: $(ASMDIR)/%.s $(DO_AS) $(B)/client/%.o: $(CDIR)/%.c @@ -1550,20 +1507,20 @@ $(B)/client/%.o: $(JPDIR)/%.c $(B)/client/%.o: $(RDIR)/%.c $(DO_CC) -$(B)/client/%.o: $(UDIR)/%.c +$(B)/client/%.o: $(SDLDIR)/%.c $(DO_CC) -$(B)/clientsmp/%.o: $(UDIR)/%.c +$(B)/clientsmp/%.o: $(SDLDIR)/%.c $(DO_SMP_CC) -$(B)/client/%.o: $(W32DIR)/%.c +$(B)/client/%.o: $(SYSDIR)/%.c $(DO_CC) -$(B)/client/%.o: $(W32DIR)/%.rc +$(B)/client/%.o: $(SYSDIR)/%.rc $(DO_WINDRES) -$(B)/ded/%.o: $(UDIR)/%.s +$(B)/ded/%.o: $(ASMDIR)/%.s $(DO_AS) $(B)/ded/%.o: $(SDIR)/%.c @@ -1575,7 +1532,7 @@ $(B)/ded/%.o: $(CMDIR)/%.c $(B)/ded/%.o: $(BLIBDIR)/%.c $(DO_BOT_CC) -$(B)/ded/%.o: $(UDIR)/%.c +$(B)/ded/%.o: $(SYSDIR)/%.c $(DO_DED_CC) $(B)/ded/%.o: $(NDIR)/%.c diff --git a/README b/README index b13afe9c..5c52b4e9 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ The intent of this project is to provide a baseline Quake 3 which may be used for further development. Some of the major features currently implemented are: - * SDL backend for unix-like operating systems + * SDL backend * OpenAL sound API support (multiple speaker support and better sound quality) * Full x86_64 support on Linux @@ -46,17 +46,7 @@ For *nix For Windows, using MinGW 1. Download and install MinGW and MSys from http://www.mingw.org/. - 2. Download http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz - and untar it into your MinGW directory (usually C:\MinGW). - 3. Open an MSys terminal, and follow the instructions for compiling on *nix. - -For Windows, using MSVC - 1. Run Visual Studio and open the quake3.sln file in the code/win32/msvc - directory. - 2. Build. - 3. Copy the resultant Quake3.exe to your quake 3 directory, make a backup if - you want to keep your original. If you wish to use native libraries, copy - the resultant dlls to your baseq3 directory. + 2. Open an MSys terminal, and follow the instructions for compiling on *nix. For Mac OS X, building a Universal Binary 1. Install the MacOSX10.2.8.sdk and MacOSX10.4u.sdk which are included in @@ -68,7 +58,7 @@ For Mac OS X, building a Universal Binary Installation, for *nix 1. Set the COPYDIR variable in the shell to be where you installed Quake 3 - to. By default it will be /usr/local/games/quake3 if you haven't set it. + to. By default it will be /usr/local/games/quake3 if you haven't set it. This is the path as used by the original Linux Q3 installer and subsequent point releases. 2. Run 'make copyfiles'. @@ -83,11 +73,10 @@ compiling is simply a case of using './cross-make-mingw.sh' in place of 'make', though you may find you need to change the value of the variables in this script to match your environment. -If the make based build system is being used (i.e. *nix or MinGW), the -following variables may be set, either on the command line or in +The following variables may be set, either on the command line or in Makefile.local: - OPTIMIZE - use this for custom CFLAGS + CFLAGS - use this for custom CFLAGS V - set to show cc command line when building DEFAULT_BASEDIR - extra path to search for baseq3 and such BUILD_SERVER - build the 'ioq3ded' server binary @@ -95,7 +84,6 @@ Makefile.local: BUILD_CLIENT_SMP - build the 'ioquake3-smp' client binary BUILD_GAME_SO - build the game shared libraries BUILD_GAME_QVM - build the game qvms - USE_SDL - use the SDL backend where available USE_OPENAL - use OpenAL where available USE_OPENAL_DLOPEN - link with OpenAL at runtime USE_CURL - use libcurl for http/ftp download support @@ -140,15 +128,12 @@ New cvars s_sdlDevSamps - SDL DMA buffer size override s_sdlMixSamps - SDL mix buffer size override - ttycon_ansicolor - enable use of ANSI escape codes in the tty - r_GLlibCoolDownMsec - wait for some milliseconds to close GL - library + com_ansiColor - enable use of ANSI escape codes in the tty com_altivec - enable use of altivec on PowerPC systems s_backend - read only, indicates the current sound backend - in_shiftedKeys - non-SDL Linux only; enables binding to - shifted keys - in_joystickNo - SDL only; select which joystick to use + s_muteWhenMinimized - mute sound when minimized + in_joystickNo - select which joystick to use cl_consoleHistory - read only, stores the console history cl_platformSensitivity - read only, indicates the mouse input scaling @@ -292,8 +277,8 @@ Multiuser Support on Windows systems Note that this cvar MUST be set as a command line parameter. SDL Keyboard Differences - ioquake3 clients built againt SDL (e.g. Linux and Mac OS X) have different - keyboard behaviour than the original Quake3 clients. + ioquake3 clients have different keyboard behaviour compared to the original + Quake3 clients. * "Caps Lock" and "Num Lock" can not be used as normal binds since they do not send a KEYUP event until the key is pressed again. @@ -345,7 +330,7 @@ all. The focus for ioquake3 to develop a stable base suitable for further development, and provide players with the same Quake 3 experience they've had -for years. As such ioq3 does not have any significant graphical enhancements +for years. As such ioq3 does not have any significant graphical enhancements and none are planned at this time. However, improved graphics and sound patches will be accepted as long as they are entirely optional, do not require new media and are off by default. @@ -372,8 +357,7 @@ but we have some general guidelines: providing pak0.pk3 and the patch pk3s are not refered to or included in the installer. - * Please include at least an SDL so/dylib on every platform but Windows - (which doesn't use it yet). + * Please include at least an SDL so/dylib on every platform. * Please include an OpenAL so/dylib/dll, since every platform should be using it by now. diff --git a/TODO b/TODO index 0aefa633..269a00a7 100644 --- a/TODO +++ b/TODO @@ -19,7 +19,6 @@ MacOS X For 1.35+: * IPv6 support -* Replace windows DirectX backend with SDL * Graphical "ioquake3" watermark in videos, optional, on by default * Gamma stuff while recording videos. * Application for OS X at least to launch mods with appropriate hunkmegs, etc. diff --git a/code/unix/ftola.s b/code/asm/ftola.s similarity index 100% rename from code/unix/ftola.s rename to code/asm/ftola.s diff --git a/code/unix/matha.s b/code/asm/matha.s similarity index 100% rename from code/unix/matha.s rename to code/asm/matha.s diff --git a/code/unix/qasm.h b/code/asm/qasm.h similarity index 100% rename from code/unix/qasm.h rename to code/asm/qasm.h diff --git a/code/unix/snapvectora.s b/code/asm/snapvectora.s similarity index 100% rename from code/unix/snapvectora.s rename to code/asm/snapvectora.s diff --git a/code/unix/snd_mixa.s b/code/asm/snd_mixa.s similarity index 100% rename from code/unix/snd_mixa.s rename to code/asm/snd_mixa.s diff --git a/code/botlib/be_ai_chat.c b/code/botlib/be_ai_chat.c index 7e560dab..6d64cf63 100644 --- a/code/botlib/be_ai_chat.c +++ b/code/botlib/be_ai_chat.c @@ -1439,7 +1439,7 @@ int StringsMatch(bot_matchpiece_t *pieces, bot_match_t *match) //if the last piece was a variable string if (lastvariable >= 0) { - assert( match->variables[lastvariable].offset >= 0 ); // bk001204 + assert( match->variables[lastvariable].offset >= 0 ); match->variables[lastvariable].length = strlen(&match->string[ (int) match->variables[lastvariable].offset]); } //end if @@ -1500,7 +1500,7 @@ void BotMatchVariable(bot_match_t *match, int variable, char *buf, int size) { if (match->variables[variable].length < size) size = match->variables[variable].length+1; - assert( match->variables[variable].offset >= 0 ); // bk001204 + assert( match->variables[variable].offset >= 0 ); strncpy(buf, &match->string[ (int) match->variables[variable].offset], size-1); buf[size-1] = '\0'; } //end if @@ -2316,7 +2316,7 @@ int BotExpandChatMessage(char *outmessage, char *message, unsigned long mcontext } //end if if (match->variables[num].offset >= 0) { - assert( match->variables[num].offset >= 0 ); // bk001204 + assert( match->variables[num].offset >= 0 ); ptr = &match->string[ (int) match->variables[num].offset]; for (i = 0; i < match->variables[num].length; i++) { diff --git a/code/botlib/be_ai_goal.c b/code/botlib/be_ai_goal.c index 37065196..fbcc20fd 100644 --- a/code/botlib/be_ai_goal.c +++ b/code/botlib/be_ai_goal.c @@ -176,22 +176,22 @@ typedef struct bot_goalstate_s float avoidgoaltimes[MAX_AVOIDGOALS]; //times to avoid the goals } bot_goalstate_t; -bot_goalstate_t *botgoalstates[MAX_CLIENTS + 1]; // bk001206 - FIXME: init? +bot_goalstate_t *botgoalstates[MAX_CLIENTS + 1]; // FIXME: init? //item configuration -itemconfig_t *itemconfig = NULL; // bk001206 - init +itemconfig_t *itemconfig = NULL; //level items -levelitem_t *levelitemheap = NULL; // bk001206 - init -levelitem_t *freelevelitems = NULL; // bk001206 - init -levelitem_t *levelitems = NULL; // bk001206 - init +levelitem_t *levelitemheap = NULL; +levelitem_t *freelevelitems = NULL; +levelitem_t *levelitems = NULL; int numlevelitems = 0; //map locations -maplocation_t *maplocations = NULL; // bk001206 - init +maplocation_t *maplocations = NULL; //camp spots -campspot_t *campspots = NULL; // bk001206 - init +campspot_t *campspots = NULL; //the game type -int g_gametype = 0; // bk001206 - init +int g_gametype = 0; //additional dropped item weight -libvar_t *droppedweight = NULL; // bk001206 - init +libvar_t *droppedweight = NULL; //======================================================================== // diff --git a/code/botlib/be_ai_move.c b/code/botlib/be_ai_move.c index 332c2049..27a855a5 100644 --- a/code/botlib/be_ai_move.c +++ b/code/botlib/be_ai_move.c @@ -51,8 +51,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA //#define DEBUG_ELEVATOR //#define DEBUG_GRAPPLE -// bk001204 - redundant bot_avoidspot_t, see be_ai_move.h - //movement state //NOTE: the moveflags MFL_ONGROUND, MFL_TELEPORTED, MFL_WATERJUMP and // MFL_GRAPPLEPULL must be set outside the movement code diff --git a/code/botlib/be_ai_move.h b/code/botlib/be_ai_move.h index d960c3c8..a32d9397 100644 --- a/code/botlib/be_ai_move.h +++ b/code/botlib/be_ai_move.h @@ -102,8 +102,6 @@ typedef struct bot_moveresult_s #define bot_moveresult_t_cleared(x) bot_moveresult_t (x) = {0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}} -// bk001204: from code/botlib/be_ai_move.c -// TTimo 04/12/2001 was moved here to avoid dup defines typedef struct bot_avoidspot_s { vec3_t origin; diff --git a/code/botlib/be_ai_weap.c b/code/botlib/be_ai_weap.c index 50b0deaa..0aab5e8c 100644 --- a/code/botlib/be_ai_weap.c +++ b/code/botlib/be_ai_weap.c @@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define WEAPON_OFS(x) (size_t)&(((weaponinfo_t *)0)->x) #define PROJECTILE_OFS(x) (size_t)&(((projectileinfo_t *)0)->x) -//weapon definition // bk001212 - static +//weapon definition static fielddef_t weaponinfo_fields[] = { {"number", WEAPON_OFS(number), FT_INT}, //weapon number diff --git a/code/botlib/be_interface.c b/code/botlib/be_interface.c index 7f303003..9ef67564 100644 --- a/code/botlib/be_interface.c +++ b/code/botlib/be_interface.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /***************************************************************************** - * name: be_interface.c // bk010221 - FIXME - DEAD code elimination + * name: be_interface.c * * desc: bot library interface * @@ -140,7 +140,7 @@ int Export_BotLibSetup(void) char *homedir, *gamedir; bot_developer = LibVarGetValue("bot_developer"); - memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init + memset( &botlibglobals, 0, sizeof(botlibglobals) ); //initialize byte swapping (litte endian etc.) // Swap_Init(); homedir = LibVarGetString("homedir"); @@ -860,9 +860,9 @@ GetBotLibAPI ============ */ botlib_export_t *GetBotLibAPI(int apiVersion, botlib_import_t *import) { - assert(import); // bk001129 - this wasn't set for baseq3/ - botimport = *import; - assert(botimport.Print); // bk001129 - pars pro toto + assert(import); + botimport = *import; + assert(botimport.Print); Com_Memset( &be_botlib_export, 0, sizeof( be_botlib_export ) ); diff --git a/code/botlib/l_memory.c b/code/botlib/l_memory.c index 0dad5b6a..da063ab0 100644 --- a/code/botlib/l_memory.c +++ b/code/botlib/l_memory.c @@ -100,7 +100,7 @@ void *GetMemory(unsigned long size) { void *ptr; memoryblock_t *block; - assert(botimport.GetMemory); // bk001129 - was NULL'ed + assert(botimport.GetMemory); ptr = botimport.GetMemory(size + sizeof(memoryblock_t)); block = (memoryblock_t *) ptr; block->id = MEM_ID; diff --git a/code/botlib/l_precomp.c b/code/botlib/l_precomp.c index 74276a4e..91b9a7b5 100644 --- a/code/botlib/l_precomp.c +++ b/code/botlib/l_precomp.c @@ -669,7 +669,7 @@ void PC_AddBuiltinDefines(source_t *source) { char *string; int builtin; - } builtin[] = { // bk001204 - brackets + } builtin[] = { { "__LINE__", BUILTIN_LINE }, { "__FILE__", BUILTIN_FILE }, { "__DATE__", BUILTIN_DATE }, diff --git a/code/botlib/l_script.c b/code/botlib/l_script.c index e721891c..5e4b1285 100644 --- a/code/botlib/l_script.c +++ b/code/botlib/l_script.c @@ -706,14 +706,14 @@ int PS_ReadNumber(script_t *script, token_t *token) { c = *script->script_p; //check for a LONG number - if ( (c == 'l' || c == 'L') // bk001204 - brackets + if ( (c == 'l' || c == 'L') && !(token->subtype & TT_LONG)) { script->script_p++; token->subtype |= TT_LONG; } //end if //check for an UNSIGNED number - else if ( (c == 'u' || c == 'U') // bk001204 - brackets + else if ( (c == 'u' || c == 'U') && !(token->subtype & (TT_UNSIGNED | TT_FLOAT))) { script->script_p++; diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index b4fe5646..a525e5c3 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -1596,18 +1596,18 @@ static void CG_DrawDisconnect( void ) { int cmdNum; usercmd_t cmd; const char *s; - int w; // bk010215 - FIXME char message[1024]; + int w; // draw the phone jack if we are completely past our buffers cmdNum = trap_GetCurrentCmdNumber() - CMD_BACKUP + 1; trap_GetUserCmd( cmdNum, &cmd ); if ( cmd.serverTime <= cg.snap->ps.commandTime - || cmd.serverTime > cg.time ) { // special check for map_restart // bk 0102165 - FIXME + || cmd.serverTime > cg.time ) { // special check for map_restart return; } // also add text in center of screen - s = "Connection Interrupted"; // bk 010215 - FIXME + s = "Connection Interrupted"; w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; CG_DrawBigString( 320 - w/2, 100, s, 1.0F); @@ -1786,8 +1786,8 @@ static void CG_DrawCenterString( void ) { char *start; int l; int x, y, w; -#ifdef MISSIONPACK // bk010221 - unused else - int h; +#ifdef MISSIONPACK + int h; #endif float *color; diff --git a/code/cgame/cg_drawtools.c b/code/cgame/cg_drawtools.c index 1409ec1b..2651d98d 100644 --- a/code/cgame/cg_drawtools.c +++ b/code/cgame/cg_drawtools.c @@ -431,10 +431,6 @@ void CG_ColorForHealth( vec4_t hcolor ) { } - - -// bk001205 - code below duplicated in q3_ui/ui-atoms.c -// bk001205 - FIXME: does this belong in ui_shared.c? /* ================= UI_DrawProportionalString2 @@ -594,7 +590,7 @@ UI_DrawBannerString static void UI_DrawBannerString2( int x, int y, const char* str, vec4_t color ) { const char* s; - unsigned char ch; // bk001204 : array subscript + unsigned char ch; float ax; float ay; float aw; @@ -704,7 +700,7 @@ int UI_ProportionalStringWidth( const char* str ) { static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t color, float sizeScale, qhandle_t charset ) { const char* s; - unsigned char ch; // bk001204 - unsigned + unsigned char ch; float ax; float ay; float aw; diff --git a/code/cgame/cg_event.c b/code/cgame/cg_event.c index af1f3594..7467cb62 100644 --- a/code/cgame/cg_event.c +++ b/code/cgame/cg_event.c @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "cg_local.h" // for the voice chats -#ifdef MISSIONPACK // bk001205 +#ifdef MISSIONPACK #include "../../ui/menudef.h" #endif //========================================================================== diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index 9a5d1ded..71598a6a 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -1635,7 +1635,7 @@ typedef enum { SYSTEM_PRINT, CHAT_PRINT, TEAMCHAT_PRINT -} q3print_t; // bk001201 - warning: useless keyword or type name in empty declaration +} q3print_t; int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits); diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 8f1f46c0..3740bca0 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -204,7 +204,7 @@ typedef struct { int cvarFlags; } cvarTable_t; -static cvarTable_t cvarTable[] = { // bk001129 +static cvarTable_t cvarTable[] = { { &cg_ignore, "cg_ignore", "0", 0 }, // used for debugging { &cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE }, { &cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE }, @@ -1357,7 +1357,7 @@ qboolean CG_Asset_Parse(int handle) { continue; } } - return qfalse; // bk001204 - why not? + return qfalse; } void CG_ParseMenu(const char *menuFile) { @@ -1690,7 +1690,7 @@ static void CG_FeederSelection(float feederID, int index) { } #endif -#ifdef MISSIONPACK // bk001204 - only needed there +#ifdef MISSIONPACK static float CG_Cvar_Get(const char *cvar) { char buff[128]; memset(buff, 0, sizeof(buff)); diff --git a/code/cgame/cg_newdraw.c b/code/cgame/cg_newdraw.c index c2ca9d58..25dc3422 100644 --- a/code/cgame/cg_newdraw.c +++ b/code/cgame/cg_newdraw.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#ifndef MISSIONPACK // bk001204 +#ifndef MISSIONPACK #error This file not be used for classic Q3A. #endif @@ -172,7 +172,7 @@ static void CG_DrawPlayerArmorIcon( rectDef_t *rect, qboolean draw2D ) { cent = &cg_entities[cg.snap->ps.clientNum]; ps = &cg.snap->ps; - if ( draw2D || ( !cg_draw3dIcons.integer && cg_drawIcons.integer) ) { // bk001206 - parentheses + if ( draw2D || ( !cg_draw3dIcons.integer && cg_drawIcons.integer) ) { CG_DrawPic( rect->x, rect->y + rect->h/2 + 1, rect->w, rect->h, cgs.media.armorIcon ); } else if (cg_draw3dIcons.integer) { VectorClear( angles ); @@ -209,10 +209,9 @@ static void CG_DrawPlayerArmorValue(rectDef_t *rect, float scale, vec4_t color, } } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static float healthColors[4][4] = { // { 0.2, 1.0, 0.2, 1.0 } , { 1.0, 0.2, 0.2, 1.0 }, {0.5, 0.5, 0.5, 1} }; - // bk0101016 - float const { 1.0f, 0.69f, 0.0f, 1.0f } , // normal { 1.0f, 0.2f, 0.2f, 1.0f }, // low health { 0.5f, 0.5f, 0.5f, 1.0f}, // weapon firing @@ -228,7 +227,7 @@ static void CG_DrawPlayerAmmoIcon( rectDef_t *rect, qboolean draw2D ) { cent = &cg_entities[cg.snap->ps.clientNum]; ps = &cg.snap->ps; - if ( draw2D || (!cg_draw3dIcons.integer && cg_drawIcons.integer) ) { // bk001206 - parentheses + if ( draw2D || (!cg_draw3dIcons.integer && cg_drawIcons.integer) ) { qhandle_t icon; icon = cg_weapons[ cg.predictedPlayerState.weapon ].ammoIcon; if ( icon ) { @@ -1214,8 +1213,6 @@ static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4 vec4_t newColor; glyphInfo_t *glyph; if (text) { -// TTimo: FIXME -// const unsigned char *s = text; // bk001206 - unsigned const char *s = text; float max = *maxX; float useScale; diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index c221a595..61e26c72 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -1752,7 +1752,7 @@ static void CG_PlayerFlag( centity_t *cent, qhandle_t hSkin, refEntity_t *torso } -#ifdef MISSIONPACK // bk001204 +#ifdef MISSIONPACK /* =============== CG_PlayerTokens @@ -2025,7 +2025,7 @@ static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) { // fade the shadow out with height alpha = 1.0 - trace.fraction; - // bk0101022 - hack / FPE - bogus planes? + // hack / FPE - bogus planes? //assert( DotProduct( trace.plane.normal, trace.plane.normal ) != 0.0f ) // add the mark as a temporary, so it goes directly to the renderer diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c index 94cf3327..185a068f 100644 --- a/code/cgame/cg_servercmds.c +++ b/code/cgame/cg_servercmds.c @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // be a valid snapshot this frame #include "cg_local.h" -#include "../../ui/menudef.h" // bk001205 - for Q3_ui as well +#include "../../ui/menudef.h" typedef struct { const char *order; @@ -46,7 +46,7 @@ static const orderTask_t validOrders[] = { static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t); -#ifdef MISSIONPACK // bk001204 +#ifdef MISSIONPACK static int CG_ValidOrder(const char *p) { int i; for (i = 0; i < numValidOrders; i++) { diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c index 810f738e..b53e304d 100644 --- a/code/client/cl_cgame.c +++ b/code/client/cl_cgame.c @@ -697,7 +697,7 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) { return re.inPVS( VMA(1), VMA(2) ); default: - assert(0); // bk010102 + assert(0); Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] ); } return 0; @@ -906,8 +906,6 @@ void CL_FirstSnapshot( void ) { Cbuf_AddText( cl_activeAction->string ); Cvar_Set( "activeAction", "" ); } - - Sys_BeginProfiling(); } /* @@ -1010,9 +1008,35 @@ void CL_SetCGameTime( void ) { // while a normal demo may have different time samples // each time it is played back if ( cl_timedemo->integer ) { + int now = Sys_Milliseconds( ); + int frameDuration; + if (!clc.timeDemoStart) { - clc.timeDemoStart = Sys_Milliseconds(); + clc.timeDemoStart = clc.timeDemoLastFrame = now; + clc.timeDemoMinDuration = INT_MAX; + clc.timeDemoMaxDuration = 0; } + + frameDuration = now - clc.timeDemoLastFrame; + clc.timeDemoLastFrame = now; + + // Ignore the first measurement as it'll always be 0 + if( clc.timeDemoFrames > 0 ) + { + if( frameDuration > clc.timeDemoMaxDuration ) + clc.timeDemoMaxDuration = frameDuration; + + if( frameDuration < clc.timeDemoMinDuration ) + clc.timeDemoMinDuration = frameDuration; + + // 255 ms = about 4fps + if( frameDuration > UCHAR_MAX ) + frameDuration = UCHAR_MAX; + + clc.timeDemoDurations[ ( clc.timeDemoFrames - 1 ) % + MAX_TIMEDEMO_DURATIONS ] = frameDuration; + } + clc.timeDemoFrames++; cl.serverTime = clc.timeDemoBaseTime + clc.timeDemoFrames * 50; } diff --git a/code/client/cl_cin.c b/code/client/cl_cin.c index 7d19ff3c..0e44eee3 100644 --- a/code/client/cl_cin.c +++ b/code/client/cl_cin.c @@ -1072,12 +1072,10 @@ static void RoQReset( void ) { if (currentHandle < 0) return; - Sys_EndStreamedFile(cinTable[currentHandle].iFile); FS_FCloseFile( cinTable[currentHandle].iFile ); FS_FOpenFileRead (cinTable[currentHandle].fileName, &cinTable[currentHandle].iFile, qtrue); // let the background thread start reading ahead - Sys_BeginStreamedFile( cinTable[currentHandle].iFile, 0x10000 ); - Sys_StreamedRead (cin.file, 16, 1, cinTable[currentHandle].iFile); + FS_Read (cin.file, 16, cinTable[currentHandle].iFile); RoQ_init(); cinTable[currentHandle].status = FMV_LOOPED; } @@ -1098,7 +1096,7 @@ static void RoQInterrupt(void) if (currentHandle < 0) return; - Sys_StreamedRead( cin.file, cinTable[currentHandle].RoQFrameSize+8, 1, cinTable[currentHandle].iFile ); + FS_Read( cin.file, cinTable[currentHandle].RoQFrameSize+8, cinTable[currentHandle].iFile ); if ( cinTable[currentHandle].RoQPlayed >= cinTable[currentHandle].ROQSize ) { if (cinTable[currentHandle].holdAtEnd==qfalse) { if (cinTable[currentHandle].looping) { @@ -1214,7 +1212,7 @@ redump: // one more frame hits the dust // // assert(cinTable[currentHandle].RoQFrameSize <= 65536); -// r = Sys_StreamedRead( cin.file, cinTable[currentHandle].RoQFrameSize+8, 1, cinTable[currentHandle].iFile ); +// r = FS_Read( cin.file, cinTable[currentHandle].RoQFrameSize+8, cinTable[currentHandle].iFile ); cinTable[currentHandle].RoQPlayed += cinTable[currentHandle].RoQFrameSize+8; } @@ -1272,7 +1270,6 @@ static void RoQShutdown( void ) { cinTable[currentHandle].status = FMV_IDLE; if (cinTable[currentHandle].iFile) { - Sys_EndStreamedFile( cinTable[currentHandle].iFile ); FS_FCloseFile( cinTable[currentHandle].iFile ); cinTable[currentHandle].iFile = 0; } @@ -1332,7 +1329,6 @@ Fetch and decompress the pending frame e_status CIN_RunCinematic (int handle) { - // bk001204 - init int start = 0; int thisTime = 0; @@ -1472,8 +1468,6 @@ int CIN_PlayCinematic( const char *arg, int x, int y, int w, int h, int systemBi { RoQ_init(); // FS_Read (cin.file, cinTable[currentHandle].RoQFrameSize+8, cinTable[currentHandle].iFile); - // let the background thread start reading ahead - Sys_BeginStreamedFile( cinTable[currentHandle].iFile, 0x10000 ); cinTable[currentHandle].status = FMV_PLAY; Com_DPrintf("trFMV::play(), playing %s\n", arg); diff --git a/code/client/cl_console.c b/code/client/cl_console.c index b8f5f90f..9db8c4d2 100644 --- a/code/client/cl_console.c +++ b/code/client/cl_console.c @@ -71,9 +71,8 @@ Con_ToggleConsole_f ================ */ void Con_ToggleConsole_f (void) { - // closing a full screen console restarts the demo loop + // Can't toggle the console when it's the only thing available if ( cls.state == CA_DISCONNECTED && cls.keyCatchers == KEYCATCH_CONSOLE ) { - CL_StartDemoLoop(); return; } @@ -619,13 +618,13 @@ void Con_DrawSolidConsole( float frac ) { re.SetColor( g_color_table[ColorIndex(COLOR_RED)] ); - i = strlen( SVN_VERSION ); + i = strlen( Q3_VERSION ); for (x=0 ; x -#define OBJTYPE HMODULE -#define OBJLOAD(x) LoadLibrary(x) -#define SYMLOAD(x,y) GetProcAddress(x,y) -#define OBJFREE(x) FreeLibrary(x) - -#elif defined __linux__ || defined __FreeBSD__ || defined MACOS_X || defined __sun -#include -#define OBJTYPE void * -#define OBJLOAD(x) dlopen(x, RTLD_LAZY | RTLD_GLOBAL) -#define SYMLOAD(x,y) dlsym(x,y) -#define OBJFREE(x) dlclose(x) -#else - -#error "Your platform has no lib loading code or it is disabled" -#endif - -#if defined __linux__ || defined __FreeBSD__ || defined MACOS_X -#include -#include -#endif +#include "../sys/sys_loadlib.h" char* (*qcurl_version)(void); @@ -85,7 +55,7 @@ CURLMsg *(*qcurl_multi_info_read)(CURLM *multi_handle, int *msgs_in_queue); const char *(*qcurl_multi_strerror)(CURLMcode); -static OBJTYPE cURLLib = NULL; +static void *cURLLib = NULL; /* ================= @@ -96,7 +66,7 @@ static void *GPA(char *str) { void *rv; - rv = SYMLOAD(cURLLib, str); + rv = Sys_LoadFunction(cURLLib, str); if(!rv) { Com_Printf("Can't load symbol %s\n", str); @@ -124,17 +94,17 @@ qboolean CL_cURL_Init() Com_Printf("Loading \"%s\"...", cl_cURLLib->string); - if( (cURLLib = OBJLOAD(cl_cURLLib->string)) == 0 ) + if( (cURLLib = Sys_LoadLibrary(cl_cURLLib->string)) == 0 ) { #ifdef _WIN32 return qfalse; #else char fn[1024]; - getcwd(fn, sizeof(fn)); + Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) ); strncat(fn, "/", sizeof(fn)-strlen(fn)-1); strncat(fn, cl_cURLLib->string, sizeof(fn)-strlen(fn)-1); - if( (cURLLib = OBJLOAD(fn)) == 0 ) + if( (cURLLib = Sys_LoadLibrary(fn)) == 0 ) { return qfalse; } @@ -189,7 +159,7 @@ void CL_cURL_Shutdown( void ) #if USE_CURL_DLOPEN if(cURLLib) { - OBJFREE(cURLLib); + Sys_UnloadLibrary(cURLLib); cURLLib = NULL; } qcurl_easy_init = NULL; diff --git a/code/client/cl_keys.c b/code/client/cl_keys.c index 1c254db1..11354d27 100644 --- a/code/client/cl_keys.c +++ b/code/client/cl_keys.c @@ -1147,7 +1147,6 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) { } } -#ifndef _WIN32 if (key == K_ENTER) { if (down) @@ -1157,14 +1156,10 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) { Key_ClearStates(); Cvar_SetValue( "r_fullscreen", !Cvar_VariableIntegerValue( "r_fullscreen" ) ); -#if !USE_SDL_VIDEO // This is handled in sdl_glimp.c/GLimp_EndFrame - Cbuf_ExecuteText( EXEC_APPEND, "vid_restart\n"); -#endif return; } } } -#endif // console key is hardcoded, so the user can never unbind it if (key == '`' || key == '~' || @@ -1207,7 +1202,7 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) { if ( cls.state == CA_ACTIVE && !clc.demoplaying ) { VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_INGAME ); } - else { + else if ( cls.state != CA_DISCONNECTED ) { CL_Disconnect_f(); S_StopAllSounds(); VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_MAIN ); @@ -1222,19 +1217,21 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) { // // key up events only perform actions if the game key binding is // a button command (leading + sign). These will be processed even in - // console mode and menu mode, to keep the character from continuing + // console mode and menu mode, to keep the character from continuing // an action started before a mode switch. // - if (!down) { - kb = keys[key].binding; + if (!down ) { + if ( cls.state != CA_DISCONNECTED ) { + kb = keys[key].binding; - CL_AddKeyUpCommands( key, kb, time ); + CL_AddKeyUpCommands( key, kb, time ); - if ( cls.keyCatchers & KEYCATCH_UI && uivm ) { - VM_Call( uivm, UI_KEY_EVENT, key, down ); - } else if ( cls.keyCatchers & KEYCATCH_CGAME && cgvm ) { - VM_Call( cgvm, CG_KEY_EVENT, key, down ); - } + if ( cls.keyCatchers & KEYCATCH_UI && uivm ) { + VM_Call( uivm, UI_KEY_EVENT, key, down ); + } else if ( cls.keyCatchers & KEYCATCH_CGAME && cgvm ) { + VM_Call( cgvm, CG_KEY_EVENT, key, down ); + } + } return; } @@ -1263,7 +1260,7 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) { Com_Printf ("%s is unbound, use controls menu to set.\n" , Key_KeynumToString( key ) ); } - } else if (kb[0] == '+') { + } else if (kb[0] == '+') { int i; char button[1024], *buttonPtr; buttonPtr = button; diff --git a/code/client/cl_main.c b/code/client/cl_main.c index c235a214..fb830ef1 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -43,6 +43,7 @@ cvar_t *cl_freezeDemo; cvar_t *cl_shownet; cvar_t *cl_showSend; cvar_t *cl_timedemo; +cvar_t *cl_timedemoLog; cvar_t *cl_autoRecordDemo; cvar_t *cl_aviFrameRate; cvar_t *cl_aviMotionJpeg; @@ -391,19 +392,96 @@ CLIENT SIDE DEMO PLAYBACK ======================================================================= */ +/* +================= +CL_DemoFrameDurationSDev +================= +*/ +static float CL_DemoFrameDurationSDev( void ) +{ + int i; + int numFrames; + float mean = 0.0f; + float variance = 0.0f; + + if( ( clc.timeDemoFrames - 1 ) > MAX_TIMEDEMO_DURATIONS ) + numFrames = MAX_TIMEDEMO_DURATIONS; + else + numFrames = clc.timeDemoFrames - 1; + + for( i = 0; i < numFrames; i++ ) + mean += clc.timeDemoDurations[ i ]; + mean /= numFrames; + + for( i = 0; i < numFrames; i++ ) + { + float x = clc.timeDemoDurations[ i ]; + + variance += ( ( x - mean ) * ( x - mean ) ); + } + variance /= numFrames; + + return sqrt( variance ); +} + /* ================= CL_DemoCompleted ================= */ -void CL_DemoCompleted( void ) { - if (cl_timedemo && cl_timedemo->integer) { +void CL_DemoCompleted( void ) +{ + char buffer[ MAX_STRING_CHARS ]; + + if( cl_timedemo && cl_timedemo->integer ) + { int time; time = Sys_Milliseconds() - clc.timeDemoStart; - if ( time > 0 ) { - Com_Printf ("%i frames, %3.1f seconds: %3.1f fps\n", clc.timeDemoFrames, - time/1000.0, clc.timeDemoFrames*1000.0 / time); + if( time > 0 ) + { + // Millisecond times are frame durations: + // minimum/average/maximum/std deviation + Com_sprintf( buffer, sizeof( buffer ), + "%i frames %3.1f seconds %3.1f fps %d.0/%.1f/%d.0/%.1f ms\n", + clc.timeDemoFrames, + time/1000.0, + clc.timeDemoFrames*1000.0 / time, + clc.timeDemoMinDuration, + time / (float)clc.timeDemoFrames, + clc.timeDemoMaxDuration, + CL_DemoFrameDurationSDev( ) ); + Com_Printf( buffer ); + + // Write a log of all the frame durations + if( cl_timedemoLog && strlen( cl_timedemoLog->string ) > 0 ) + { + int i; + int numFrames; + fileHandle_t f; + + if( ( clc.timeDemoFrames - 1 ) > MAX_TIMEDEMO_DURATIONS ) + numFrames = MAX_TIMEDEMO_DURATIONS; + else + numFrames = clc.timeDemoFrames - 1; + + f = FS_FOpenFileWrite( cl_timedemoLog->string ); + if( f ) + { + FS_Printf( f, "# %s", buffer ); + + for( i = 0; i < numFrames; i++ ) + FS_Printf( f, "%d\n", clc.timeDemoDurations[ i ] ); + + FS_FCloseFile( f ); + Com_Printf( "%s written\n", cl_timedemoLog->string ); + } + else + { + Com_Printf( "Couldn't open %s for writing\n", + cl_timedemoLog->string ); + } + } } } @@ -658,7 +736,7 @@ void CL_FlushMemory( void ) { Hunk_ClearToMark(); } - CL_StartHunkUsers(); + CL_StartHunkUsers( qfalse ); } /* @@ -671,6 +749,12 @@ memory on the hunk from cgame, ui, and renderer ===================== */ void CL_MapLoading( void ) { + if ( com_dedicated->integer ) { + cls.state = CA_DISCONNECTED; + cls.keyCatchers = KEYCATCH_CONSOLE; + return; + } + if ( !com_cl_running->integer ) { return; } @@ -830,7 +914,7 @@ void CL_ForwardCommandToServer( const char *string ) { } if ( clc.demoplaying || cls.state < CA_CONNECTED || cmd[0] == '+' ) { - Com_Printf ("Unknown command \"%s\"\n", cmd); + Com_Printf ("Unknown command \"%s" S_COLOR_WHITE "\"\n", cmd); return; } @@ -939,26 +1023,22 @@ void CL_RequestAuthorization( void ) { return; } - if ( Cvar_VariableValue( "fs_restrict" ) ) { - Q_strncpyz( nums, "demota", sizeof( nums ) ); - } else { - // only grab the alphanumeric values from the cdkey, to avoid any dashes or spaces - j = 0; - l = strlen( cl_cdkey ); - if ( l > 32 ) { - l = 32; - } - for ( i = 0 ; i < l ; i++ ) { - if ( ( cl_cdkey[i] >= '0' && cl_cdkey[i] <= '9' ) + // only grab the alphanumeric values from the cdkey, to avoid any dashes or spaces + j = 0; + l = strlen( cl_cdkey ); + if ( l > 32 ) { + l = 32; + } + for ( i = 0 ; i < l ; i++ ) { + if ( ( cl_cdkey[i] >= '0' && cl_cdkey[i] <= '9' ) || ( cl_cdkey[i] >= 'a' && cl_cdkey[i] <= 'z' ) || ( cl_cdkey[i] >= 'A' && cl_cdkey[i] <= 'Z' ) - ) { - nums[j] = cl_cdkey[i]; - j++; - } + ) { + nums[j] = cl_cdkey[i]; + j++; } - nums[j] = 0; } + nums[j] = 0; fs = Cvar_Get ("cl_anonymous", "0", CVAR_INIT|CVAR_SYSTEMINFO ); @@ -1276,7 +1356,7 @@ void CL_Vid_Restart_f( void ) { CL_InitRef(); // startup all the client stuff - CL_StartHunkUsers(); + CL_StartHunkUsers( qfalse ); // start the cgame if connected if ( cls.state > CA_CONNECTED && cls.state != CA_CINEMATIC ) { @@ -2316,7 +2396,7 @@ After the server has cleared the hunk, these will need to be restarted This is the only place that any of these functions are called from ============================ */ -void CL_StartHunkUsers( void ) { +void CL_StartHunkUsers( qboolean rendererOnly ) { if (!com_cl_running) { return; } @@ -2330,6 +2410,10 @@ void CL_StartHunkUsers( void ) { CL_InitRenderer(); } + if ( rendererOnly ) { + return; + } + if ( !cls.soundStarted ) { cls.soundStarted = qtrue; S_Init(); @@ -2590,6 +2674,7 @@ void CL_Init( void ) { cl_activeAction = Cvar_Get( "activeAction", "", CVAR_TEMP ); cl_timedemo = Cvar_Get ("timedemo", "0", 0); + cl_timedemoLog = Cvar_Get ("cl_timedemoLog", "", CVAR_ARCHIVE); cl_autoRecordDemo = Cvar_Get ("cl_autoRecordDemo", "0", CVAR_ARCHIVE); cl_aviFrameRate = Cvar_Get ("cl_aviFrameRate", "25", CVAR_ARCHIVE); cl_aviMotionJpeg = Cvar_Get ("cl_aviMotionJpeg", "1", CVAR_ARCHIVE); @@ -3203,11 +3288,6 @@ void CL_GlobalServers_f( void ) { for (i=3; i -#define OBJTYPE HMODULE -#define OBJLOAD(x) LoadLibrary(x) -#define SYMLOAD(x,y) GetProcAddress(x,y) -#define OBJFREE(x) FreeLibrary(x) - -#elif defined __linux__ || defined __FreeBSD__ || defined MACOS_X || defined __sun -#include -#define OBJTYPE void * -#define OBJLOAD(x) dlopen(x, RTLD_LAZY | RTLD_GLOBAL) -#define SYMLOAD(x,y) dlsym(x,y) -#define OBJFREE(x) dlclose(x) -#else - -#error "Your platform has no lib loading code or it is disabled" -#endif - -#if defined __linux__ || defined __FreeBSD__ || defined MACOS_X -#include -#include -#endif +#include "../sys/sys_loadlib.h" LPALENABLE qalEnable; LPALDISABLE qalDisable; @@ -131,7 +102,7 @@ LPALCGETENUMVALUE qalcGetEnumValue; LPALCGETSTRING qalcGetString; LPALCGETINTEGERV qalcGetIntegerv; -static OBJTYPE OpenALLib = NULL; +static void *OpenALLib = NULL; static qboolean alinit_fail = qfalse; @@ -144,7 +115,7 @@ static void *GPA(char *str) { void *rv; - rv = SYMLOAD(OpenALLib, str); + rv = Sys_LoadFunction(OpenALLib, str); if(!rv) { Com_Printf( " Can't load symbol %s\n", str); @@ -169,17 +140,17 @@ qboolean QAL_Init(const char *libname) return qtrue; Com_Printf( "Loading \"%s\"...\n", libname); - if( (OpenALLib = OBJLOAD(libname)) == 0 ) + if( (OpenALLib = Sys_LoadLibrary(libname)) == 0 ) { #ifdef _WIN32 return qfalse; #else char fn[1024]; - getcwd(fn, sizeof(fn)); + Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) ); strncat(fn, "/", sizeof(fn) - strlen(fn) - 1); strncat(fn, libname, sizeof(fn) - strlen(fn) - 1); - if( (OpenALLib = OBJLOAD(fn)) == 0 ) + if( (OpenALLib = Sys_LoadLibrary(fn)) == 0 ) { return qfalse; } @@ -278,7 +249,7 @@ void QAL_Shutdown( void ) { if(OpenALLib) { - OBJFREE(OpenALLib); + Sys_UnloadLibrary(OpenALLib); OpenALLib = NULL; } diff --git a/code/client/snd_dma.c b/code/client/snd_dma.c index 0b6b56d8..e1164a79 100644 --- a/code/client/snd_dma.c +++ b/code/client/snd_dma.c @@ -616,11 +616,7 @@ void S_Base_ClearSoundBuffer( void ) { SNDDMA_BeginPainting (); if (dma.buffer) - // TTimo: due to a particular bug workaround in linux sound code, - // have to optionally use a custom C implementation of Com_Memset - // not affecting win32, we have #define Snd_Memset Com_Memset - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371 - Snd_Memset(dma.buffer, clear, dma.samples * dma.samplebits/8); + Com_Memset(dma.buffer, clear, dma.samples * dma.samplebits/8); SNDDMA_Submit (); } diff --git a/code/client/snd_main.c b/code/client/snd_main.c index ea6bbeb0..25263363 100644 --- a/code/client/snd_main.c +++ b/code/client/snd_main.c @@ -30,6 +30,7 @@ cvar_t *s_volume; cvar_t *s_musicVolume; cvar_t *s_doppler; cvar_t *s_backend; +cvar_t *s_muteWhenMinimized; static soundInterface_t si; @@ -219,6 +220,11 @@ S_Update */ void S_Update( void ) { + if( s_muteWhenMinimized->integer && com_minimized->integer ) { + S_StopAllSounds( ); + return; + } + if( si.Update ) { si.Update( ); } @@ -372,6 +378,7 @@ void S_Init( void ) s_musicVolume = Cvar_Get( "s_musicvolume", "0.25", CVAR_ARCHIVE ); s_doppler = Cvar_Get( "s_doppler", "1", CVAR_ARCHIVE ); s_backend = Cvar_Get( "s_backend", "", CVAR_ROM ); + s_muteWhenMinimized = Cvar_Get( "s_muteWhenMinimized", "0", CVAR_ARCHIVE ); cv = Cvar_Get( "s_initsound", "1", 0 ); if( !cv->integer ) { diff --git a/code/client/snd_mix.c b/code/client/snd_mix.c index 47d5ba5b..62e68414 100644 --- a/code/client/snd_mix.c +++ b/code/client/snd_mix.c @@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA static portable_samplepair_t paintbuffer[PAINTBUFFER_SIZE]; static int snd_vol; -// bk001119 - these not static, required by unix/snd_mixa.s int* snd_p; int snd_linear_count; short* snd_out; diff --git a/code/game/ai_chat.c b/code/game/ai_chat.c index a5137484..a55cbead 100644 --- a/code/game/ai_chat.c +++ b/code/game/ai_chat.c @@ -53,7 +53,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "match.h" //string matching types and vars // for the voice chats -#ifdef MISSIONPACK // bk001205 +#ifdef MISSIONPACK #include "../../ui/menudef.h" #endif diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c index 040dff50..894e295d 100644 --- a/code/game/ai_dmq3.c +++ b/code/game/ai_dmq3.c @@ -3751,7 +3751,6 @@ void BotMapScripts(bot_state_t *bs) { BotSetMovedir ================== */ -// bk001205 - made these static static vec3_t VEC_UP = {0, -1, 0}; static vec3_t MOVEDIR_UP = {0, 0, 1}; static vec3_t VEC_DOWN = {0, -2, 0}; diff --git a/code/game/ai_main.c b/code/game/ai_main.c index b0cfd704..0250dd96 100644 --- a/code/game/ai_main.c +++ b/code/game/ai_main.c @@ -1626,9 +1626,6 @@ int BotInitLibrary(void) { //game directory trap_Cvar_VariableStringBuffer("fs_game", buf, sizeof(buf)); if (strlen(buf)) trap_BotLibVarSet("gamedir", buf); - //cd directory - trap_Cvar_VariableStringBuffer("fs_cdpath", buf, sizeof(buf)); - if (strlen(buf)) trap_BotLibVarSet("cddir", buf); //home directory trap_Cvar_VariableStringBuffer("fs_homepath", buf, sizeof(buf)); if (strlen(buf)) trap_BotLibVarSet("homedir", buf); diff --git a/code/game/bg_lib.c b/code/game/bg_lib.c index 997b9c94..1e65ae54 100644 --- a/code/game/bg_lib.c +++ b/code/game/bg_lib.c @@ -43,7 +43,6 @@ static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = #endif /* LIBC_SCCS and not lint */ -// bk001127 - needed for DLL's #if !defined( Q3_VM ) typedef int cmp_t(const void *, const void *); #endif @@ -189,8 +188,6 @@ loop: SWAPINIT(a, es); // this file is excluded from release builds because of intrinsics - -// bk001211 - gcc errors on compiling strcpy: parse error before `__extension__' #if defined ( Q3_VM ) size_t strlen( const char *string ) { @@ -265,7 +262,7 @@ char *strstr( const char *string, const char *strCharSet ) { } return (char *)0; } -#endif // bk001211 +#endif #if defined ( Q3_VM ) int tolower( int c ) { @@ -754,8 +751,6 @@ double atan2( double y, double x ) { #endif #ifdef Q3_VM -// bk001127 - guarded this tan replacement -// ld: undefined versioned symbol name tan@@GLIBC_2.0 double tan( double x ) { return sin(x) / cos(x); } @@ -844,7 +839,7 @@ double _atof( const char **stringPtr ) { const char *string; float sign; float value; - int c = '0'; // bk001211 - uninitialized use possible + int c = '0'; string = *stringPtr; diff --git a/code/game/bg_misc.c b/code/game/bg_misc.c index 92a1648d..a6ec86e2 100644 --- a/code/game/bg_misc.c +++ b/code/game/bg_misc.c @@ -1177,7 +1177,7 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play Com_Error( ERR_DROP, "BG_CanItemBeGrabbed: IT_BAD" ); default: #ifndef Q3_VM -#ifndef NDEBUG // bk0001204 +#ifndef NDEBUG Com_Printf("BG_CanItemBeGrabbed: unknown enum %d\n", item->giType ); #endif #endif diff --git a/code/game/g_arenas.c b/code/game/g_arenas.c index 1179e6ca..da96c479 100644 --- a/code/game/g_arenas.c +++ b/code/game/g_arenas.c @@ -43,7 +43,7 @@ void UpdateTournamentInfo( void ) { int playerClientNum; int n, accuracy, perfect, msglen; int buflen; -#ifdef MISSIONPACK // bk001205 +#ifdef MISSIONPACK int score1, score2; qboolean won; #endif diff --git a/code/game/g_bot.c b/code/game/g_bot.c index 2ce6fc5f..4c9cf8ce 100644 --- a/code/game/g_bot.c +++ b/code/game/g_bot.c @@ -43,7 +43,6 @@ typedef struct { int spawnTime; } botSpawnQueue_t; -//static int botBeginDelay = 0; // bk001206 - unused, init static botSpawnQueue_t botSpawnQueue[BOT_SPAWN_QUEUE_DEPTH]; vmCvar_t bot_minplayers; diff --git a/code/game/g_client.c b/code/game/g_client.c index 6fe017b4..54142405 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -1129,7 +1129,7 @@ void ClientSpawn(gentity_t *ent) { } eventSequence = client->ps.eventSequence; - memset (client, 0, sizeof(*client)); // bk FIXME: Com_Memset? + Com_Memset (client, 0, sizeof(*client)); client->pers = saved; client->sess = savedSess; diff --git a/code/game/g_main.c b/code/game/g_main.c index f369ffc5..99c12224 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -95,7 +95,6 @@ vmCvar_t g_enableBreath; vmCvar_t g_proxMineTimeout; #endif -// bk001129 - made static to avoid aliasing static cvarTable_t gameCvarTable[] = { // don't override the cheat state set by the system { &g_cheats, "sv_cheats", "", 0, 0, qfalse }, @@ -182,7 +181,6 @@ static cvarTable_t gameCvarTable[] = { }; -// bk001129 - made static to avoid aliasing static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[0] ); @@ -1118,7 +1116,7 @@ Append information about this game to the log file void LogExit( const char *string ) { int i, numSorted; gclient_t *cl; -#ifdef MISSIONPACK // bk001205 +#ifdef MISSIONPACK qboolean won = qtrue; #endif G_LogPrintf( "Exit: %s\n", string ); diff --git a/code/game/g_mem.c b/code/game/g_mem.c index 841fe2f3..dbeb301c 100644 --- a/code/game/g_mem.c +++ b/code/game/g_mem.c @@ -41,7 +41,7 @@ void *G_Alloc( int size ) { } if ( allocPoint + size > POOLSIZE ) { - G_Error( "G_Alloc: failed on allocation of %i bytes\n", size ); // bk010103 - was %u, but is signed + G_Error( "G_Alloc: failed on allocation of %i bytes\n", size ); return NULL; } diff --git a/code/game/g_session.c b/code/game/g_session.c index 89bceec7..26a9e166 100644 --- a/code/game/g_session.c +++ b/code/game/g_session.c @@ -69,8 +69,6 @@ Called on a reconnect void G_ReadSessionData( gclient_t *client ) { char s[MAX_STRING_CHARS]; const char *var; - - // bk001205 - format int teamLeader; int spectatorState; int sessionTeam; @@ -79,16 +77,15 @@ void G_ReadSessionData( gclient_t *client ) { trap_Cvar_VariableStringBuffer( var, s, sizeof(s) ); sscanf( s, "%i %i %i %i %i %i %i", - &sessionTeam, // bk010221 - format + &sessionTeam, &client->sess.spectatorTime, - &spectatorState, // bk010221 - format + &spectatorState, &client->sess.spectatorClient, &client->sess.wins, &client->sess.losses, - &teamLeader // bk010221 - format + &teamLeader ); - // bk001205 - format issues client->sess.sessionTeam = (team_t)sessionTeam; client->sess.spectatorState = (spectatorState_t)spectatorState; client->sess.teamLeader = (qboolean)teamLeader; diff --git a/code/jpeg-6/jcdctmgr.c b/code/jpeg-6/jcdctmgr.c index f31a96f2..debba72b 100644 --- a/code/jpeg-6/jcdctmgr.c +++ b/code/jpeg-6/jcdctmgr.c @@ -179,95 +179,6 @@ start_pass_fdctmgr (j_compress_ptr cinfo) * blocks. The quantized coefficients are returned in coef_blocks[]. */ -#if 0 // bk001204 -METHODDEF void -forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks) -/* This version is used for integer DCT implementations. */ -{ - /* This routine is heavily used, so it's worth coding it tightly. */ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - forward_DCT_method_ptr do_dct = fdct->do_dct; - DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no]; - DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ - JDIMENSION bi; - - sample_data += start_row; /* fold in the vertical offset once */ - - for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { - /* Load data into workspace, applying unsigned->signed conversion */ - { register DCTELEM *workspaceptr; - register JSAMPROW elemptr; - register int elemr; - - workspaceptr = workspace; - for (elemr = 0; elemr < DCTSIZE; elemr++) { - elemptr = sample_data[elemr] + start_col; -#if DCTSIZE == 8 /* unroll the inner loop */ - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; -#else - { register int elemc; - for (elemc = DCTSIZE; elemc > 0; elemc--) { - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - } - } -#endif - } - } - - /* Perform the DCT */ - (*do_dct) (workspace); - - /* Quantize/descale the coefficients, and store into coef_blocks[] */ - { register DCTELEM temp, qval; - register int i; - register JCOEFPTR output_ptr = coef_blocks[bi]; - - for (i = 0; i < DCTSIZE2; i++) { - qval = divisors[i]; - temp = workspace[i]; - /* Divide the coefficient value by qval, ensuring proper rounding. - * Since C does not specify the direction of rounding for negative - * quotients, we have to force the dividend positive for portability. - * - * In most files, at least half of the output values will be zero - * (at default quantization settings, more like three-quarters...) - * so we should ensure that this case is fast. On many machines, - * a comparison is enough cheaper than a divide to make a special test - * a win. Since both inputs will be nonnegative, we need only test - * for a < b to discover whether a/b is 0. - * If your machine's division is fast enough, define FAST_DIVIDE. - */ -#ifdef FAST_DIVIDE -#define DIVIDE_BY(a,b) a /= b -#else -#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 -#endif - if (temp < 0) { - temp = -temp; - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - temp = -temp; - } else { - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - } - output_ptr[i] = (JCOEF) temp; - } - } - } -} -#endif // 0 - #ifdef DCT_FLOAT_SUPPORTED METHODDEF void diff --git a/code/jpeg-6/jcmainct.c b/code/jpeg-6/jcmainct.c index 42a02d09..aa8ba9b5 100644 --- a/code/jpeg-6/jcmainct.c +++ b/code/jpeg-6/jcmainct.c @@ -68,7 +68,6 @@ METHODDEF void process_data_buffer_main METHODDEF void start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) { - // bk001204 - don't use main... my_main_ptr jmain = (my_main_ptr) cinfo->main; /* Do nothing in raw-data mode. */ @@ -115,7 +114,6 @@ process_data_simple_main (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail) { - // bk001204 - don't use main my_main_ptr jmain = (my_main_ptr) cinfo->main; while (jmain->cur_iMCU_row < cinfo->total_iMCU_rows) { @@ -246,7 +244,6 @@ process_data_buffer_main (j_compress_ptr cinfo, GLOBAL void jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) { - // bk001204 - don't use main my_main_ptr jmain; int ci; jpeg_component_info *compptr; diff --git a/code/jpeg-6/jdmainct.c b/code/jpeg-6/jdmainct.c index 6cb0b7a0..e50a4717 100644 --- a/code/jpeg-6/jdmainct.c +++ b/code/jpeg-6/jdmainct.c @@ -159,7 +159,6 @@ alloc_funny_pointers (j_decompress_ptr cinfo) * This is done only once, not once per pass. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, rgroup; int M = cinfo->min_DCT_scaled_size; @@ -201,7 +200,6 @@ make_funny_pointers (j_decompress_ptr cinfo) * This will be repeated at the beginning of each pass. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, i, rgroup; int M = cinfo->min_DCT_scaled_size; @@ -242,7 +240,6 @@ set_wraparound_pointers (j_decompress_ptr cinfo) * This changes the pointer list state from top-of-image to the normal state. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, i, rgroup; int M = cinfo->min_DCT_scaled_size; @@ -272,7 +269,6 @@ set_bottom_pointers (j_decompress_ptr cinfo) * Also sets rowgroups_avail to indicate number of nondummy row groups in row. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, i, rgroup, iMCUheight, rows_left; jpeg_component_info *compptr; @@ -310,7 +306,6 @@ set_bottom_pointers (j_decompress_ptr cinfo) METHODDEF void start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; switch (pass_mode) { @@ -351,7 +346,6 @@ process_data_simple_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; JDIMENSION rowgroups_avail; @@ -392,7 +386,6 @@ process_data_context_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; /* Read input data if we haven't filled the main buffer yet */ @@ -482,7 +475,6 @@ process_data_crank_post (j_decompress_ptr cinfo, GLOBAL void jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) { - // bk001204 - no use main my_main_ptr jmain; int ci, rgroup, ngroups; jpeg_component_info *compptr; diff --git a/code/libs/win32/libSDL.dll.a b/code/libs/win32/libSDL.dll.a new file mode 100755 index 0000000000000000000000000000000000000000..f2523faf1a90f5fbca8c4ae8223f8ddab11ba365 GIT binary patch literal 123944 zcmeI5eUM~Fap0>*pSQOsWB~$%ERW?ymSwS;*`3+l0a@03?yh!bcb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XYwh+$eEG2uDkly_ymnTVNN?RQ|+fOzA}&G_NqFk_i_l0rU?h;jH! zW0~X%Cq-*~l!WJiQ|=u-ub_l>;)u1q8{RttCZsD4CraldB|P_=GATDHQdaVhx43gd+< zeXNA%ZByRs_8P;=(e}`=B3*G=QA!^x;n~{Bg!k|oF|5d*b5Hgm;_VFu&&rjdgt_FB zV-@-M*~#N#ub3U)F`^pr(}Yd6k;-p^3 YiT}NL<4f?UGi;biu5eI{&L-vm1K{4+hyVZp literal 0 HcmV?d00001 diff --git a/code/libs/win32/libSDL.la b/code/libs/win32/libSDL.la new file mode 100755 index 00000000..40b4192f --- /dev/null +++ b/code/libs/win32/libSDL.la @@ -0,0 +1,35 @@ +# libSDL.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='../bin/SDL.dll' + +# Names of this library. +library_names='libSDL.dll.a' + +# The name of the static archive. +old_library='libSDL.a' + +# Libraries that this one depends upon. +dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid' + +# Version information for libSDL. +current=11 +age=11 +revision=1 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/Users/hercules/tmp/SDL-1.2.12/lib' diff --git a/code/libs/win32/libSDLmain.a b/code/libs/win32/libSDLmain.a new file mode 100644 index 0000000000000000000000000000000000000000..a628ec44e8e18ce3e53e4792b0b9fab446d97080 GIT binary patch literal 207032 zcmeFa2Ygjk`u@8ksHiCRv5hi{1x3g?IVlhXLJ}YvNJv7n#gLppBqT8>q3Ae90X2iD zV{h0;9sAfTVi~(L>daWjI)b9u>sasmJnve2zb83ye(m1R@817CpO5%G?|Rm|S6^$d zz4pnkM%T61&mFVrh{5TfSgas1GAA!TFK6)JYzEnX2M^9E@cJV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-**xQZzb&FfFx4pdfN83DITH8ckpZX-*MK$z>-(vO^Kx)C0mu@2(@PsD171;;vMzdUPW4`8qthFX z`U=F(8*P2WdM%iEc6olGpPhGfbZhj6&t8y5+>KKP``k~C^7+qu@8d=MzTPptZ~pFj z=G3*6KW;kv;xCGRuT+U&^v&9^@cN9j*4@VENgO}FzOx8QK6dPKQDei+jlIzfu7o>s z@WraC)FiNK`gm})ud_q6_JFNXtbQ|*^`y6P)xWdh4@U9=14eg* za2yzbc#hMgIG-#(yrU$8R+nKhCeOHcm+WaZ8<%QcXYB7?#{uCG`&r-mj8+V0izcz<#5^ z{tctTk6M2dCgxZ<+c12srM{*vA|YHc`X~H zyp}^!Udvx3<+WUr@>+(Zyq3RD>YG;IzbdK!MCxY@_TNc;!&3i~)K6RLt*&UGTp4)x`VT$mxPn@MHYn$M@}$`u7(Jd*?D!AC%NDmejA5)UTG*zb&bsy~?sD zCG`u}3HyzbYTYF4yrllmcN6xDqfGsy7s-QPEva88<Glb2T!ZMxZ_Pju$oQ9S{b3EJ{WA)&Jx*#$oOfzCLSCAId{Bd+3tiv@ z;1xHlX2uGgUeaFGzlB>-s&eLc8aaQB?Jhca!6&xk^>#aYI}y9{0yyufx3v#JCz}73^Li UeG_VKUilAMX4Hp~_vT0cAN+G*mjD0& literal 0 HcmV?d00001 diff --git a/code/null/null_client.c b/code/null/null_client.c index a41063b0..e70b3b8d 100644 --- a/code/null/null_client.c +++ b/code/null/null_client.c @@ -53,7 +53,7 @@ void CL_MapLoading( void ) { } qboolean CL_GameCommand( void ) { - return qfalse; // bk001204 - non-void + return qfalse; } void CL_KeyEvent (int key, qboolean down, unsigned time) { @@ -81,11 +81,9 @@ void CL_CDDialog( void ) { void CL_FlushMemory( void ) { } -void CL_StartHunkUsers( void ) { +void CL_StartHunkUsers( qboolean rendererOnly ) { } -// bk001119 - added new dummy for sv_init.c void CL_ShutdownAll(void) {} -// bk001208 - added new dummy (RC4) qboolean CL_CDKeyValidate( const char *key, const char *checksum ) { return qtrue; } diff --git a/code/null/null_snddma.c b/code/null/null_snddma.c index 97f99e21..19182014 100644 --- a/code/null/null_snddma.c +++ b/code/null/null_snddma.c @@ -47,7 +47,6 @@ void SNDDMA_Submit(void) { } -// bk001119 - added boolean flag, match client/snd_public.h sfxHandle_t S_RegisterSound( const char *name, qboolean compressed ) { return 0; diff --git a/code/q3_ui/ui_atoms.c b/code/q3_ui/ui_atoms.c index 3ae12e0c..e66996d3 100644 --- a/code/q3_ui/ui_atoms.c +++ b/code/q3_ui/ui_atoms.c @@ -330,8 +330,6 @@ static int propMapB[26][3] = { #define PROPB_SPACE_WIDTH 12 #define PROPB_HEIGHT 36 -// bk001205 - code below duplicated in cgame/cg_drawtools.c -// bk001205 - FIXME: does this belong in ui_shared.c? /* ================= UI_DrawBannerString @@ -340,7 +338,7 @@ UI_DrawBannerString static void UI_DrawBannerString2( int x, int y, const char* str, vec4_t color ) { const char* s; - unsigned char ch; // bk001204 - unsigned + unsigned char ch; float ax; float ay; float aw; @@ -450,10 +448,10 @@ int UI_ProportionalStringWidth( const char* str ) { static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t color, float sizeScale, qhandle_t charset ) { const char* s; - unsigned char ch; // bk001204 - unsigned + unsigned char ch; float ax; float ay; - float aw = 0; // bk001204 - init + float aw = 0; float ah; float frow; float fcol; @@ -831,7 +829,6 @@ void UI_SetActiveMenu( uiMenuCommand_t menu ) { UI_InGameMenu(); return; - // bk001204 case UIMENU_TEAM: case UIMENU_POSTGAME: default: diff --git a/code/q3_ui/ui_connect.c b/code/q3_ui/ui_connect.c index 990b5fb8..0db89a21 100644 --- a/code/q3_ui/ui_connect.c +++ b/code/q3_ui/ui_connect.c @@ -82,15 +82,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { downloadCount = trap_Cvar_VariableValue( "cl_downloadCount" ); downloadTime = trap_Cvar_VariableValue( "cl_downloadTime" ); -#if 0 // bk010104 - fprintf( stderr, "\n\n-----------------------------------------------\n"); - fprintf( stderr, "DB: downloadSize: %16d\n", downloadSize ); - fprintf( stderr, "DB: downloadCount: %16d\n", downloadCount ); - fprintf( stderr, "DB: downloadTime: %16d\n", downloadTime ); - fprintf( stderr, "DB: UI realtime: %16d\n", uis.realtime ); // bk - fprintf( stderr, "DB: UI frametime: %16d\n", uis.frametime ); // bk -#endif - leftWidth = width = UI_ProportionalStringWidth( dlText ) * UI_ProportionalSizeScale( style ); width = UI_ProportionalStringWidth( etaText ) * UI_ProportionalSizeScale( style ); if (width > leftWidth) leftWidth = width; @@ -118,10 +109,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { UI_DrawProportionalString( leftWidth, 192, va("(%s of %s copied)", dlSizeBuf, totalSizeBuf), style, color_white ); } else { - // bk010108 - //float elapsedTime = (float)(uis.realtime - downloadTime); // current - start (msecs) - //elapsedTime = elapsedTime * 0.001f; // in seconds - //if ( elapsedTime <= 0.0f ) elapsedTime == 0.0f; if ( (uis.realtime - downloadTime) / 1000) { xferRate = downloadCount / ((uis.realtime - downloadTime) / 1000); //xferRate = (int)( ((float)downloadCount) / elapsedTime); @@ -129,9 +116,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { xferRate = 0; } - //fprintf( stderr, "DB: elapsedTime: %16.8f\n", elapsedTime ); // bk - //fprintf( stderr, "DB: xferRate: %16d\n", xferRate ); // bk - UI_ReadableSize( xferRateBuf, sizeof xferRateBuf, xferRate ); // Extrapolate estimated completion time @@ -141,7 +125,7 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { // We do it in K (/1024) because we'd overflow around 4MB n = (n - (((downloadCount/1024) * n) / (downloadSize/1024))) * 1000; - UI_PrintTime ( dlTimeBuf, sizeof dlTimeBuf, n ); // bk010104 + UI_PrintTime ( dlTimeBuf, sizeof dlTimeBuf, n ); //(n - (((downloadCount/1024) * n) / (downloadSize/1024))) * 1000); UI_DrawProportionalString( leftWidth, 160, diff --git a/code/q3_ui/ui_controls2.c b/code/q3_ui/ui_controls2.c index ba9528c7..907ad00f 100644 --- a/code/q3_ui/ui_controls2.c +++ b/code/q3_ui/ui_controls2.c @@ -223,7 +223,7 @@ typedef struct static controls_t s_controls; -static vec4_t controls_binding_color = {1.00f, 0.43f, 0.00f, 1.00f}; // bk: Win32 C4305 +static vec4_t controls_binding_color = {1.00f, 0.43f, 0.00f, 1.00f}; static bind_t g_bindings[] = { @@ -561,7 +561,6 @@ static void Controls_Update( void ) { // disable all controls in all groups for( i = 0; i < C_MAX; i++ ) { controls = g_controls[i]; - // bk001204 - parentheses for( j = 0; (control = controls[j]) ; j++ ) { control->flags |= (QMF_HIDDEN|QMF_INACTIVE); } @@ -570,14 +569,12 @@ static void Controls_Update( void ) { controls = g_controls[s_controls.section]; // enable controls in active group (and count number of items for vertical centering) - // bk001204 - parentheses for( j = 0; (control = controls[j]) ; j++ ) { control->flags &= ~(QMF_GRAYED|QMF_HIDDEN|QMF_INACTIVE); } // position controls y = ( SCREEN_HEIGHT - j * SMALLCHAR_HEIGHT ) / 2; - // bk001204 - parentheses for( j = 0; (control = controls[j]) ; j++, y += SMALLCHAR_HEIGHT ) { control->x = 320; control->y = y; diff --git a/code/q3_ui/ui_gameinfo.c b/code/q3_ui/ui_gameinfo.c index 50f7c573..be0497bb 100644 --- a/code/q3_ui/ui_gameinfo.c +++ b/code/q3_ui/ui_gameinfo.c @@ -811,10 +811,5 @@ void UI_InitGameinfo( void ) { UI_LoadArenas(); UI_LoadBots(); - if( (trap_Cvar_VariableValue( "fs_restrict" )) || (ui_numSpecialSinglePlayerArenas == 0 && ui_numSinglePlayerArenas == 4) ) { - uis.demoversion = qtrue; - } - else { - uis.demoversion = qfalse; - } + uis.demoversion = qfalse; } diff --git a/code/q3_ui/ui_local.h b/code/q3_ui/ui_local.h index 03b63e05..3e1cdf19 100644 --- a/code/q3_ui/ui_local.h +++ b/code/q3_ui/ui_local.h @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/q_shared.h" #include "../renderer/tr_types.h" //NOTE: include the ui_public.h from the new UI -#include "../ui/ui_public.h" // bk001205 - yes, do have to use this +#include "../ui/ui_public.h" //redefine to old API version #undef UI_API_VERSION #define UI_API_VERSION 4 @@ -678,7 +678,7 @@ int trap_MemoryRemaining( void ); void trap_GetCDKey( char *buf, int buflen ); void trap_SetCDKey( char *buf ); -qboolean trap_VerifyCDKey( const char *key, const char *chksum); // bk001208 - RC4 +qboolean trap_VerifyCDKey( const char *key, const char *chksum); void trap_SetPbClStatus( int status ); diff --git a/code/q3_ui/ui_main.c b/code/q3_ui/ui_main.c index 9327617e..734166fe 100644 --- a/code/q3_ui/ui_main.c +++ b/code/q3_ui/ui_main.c @@ -79,7 +79,7 @@ intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, UI_DrawConnectScreen( arg0 ); return 0; case UI_HASUNIQUECDKEY: // mod authors need to observe this - return qtrue; // bk010117 - change this to qfalse for mods! + return qtrue; // change this to qfalse for mods! } return -1; @@ -156,7 +156,6 @@ vmCvar_t ui_server16; vmCvar_t ui_cdkeychecked; -// bk001129 - made static to avoid aliasing. static cvarTable_t cvarTable[] = { { &ui_ffa_fraglimit, "ui_ffa_fraglimit", "20", CVAR_ARCHIVE }, { &ui_ffa_timelimit, "ui_ffa_timelimit", "0", CVAR_ARCHIVE }, @@ -216,7 +215,6 @@ static cvarTable_t cvarTable[] = { { &ui_cdkeychecked, "ui_cdkeychecked", "0", CVAR_ROM } }; -// bk001129 - made static to avoid aliasing static int cvarTableSize = sizeof(cvarTable) / sizeof(cvarTable[0]); diff --git a/code/q3_ui/ui_mods.c b/code/q3_ui/ui_mods.c index 97561155..e1443759 100644 --- a/code/q3_ui/ui_mods.c +++ b/code/q3_ui/ui_mods.c @@ -106,42 +106,6 @@ static void UI_Mods_ParseInfos( char *modDir, char *modDesc ) { } -#if 0 // bk001204 - unused -/* -=============== -UI_Mods_LoadModsFromFile -=============== -*/ -static void UI_Mods_LoadModsFromFile( char *filename ) { - int len; - fileHandle_t f; - char buf[1024]; - - len = trap_FS_FOpenFile( filename, &f, FS_READ ); - if ( !f ) { - trap_Print( va( S_COLOR_RED "file not found: %s\n", filename ) ); - return; - } - if ( len >= sizeof(buf) ) { - trap_Print( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i", filename, len, sizeof(buf) ) ); - trap_FS_FCloseFile( f ); - return; - } - - trap_FS_Read( buf, len, f ); - buf[len] = 0; - trap_FS_FCloseFile( f ); - - len = strlen( filename ); - if( !Q_stricmp(filename + len - 4,".mod") ) { - filename[len-4] = '\0'; - } - - UI_Mods_ParseInfos( filename, buf ); -} -#endif - - /* =============== UI_Mods_LoadMods diff --git a/code/q3_ui/ui_qmenu.c b/code/q3_ui/ui_qmenu.c index fa0cc754..e955c51c 100644 --- a/code/q3_ui/ui_qmenu.c +++ b/code/q3_ui/ui_qmenu.c @@ -327,7 +327,6 @@ void Bitmap_Draw( menubitmap_s *b ) if (b->shader) UI_DrawHandlePic( x, y, w, h, b->shader ); - // bk001204 - parentheses if ( ( (b->generic.flags & QMF_PULSE) || (b->generic.flags & QMF_PULSEIFFOCUS) ) && (Menu_ItemAtCursor( b->generic.parent ) == b)) diff --git a/code/q3_ui/ui_team.c b/code/q3_ui/ui_team.c index 0bd73162..e15dde63 100644 --- a/code/q3_ui/ui_team.c +++ b/code/q3_ui/ui_team.c @@ -47,16 +47,6 @@ typedef struct static teammain_t s_teammain; -// bk001204 - unused -//static menuframework_s s_teammain_menu; -//static menuaction_s s_teammain_orders; -//static menuaction_s s_teammain_voice; -//static menuaction_s s_teammain_joinred; -//static menuaction_s s_teammain_joinblue; -//static menuaction_s s_teammain_joingame; -//static menuaction_s s_teammain_spectate; - - /* =============== TeamMain_MenuEvent diff --git a/code/q3_ui/ui_video.c b/code/q3_ui/ui_video.c index 44198b94..1a7e7f70 100644 --- a/code/q3_ui/ui_video.c +++ b/code/q3_ui/ui_video.c @@ -238,13 +238,6 @@ GRAPHICS OPTIONS MENU #define GRAPHICSOPTIONS_ACCEPT0 "menu/art/accept_0" #define GRAPHICSOPTIONS_ACCEPT1 "menu/art/accept_1" -static const char *s_drivers[] = -{ - OPENGL_DRIVER_NAME, - _3DFX_DRIVER_NAME, - NULL -}; - #define ID_BACK2 101 #define ID_FULLSCREEN 102 #define ID_LIST 103 @@ -489,24 +482,9 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) trap_Cvar_SetValue( "r_allowExtensions", s_graphicsoptions.allow_extensions.curvalue ); trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue ); trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue ); - trap_Cvar_Set( "r_glDriver", ( char * ) s_drivers[s_graphicsoptions.driver.curvalue] ); - switch ( s_graphicsoptions.colordepth.curvalue ) - { - case 0: - trap_Cvar_SetValue( "r_colorbits", 0 ); - trap_Cvar_SetValue( "r_depthbits", 0 ); - trap_Cvar_SetValue( "r_stencilbits", 0 ); - break; - case 1: - trap_Cvar_SetValue( "r_colorbits", 16 ); - trap_Cvar_SetValue( "r_depthbits", 16 ); - trap_Cvar_SetValue( "r_stencilbits", 0 ); - break; - case 2: - trap_Cvar_SetValue( "r_colorbits", 32 ); - trap_Cvar_SetValue( "r_depthbits", 24 ); - break; - } + trap_Cvar_SetValue( "r_colorbits", 0 ); + trap_Cvar_SetValue( "r_depthbits", 0 ); + trap_Cvar_SetValue( "r_stencilbits", 0 ); trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue ); if ( s_graphicsoptions.geometry.curvalue == 2 ) diff --git a/code/qcommon/cm_trace.c b/code/qcommon/cm_trace.c index 44ca5f82..a2873b1c 100644 --- a/code/qcommon/cm_trace.c +++ b/code/qcommon/cm_trace.c @@ -41,7 +41,7 @@ BASIC MATH RotatePoint ================ */ -void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // bk: FIXME +void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // FIXME vec3_t tvec; VectorCopy(point, tvec); @@ -55,7 +55,7 @@ void RotatePoint(vec3_t point, /*const*/ vec3_t matrix[3]) { // bk: FIXME TransposeMatrix ================ */ -void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]) { // bk: FIXME +void TransposeMatrix(/*const*/ vec3_t matrix[3], vec3_t transpose[3]) { // FIXME int i, j; for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { @@ -1067,17 +1067,6 @@ void CM_TraceThroughTree( traceWork_t *tw, int num, float p1f, float p2f, vec3_t if ( tw->isPoint ) { offset = 0; } else { -#if 0 // bk010201 - DEAD - // an axial brush right behind a slanted bsp plane - // will poke through when expanded, so adjust - // by sqrt(3) - offset = fabs(tw->extents[0]*plane->normal[0]) + - fabs(tw->extents[1]*plane->normal[1]) + - fabs(tw->extents[2]*plane->normal[2]); - - offset *= 2; - offset = tw->maxOffset; -#endif // this is silly offset = 2048; } @@ -1276,7 +1265,7 @@ void CM_Trace( trace_t *results, const vec3_t start, const vec3_t end, vec3_t mi // if (start[0] == end[0] && start[1] == end[1] && start[2] == end[2]) { if ( model ) { -#ifdef ALWAYS_BBOX_VS_BBOX // bk010201 - FIXME - compile time flag? +#ifdef ALWAYS_BBOX_VS_BBOX // FIXME - compile time flag? if ( model == BOX_MODEL_HANDLE || model == CAPSULE_MODEL_HANDLE) { tw.sphere.use = qfalse; CM_TestInLeaf( &tw, &cmod->leaf ); diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 3c376568..c8aaaeb6 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -56,7 +56,6 @@ static fileHandle_t logfile; fileHandle_t com_journalFile; // events are written here fileHandle_t com_journalDataFile; // config files are written here -cvar_t *com_viewlog; cvar_t *com_speeds; cvar_t *com_developer; cvar_t *com_dedicated; @@ -80,9 +79,9 @@ cvar_t *sv_paused; cvar_t *cl_packetdelay; cvar_t *sv_packetdelay; cvar_t *com_cameraMode; -#if defined(_WIN32) && defined(_DEBUG) -cvar_t *com_noErrorInterrupt; -#endif +cvar_t *com_ansiColor; +cvar_t *com_unfocused; +cvar_t *com_minimized; // com_speeds times int time_game; @@ -161,10 +160,9 @@ void QDECL Com_Printf( const char *fmt, ... ) { return; } - // echo to console if we're not a dedicated server - if ( com_dedicated && !com_dedicated->integer ) { - CL_ConsolePrint( msg ); - } +#ifndef DEDICATED + CL_ConsolePrint( msg ); +#endif // echo to dedicated console and early console Sys_Print( msg ); @@ -246,16 +244,6 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { static int errorCount; int currentTime; -#if defined(_WIN32) && defined(_DEBUG) - if ( code != ERR_DISCONNECT && code != ERR_NEED_CD ) { - if (!com_noErrorInterrupt->integer) { - __asm { - int 0x03 - } - } - } -#endif - // when we are running automated scripts, make sure we // know if anything failed if ( com_buildScript && com_buildScript->integer ) { @@ -1126,7 +1114,6 @@ typedef struct memstatic_s { byte mem[2]; } memstatic_t; -// bk001204 - initializer brackets memstatic_t emptystring = { {(sizeof(memblock_t)+2 + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'\0', '\0'} }; memstatic_t numberstring[] = { @@ -1385,7 +1372,6 @@ Com_InitZoneMemory */ void Com_InitSmallZoneMemory( void ) { s_smallZoneTotal = 512 * 1024; - // bk001205 - was malloc smallzone = calloc( s_smallZoneTotal, 1 ); if ( !smallzone ) { Com_Error( ERR_FATAL, "Small zone data failed to allocate %1.1f megs", (float)s_smallZoneTotal / (1024*1024) ); @@ -1411,7 +1397,6 @@ void Com_InitZoneMemory( void ) { s_zoneTotal = cv->integer * 1024 * 1024; } - // bk001205 - was malloc mainzone = calloc( s_zoneTotal, 1 ); if ( !mainzone ) { Com_Error( ERR_FATAL, "Zone data failed to allocate %i megs", s_zoneTotal / (1024*1024) ); @@ -1536,8 +1521,6 @@ void Com_InitHunkMemory( void ) { s_hunkTotal = cv->integer * 1024 * 1024; } - - // bk001205 - was malloc s_hunkData = calloc( s_hunkTotal + 31, 1 ); if ( !s_hunkData ) { Com_Error( ERR_FATAL, "Hunk data failed to allocate %i megs", s_hunkTotal / (1024*1024) ); @@ -1901,14 +1884,9 @@ journaled file =================================================================== */ -// bk001129 - here we go again: upped from 64 -// FIXME TTimo blunt upping from 256 to 1024 -// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=5 #define MAX_PUSHED_EVENTS 1024 -// bk001129 - init, also static static int com_pushedEventsHead = 0; static int com_pushedEventsTail = 0; -// bk001129 - static static sysEvent_t com_pushedEvents[MAX_PUSHED_EVENTS]; /* @@ -1941,6 +1919,125 @@ void Com_InitJournaling( void ) { } } +/* +======================================================================== + +EVENT LOOP + +======================================================================== +*/ + +#define MAX_QUEUED_EVENTS 256 +#define MASK_QUEUED_EVENTS ( MAX_QUEUED_EVENTS - 1 ) + +static sysEvent_t eventQueue[ MAX_QUEUED_EVENTS ]; +static int eventHead = 0; +static int eventTail = 0; +static byte sys_packetReceived[ MAX_MSGLEN ]; + +/* +================ +Com_QueueEvent + +A time of 0 will get the current time +Ptr should either be null, or point to a block of data that can +be freed by the game later. +================ +*/ +void Com_QueueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ) +{ + sysEvent_t *ev; + + ev = &eventQueue[ eventHead & MASK_QUEUED_EVENTS ]; + + if ( eventHead - eventTail >= MAX_QUEUED_EVENTS ) + { + Com_Printf("Com_QueueEvent: overflow\n"); + // we are discarding an event, but don't leak memory + if ( ev->evPtr ) + { + Z_Free( ev->evPtr ); + } + eventTail++; + } + + eventHead++; + + if ( time == 0 ) + { + time = Sys_Milliseconds(); + } + + ev->evTime = time; + ev->evType = type; + ev->evValue = value; + ev->evValue2 = value2; + ev->evPtrLength = ptrLength; + ev->evPtr = ptr; +} + +/* +================ +Com_GetSystemEvent + +================ +*/ +sysEvent_t Com_GetSystemEvent( void ) +{ + sysEvent_t ev; + char *s; + msg_t netmsg; + netadr_t adr; + + // return if we have data + if ( eventHead > eventTail ) + { + eventTail++; + return eventQueue[ ( eventTail - 1 ) & MASK_QUEUED_EVENTS ]; + } + + // check for console commands + s = Sys_ConsoleInput(); + if ( s ) + { + char *b; + int len; + + len = strlen( s ) + 1; + b = Z_Malloc( len ); + strcpy( b, s ); + Com_QueueEvent( 0, SE_CONSOLE, 0, 0, len, b ); + } + + // check for network packets + MSG_Init( &netmsg, sys_packetReceived, sizeof( sys_packetReceived ) ); + if ( Sys_GetPacket ( &adr, &netmsg ) ) + { + netadr_t *buf; + int len; + + // copy out to a seperate buffer for qeueing + len = sizeof( netadr_t ) + netmsg.cursize; + buf = Z_Malloc( len ); + *buf = adr; + memcpy( buf+1, netmsg.data, netmsg.cursize ); + Com_QueueEvent( 0, SE_PACKET, 0, 0, len, buf ); + } + + // return if we have data + if ( eventHead > eventTail ) + { + eventTail++; + return eventQueue[ ( eventTail - 1 ) & MASK_QUEUED_EVENTS ]; + } + + // create an empty event to return + memset( &ev, 0, sizeof( ev ) ); + ev.evTime = Sys_Milliseconds(); + + return ev; +} + /* ================= Com_GetRealEvent @@ -1964,7 +2061,7 @@ sysEvent_t Com_GetRealEvent( void ) { } } } else { - ev = Sys_GetEvent(); + ev = Com_GetSystemEvent(); // write the journal value out if needed if ( com_journal->integer == 1 ) { @@ -1990,7 +2087,6 @@ sysEvent_t Com_GetRealEvent( void ) { Com_InitPushEvent ================= */ -// bk001129 - added void Com_InitPushEvent( void ) { // clear the static buffer array // this requires SE_NONE to be accepted as a valid but NOP event @@ -2009,7 +2105,7 @@ Com_PushEvent */ void Com_PushEvent( sysEvent_t *event ) { sysEvent_t *ev; - static int printedWarning = 0; // bk001129 - init, bk001204 - explicit int + static int printedWarning = 0; ev = &com_pushedEvents[ com_pushedEventsHead & (MAX_PUSHED_EVENTS-1) ]; @@ -2110,7 +2206,6 @@ int Com_EventLoop( void ) { switch ( ev.evType ) { default: - // bk001129 - was ev.evTime Com_Error( ERR_FATAL, "Com_EventLoop: bad event type %i", ev.evType ); break; case SE_NONE: @@ -2322,7 +2417,7 @@ void Com_AppendCDKey( const char *filename ) { } } -#ifndef DEDICATED // bk001204 +#ifndef DEDICATED /* ================= Com_WriteCDKey @@ -2378,7 +2473,7 @@ static void Com_DetectAltivec(void) static qboolean altivec = qfalse; static qboolean detected = qfalse; if (!detected) { - altivec = Sys_DetectAltivec(); + altivec = ( Sys_GetProcessorFeatures( ) & CF_ALTIVEC ); detected = qtrue; } @@ -2397,13 +2492,17 @@ Com_Init void Com_Init( char *commandLine ) { char *s; - Com_Printf( "%s %s %s\n", SVN_VERSION, PLATFORM_STRING, __DATE__ ); + Com_Printf( "%s %s %s\n", Q3_VERSION, PLATFORM_STRING, __DATE__ ); if ( setjmp (abortframe) ) { Sys_Error ("Error during initialization"); } - // bk001129 - do this before anything else decides to push events + // Clear queues + Com_Memset( &eventQueue[ 0 ], 0, MAX_QUEUED_EVENTS * sizeof( sysEvent_t ) ); + Com_Memset( &sys_packetReceived[ 0 ], 0, MAX_MSGLEN * sizeof( byte ) ); + + // do this before anything else decides to push events Com_InitPushEvent(); Com_InitSmallZoneMemory(); @@ -2473,7 +2572,6 @@ void Com_Init( char *commandLine ) { com_fixedtime = Cvar_Get ("fixedtime", "0", CVAR_CHEAT); com_showtrace = Cvar_Get ("com_showtrace", "0", CVAR_CHEAT); com_dropsim = Cvar_Get ("com_dropsim", "0", CVAR_CHEAT); - com_viewlog = Cvar_Get( "viewlog", "0", CVAR_CHEAT ); com_speeds = Cvar_Get ("com_speeds", "0", 0); com_timedemo = Cvar_Get ("timedemo", "0", CVAR_CHEAT); com_cameraMode = Cvar_Get ("com_cameraMode", "0", CVAR_CHEAT); @@ -2485,19 +2583,13 @@ void Com_Init( char *commandLine ) { com_sv_running = Cvar_Get ("sv_running", "0", CVAR_ROM); com_cl_running = Cvar_Get ("cl_running", "0", CVAR_ROM); com_buildScript = Cvar_Get( "com_buildScript", "0", 0 ); + com_ansiColor = Cvar_Get( "com_ansiColor", "0", CVAR_ARCHIVE ); + + com_unfocused = Cvar_Get( "com_unfocused", "0", CVAR_ROM ); + com_minimized = Cvar_Get( "com_minimized", "0", CVAR_ROM ); com_introPlayed = Cvar_Get( "com_introplayed", "0", CVAR_ARCHIVE); -#if defined(_WIN32) && defined(_DEBUG) - com_noErrorInterrupt = Cvar_Get( "com_noErrorInterrupt", "0", 0 ); -#endif - - if ( com_dedicated->integer ) { - if ( !com_viewlog->integer ) { - Cvar_Set( "viewlog", "1" ); - } - } - if ( com_developer && com_developer->integer ) { Cmd_AddCommand ("error", Com_Error_f); Cmd_AddCommand ("crash", Com_Crash_f ); @@ -2516,10 +2608,9 @@ void Com_Init( char *commandLine ) { SV_Init(); com_dedicated->modified = qfalse; - if ( !com_dedicated->integer ) { - CL_Init(); - Sys_ShowConsole( com_viewlog->integer, qfalse ); - } +#ifndef DEDICATED + CL_Init(); +#endif // set com_frameTime so that if a map is started on the // command line it will still be able to count on com_frameTime @@ -2541,7 +2632,7 @@ void Com_Init( char *commandLine ) { // start in full screen ui mode Cvar_Set("r_uiFullScreen", "1"); - CL_StartHunkUsers(); + CL_StartHunkUsers( qfalse ); // make sure single player is off by default Cvar_Set("ui_singlePlayerActive", "0"); @@ -2550,9 +2641,9 @@ void Com_Init( char *commandLine ) { // always set the cvar, but only print the info if it makes sense. Com_DetectAltivec(); - #if idppc +#if idppc Com_Printf ("Altivec support is %s\n", com_altivec->integer ? "enabled" : "disabled"); - #endif +#endif Com_Printf ("--- Common Initialization Complete ---\n"); } @@ -2583,7 +2674,7 @@ Writes key bindings and archived cvars to config file if modified =============== */ void Com_WriteConfiguration( void ) { -#ifndef DEDICATED // bk001204 +#ifndef DEDICATED cvar_t *fs; #endif // if we are quiting without fully initializing, make sure @@ -2599,7 +2690,7 @@ void Com_WriteConfiguration( void ) { Com_WriteConfigToFile( "q3config.cfg" ); - // bk001119 - tentative "not needed for dedicated" + // not needed for dedicated #ifndef DEDICATED fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO ); if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) { @@ -2708,8 +2799,6 @@ void Com_Frame( void ) { return; // an ERR_DROP was thrown } - // bk001204 - init to zero. - // also: might be clobbered by `longjmp' or `vfork' timeBeforeFirstEvents =0; timeBeforeServer =0; timeBeforeEvents =0; @@ -2723,14 +2812,6 @@ void Com_Frame( void ) { // write config file if anything changed Com_WriteConfiguration(); - // if "viewlog" has been modified, show or hide the log console - if ( com_viewlog->modified ) { - if ( !com_dedicated->value ) { - Sys_ShowConsole( com_viewlog->integer, qfalse ); - } - com_viewlog->modified = qfalse; - } - // // main event loop // @@ -2783,42 +2864,39 @@ void Com_Frame( void ) { Cvar_Get( "dedicated", "0", 0 ); com_dedicated->modified = qfalse; if ( !com_dedicated->integer ) { - CL_Init(); - Sys_ShowConsole( com_viewlog->integer, qfalse ); - } else { - CL_Shutdown(); - Sys_ShowConsole( 1, qtrue ); + SV_Shutdown( "dedicated set to 0" ); + CL_FlushMemory(); } } +#ifndef DEDICATED // // client system // - if ( !com_dedicated->integer ) { - // - // run event loop a second time to get server to client packets - // without a frame of latency - // - if ( com_speeds->integer ) { - timeBeforeEvents = Sys_Milliseconds (); - } - Com_EventLoop(); - Cbuf_Execute (); - - - // - // client side - // - if ( com_speeds->integer ) { - timeBeforeClient = Sys_Milliseconds (); - } - - CL_Frame( msec ); - - if ( com_speeds->integer ) { - timeAfter = Sys_Milliseconds (); - } + // + // run event loop a second time to get server to client packets + // without a frame of latency + // + if ( com_speeds->integer ) { + timeBeforeEvents = Sys_Milliseconds (); } + Com_EventLoop(); + Cbuf_Execute (); + + + // + // client side + // + if ( com_speeds->integer ) { + timeBeforeClient = Sys_Milliseconds (); + } + + CL_Frame( msec ); + + if ( com_speeds->integer ) { + timeAfter = Sys_Milliseconds (); + } +#endif // // report timing information diff --git a/code/qcommon/cvar.c b/code/qcommon/cvar.c index 6e229c43..23c014e6 100644 --- a/code/qcommon/cvar.c +++ b/code/qcommon/cvar.c @@ -511,8 +511,20 @@ qboolean Cvar_Command( void ) { if ( Cmd_Argc() == 1 ) { Com_TruncateLongString( string, v->string ); Com_TruncateLongString( resetString, v->resetString ); - Com_Printf ("\"%s\" is:\"%s" S_COLOR_WHITE "\" default:\"%s" S_COLOR_WHITE "\"\n", - v->name, string, resetString ); + Com_Printf ("\"%s\" is:\"%s" S_COLOR_WHITE "\"", + v->name, string ); + + if ( !( v->flags & CVAR_ROM ) ) { + if ( !Q_stricmp( string, resetString ) ) { + Com_Printf (", the default" ); + } else { + Com_Printf (" default:\"%s" S_COLOR_WHITE "\"", + resetString ); + } + } + + Com_Printf ("\n"); + if ( v->latchedString ) { Com_TruncateLongString( latchedString, v->latchedString ); Com_Printf( "latched: \"%s\"\n", latchedString ); @@ -895,8 +907,8 @@ updates an interpreted modules' version of a cvar ===================== */ void Cvar_Update( vmCvar_t *vmCvar ) { - cvar_t *cv = NULL; // bk001129 - assert(vmCvar); // bk + cvar_t *cv = NULL; + assert(vmCvar); if ( (unsigned)vmCvar->handle >= cvar_numIndexes ) { Com_Error( ERR_DROP, "Cvar_Update: handle out of range" ); @@ -911,16 +923,10 @@ void Cvar_Update( vmCvar_t *vmCvar ) { return; // variable might have been cleared by a cvar_restart } vmCvar->modificationCount = cv->modificationCount; - // bk001129 - mismatches. if ( strlen(cv->string)+1 > MAX_CVAR_VALUE_STRING ) Com_Error( ERR_DROP, "Cvar_Update: src %s length %zd exceeds MAX_CVAR_VALUE_STRING", cv->string, strlen(cv->string)); - // bk001212 - Q_strncpyz guarantees zero padding and dest[MAX_CVAR_VALUE_STRING-1]==0 - // bk001129 - paranoia. Never trust the destination string. - // bk001129 - beware, sizeof(char*) is always 4 (for cv->string). - // sizeof(vmCvar->string) always MAX_CVAR_VALUE_STRING - //Q_strncpyz( vmCvar->string, cv->string, sizeof( vmCvar->string ) ); // id Q_strncpyz( vmCvar->string, cv->string, MAX_CVAR_VALUE_STRING ); vmCvar->value = cv->value; diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 8220f6f5..af5eaec5 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -51,15 +51,6 @@ command line to allow code debugging in a different directory. Basepath cannot be modified at all after startup. Any files that are created (demos, screenshots, etc) will be created reletive to the base path, so base path should usually be writable. -The "cd path" is the path to an alternate hierarchy that will be searched if a file -is not located in the base path. A user can do a partial install that copies some -data to a base path created on their hard drive and leave the rest on the cd. Files -are never writen to the cd path. It defaults to a value set by the installer, like -"e:\quake3", but it can be overridden with "+set fs_cdpath g:\quake3". - -If a user runs the game directly from a CD, the base path would be on the CD. This -should still function correctly, but all file writes will fail (harmlessly). - The "home path" is the path used for all write access. On win32 systems we have "base path" == "home path", but on *nix systems the base installation is usually readonly, and "home path" points to ~/.q3a or similar @@ -93,21 +84,6 @@ trying to restrict demo / oem versions of the game with code changes. Demo / oe should be exactly the same executables as release versions, but with different data that automatically restricts where game media can come from to prevent add-ons from working. -After the paths are initialized, quake will look for the product.txt file. If not -found and verified, the game will run in restricted mode. In restricted mode, only -files contained in demoq3/pak0.pk3 will be available for loading, and only if the zip header is -verified to not have been modified. A single exception is made for q3config.cfg. Files -can still be written out in restricted mode, so screenshots and demos are allowed. -Restricted mode can be tested by setting "+set fs_restrict 1" on the command line, even -if there is a valid product.txt under the basepath or cdpath. - -If not running in restricted mode, and a file is not found in any local filesystem, -an attempt will be made to download it and save it under the base path. - -If the "fs_copyfiles" cvar is set to 1, then every time a file is sourced from the cd -path, it will be copied over to the base path. This is a development aid to help build -test releases and to copy working sets over slow network links. - File search order: when FS_FOpenFileRead gets called it will go through the fs_searchpaths structure and stop on the first successful hit. fs_searchpaths is built with successive calls to FS_AddGameDirectory @@ -260,10 +236,7 @@ static cvar_t *fs_debug; static cvar_t *fs_homepath; static cvar_t *fs_basepath; static cvar_t *fs_basegame; -static cvar_t *fs_cdpath; -static cvar_t *fs_copyfiles; static cvar_t *fs_gamedirvar; -static cvar_t *fs_restrict; static searchpath_t *fs_searchpaths; static int fs_readCount; // total bytes read static int fs_loadCount; // total files read @@ -362,7 +335,7 @@ int FS_LoadStack( void ) { return fs_loadStack; } - + /* ================ return a hash value for the filename @@ -676,8 +649,9 @@ fileHandle_t FS_SV_FOpenFileWrite( const char *filename ) { /* =========== FS_SV_FOpenFileRead -search for a file somewhere below the home path, base path or cd path -we search in that order, matching FS_SV_FOpenFileRead order + +Search for a file somewhere below the home path then base path +in that order =========== */ int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp ) { @@ -696,7 +670,7 @@ int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp ) { // don't let sound stutter S_ClearSoundBuffer(); - // search homepath + // search homepath ospath = FS_BuildOSPath( fs_homepath->string, filename, "" ); // remove trailing slash ospath[strlen(ospath)-1] = '\0'; @@ -707,48 +681,30 @@ int FS_SV_FOpenFileRead( const char *filename, fileHandle_t *fp ) { fsh[f].handleFiles.file.o = fopen( ospath, "rb" ); fsh[f].handleSync = qfalse; - if (!fsh[f].handleFiles.file.o) - { - // NOTE TTimo on non *nix systems, fs_homepath == fs_basepath, might want to avoid - if (Q_stricmp(fs_homepath->string,fs_basepath->string)) - { - // search basepath - ospath = FS_BuildOSPath( fs_basepath->string, filename, "" ); - ospath[strlen(ospath)-1] = '\0'; + if (!fsh[f].handleFiles.file.o) + { + // If fs_homepath == fs_basepath, don't bother + if (Q_stricmp(fs_homepath->string,fs_basepath->string)) + { + // search basepath + ospath = FS_BuildOSPath( fs_basepath->string, filename, "" ); + ospath[strlen(ospath)-1] = '\0'; - if ( fs_debug->integer ) - { - Com_Printf( "FS_SV_FOpenFileRead (fs_basepath): %s\n", ospath ); - } + if ( fs_debug->integer ) + { + Com_Printf( "FS_SV_FOpenFileRead (fs_basepath): %s\n", ospath ); + } - fsh[f].handleFiles.file.o = fopen( ospath, "rb" ); - fsh[f].handleSync = qfalse; + fsh[f].handleFiles.file.o = fopen( ospath, "rb" ); + fsh[f].handleSync = qfalse; + } - if ( !fsh[f].handleFiles.file.o ) - { - f = 0; - } - } - } + if ( !fsh[f].handleFiles.file.o ) + { + f = 0; + } + } - if (!fsh[f].handleFiles.file.o) { - // search cd path - ospath = FS_BuildOSPath( fs_cdpath->string, filename, "" ); - ospath[strlen(ospath)-1] = '\0'; - - if (fs_debug->integer) - { - Com_Printf( "FS_SV_FOpenFileRead (fs_cdpath) : %s\n", ospath ); - } - - fsh[f].handleFiles.file.o = fopen( ospath, "rb" ); - fsh[f].handleSync = qfalse; - - if( !fsh[f].handleFiles.file.o ) { - f = 0; - } - } - *fp = f; if (f) { return FS_filelength(f); @@ -836,9 +792,6 @@ void FS_FCloseFile( fileHandle_t f ) { Com_Error( ERR_FATAL, "Filesystem call made without initialization\n" ); } - if (fsh[f].streamed) { - Sys_EndStreamedFile(f); - } if (fsh[f].zipFile == qtrue) { unzCloseCurrentFile( fsh[f].handleFiles.file.z ); if ( fsh[f].handleFiles.unique ) { @@ -1155,12 +1108,12 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF // if we are running restricted, the only files we // will allow to come from the directory are .cfg files l = strlen( filename ); - // FIXME TTimo I'm not sure about the fs_numServerPaks test - // if you are using FS_ReadFile to find out if a file exists, - // this test can make the search fail although the file is in the directory - // I had the problem on https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=8 - // turned out I used FS_FileExists instead - if ( fs_restrict->integer || fs_numServerPaks ) { + // FIXME TTimo I'm not sure about the fs_numServerPaks test + // if you are using FS_ReadFile to find out if a file exists, + // this test can make the search fail although the file is in the directory + // I had the problem on https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=8 + // turned out I used FS_FileExists instead + if ( fs_numServerPaks ) { if ( Q_stricmp( filename + l - 4, ".cfg" ) // for config files && Q_stricmp( filename + l - 5, ".menu" ) // menu files @@ -1186,7 +1139,7 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF && Q_stricmp( filename + l - 4, ".dat" ) ) { // for journal files fs_fakeChkSum = random(); } - + Q_strncpyz( fsh[*file].name, filename, sizeof( fsh[*file].name ) ); fsh[*file].zipFile = qfalse; if ( fs_debug->integer ) { @@ -1194,15 +1147,6 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF dir->path, dir->gamedir ); } - // if we are getting it from the cdpath, optionally copy it - // to the basepath - if ( fs_copyfiles->integer && !Q_stricmp( dir->path, fs_cdpath->string ) ) { - char *copypath; - - copypath = FS_BuildOSPath( fs_basepath->string, dir->gamedir, filename ); - FS_CopyFile( netpath, copypath ); - } - return FS_filelength (*file); } } @@ -1235,7 +1179,7 @@ int FS_Read2( void *buffer, int len, fileHandle_t f ) { if (fsh[f].streamed) { int r; fsh[f].streamed = qfalse; - r = Sys_StreamedRead( buffer, len, 1, f); + r = FS_Read( buffer, len, f ); fsh[f].streamed = qtrue; return r; } else { @@ -1371,7 +1315,7 @@ int FS_Seek( fileHandle_t f, long offset, int origin ) { if (fsh[f].streamed) { fsh[f].streamed = qfalse; - Sys_StreamSeek( f, offset, origin ); + FS_Seek( f, offset, origin ); fsh[f].streamed = qtrue; } @@ -1946,7 +1890,7 @@ char **FS_ListFilteredFiles( const char *path, const char *extension, char *filt char *name; // don't scan directories for files if we are pure or restricted - if ( fs_restrict->integer || fs_numServerPaks ) { + if ( fs_numServerPaks ) { continue; } else { netpath = FS_BuildOSPath( search->dir->path, search->dir->gamedir, path ); @@ -2060,58 +2004,51 @@ FIXME TTimo those two should move to common.c next to Sys_ListFiles */ static unsigned int Sys_CountFileList(char **list) { - int i = 0; + int i = 0; - if (list) - { - while (*list) - { - list++; - i++; - } - } - return i; + if (list) + { + while (*list) + { + list++; + i++; + } + } + return i; } -static char** Sys_ConcatenateFileLists( char **list0, char **list1, char **list2 ) +static char** Sys_ConcatenateFileLists( char **list0, char **list1 ) { - int totalLength = 0; - char** cat = NULL, **dst, **src; + int totalLength = 0; + char** cat = NULL, **dst, **src; - totalLength += Sys_CountFileList(list0); - totalLength += Sys_CountFileList(list1); - totalLength += Sys_CountFileList(list2); + totalLength += Sys_CountFileList(list0); + totalLength += Sys_CountFileList(list1); - /* Create new list. */ - dst = cat = Z_Malloc( ( totalLength + 1 ) * sizeof( char* ) ); + /* Create new list. */ + dst = cat = Z_Malloc( ( totalLength + 1 ) * sizeof( char* ) ); - /* Copy over lists. */ - if (list0) - { - for (src = list0; *src; src++, dst++) - *dst = *src; - } - if (list1) - { - for (src = list1; *src; src++, dst++) - *dst = *src; - } - if (list2) - { - for (src = list2; *src; src++, dst++) - *dst = *src; - } + /* Copy over lists. */ + if (list0) + { + for (src = list0; *src; src++, dst++) + *dst = *src; + } + if (list1) + { + for (src = list1; *src; src++, dst++) + *dst = *src; + } - // Terminate the list - *dst = NULL; + // Terminate the list + *dst = NULL; - // Free our old lists. - // NOTE: not freeing their content, it's been merged in dst and still being used - if (list0) Z_Free( list0 ); - if (list1) Z_Free( list1 ); - if (list2) Z_Free( list2 ); + // Free our old lists. + // NOTE: not freeing their content, it's been merged in dst and still being used + if (list0) Z_Free( list0 ); + if (list1) Z_Free( list1 ); - return cat; + return cat; } /* @@ -2124,116 +2061,106 @@ The directories are searched in base path, cd path and home path ================ */ int FS_GetModList( char *listbuf, int bufsize ) { - int nMods, i, j, nTotal, nLen, nPaks, nPotential, nDescLen; - char **pFiles = NULL; - char **pPaks = NULL; - char *name, *path; - char descPath[MAX_OSPATH]; - fileHandle_t descHandle; + int nMods, i, j, nTotal, nLen, nPaks, nPotential, nDescLen; + char **pFiles = NULL; + char **pPaks = NULL; + char *name, *path; + char descPath[MAX_OSPATH]; + fileHandle_t descHandle; - int dummy; - char **pFiles0 = NULL; - char **pFiles1 = NULL; - char **pFiles2 = NULL; - qboolean bDrop = qfalse; + int dummy; + char **pFiles0 = NULL; + char **pFiles1 = NULL; + qboolean bDrop = qfalse; - *listbuf = 0; - nMods = nPotential = nTotal = 0; + *listbuf = 0; + nMods = nPotential = nTotal = 0; - pFiles0 = Sys_ListFiles( fs_homepath->string, NULL, NULL, &dummy, qtrue ); - pFiles1 = Sys_ListFiles( fs_basepath->string, NULL, NULL, &dummy, qtrue ); - pFiles2 = Sys_ListFiles( fs_cdpath->string, NULL, NULL, &dummy, qtrue ); - // we searched for mods in the three paths - // it is likely that we have duplicate names now, which we will cleanup below - pFiles = Sys_ConcatenateFileLists( pFiles0, pFiles1, pFiles2 ); - nPotential = Sys_CountFileList(pFiles); + pFiles0 = Sys_ListFiles( fs_homepath->string, NULL, NULL, &dummy, qtrue ); + pFiles1 = Sys_ListFiles( fs_basepath->string, NULL, NULL, &dummy, qtrue ); + // we searched for mods in the three paths + // it is likely that we have duplicate names now, which we will cleanup below + pFiles = Sys_ConcatenateFileLists( pFiles0, pFiles1 ); + nPotential = Sys_CountFileList(pFiles); - for ( i = 0 ; i < nPotential ; i++ ) { - name = pFiles[i]; - // NOTE: cleaner would involve more changes - // ignore duplicate mod directories - if (i!=0) { - bDrop = qfalse; - for(j=0; jstring, name, "" ); - nPaks = 0; - pPaks = Sys_ListFiles(path, ".pk3", NULL, &nPaks, qfalse); - Sys_FreeFileList( pPaks ); // we only use Sys_ListFiles to check wether .pk3 files are present + for ( i = 0 ; i < nPotential ; i++ ) { + name = pFiles[i]; + // NOTE: cleaner would involve more changes + // ignore duplicate mod directories + if (i!=0) { + bDrop = qfalse; + for(j=0; jstring, name, "" ); + nPaks = 0; + pPaks = Sys_ListFiles(path, ".pk3", NULL, &nPaks, qfalse); + Sys_FreeFileList( pPaks ); // we only use Sys_ListFiles to check wether .pk3 files are present - /* Try on cd path */ - if( nPaks <= 0 ) { - path = FS_BuildOSPath( fs_cdpath->string, name, "" ); - nPaks = 0; - pPaks = Sys_ListFiles( path, ".pk3", NULL, &nPaks, qfalse ); - Sys_FreeFileList( pPaks ); - } + /* try on home path */ + if ( nPaks <= 0 ) + { + path = FS_BuildOSPath( fs_homepath->string, name, "" ); + nPaks = 0; + pPaks = Sys_ListFiles( path, ".pk3", NULL, &nPaks, qfalse ); + Sys_FreeFileList( pPaks ); + } - /* try on home path */ - if ( nPaks <= 0 ) - { - path = FS_BuildOSPath( fs_homepath->string, name, "" ); - nPaks = 0; - pPaks = Sys_ListFiles( path, ".pk3", NULL, &nPaks, qfalse ); - Sys_FreeFileList( pPaks ); - } + if (nPaks > 0) { + nLen = strlen(name) + 1; + // nLen is the length of the mod path + // we need to see if there is a description available + descPath[0] = '\0'; + strcpy(descPath, name); + strcat(descPath, "/description.txt"); + nDescLen = FS_SV_FOpenFileRead( descPath, &descHandle ); + if ( nDescLen > 0 && descHandle) { + FILE *file; + file = FS_FileForHandle(descHandle); + Com_Memset( descPath, 0, sizeof( descPath ) ); + nDescLen = fread(descPath, 1, 48, file); + if (nDescLen >= 0) { + descPath[nDescLen] = '\0'; + } + FS_FCloseFile(descHandle); + } else { + strcpy(descPath, name); + } + nDescLen = strlen(descPath) + 1; - if (nPaks > 0) { - nLen = strlen(name) + 1; - // nLen is the length of the mod path - // we need to see if there is a description available - descPath[0] = '\0'; - strcpy(descPath, name); - strcat(descPath, "/description.txt"); - nDescLen = FS_SV_FOpenFileRead( descPath, &descHandle ); - if ( nDescLen > 0 && descHandle) { - FILE *file; - file = FS_FileForHandle(descHandle); - Com_Memset( descPath, 0, sizeof( descPath ) ); - nDescLen = fread(descPath, 1, 48, file); - if (nDescLen >= 0) { - descPath[nDescLen] = '\0'; - } - FS_FCloseFile(descHandle); - } else { - strcpy(descPath, name); - } - nDescLen = strlen(descPath) + 1; + if (nTotal + nLen + 1 + nDescLen + 1 < bufsize) { + strcpy(listbuf, name); + listbuf += nLen; + strcpy(listbuf, descPath); + listbuf += nDescLen; + nTotal += nLen + nDescLen; + nMods++; + } + else { + break; + } + } + } + } + Sys_FreeFileList( pFiles ); - if (nTotal + nLen + 1 + nDescLen + 1 < bufsize) { - strcpy(listbuf, name); - listbuf += nLen; - strcpy(listbuf, descPath); - listbuf += nDescLen; - nTotal += nLen + nDescLen; - nMods++; - } - else { - break; - } - } - } - } - Sys_FreeFileList( pFiles ); - - return nMods; + return nMods; } @@ -2300,7 +2227,7 @@ Ignore case and seprator char distinctions */ int FS_PathCmp( const char *s1, const char *s2 ) { int c1, c2; - + do { c1 = *s1++; c2 = *s2++; @@ -2429,9 +2356,6 @@ void FS_Path_f( void ) { /* ============ FS_TouchFile_f - -The only purpose of this function is to allow game script files to copy -arbitrary files furing an "fs_copyfiles 1" run. ============ */ void FS_TouchFile_f( void ) { @@ -2477,8 +2401,7 @@ static void FS_AddGameDirectory( const char *path, const char *dir ) { int numfiles; char **pakfiles; - // this fixes the case where fs_basepath is the same as fs_cdpath - // which happens on full installs + // Unique for ( sp = fs_searchpaths ; sp ; sp = sp->next ) { if ( sp->dir && !Q_stricmp(sp->dir->path, path) && !Q_stricmp(sp->dir->gamedir, dir)) { return; // we've already got this one @@ -2609,10 +2532,10 @@ qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) { // Make sure the server cannot make us write to non-quake3 directories. if(FS_CheckDirTraversal(fs_serverReferencedPakNames[i])) - { + { Com_Printf("WARNING: Invalid download name %s\n", fs_serverReferencedPakNames[i]); - continue; - } + continue; + } for ( sp = fs_searchpaths ; sp ; sp = sp->next ) { if ( sp->pack && sp->pack->checksum == fs_serverReferencedPaks[i] ) { @@ -2624,54 +2547,55 @@ qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) { if ( !havepak && fs_serverReferencedPakNames[i] && *fs_serverReferencedPakNames[i] ) { // Don't got it - if (dlstring) - { - // We need this to make sure we won't hit the end of the buffer or the server could - // overwrite non-pk3 files on clients by writing so much crap into neededpaks that - // Q_strcat cuts off the .pk3 extension. - - origpos += strlen(origpos); - - // Remote name - Q_strcat( neededpaks, len, "@"); - Q_strcat( neededpaks, len, fs_serverReferencedPakNames[i] ); - Q_strcat( neededpaks, len, ".pk3" ); + if (dlstring) + { + // We need this to make sure we won't hit the end of the buffer or the server could + // overwrite non-pk3 files on clients by writing so much crap into neededpaks that + // Q_strcat cuts off the .pk3 extension. - // Local name - Q_strcat( neededpaks, len, "@"); - // Do we have one with the same name? - if ( FS_SV_FileExists( va( "%s.pk3", fs_serverReferencedPakNames[i] ) ) ) - { - char st[MAX_ZPATH]; - // We already have one called this, we need to download it to another name - // Make something up with the checksum in it - Com_sprintf( st, sizeof( st ), "%s.%08x.pk3", fs_serverReferencedPakNames[i], fs_serverReferencedPaks[i] ); - Q_strcat( neededpaks, len, st ); - } else - { - Q_strcat( neededpaks, len, fs_serverReferencedPakNames[i] ); - Q_strcat( neededpaks, len, ".pk3" ); - } - - // Find out whether it might have overflowed the buffer and don't add this file to the - // list if that is the case. - if(strlen(origpos) + (origpos - neededpaks) >= len - 1) - { - *origpos = '\0'; - break; - } - } - else - { - Q_strcat( neededpaks, len, fs_serverReferencedPakNames[i] ); - Q_strcat( neededpaks, len, ".pk3" ); - // Do we have one with the same name? - if ( FS_SV_FileExists( va( "%s.pk3", fs_serverReferencedPakNames[i] ) ) ) - { - Q_strcat( neededpaks, len, " (local file exists with wrong checksum)"); - } - Q_strcat( neededpaks, len, "\n"); - } + origpos += strlen(origpos); + + // Remote name + Q_strcat( neededpaks, len, "@"); + Q_strcat( neededpaks, len, fs_serverReferencedPakNames[i] ); + Q_strcat( neededpaks, len, ".pk3" ); + + // Local name + Q_strcat( neededpaks, len, "@"); + // Do we have one with the same name? + if ( FS_SV_FileExists( va( "%s.pk3", fs_serverReferencedPakNames[i] ) ) ) + { + char st[MAX_ZPATH]; + // We already have one called this, we need to download it to another name + // Make something up with the checksum in it + Com_sprintf( st, sizeof( st ), "%s.%08x.pk3", fs_serverReferencedPakNames[i], fs_serverReferencedPaks[i] ); + Q_strcat( neededpaks, len, st ); + } + else + { + Q_strcat( neededpaks, len, fs_serverReferencedPakNames[i] ); + Q_strcat( neededpaks, len, ".pk3" ); + } + + // Find out whether it might have overflowed the buffer and don't add this file to the + // list if that is the case. + if(strlen(origpos) + (origpos - neededpaks) >= len - 1) + { + *origpos = '\0'; + break; + } + } + else + { + Q_strcat( neededpaks, len, fs_serverReferencedPakNames[i] ); + Q_strcat( neededpaks, len, ".pk3" ); + // Do we have one with the same name? + if ( FS_SV_FileExists( va( "%s.pk3", fs_serverReferencedPakNames[i] ) ) ) + { + Q_strcat( neededpaks, len, " (local file exists with wrong checksum)"); + } + Q_strcat( neededpaks, len, "\n"); + } } } @@ -2731,7 +2655,7 @@ void FS_Shutdown( qboolean closemfp ) { void Com_AppendCDKey( const char *filename ); void Com_ReadCDKey( const char *filename ); - + /* ================ FS_ReorderPurePaks @@ -2745,14 +2669,14 @@ static void FS_ReorderPurePaks( void ) int i; searchpath_t **p_insert_index, // for linked list reordering **p_previous; // when doing the scan - + // only relevant when connected to pure server if ( !fs_numServerPaks ) return; - + fs_reordered = qfalse; - - p_insert_index = &fs_searchpaths; // we insert in order at the beginning of the list + + p_insert_index = &fs_searchpaths; // we insert in order at the beginning of the list for ( i = 0 ; i < fs_numServerPaks ; i++ ) { p_previous = p_insert_index; // track the pointer-to-current-item for (s = *p_insert_index; s; s = s->next) { @@ -2767,7 +2691,7 @@ static void FS_ReorderPurePaks( void ) p_insert_index = &s->next; break; // iterate to next server pack } - p_previous = &s->next; + p_previous = &s->next; } } } @@ -2777,43 +2701,35 @@ static void FS_ReorderPurePaks( void ) FS_Startup ================ */ -static void FS_Startup( const char *gameName ) { - const char *homePath; +static void FS_Startup( const char *gameName ) +{ + const char *homePath; cvar_t *fs; Com_Printf( "----- FS_Startup -----\n" ); fs_debug = Cvar_Get( "fs_debug", "0", 0 ); - fs_copyfiles = Cvar_Get( "fs_copyfiles", "0", CVAR_INIT ); - fs_cdpath = Cvar_Get ("fs_cdpath", Sys_DefaultCDPath(), CVAR_INIT ); fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT ); fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); - homePath = Sys_DefaultHomePath(); - if (!homePath || !homePath[0]) { + homePath = Sys_DefaultHomePath(); + if (!homePath || !homePath[0]) { homePath = fs_basepath->string; } fs_homepath = Cvar_Get ("fs_homepath", homePath, CVAR_INIT ); fs_gamedirvar = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO ); - fs_restrict = Cvar_Get ("fs_restrict", "", CVAR_INIT ); // add search path elements in reverse priority order - if (fs_cdpath->string[0]) { - FS_AddGameDirectory( fs_cdpath->string, gameName ); - } if (fs_basepath->string[0]) { FS_AddGameDirectory( fs_basepath->string, gameName ); } - // fs_homepath is somewhat particular to *nix systems, only add if relevant - // NOTE: same filtering below for mods and basegame - if (fs_basepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + // fs_homepath is somewhat particular to *nix systems, only add if relevant + // NOTE: same filtering below for mods and basegame + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { FS_AddGameDirectory ( fs_homepath->string, gameName ); } - + // check for additional base game so mods can be based upon other mods if ( fs_basegame->string[0] && !Q_stricmp( gameName, BASEGAME ) && Q_stricmp( fs_basegame->string, gameName ) ) { - if (fs_cdpath->string[0]) { - FS_AddGameDirectory(fs_cdpath->string, fs_basegame->string); - } if (fs_basepath->string[0]) { FS_AddGameDirectory(fs_basepath->string, fs_basegame->string); } @@ -2824,9 +2740,6 @@ static void FS_Startup( const char *gameName ) { // check for additional game folder for mods if ( fs_gamedirvar->string[0] && !Q_stricmp( gameName, BASEGAME ) && Q_stricmp( fs_gamedirvar->string, gameName ) ) { - if (fs_cdpath->string[0]) { - FS_AddGameDirectory(fs_cdpath->string, fs_gamedirvar->string); - } if (fs_basepath->string[0]) { FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string); } @@ -2850,7 +2763,7 @@ static void FS_Startup( const char *gameName ) { // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=506 // reorder the pure pk3 files according to server order FS_ReorderPurePaks(); - + // print the current search paths FS_Path_f(); @@ -3326,12 +3239,9 @@ void FS_InitFilesystem( void ) { // we have to specially handle this, because normal command // line variable sets don't happen until after the filesystem // has already been initialized - Com_StartupVariable( "fs_cdpath" ); Com_StartupVariable( "fs_basepath" ); Com_StartupVariable( "fs_homepath" ); Com_StartupVariable( "fs_game" ); - Com_StartupVariable( "fs_copyfiles" ); - Com_StartupVariable( "fs_restrict" ); // try to start up normally FS_Startup( BASEGAME ); @@ -3343,13 +3253,10 @@ void FS_InitFilesystem( void ) { // graphics screen when the font fails to load if ( FS_ReadFile( "default.cfg", NULL ) <= 0 ) { Com_Error( ERR_FATAL, "Couldn't load default.cfg" ); - // bk001208 - SafeMode see below, FIXME? } Q_strncpyz(lastValidBase, fs_basepath->string, sizeof(lastValidBase)); Q_strncpyz(lastValidGame, fs_gamedirvar->string, sizeof(lastValidGame)); - - // bk001208 - SafeMode see below, FIXME? } @@ -3386,7 +3293,6 @@ void FS_Restart( int checksumFeed ) { Cvar_Set("fs_gamedirvar", lastValidGame); lastValidBase[0] = '\0'; lastValidGame[0] = '\0'; - Cvar_Set( "fs_restrict", "0" ); FS_Restart(checksumFeed); Com_Error( ERR_DROP, "Invalid game folder\n" ); return; @@ -3394,7 +3300,6 @@ void FS_Restart( int checksumFeed ) { Com_Error( ERR_FATAL, "Couldn't load default.cfg" ); } - // bk010116 - new check before safeMode if ( Q_stricmp(fs_gamedirvar->string, lastValidGame) ) { // skip the q3config.cfg if "safe" is on the command line if ( !Com_SafeMode() ) { @@ -3474,7 +3379,6 @@ int FS_FOpenFileByMode( const char *qpath, fileHandle_t *f, fsMode_t mode ) { fsh[*f].streamed = qfalse; if (mode == FS_READ) { - Sys_BeginStreamedFile( *f, 0x4000 ); fsh[*f].streamed = qtrue; } } diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 9248db31..dadfbd3b 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -1026,28 +1026,22 @@ void NET_Shutdown( void ) { ==================== NET_Sleep -Sleeps msec or until net socket is ready +Sleeps msec or until something happens on the network or stdin ==================== */ void NET_Sleep( int msec ) { struct timeval timeout; fd_set fdset; -#ifndef _WIN32 //FIXME - extern qboolean stdin_active; -#endif int highestfd = 0; if (!com_dedicated->integer) return; // we're not a server, just run full speed FD_ZERO(&fdset); -#ifndef _WIN32 //FIXME - if (stdin_active) - { - FD_SET(0, &fdset); // stdin is processed too - highestfd = 1; - } -#endif + + FD_SET(fileno(stdin), &fdset); + highestfd = fileno(stdin) + 1; + if(ip_socket) { FD_SET(ip_socket, &fdset); // network socket diff --git a/code/qcommon/q_math.c b/code/qcommon/q_math.c index ae2de698..bfaa60a3 100644 --- a/code/qcommon/q_math.c +++ b/code/qcommon/q_math.c @@ -447,7 +447,7 @@ void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal ) inv_denom = DotProduct( normal, normal ); #ifndef Q3_VM - assert( Q_fabs(inv_denom) != 0.0f ); // bk010122 - zero vectors get here + assert( Q_fabs(inv_denom) != 0.0f ); // zero vectors get here #endif inv_denom = 1.0f / inv_denom; @@ -515,7 +515,6 @@ float Q_rsqrt( float number ) y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration // y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed - //assert( !isnan(y) ); // bk010122 - FPE? return y; } @@ -1110,17 +1109,11 @@ vec_t VectorNormalize2( const vec3_t v, vec3_t out) { if (length) { -#ifndef Q3_VM // bk0101022 - FPE related -// assert( ((Q_fabs(v[0])!=0.0f) || (Q_fabs(v[1])!=0.0f) || (Q_fabs(v[2])!=0.0f)) ); -#endif ilength = 1/length; out[0] = v[0]*ilength; out[1] = v[1]*ilength; out[2] = v[2]*ilength; } else { -#ifndef Q3_VM // bk0101022 - FPE related -// assert( ((Q_fabs(v[0])==0.0f) && (Q_fabs(v[1])==0.0f) && (Q_fabs(v[2])==0.0f)) ); -#endif VectorClear( out ); } diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h index 2d4306ad..4468904a 100644 --- a/code/qcommon/q_platform.h +++ b/code/qcommon/q_platform.h @@ -168,7 +168,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA //=============================================================== FreeBSD === -#ifdef __FreeBSD__ // rb010123 +#ifdef __FreeBSD__ #include diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c index a68b283b..81e4e808 100644 --- a/code/qcommon/q_shared.c +++ b/code/qcommon/q_shared.c @@ -734,7 +734,6 @@ Safe strncpy that ensures a trailing zero ============= */ void Q_strncpyz( char *dest, const char *src, int destsize ) { - // bk001129 - also NULL dest if ( !dest ) { Com_Error( ERR_FATAL, "Q_strncpyz: NULL dest" ); } @@ -752,7 +751,6 @@ void Q_strncpyz( char *dest, const char *src, int destsize ) { int Q_stricmpn (const char *s1, const char *s2, int n) { int c1, c2; - // bk001129 - moved in 1.17 fix not in id codebase if ( s1 == NULL ) { if ( s2 == NULL ) return 0; @@ -846,6 +844,38 @@ void Q_strcat( char *dest, int size, const char *src ) { Q_strncpyz( dest + l1, src, size - l1 ); } +/* +* Find the first occurrence of find in s. +*/ +const char *Q_stristr( const char *s, const char *find) +{ + char c, sc; + size_t len; + + if ((c = *find++) != 0) + { + if (c >= 'a' && c <= 'z') + { + c -= ('a' - 'A'); + } + len = strlen(find); + do + { + do + { + if ((sc = *s++) == 0) + return NULL; + if (sc >= 'a' && sc <= 'z') + { + sc -= ('a' - 'A'); + } + } while (sc != c); + } while (Q_stricmpn(s, find, len) != 0); + s--; + } + return s; +} + int Q_PrintStrlen( const char *string ) { int len; diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index fcd48e02..12dd36ef 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -26,14 +26,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // q_shared.h -- included first by ALL program modules. // A user mod should never modify this file -#define Q3_VERSION "ioQ3 1.33" -#ifndef SVN_VERSION - #define SVN_VERSION Q3_VERSION +#define Q3_VERSION_BASE "ioq3 1.35" +#ifdef SVN_VERSION +# define Q3_VERSION Q3_VERSION_BASE "_SVN" SVN_VERSION +#else +# define Q3_VERSION Q3_VERSION_BASE #endif -#define CLIENT_WINDOW_TITLE "ioquake3" -#define CLIENT_WINDOW_ICON "ioq3" -#define CONSOLE_WINDOW_TITLE "ioquake3 console" -#define CONSOLE_WINDOW_ICON "ioq3 console" + +#define CLIENT_WINDOW_TITLE "ioquake3" +#define CLIENT_WINDOW_MIN_TITLE "ioq3" // 1.32 released 7-10-2002 #define BASEGAME "baseq3" @@ -262,14 +263,6 @@ void *Hunk_AllocDebug( int size, ha_pref preference, char *label, char *file, in void *Hunk_Alloc( int size, ha_pref preference ); #endif -#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(MACOS_X) -// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371 -// custom Snd_Memset implementation for glibc memset bug workaround -void Snd_Memset (void* dest, const int val, const size_t count); -#else -#define Snd_Memset Com_Memset -#endif - #define Com_Memset memset #define Com_Memcpy memcpy @@ -678,6 +671,7 @@ int Q_stricmpn (const char *s1, const char *s2, int n); char *Q_strlwr( char *s1 ); char *Q_strupr( char *s1 ); char *Q_strrchr( const char* string, int c ); +const char *Q_stristr( const char *s, const char *find); // buffer size safe library replacements void Q_strncpyz( char *dest, const char *src, int destsize ); diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index 63828438..a563ef92 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -687,13 +687,11 @@ MISC ============================================================== */ -// TTimo // vsnprintf is ISO/IEC 9899:1999 // abstracting this to make it portable #ifdef WIN32 #define Q_vsnprintf _vsnprintf #else -// TODO: do we need Mac define? #define Q_vsnprintf vsnprintf #endif @@ -701,22 +699,46 @@ MISC // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=470 extern char cl_cdkey[34]; -// returnbed by Sys_GetProcessorId -#define CPUID_GENERIC 0 // any unrecognized processor +// returned by Sys_GetProcessorFeatures +typedef enum +{ + CF_RDTSC = 1 << 0, + CF_MMX = 1 << 1, + CF_MMX_EXT = 1 << 2, + CF_3DNOW = 1 << 3, + CF_3DNOW_EXT = 1 << 4, + CF_SSE = 1 << 5, + CF_SSE2 = 1 << 6, + CF_ALTIVEC = 1 << 7 +} cpuFeatures_t; -#define CPUID_AXP 0x10 - -#define CPUID_INTEL_UNSUPPORTED 0x20 // Intel 386/486 -#define CPUID_INTEL_PENTIUM 0x21 // Intel Pentium or PPro -#define CPUID_INTEL_MMX 0x22 // Intel Pentium/MMX or P2/MMX -#define CPUID_INTEL_KATMAI 0x23 // Intel Katmai - -#define CPUID_AMD_3DNOW 0x30 // AMD K6 3DNOW! - -// TTimo // centralized and cleaned, that's the max string you can send to a Com_Printf / Com_DPrintf (above gets truncated) #define MAXPRINTMSG 4096 + +typedef enum { + // SE_NONE must be zero + SE_NONE = 0, // evTime is still valid + SE_KEY, // evValue is a key code, evValue2 is the down flag + SE_CHAR, // evValue is an ascii char + SE_MOUSE, // evValue and evValue2 are reletive signed x / y moves + SE_JOYSTICK_AXIS, // evValue is an axis number and evValue2 is the current state (-127 to 127) + SE_CONSOLE, // evPtr is a char* + SE_PACKET // evPtr is a netadr_t followed by data bytes to evPtrLength +} sysEventType_t; + +typedef struct { + int evTime; + sysEventType_t evType; + int evValue, evValue2; + int evPtrLength; // bytes of data pointed to by evPtr, for journaling + void *evPtr; // this must be manually freed if not NULL +} sysEvent_t; + +void Com_QueueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ); +int Com_EventLoop( void ); +sysEvent_t Com_GetSystemEvent( void ); + char *CopyString( const char *in ); void Info_Print( const char *s ); @@ -726,7 +748,7 @@ void QDECL Com_Printf( const char *fmt, ... ) __attribute__ ((format (printf, void QDECL Com_DPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2))); void QDECL Com_Error( int code, const char *fmt, ... ) __attribute__ ((format (printf, 2, 3))); void Com_Quit_f( void ); -int Com_EventLoop( void ); + int Com_Milliseconds( void ); // will be journaled properly unsigned Com_BlockChecksum( const void *buffer, int length ); char *Com_MD5File(const char *filename, int length, const char *prefix, int prefix_len); @@ -748,12 +770,14 @@ extern cvar_t *com_speeds; extern cvar_t *com_timescale; extern cvar_t *com_sv_running; extern cvar_t *com_cl_running; -extern cvar_t *com_viewlog; // 0 = hidden, 1 = visible, 2 = minimized extern cvar_t *com_version; extern cvar_t *com_blood; extern cvar_t *com_buildScript; // for building release pak files extern cvar_t *com_journal; extern cvar_t *com_cameraMode; +extern cvar_t *com_ansiColor; +extern cvar_t *com_unfocused; +extern cvar_t *com_minimized; extern cvar_t *com_altivec; // both client and server must agree to pause @@ -897,7 +921,7 @@ void CL_ShutdownAll( void ); void CL_FlushMemory( void ); // dump all memory on an error -void CL_StartHunkUsers( void ); +void CL_StartHunkUsers( qboolean rendererOnly ); // start all the client stuff using the hunk void Key_WriteBindings( fileHandle_t f ); @@ -942,31 +966,9 @@ typedef enum { MAX_JOYSTICK_AXIS } joystickAxis_t; -typedef enum { - // bk001129 - make sure SE_NONE is zero - SE_NONE = 0, // evTime is still valid - SE_KEY, // evValue is a key code, evValue2 is the down flag - SE_CHAR, // evValue is an ascii char - SE_MOUSE, // evValue and evValue2 are reletive signed x / y moves - SE_JOYSTICK_AXIS, // evValue is an axis number and evValue2 is the current state (-127 to 127) - SE_CONSOLE, // evPtr is a char* - SE_PACKET // evPtr is a netadr_t followed by data bytes to evPtrLength -} sysEventType_t; - -typedef struct { - int evTime; - sysEventType_t evType; - int evValue, evValue2; - int evPtrLength; // bytes of data pointed to by evPtr, for journaling - void *evPtr; // this must be manually freed if not NULL -} sysEvent_t; - -sysEvent_t Sys_GetEvent( void ); - void Sys_Init (void); // general development dll loading for virtual machine testing -// fqpath param added 7/20/02 by T.Ray - Sys_LoadDll is only called in vm.c at this time void * QDECL Sys_LoadDll( const char *name, char *fqpath , intptr_t (QDECL **entryPoint)(int, ...), intptr_t (QDECL *systemcalls)(intptr_t, ...) ); void Sys_UnloadDll( void *dllHandle ); @@ -1003,17 +1005,12 @@ qboolean Sys_RandomBytes( byte *string, int len ); // the system console is shown when a dedicated server is running void Sys_DisplaySystemConsole( qboolean show ); -int Sys_GetProcessorId( void ); +cpuFeatures_t Sys_GetProcessorFeatures( void ); -void Sys_BeginStreamedFile( fileHandle_t f, int readahead ); -void Sys_EndStreamedFile( fileHandle_t f ); -int Sys_StreamedRead( void *buffer, int size, int count, fileHandle_t f ); -void Sys_StreamSeek( fileHandle_t f, int offset, int origin ); - -void Sys_ShowConsole( int level, qboolean quitOnClose ); void Sys_SetErrorText( const char *text ); void Sys_SendPacket( int length, const void *data, netadr_t to ); +qboolean Sys_GetPacket( netadr_t *net_from, msg_t *net_message ); qboolean Sys_StringToAdr( const char *s, netadr_t *a ); //Does NOT parse port numbers, only base addresses. @@ -1021,29 +1018,20 @@ qboolean Sys_StringToAdr( const char *s, netadr_t *a ); qboolean Sys_IsLANAddress (netadr_t adr); void Sys_ShowIP(void); -qboolean Sys_CheckCD( void ); - void Sys_Mkdir( const char *path ); char *Sys_Cwd( void ); -void Sys_SetDefaultCDPath(const char *path); -char *Sys_DefaultCDPath(void); void Sys_SetDefaultInstallPath(const char *path); char *Sys_DefaultInstallPath(void); void Sys_SetDefaultHomePath(const char *path); char *Sys_DefaultHomePath(void); +const char *Sys_Dirname( char *path ); +const char *Sys_Basename( char *path ); +char *Sys_ConsoleInput(void); char **Sys_ListFiles( const char *directory, const char *extension, char *filter, int *numfiles, qboolean wantsubs ); void Sys_FreeFileList( char **list ); -void Sys_BeginProfiling( void ); -void Sys_EndProfiling( void ); - qboolean Sys_LowPhysicalMemory( void ); -unsigned int Sys_ProcessorCount( void ); - -int Sys_MonkeyShouldBeSpanked( void ); - -qboolean Sys_DetectAltivec( void ); /* This is based on the Adaptive Huffman algorithm described in Sayood's Data * Compression book. The ranks are not actually stored, but implicitly defined diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c index 0e35791d..ecc29c19 100644 --- a/code/qcommon/vm.c +++ b/code/qcommon/vm.c @@ -36,8 +36,8 @@ and one exported function: Perform #include "vm_local.h" -vm_t *currentVM = NULL; // bk001212 -vm_t *lastVM = NULL; // bk001212 +vm_t *currentVM = NULL; +vm_t *lastVM = NULL; int vm_debugLevel; #define MAX_VM 3 @@ -543,13 +543,6 @@ vm_t *VM_Create( const char *module, intptr_t (*systemCalls)(intptr_t *), Q_strncpyz( vm->name, module, sizeof( vm->name ) ); vm->systemCall = systemCalls; - // never allow dll loading with a demo - if ( interpret == VMI_NATIVE ) { - if ( Cvar_VariableValue( "fs_restrict" ) ) { - interpret = VMI_COMPILED; - } - } - if ( interpret == VMI_NATIVE ) { // try to load as a system dll Com_Printf( "Loading dll file %s.\n", vm->name ); @@ -655,7 +648,7 @@ void *VM_ArgPtr( intptr_t intValue ) { if ( !intValue ) { return NULL; } - // bk001220 - currentVM is missing on reconnect + // currentVM is missing on reconnect if ( currentVM==NULL ) return NULL; @@ -672,7 +665,7 @@ void *VM_ExplicitArgPtr( vm_t *vm, intptr_t intValue ) { return NULL; } - // bk010124 - currentVM is missing on reconnect here as well? + // currentVM is missing on reconnect here as well? if ( currentVM==NULL ) return NULL; @@ -773,7 +766,7 @@ intptr_t QDECL VM_Call( vm_t *vm, int callnum, ... ) { #endif } - if ( oldVM != NULL ) // bk001220 - assert(currentVM!=NULL) for oldVM==NULL + if ( oldVM != NULL ) currentVM = oldVM; return r; } diff --git a/code/qcommon/vm_interpreted.c b/code/qcommon/vm_interpreted.c index a6be7c74..3a41e6b7 100644 --- a/code/qcommon/vm_interpreted.c +++ b/code/qcommon/vm_interpreted.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "vm_local.h" //#define DEBUG_VM -#ifdef DEBUG_VM // bk001204 +#ifdef DEBUG_VM static char *opnames[256] = { "OP_UNDEF", diff --git a/code/qcommon/vm_local.h b/code/qcommon/vm_local.h index 24f996a1..8e81b369 100644 --- a/code/qcommon/vm_local.h +++ b/code/qcommon/vm_local.h @@ -160,7 +160,6 @@ struct vm_s { int breakFunction; // increment breakCount on function entry to this int breakCount; -// fqpath member added 7/20/02 by T.Ray char fqpath[MAX_QPATH+1] ; byte *jumpTableTargets; diff --git a/code/qcommon/vm_x86.c b/code/qcommon/vm_x86.c index 8b6e4a12..ac8dd1a2 100644 --- a/code/qcommon/vm_x86.c +++ b/code/qcommon/vm_x86.c @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif -#ifdef __FreeBSD__ // rb0101023 +#ifdef __FreeBSD__ #include #endif @@ -77,13 +77,11 @@ static int asmCallPtr = (int)AsmCall; #else // _MSC_VER #if defined( FTOL_PTR ) -// bk001213 - BEWARE: does not work! UI menu etc. broken - stack! -// bk001119 - added: int gftol( float x ) { return (int)x; } -int qftol( void ); // bk001213 - label, see unix/ftol.nasm -int qftol027F( void ); // bk001215 - fixed FPU control variants +int qftol( void ); +int qftol027F( void ); int qftol037F( void ); -int qftol0E7F( void ); // bk010102 - fixed bogus bits (duh) +int qftol0E7F( void ); int qftol0F7F( void ); @@ -95,7 +93,7 @@ static int asmCallPtr = (int)doAsmCall; #endif -static int callMask = 0; // bk001213 - init +static int callMask = 0; static int instruction, pass; static int lastConst = 0; @@ -1020,7 +1018,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) { EmitString( "D9 1F" ); // fstp dword ptr [edi] break; case OP_CVFI: -#ifndef FTOL_PTR // WHENHELLISFROZENOVER // bk001213 - was used in 1.17 +#ifndef FTOL_PTR // WHENHELLISFROZENOVER // not IEEE complient, but simple and fast EmitString( "D9 07" ); // fld dword ptr [edi] EmitString( "DB 1F" ); // fistp dword ptr [edi] diff --git a/code/qcommon/vm_x86_64.c b/code/qcommon/vm_x86_64.c index 1d6ca63d..c0fbfb05 100644 --- a/code/qcommon/vm_x86_64.c +++ b/code/qcommon/vm_x86_64.c @@ -109,7 +109,7 @@ static long callAsmCall(long callProgramStack, long callSyscallNum) return ret; } -#ifdef DEBUG_VM // bk001204 +#ifdef DEBUG_VM static char *opnames[256] = { "OP_UNDEF", diff --git a/code/renderer/qgl.h b/code/renderer/qgl.h index 52ba8cae..2dc6b35a 100644 --- a/code/renderer/qgl.h +++ b/code/renderer/qgl.h @@ -26,11 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __QGL_H__ #define __QGL_H__ -#if defined( __LINT__ ) - -#include - -#elif defined( _WIN32 ) +#if defined( _WIN32 ) #if _MSC_VER #pragma warning (disable: 4201) @@ -43,6 +39,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include +#include #elif defined(MACOS_X) @@ -53,41 +50,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif -// This can be defined to use the CGLMacro.h support which avoids looking up -// the current context. -//#define USE_CGLMACROS - -#ifdef USE_CGLMACROS -#include "macosx_local.h" -#define cgl_ctx glw_state._cgl_ctx -#include -#endif - -#elif defined( __linux__ ) || defined(__FreeBSD__) - -#include -#include -// bk001129 - from cvs1.17 (mkv) -#if defined(__FX__) -#include -#endif - -#elif defined( __sun ) -#include -#include - #else -#include +#include +#include #endif #ifndef APIENTRY #define APIENTRY #endif -#ifndef WINAPI -#define WINAPI -#endif //=========================================================================== @@ -109,6 +81,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #else +// FIXME GL_MAX_TEXTURE_UNITS_ARB? #define GL_MAX_ACTIVE_TEXTURES_ARB 0x84E2 #endif /* defined(__sun) */ @@ -122,9 +95,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define GL_CLAMP_TO_EDGE 0x812F #endif -//=========================================================================== +// S3TC compression constants +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 -// NOTE: some Linux platforms would need those prototypes #if defined(MACOS_X) || ( defined(__sun) && defined(__sparc) ) typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); @@ -162,445 +136,351 @@ typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target); typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum target); #endif -// TTimo - VC7 / XP ? -#ifdef WIN32 -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target); -typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum target); -#endif - -/* -** extension constants -*/ - - -// S3TC compression constants -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 - +//=========================================================================== // extensions will be function pointers on all platforms +extern void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t ); +extern void ( APIENTRY * qglActiveTextureARB )( GLenum texture ); +extern void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture ); -extern void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t ); -extern void ( APIENTRY * qglActiveTextureARB )( GLenum texture ); -extern void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture ); - -extern void ( APIENTRY * qglLockArraysEXT) (GLint, GLint); -extern void ( APIENTRY * qglUnlockArraysEXT) (void); +extern void ( APIENTRY * qglLockArraysEXT)( GLint, GLint); +extern void ( APIENTRY * qglUnlockArraysEXT) ( void ); //=========================================================================== -// non-dlopening systems will just redefine qgl* to gl* -#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) && !defined(__sun) // rb010123 - -#include "qgl_linked.h" - -#elif (defined(MACOS_X) && !defined(USE_SDL_VIDEO)) -// This includes #ifdefs for optional logging and GL error checking after every GL call as well as #defines to prevent incorrect usage of the non-'qgl' versions of the GL API. -#include "macosx_qgl.h" - -#else - -// windows systems use a function pointer for each call so we can load minidrivers - -extern void ( APIENTRY * qglAccum )(GLenum op, GLfloat value); -extern void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref); -extern GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences); -extern void ( APIENTRY * qglArrayElement )(GLint i); -extern void ( APIENTRY * qglBegin )(GLenum mode); -extern void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture); -extern void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -extern void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor); -extern void ( APIENTRY * qglCallList )(GLuint list); -extern void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists); -extern void ( APIENTRY * qglClear )(GLbitfield mask); -extern void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -extern void ( APIENTRY * qglClearDepth )(GLclampd depth); -extern void ( APIENTRY * qglClearIndex )(GLfloat c); -extern void ( APIENTRY * qglClearStencil )(GLint s); -extern void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation); -extern void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue); -extern void ( APIENTRY * qglColor3bv )(const GLbyte *v); -extern void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue); -extern void ( APIENTRY * qglColor3dv )(const GLdouble *v); -extern void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue); -extern void ( APIENTRY * qglColor3fv )(const GLfloat *v); -extern void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue); -extern void ( APIENTRY * qglColor3iv )(const GLint *v); -extern void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue); -extern void ( APIENTRY * qglColor3sv )(const GLshort *v); -extern void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue); -extern void ( APIENTRY * qglColor3ubv )(const GLubyte *v); -extern void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue); -extern void ( APIENTRY * qglColor3uiv )(const GLuint *v); -extern void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue); -extern void ( APIENTRY * qglColor3usv )(const GLushort *v); -extern void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -extern void ( APIENTRY * qglColor4bv )(const GLbyte *v); -extern void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -extern void ( APIENTRY * qglColor4dv )(const GLdouble *v); -extern void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern void ( APIENTRY * qglColor4fv )(const GLfloat *v); -extern void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha); -extern void ( APIENTRY * qglColor4iv )(const GLint *v); -extern void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha); -extern void ( APIENTRY * qglColor4sv )(const GLshort *v); -extern void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -extern void ( APIENTRY * qglColor4ubv )(const GLubyte *v); -extern void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha); -extern void ( APIENTRY * qglColor4uiv )(const GLuint *v); -extern void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha); -extern void ( APIENTRY * qglColor4usv )(const GLushort *v); -extern void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -extern void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode); -extern void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -extern void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -extern void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -extern void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -extern void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -extern void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -extern void ( APIENTRY * qglCullFace )(GLenum mode); -extern void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range); -extern void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures); -extern void ( APIENTRY * qglDepthFunc )(GLenum func); -extern void ( APIENTRY * qglDepthMask )(GLboolean flag); -extern void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar); -extern void ( APIENTRY * qglDisable )(GLenum cap); -extern void ( APIENTRY * qglDisableClientState )(GLenum array); -extern void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count); -extern void ( APIENTRY * qglDrawBuffer )(GLenum mode); -extern void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -extern void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -extern void ( APIENTRY * qglEdgeFlag )(GLboolean flag); -extern void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer); -extern void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag); -extern void ( APIENTRY * qglEnable )(GLenum cap); -extern void ( APIENTRY * qglEnableClientState )(GLenum array); -extern void ( APIENTRY * qglEnd )(void); -extern void ( APIENTRY * qglEndList )(void); -extern void ( APIENTRY * qglEvalCoord1d )(GLdouble u); -extern void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u); -extern void ( APIENTRY * qglEvalCoord1f )(GLfloat u); -extern void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u); -extern void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v); -extern void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u); -extern void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v); -extern void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u); -extern void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2); -extern void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -extern void ( APIENTRY * qglEvalPoint1 )(GLint i); -extern void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j); -extern void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer); -extern void ( APIENTRY * qglFinish )(void); -extern void ( APIENTRY * qglFlush )(void); -extern void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param); -extern void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglFogi )(GLenum pname, GLint param); -extern void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params); -extern void ( APIENTRY * qglFrontFace )(GLenum mode); -extern void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern GLuint ( APIENTRY * qglGenLists )(GLsizei range); -extern void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures); -extern void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params); -extern void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation); -extern void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params); -extern GLenum ( APIENTRY * qglGetError )(void); -extern void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params); -extern void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params); -extern void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v); -extern void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v); -extern void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v); -extern void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params); -extern void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values); -extern void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values); -extern void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values); -extern void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params); -extern void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask); -extern const GLubyte * ( APIENTRY * qglGetString )(GLenum name); -extern void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params); -extern void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params); -extern void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params); -extern void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -extern void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params); -extern void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params); -extern void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params); -extern void ( APIENTRY * qglHint )(GLenum target, GLenum mode); -extern void ( APIENTRY * qglIndexMask )(GLuint mask); -extern void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -extern void ( APIENTRY * qglIndexd )(GLdouble c); -extern void ( APIENTRY * qglIndexdv )(const GLdouble *c); -extern void ( APIENTRY * qglIndexf )(GLfloat c); -extern void ( APIENTRY * qglIndexfv )(const GLfloat *c); -extern void ( APIENTRY * qglIndexi )(GLint c); -extern void ( APIENTRY * qglIndexiv )(const GLint *c); -extern void ( APIENTRY * qglIndexs )(GLshort c); -extern void ( APIENTRY * qglIndexsv )(const GLshort *c); -extern void ( APIENTRY * qglIndexub )(GLubyte c); -extern void ( APIENTRY * qglIndexubv )(const GLubyte *c); -extern void ( APIENTRY * qglInitNames )(void); -extern void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer); -extern GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap); -extern GLboolean ( APIENTRY * qglIsList )(GLuint list); -extern GLboolean ( APIENTRY * qglIsTexture )(GLuint texture); -extern void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param); -extern void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param); -extern void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params); -extern void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param); -extern void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param); -extern void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params); -extern void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern); -extern void ( APIENTRY * qglLineWidth )(GLfloat width); -extern void ( APIENTRY * qglListBase )(GLuint base); -extern void ( APIENTRY * qglLoadIdentity )(void); -extern void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m); -extern void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m); -extern void ( APIENTRY * qglLoadName )(GLuint name); -extern void ( APIENTRY * qglLogicOp )(GLenum opcode); -extern void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -extern void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -extern void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -extern void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -extern void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2); -extern void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2); -extern void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -extern void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -extern void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param); -extern void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param); -extern void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params); -extern void ( APIENTRY * qglMatrixMode )(GLenum mode); -extern void ( APIENTRY * qglMultMatrixd )(const GLdouble *m); -extern void ( APIENTRY * qglMultMatrixf )(const GLfloat *m); -extern void ( APIENTRY * qglNewList )(GLuint list, GLenum mode); -extern void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz); -extern void ( APIENTRY * qglNormal3bv )(const GLbyte *v); -extern void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz); -extern void ( APIENTRY * qglNormal3dv )(const GLdouble *v); -extern void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz); -extern void ( APIENTRY * qglNormal3fv )(const GLfloat *v); -extern void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz); -extern void ( APIENTRY * qglNormal3iv )(const GLint *v); -extern void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz); -extern void ( APIENTRY * qglNormal3sv )(const GLshort *v); -extern void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -extern void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern void ( APIENTRY * qglPassThrough )(GLfloat token); -extern void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values); -extern void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values); -extern void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values); -extern void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param); -extern void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param); -extern void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param); -extern void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param); -extern void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor); -extern void ( APIENTRY * qglPointSize )(GLfloat size); -extern void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode); -extern void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units); -extern void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask); -extern void ( APIENTRY * qglPopAttrib )(void); -extern void ( APIENTRY * qglPopClientAttrib )(void); -extern void ( APIENTRY * qglPopMatrix )(void); -extern void ( APIENTRY * qglPopName )(void); -extern void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities); -extern void ( APIENTRY * qglPushAttrib )(GLbitfield mask); -extern void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask); -extern void ( APIENTRY * qglPushMatrix )(void); -extern void ( APIENTRY * qglPushName )(GLuint name); -extern void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y); -extern void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v); -extern void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y); -extern void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v); -extern void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y); -extern void ( APIENTRY * qglRasterPos2iv )(const GLint *v); -extern void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y); -extern void ( APIENTRY * qglRasterPos2sv )(const GLshort *v); -extern void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z); -extern void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v); -extern void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z); -extern void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v); -extern void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z); -extern void ( APIENTRY * qglRasterPos3iv )(const GLint *v); -extern void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z); -extern void ( APIENTRY * qglRasterPos3sv )(const GLshort *v); -extern void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v); -extern void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v); -extern void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w); -extern void ( APIENTRY * qglRasterPos4iv )(const GLint *v); -extern void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w); -extern void ( APIENTRY * qglRasterPos4sv )(const GLshort *v); -extern void ( APIENTRY * qglReadBuffer )(GLenum mode); -extern void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -extern void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -extern void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2); -extern void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -extern void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2); -extern void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2); -extern void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2); -extern void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -extern void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2); -extern GLint ( APIENTRY * qglRenderMode )(GLenum mode); -extern void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -extern void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -extern void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z); -extern void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z); -extern void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height); -extern void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer); -extern void ( APIENTRY * qglShadeModel )(GLenum mode); -extern void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask); -extern void ( APIENTRY * qglStencilMask )(GLuint mask); -extern void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass); -extern void ( APIENTRY * qglTexCoord1d )(GLdouble s); -extern void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v); -extern void ( APIENTRY * qglTexCoord1f )(GLfloat s); -extern void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v); -extern void ( APIENTRY * qglTexCoord1i )(GLint s); -extern void ( APIENTRY * qglTexCoord1iv )(const GLint *v); -extern void ( APIENTRY * qglTexCoord1s )(GLshort s); -extern void ( APIENTRY * qglTexCoord1sv )(const GLshort *v); -extern void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t); -extern void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v); -extern void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t); -extern void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v); -extern void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t); -extern void ( APIENTRY * qglTexCoord2iv )(const GLint *v); -extern void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t); -extern void ( APIENTRY * qglTexCoord2sv )(const GLshort *v); -extern void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r); -extern void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v); -extern void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r); -extern void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v); -extern void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r); -extern void ( APIENTRY * qglTexCoord3iv )(const GLint *v); -extern void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r); -extern void ( APIENTRY * qglTexCoord3sv )(const GLshort *v); -extern void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -extern void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v); -extern void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -extern void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v); -extern void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q); -extern void ( APIENTRY * qglTexCoord4iv )(const GLint *v); -extern void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q); -extern void ( APIENTRY * qglTexCoord4sv )(const GLshort *v); -extern void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -extern void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param); -extern void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param); -extern void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params); -extern void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param); -extern void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params); -extern void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param); -extern void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param); -extern void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params); -extern void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -extern void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -extern void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param); -extern void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params); -extern void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param); -extern void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params); -extern void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -extern void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -extern void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z); -extern void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z); -extern void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y); -extern void ( APIENTRY * qglVertex2dv )(const GLdouble *v); -extern void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y); -extern void ( APIENTRY * qglVertex2fv )(const GLfloat *v); -extern void ( APIENTRY * qglVertex2i )(GLint x, GLint y); -extern void ( APIENTRY * qglVertex2iv )(const GLint *v); -extern void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y); -extern void ( APIENTRY * qglVertex2sv )(const GLshort *v); -extern void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z); -extern void ( APIENTRY * qglVertex3dv )(const GLdouble *v); -extern void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z); -extern void ( APIENTRY * qglVertex3fv )(const GLfloat *v); -extern void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z); -extern void ( APIENTRY * qglVertex3iv )(const GLint *v); -extern void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z); -extern void ( APIENTRY * qglVertex3sv )(const GLshort *v); -extern void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern void ( APIENTRY * qglVertex4dv )(const GLdouble *v); -extern void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern void ( APIENTRY * qglVertex4fv )(const GLfloat *v); -extern void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w); -extern void ( APIENTRY * qglVertex4iv )(const GLint *v); -extern void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w); -extern void ( APIENTRY * qglVertex4sv )(const GLshort *v); -extern void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -extern void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height); - -#if defined( _WIN32 ) - -extern int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *); -extern int ( WINAPI * qwglDescribePixelFormat) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); -extern int ( WINAPI * qwglGetPixelFormat)(HDC); -extern BOOL ( WINAPI * qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *); -extern BOOL ( WINAPI * qwglSwapBuffers)(HDC); - -extern BOOL ( WINAPI * qwglGetDeviceGammaRamp3DFX)( HDC, LPVOID ); -extern BOOL ( WINAPI * qwglSetDeviceGammaRamp3DFX)( HDC, LPVOID ); - -extern BOOL ( WINAPI * qwglCopyContext)(HGLRC, HGLRC, UINT); -extern HGLRC ( WINAPI * qwglCreateContext)(HDC); -extern HGLRC ( WINAPI * qwglCreateLayerContext)(HDC, int); -extern BOOL ( WINAPI * qwglDeleteContext)(HGLRC); -extern HGLRC ( WINAPI * qwglGetCurrentContext)(VOID); -extern HDC ( WINAPI * qwglGetCurrentDC)(VOID); -extern PROC ( WINAPI * qwglGetProcAddress)(LPCSTR); -extern BOOL ( WINAPI * qwglMakeCurrent)(HDC, HGLRC); -extern BOOL ( WINAPI * qwglShareLists)(HGLRC, HGLRC); -extern BOOL ( WINAPI * qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD); - -extern BOOL ( WINAPI * qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT, - FLOAT, int, LPGLYPHMETRICSFLOAT); - -extern BOOL ( WINAPI * qwglDescribeLayerPlane)(HDC, int, int, UINT, - LPLAYERPLANEDESCRIPTOR); -extern int ( WINAPI * qwglSetLayerPaletteEntries)(HDC, int, int, int, - CONST COLORREF *); -extern int ( WINAPI * qwglGetLayerPaletteEntries)(HDC, int, int, int, - COLORREF *); -extern BOOL ( WINAPI * qwglRealizeLayerPalette)(HDC, int, BOOL); -extern BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT); - -extern BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval ); - -#endif // _WIN32 - -#if ( (defined __linux__ ) || (defined __FreeBSD__ ) || (defined __sun) ) // rb010123 - -//FX Mesa Functions -// bk001129 - from cvs1.17 (mkv) -#if defined (__FX__) -extern fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]); -extern fxMesaContext (*qfxMesaCreateBestContext)(GLuint win, GLint width, GLint height, const GLint attribList[]); -extern void (*qfxMesaDestroyContext)(fxMesaContext ctx); -extern void (*qfxMesaMakeCurrent)(fxMesaContext ctx); -extern fxMesaContext (*qfxMesaGetCurrentContext)(void); -extern void (*qfxMesaSwapBuffers)(void); -#endif - -//GLX Functions -extern XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList ); -extern GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct ); -extern void (*qglXDestroyContext)( Display *dpy, GLXContext ctx ); -extern Bool (*qglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx); -extern void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask ); -extern void (*qglXSwapBuffers)( Display *dpy, GLXDrawable drawable ); - -#endif // __linux__ || __FreeBSD__ || __sun // rb010123 - -#endif // _WIN32 && __linux__ +#define qglAccum glAccum +#define qglAlphaFunc glAlphaFunc +#define qglAreTexturesResident glAreTexturesResident +#define qglArrayElement glArrayElement +#define qglBegin glBegin +#define qglBindTexture glBindTexture +#define qglBitmap glBitmap +#define qglBlendFunc glBlendFunc +#define qglCallList glCallList +#define qglCallLists glCallLists +#define qglClear glClear +#define qglClearAccum glClearAccum +#define qglClearColor glClearColor +#define qglClearDepth glClearDepth +#define qglClearIndex glClearIndex +#define qglClearStencil glClearStencil +#define qglClipPlane glClipPlane +#define qglColor3b glColor3b +#define qglColor3bv glColor3bv +#define qglColor3d glColor3d +#define qglColor3dv glColor3dv +#define qglColor3f glColor3f +#define qglColor3fv glColor3fv +#define qglColor3i glColor3i +#define qglColor3iv glColor3iv +#define qglColor3s glColor3s +#define qglColor3sv glColor3sv +#define qglColor3ub glColor3ub +#define qglColor3ubv glColor3ubv +#define qglColor3ui glColor3ui +#define qglColor3uiv glColor3uiv +#define qglColor3us glColor3us +#define qglColor3usv glColor3usv +#define qglColor4b glColor4b +#define qglColor4bv glColor4bv +#define qglColor4d glColor4d +#define qglColor4dv glColor4dv +#define qglColor4f glColor4f +#define qglColor4fv glColor4fv +#define qglColor4i glColor4i +#define qglColor4iv glColor4iv +#define qglColor4s glColor4s +#define qglColor4sv glColor4sv +#define qglColor4ub glColor4ub +#define qglColor4ubv glColor4ubv +#define qglColor4ui glColor4ui +#define qglColor4uiv glColor4uiv +#define qglColor4us glColor4us +#define qglColor4usv glColor4usv +#define qglColorMask glColorMask +#define qglColorMaterial glColorMaterial +#define qglColorPointer glColorPointer +#define qglCopyPixels glCopyPixels +#define qglCopyTexImage1D glCopyTexImage1D +#define qglCopyTexImage2D glCopyTexImage2D +#define qglCopyTexSubImage1D glCopyTexSubImage1D +#define qglCopyTexSubImage2D glCopyTexSubImage2D +#define qglCullFace glCullFace +#define qglDeleteLists glDeleteLists +#define qglDeleteTextures glDeleteTextures +#define qglDepthFunc glDepthFunc +#define qglDepthMask glDepthMask +#define qglDepthRange glDepthRange +#define qglDisable glDisable +#define qglDisableClientState glDisableClientState +#define qglDrawArrays glDrawArrays +#define qglDrawBuffer glDrawBuffer +#define qglDrawElements glDrawElements +#define qglDrawPixels glDrawPixels +#define qglEdgeFlag glEdgeFlag +#define qglEdgeFlagPointer glEdgeFlagPointer +#define qglEdgeFlagv glEdgeFlagv +#define qglEnable glEnable +#define qglEnableClientState glEnableClientState +#define qglEnd glEnd +#define qglEndList glEndList +#define qglEvalCoord1d glEvalCoord1d +#define qglEvalCoord1dv glEvalCoord1dv +#define qglEvalCoord1f glEvalCoord1f +#define qglEvalCoord1fv glEvalCoord1fv +#define qglEvalCoord2d glEvalCoord2d +#define qglEvalCoord2dv glEvalCoord2dv +#define qglEvalCoord2f glEvalCoord2f +#define qglEvalCoord2fv glEvalCoord2fv +#define qglEvalMesh1 glEvalMesh1 +#define qglEvalMesh2 glEvalMesh2 +#define qglEvalPoint1 glEvalPoint1 +#define qglEvalPoint2 glEvalPoint2 +#define qglFeedbackBuffer glFeedbackBuffer +#define qglFinish glFinish +#define qglFlush glFlush +#define qglFogf glFogf +#define qglFogfv glFogfv +#define qglFogi glFogi +#define qglFogiv glFogiv +#define qglFrontFace glFrontFace +#define qglFrustum glFrustum +#define qglGenLists glGenLists +#define qglGenTextures glGenTextures +#define qglGetBooleanv glGetBooleanv +#define qglGetClipPlane glGetClipPlane +#define qglGetDoublev glGetDoublev +#define qglGetError glGetError +#define qglGetFloatv glGetFloatv +#define qglGetIntegerv glGetIntegerv +#define qglGetLightfv glGetLightfv +#define qglGetLightiv glGetLightiv +#define qglGetMapdv glGetMapdv +#define qglGetMapfv glGetMapfv +#define qglGetMapiv glGetMapiv +#define qglGetMaterialfv glGetMaterialfv +#define qglGetMaterialiv glGetMaterialiv +#define qglGetPixelMapfv glGetPixelMapfv +#define qglGetPixelMapuiv glGetPixelMapuiv +#define qglGetPixelMapusv glGetPixelMapusv +#define qglGetPointerv glGetPointerv +#define qglGetPolygonStipple glGetPolygonStipple +#define qglGetString glGetString +#define qglGetTexGendv glGetTexGendv +#define qglGetTexGenfv glGetTexGenfv +#define qglGetTexGeniv glGetTexGeniv +#define qglGetTexImage glGetTexImage +#define qglGetTexLevelParameterfv glGetTexLevelParameterfv +#define qglGetTexLevelParameteriv glGetTexLevelParameteriv +#define qglGetTexParameterfv glGetTexParameterfv +#define qglGetTexParameteriv glGetTexParameteriv +#define qglHint glHint +#define qglIndexMask glIndexMask +#define qglIndexPointer glIndexPointer +#define qglIndexd glIndexd +#define qglIndexdv glIndexdv +#define qglIndexf glIndexf +#define qglIndexfv glIndexfv +#define qglIndexi glIndexi +#define qglIndexiv glIndexiv +#define qglIndexs glIndexs +#define qglIndexsv glIndexsv +#define qglIndexub glIndexub +#define qglIndexubv glIndexubv +#define qglInitNames glInitNames +#define qglInterleavedArrays glInterleavedArrays +#define qglIsEnabled glIsEnabled +#define qglIsList glIsList +#define qglIsTexture glIsTexture +#define qglLightModelf glLightModelf +#define qglLightModelfv glLightModelfv +#define qglLightModeli glLightModeli +#define qglLightModeliv glLightModeliv +#define qglLightf glLightf +#define qglLightfv glLightfv +#define qglLighti glLighti +#define qglLightiv glLightiv +#define qglLineStipple glLineStipple +#define qglLineWidth glLineWidth +#define qglListBase glListBase +#define qglLoadIdentity glLoadIdentity +#define qglLoadMatrixd glLoadMatrixd +#define qglLoadMatrixf glLoadMatrixf +#define qglLoadName glLoadName +#define qglLogicOp glLogicOp +#define qglMap1d glMap1d +#define qglMap1f glMap1f +#define qglMap2d glMap2d +#define qglMap2f glMap2f +#define qglMapGrid1d glMapGrid1d +#define qglMapGrid1f glMapGrid1f +#define qglMapGrid2d glMapGrid2d +#define qglMapGrid2f glMapGrid2f +#define qglMaterialf glMaterialf +#define qglMaterialfv glMaterialfv +#define qglMateriali glMateriali +#define qglMaterialiv glMaterialiv +#define qglMatrixMode glMatrixMode +#define qglMultMatrixd glMultMatrixd +#define qglMultMatrixf glMultMatrixf +#define qglNewList glNewList +#define qglNormal3b glNormal3b +#define qglNormal3bv glNormal3bv +#define qglNormal3d glNormal3d +#define qglNormal3dv glNormal3dv +#define qglNormal3f glNormal3f +#define qglNormal3fv glNormal3fv +#define qglNormal3i glNormal3i +#define qglNormal3iv glNormal3iv +#define qglNormal3s glNormal3s +#define qglNormal3sv glNormal3sv +#define qglNormalPointer glNormalPointer +#define qglOrtho glOrtho +#define qglPassThrough glPassThrough +#define qglPixelMapfv glPixelMapfv +#define qglPixelMapuiv glPixelMapuiv +#define qglPixelMapusv glPixelMapusv +#define qglPixelStoref glPixelStoref +#define qglPixelStorei glPixelStorei +#define qglPixelTransferf glPixelTransferf +#define qglPixelTransferi glPixelTransferi +#define qglPixelZoom glPixelZoom +#define qglPointSize glPointSize +#define qglPolygonMode glPolygonMode +#define qglPolygonOffset glPolygonOffset +#define qglPolygonStipple glPolygonStipple +#define qglPopAttrib glPopAttrib +#define qglPopClientAttrib glPopClientAttrib +#define qglPopMatrix glPopMatrix +#define qglPopName glPopName +#define qglPrioritizeTextures glPrioritizeTextures +#define qglPushAttrib glPushAttrib +#define qglPushClientAttrib glPushClientAttrib +#define qglPushMatrix glPushMatrix +#define qglPushName glPushName +#define qglRasterPos2d glRasterPos2d +#define qglRasterPos2dv glRasterPos2dv +#define qglRasterPos2f glRasterPos2f +#define qglRasterPos2fv glRasterPos2fv +#define qglRasterPos2i glRasterPos2i +#define qglRasterPos2iv glRasterPos2iv +#define qglRasterPos2s glRasterPos2s +#define qglRasterPos2sv glRasterPos2sv +#define qglRasterPos3d glRasterPos3d +#define qglRasterPos3dv glRasterPos3dv +#define qglRasterPos3f glRasterPos3f +#define qglRasterPos3fv glRasterPos3fv +#define qglRasterPos3i glRasterPos3i +#define qglRasterPos3iv glRasterPos3iv +#define qglRasterPos3s glRasterPos3s +#define qglRasterPos3sv glRasterPos3sv +#define qglRasterPos4d glRasterPos4d +#define qglRasterPos4dv glRasterPos4dv +#define qglRasterPos4f glRasterPos4f +#define qglRasterPos4fv glRasterPos4fv +#define qglRasterPos4i glRasterPos4i +#define qglRasterPos4iv glRasterPos4iv +#define qglRasterPos4s glRasterPos4s +#define qglRasterPos4sv glRasterPos4sv +#define qglReadBuffer glReadBuffer +#define qglReadPixels glReadPixels +#define qglRectd glRectd +#define qglRectdv glRectdv +#define qglRectf glRectf +#define qglRectfv glRectfv +#define qglRecti glRecti +#define qglRectiv glRectiv +#define qglRects glRects +#define qglRectsv glRectsv +#define qglRenderMode glRenderMode +#define qglRotated glRotated +#define qglRotatef glRotatef +#define qglScaled glScaled +#define qglScalef glScalef +#define qglScissor glScissor +#define qglSelectBuffer glSelectBuffer +#define qglShadeModel glShadeModel +#define qglStencilFunc glStencilFunc +#define qglStencilMask glStencilMask +#define qglStencilOp glStencilOp +#define qglTexCoord1d glTexCoord1d +#define qglTexCoord1dv glTexCoord1dv +#define qglTexCoord1f glTexCoord1f +#define qglTexCoord1fv glTexCoord1fv +#define qglTexCoord1i glTexCoord1i +#define qglTexCoord1iv glTexCoord1iv +#define qglTexCoord1s glTexCoord1s +#define qglTexCoord1sv glTexCoord1sv +#define qglTexCoord2d glTexCoord2d +#define qglTexCoord2dv glTexCoord2dv +#define qglTexCoord2f glTexCoord2f +#define qglTexCoord2fv glTexCoord2fv +#define qglTexCoord2i glTexCoord2i +#define qglTexCoord2iv glTexCoord2iv +#define qglTexCoord2s glTexCoord2s +#define qglTexCoord2sv glTexCoord2sv +#define qglTexCoord3d glTexCoord3d +#define qglTexCoord3dv glTexCoord3dv +#define qglTexCoord3f glTexCoord3f +#define qglTexCoord3fv glTexCoord3fv +#define qglTexCoord3i glTexCoord3i +#define qglTexCoord3iv glTexCoord3iv +#define qglTexCoord3s glTexCoord3s +#define qglTexCoord3sv glTexCoord3sv +#define qglTexCoord4d glTexCoord4d +#define qglTexCoord4dv glTexCoord4dv +#define qglTexCoord4f glTexCoord4f +#define qglTexCoord4fv glTexCoord4fv +#define qglTexCoord4i glTexCoord4i +#define qglTexCoord4iv glTexCoord4iv +#define qglTexCoord4s glTexCoord4s +#define qglTexCoord4sv glTexCoord4sv +#define qglTexCoordPointer glTexCoordPointer +#define qglTexEnvf glTexEnvf +#define qglTexEnvfv glTexEnvfv +#define qglTexEnvi glTexEnvi +#define qglTexEnviv glTexEnviv +#define qglTexGend glTexGend +#define qglTexGendv glTexGendv +#define qglTexGenf glTexGenf +#define qglTexGenfv glTexGenfv +#define qglTexGeni glTexGeni +#define qglTexGeniv glTexGeniv +#define qglTexImage1D glTexImage1D +#define qglTexImage2D glTexImage2D +#define qglTexParameterf glTexParameterf +#define qglTexParameterfv glTexParameterfv +#define qglTexParameteri glTexParameteri +#define qglTexParameteriv glTexParameteriv +#define qglTexSubImage1D glTexSubImage1D +#define qglTexSubImage2D glTexSubImage2D +#define qglTranslated glTranslated +#define qglTranslatef glTranslatef +#define qglVertex2d glVertex2d +#define qglVertex2dv glVertex2dv +#define qglVertex2f glVertex2f +#define qglVertex2fv glVertex2fv +#define qglVertex2i glVertex2i +#define qglVertex2iv glVertex2iv +#define qglVertex2s glVertex2s +#define qglVertex2sv glVertex2sv +#define qglVertex3d glVertex3d +#define qglVertex3dv glVertex3dv +#define qglVertex3f glVertex3f +#define qglVertex3fv glVertex3fv +#define qglVertex3i glVertex3i +#define qglVertex3iv glVertex3iv +#define qglVertex3s glVertex3s +#define qglVertex3sv glVertex3sv +#define qglVertex4d glVertex4d +#define qglVertex4dv glVertex4dv +#define qglVertex4f glVertex4f +#define qglVertex4fv glVertex4fv +#define qglVertex4i glVertex4i +#define qglVertex4iv glVertex4iv +#define qglVertex4s glVertex4s +#define qglVertex4sv glVertex4sv +#define qglVertexPointer glVertexPointer +#define qglViewport glViewport #endif diff --git a/code/renderer/qgl_linked.h b/code/renderer/qgl_linked.h deleted file mode 100644 index 3d11f4a8..00000000 --- a/code/renderer/qgl_linked.h +++ /dev/null @@ -1,357 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ - -#define qglAccum glAccum -#define qglAlphaFunc glAlphaFunc -#define qglAreTexturesResident glAreTexturesResident -#define qglArrayElement glArrayElement -#define qglBegin glBegin -#define qglBindTexture glBindTexture -#define qglBitmap glBitmap -#define qglBlendFunc glBlendFunc -#define qglCallList glCallList -#define qglCallLists glCallLists -#define qglClear glClear -#define qglClearAccum glClearAccum -#define qglClearColor glClearColor -#define qglClearDepth glClearDepth -#define qglClearIndex glClearIndex -#define qglClearStencil glClearStencil -#define qglClipPlane glClipPlane -#define qglColor3b glColor3b -#define qglColor3bv glColor3bv -#define qglColor3d glColor3d -#define qglColor3dv glColor3dv -#define qglColor3f glColor3f -#define qglColor3fv glColor3fv -#define qglColor3i glColor3i -#define qglColor3iv glColor3iv -#define qglColor3s glColor3s -#define qglColor3sv glColor3sv -#define qglColor3ub glColor3ub -#define qglColor3ubv glColor3ubv -#define qglColor3ui glColor3ui -#define qglColor3uiv glColor3uiv -#define qglColor3us glColor3us -#define qglColor3usv glColor3usv -#define qglColor4b glColor4b -#define qglColor4bv glColor4bv -#define qglColor4d glColor4d -#define qglColor4dv glColor4dv -#define qglColor4f glColor4f -#define qglColor4fv glColor4fv -#define qglColor4i glColor4i -#define qglColor4iv glColor4iv -#define qglColor4s glColor4s -#define qglColor4sv glColor4sv -#define qglColor4ub glColor4ub -#define qglColor4ubv glColor4ubv -#define qglColor4ui glColor4ui -#define qglColor4uiv glColor4uiv -#define qglColor4us glColor4us -#define qglColor4usv glColor4usv -#define qglColorMask glColorMask -#define qglColorMaterial glColorMaterial -#define qglColorPointer glColorPointer -#define qglCopyPixels glCopyPixels -#define qglCopyTexImage1D glCopyTexImage1D -#define qglCopyTexImage2D glCopyTexImage2D -#define qglCopyTexSubImage1D glCopyTexSubImage1D -#define qglCopyTexSubImage2D glCopyTexSubImage2D -#define qglCullFace glCullFace -#define qglDeleteLists glDeleteLists -#define qglDeleteTextures glDeleteTextures -#define qglDepthFunc glDepthFunc -#define qglDepthMask glDepthMask -#define qglDepthRange glDepthRange -#define qglDisable glDisable -#define qglDisableClientState glDisableClientState -#define qglDrawArrays glDrawArrays -#define qglDrawBuffer glDrawBuffer -#define qglDrawElements glDrawElements -#define qglDrawPixels glDrawPixels -#define qglEdgeFlag glEdgeFlag -#define qglEdgeFlagPointer glEdgeFlagPointer -#define qglEdgeFlagv glEdgeFlagv -#define qglEnable glEnable -#define qglEnableClientState glEnableClientState -#define qglEnd glEnd -#define qglEndList glEndList -#define qglEvalCoord1d glEvalCoord1d -#define qglEvalCoord1dv glEvalCoord1dv -#define qglEvalCoord1f glEvalCoord1f -#define qglEvalCoord1fv glEvalCoord1fv -#define qglEvalCoord2d glEvalCoord2d -#define qglEvalCoord2dv glEvalCoord2dv -#define qglEvalCoord2f glEvalCoord2f -#define qglEvalCoord2fv glEvalCoord2fv -#define qglEvalMesh1 glEvalMesh1 -#define qglEvalMesh2 glEvalMesh2 -#define qglEvalPoint1 glEvalPoint1 -#define qglEvalPoint2 glEvalPoint2 -#define qglFeedbackBuffer glFeedbackBuffer -#define qglFinish glFinish -#define qglFlush glFlush -#define qglFogf glFogf -#define qglFogfv glFogfv -#define qglFogi glFogi -#define qglFogiv glFogiv -#define qglFrontFace glFrontFace -#define qglFrustum glFrustum -#define qglGenLists glGenLists -#define qglGenTextures glGenTextures -#define qglGetBooleanv glGetBooleanv -#define qglGetClipPlane glGetClipPlane -#define qglGetDoublev glGetDoublev -#define qglGetError glGetError -#define qglGetFloatv glGetFloatv -#define qglGetIntegerv glGetIntegerv -#define qglGetLightfv glGetLightfv -#define qglGetLightiv glGetLightiv -#define qglGetMapdv glGetMapdv -#define qglGetMapfv glGetMapfv -#define qglGetMapiv glGetMapiv -#define qglGetMaterialfv glGetMaterialfv -#define qglGetMaterialiv glGetMaterialiv -#define qglGetPixelMapfv glGetPixelMapfv -#define qglGetPixelMapuiv glGetPixelMapuiv -#define qglGetPixelMapusv glGetPixelMapusv -#define qglGetPointerv glGetPointerv -#define qglGetPolygonStipple glGetPolygonStipple -#define qglGetString glGetString -#define qglGetTexGendv glGetTexGendv -#define qglGetTexGenfv glGetTexGenfv -#define qglGetTexGeniv glGetTexGeniv -#define qglGetTexImage glGetTexImage -#define qglGetTexLevelParameterfv glGetTexLevelParameterfv -#define qglGetTexLevelParameteriv glGetTexLevelParameteriv -#define qglGetTexParameterfv glGetTexParameterfv -#define qglGetTexParameteriv glGetTexParameteriv -#define qglHint glHint -#define qglIndexMask glIndexMask -#define qglIndexPointer glIndexPointer -#define qglIndexd glIndexd -#define qglIndexdv glIndexdv -#define qglIndexf glIndexf -#define qglIndexfv glIndexfv -#define qglIndexi glIndexi -#define qglIndexiv glIndexiv -#define qglIndexs glIndexs -#define qglIndexsv glIndexsv -#define qglIndexub glIndexub -#define qglIndexubv glIndexubv -#define qglInitNames glInitNames -#define qglInterleavedArrays glInterleavedArrays -#define qglIsEnabled glIsEnabled -#define qglIsList glIsList -#define qglIsTexture glIsTexture -#define qglLightModelf glLightModelf -#define qglLightModelfv glLightModelfv -#define qglLightModeli glLightModeli -#define qglLightModeliv glLightModeliv -#define qglLightf glLightf -#define qglLightfv glLightfv -#define qglLighti glLighti -#define qglLightiv glLightiv -#define qglLineStipple glLineStipple -#define qglLineWidth glLineWidth -#define qglListBase glListBase -#define qglLoadIdentity glLoadIdentity -#define qglLoadMatrixd glLoadMatrixd -#define qglLoadMatrixf glLoadMatrixf -#define qglLoadName glLoadName -#define qglLogicOp glLogicOp -#define qglMap1d glMap1d -#define qglMap1f glMap1f -#define qglMap2d glMap2d -#define qglMap2f glMap2f -#define qglMapGrid1d glMapGrid1d -#define qglMapGrid1f glMapGrid1f -#define qglMapGrid2d glMapGrid2d -#define qglMapGrid2f glMapGrid2f -#define qglMaterialf glMaterialf -#define qglMaterialfv glMaterialfv -#define qglMateriali glMateriali -#define qglMaterialiv glMaterialiv -#define qglMatrixMode glMatrixMode -#define qglMultMatrixd glMultMatrixd -#define qglMultMatrixf glMultMatrixf -#define qglNewList glNewList -#define qglNormal3b glNormal3b -#define qglNormal3bv glNormal3bv -#define qglNormal3d glNormal3d -#define qglNormal3dv glNormal3dv -#define qglNormal3f glNormal3f -#define qglNormal3fv glNormal3fv -#define qglNormal3i glNormal3i -#define qglNormal3iv glNormal3iv -#define qglNormal3s glNormal3s -#define qglNormal3sv glNormal3sv -#define qglNormalPointer glNormalPointer -#define qglOrtho glOrtho -#define qglPassThrough glPassThrough -#define qglPixelMapfv glPixelMapfv -#define qglPixelMapuiv glPixelMapuiv -#define qglPixelMapusv glPixelMapusv -#define qglPixelStoref glPixelStoref -#define qglPixelStorei glPixelStorei -#define qglPixelTransferf glPixelTransferf -#define qglPixelTransferi glPixelTransferi -#define qglPixelZoom glPixelZoom -#define qglPointSize glPointSize -#define qglPolygonMode glPolygonMode -#define qglPolygonOffset glPolygonOffset -#define qglPolygonStipple glPolygonStipple -#define qglPopAttrib glPopAttrib -#define qglPopClientAttrib glPopClientAttrib -#define qglPopMatrix glPopMatrix -#define qglPopName glPopName -#define qglPrioritizeTextures glPrioritizeTextures -#define qglPushAttrib glPushAttrib -#define qglPushClientAttrib glPushClientAttrib -#define qglPushMatrix glPushMatrix -#define qglPushName glPushName -#define qglRasterPos2d glRasterPos2d -#define qglRasterPos2dv glRasterPos2dv -#define qglRasterPos2f glRasterPos2f -#define qglRasterPos2fv glRasterPos2fv -#define qglRasterPos2i glRasterPos2i -#define qglRasterPos2iv glRasterPos2iv -#define qglRasterPos2s glRasterPos2s -#define qglRasterPos2sv glRasterPos2sv -#define qglRasterPos3d glRasterPos3d -#define qglRasterPos3dv glRasterPos3dv -#define qglRasterPos3f glRasterPos3f -#define qglRasterPos3fv glRasterPos3fv -#define qglRasterPos3i glRasterPos3i -#define qglRasterPos3iv glRasterPos3iv -#define qglRasterPos3s glRasterPos3s -#define qglRasterPos3sv glRasterPos3sv -#define qglRasterPos4d glRasterPos4d -#define qglRasterPos4dv glRasterPos4dv -#define qglRasterPos4f glRasterPos4f -#define qglRasterPos4fv glRasterPos4fv -#define qglRasterPos4i glRasterPos4i -#define qglRasterPos4iv glRasterPos4iv -#define qglRasterPos4s glRasterPos4s -#define qglRasterPos4sv glRasterPos4sv -#define qglReadBuffer glReadBuffer -#define qglReadPixels glReadPixels -#define qglRectd glRectd -#define qglRectdv glRectdv -#define qglRectf glRectf -#define qglRectfv glRectfv -#define qglRecti glRecti -#define qglRectiv glRectiv -#define qglRects glRects -#define qglRectsv glRectsv -#define qglRenderMode glRenderMode -#define qglRotated glRotated -#define qglRotatef glRotatef -#define qglScaled glScaled -#define qglScalef glScalef -#define qglScissor glScissor -#define qglSelectBuffer glSelectBuffer -#define qglShadeModel glShadeModel -#define qglStencilFunc glStencilFunc -#define qglStencilMask glStencilMask -#define qglStencilOp glStencilOp -#define qglTexCoord1d glTexCoord1d -#define qglTexCoord1dv glTexCoord1dv -#define qglTexCoord1f glTexCoord1f -#define qglTexCoord1fv glTexCoord1fv -#define qglTexCoord1i glTexCoord1i -#define qglTexCoord1iv glTexCoord1iv -#define qglTexCoord1s glTexCoord1s -#define qglTexCoord1sv glTexCoord1sv -#define qglTexCoord2d glTexCoord2d -#define qglTexCoord2dv glTexCoord2dv -#define qglTexCoord2f glTexCoord2f -#define qglTexCoord2fv glTexCoord2fv -#define qglTexCoord2i glTexCoord2i -#define qglTexCoord2iv glTexCoord2iv -#define qglTexCoord2s glTexCoord2s -#define qglTexCoord2sv glTexCoord2sv -#define qglTexCoord3d glTexCoord3d -#define qglTexCoord3dv glTexCoord3dv -#define qglTexCoord3f glTexCoord3f -#define qglTexCoord3fv glTexCoord3fv -#define qglTexCoord3i glTexCoord3i -#define qglTexCoord3iv glTexCoord3iv -#define qglTexCoord3s glTexCoord3s -#define qglTexCoord3sv glTexCoord3sv -#define qglTexCoord4d glTexCoord4d -#define qglTexCoord4dv glTexCoord4dv -#define qglTexCoord4f glTexCoord4f -#define qglTexCoord4fv glTexCoord4fv -#define qglTexCoord4i glTexCoord4i -#define qglTexCoord4iv glTexCoord4iv -#define qglTexCoord4s glTexCoord4s -#define qglTexCoord4sv glTexCoord4sv -#define qglTexCoordPointer glTexCoordPointer -#define qglTexEnvf glTexEnvf -#define qglTexEnvfv glTexEnvfv -#define qglTexEnvi glTexEnvi -#define qglTexEnviv glTexEnviv -#define qglTexGend glTexGend -#define qglTexGendv glTexGendv -#define qglTexGenf glTexGenf -#define qglTexGenfv glTexGenfv -#define qglTexGeni glTexGeni -#define qglTexGeniv glTexGeniv -#define qglTexImage1D glTexImage1D -#define qglTexImage2D glTexImage2D -#define qglTexParameterf glTexParameterf -#define qglTexParameterfv glTexParameterfv -#define qglTexParameteri glTexParameteri -#define qglTexParameteriv glTexParameteriv -#define qglTexSubImage1D glTexSubImage1D -#define qglTexSubImage2D glTexSubImage2D -#define qglTranslated glTranslated -#define qglTranslatef glTranslatef -#define qglVertex2d glVertex2d -#define qglVertex2dv glVertex2dv -#define qglVertex2f glVertex2f -#define qglVertex2fv glVertex2fv -#define qglVertex2i glVertex2i -#define qglVertex2iv glVertex2iv -#define qglVertex2s glVertex2s -#define qglVertex2sv glVertex2sv -#define qglVertex3d glVertex3d -#define qglVertex3dv glVertex3dv -#define qglVertex3f glVertex3f -#define qglVertex3fv glVertex3fv -#define qglVertex3i glVertex3i -#define qglVertex3iv glVertex3iv -#define qglVertex3s glVertex3s -#define qglVertex3sv glVertex3sv -#define qglVertex4d glVertex4d -#define qglVertex4dv glVertex4dv -#define qglVertex4f glVertex4f -#define qglVertex4fv glVertex4fv -#define qglVertex4i glVertex4i -#define qglVertex4iv glVertex4iv -#define qglVertex4s glVertex4s -#define qglVertex4sv glVertex4sv -#define qglVertexPointer glVertexPointer -#define qglViewport glViewport - diff --git a/code/renderer/tr_cmds.c b/code/renderer/tr_cmds.c index 3be865c8..318a1966 100644 --- a/code/renderer/tr_cmds.c +++ b/code/renderer/tr_cmds.c @@ -118,7 +118,7 @@ void R_IssueRenderCommands( qboolean runPerformanceCounters ) { renderCommandList_t *cmdList; cmdList = &backEndData[tr.smpFrame]->commands; - assert(cmdList); // bk001205 + assert(cmdList); // add an end-of-list command *(int *)(cmdList->cmds + cmdList->used) = RC_END_OF_LIST; diff --git a/code/renderer/tr_image.c b/code/renderer/tr_image.c index 016b6f02..37b91c22 100644 --- a/code/renderer/tr_image.c +++ b/code/renderer/tr_image.c @@ -1358,7 +1358,6 @@ static void LoadTGA ( const char *name, byte **pic, int *width, int *height) #if 0 // TTimo: this is the chunk of code to ensure a behavior that meets TGA specs - // bk0101024 - fix from Leonardo // bit 5 set => top-down if (targa_header.attributes & 0x20) { unsigned char *flip = (unsigned char*)malloc (columns*4); @@ -4850,15 +4849,13 @@ void R_DeleteTextures( void ) { tr.numImages = 0; Com_Memset( glState.currenttextures, 0, sizeof( glState.currenttextures ) ); - if ( qglBindTexture ) { - if ( qglActiveTextureARB ) { - GL_SelectTexture( 1 ); - qglBindTexture( GL_TEXTURE_2D, 0 ); - GL_SelectTexture( 0 ); - qglBindTexture( GL_TEXTURE_2D, 0 ); - } else { - qglBindTexture( GL_TEXTURE_2D, 0 ); - } + if ( qglActiveTextureARB ) { + GL_SelectTexture( 1 ); + qglBindTexture( GL_TEXTURE_2D, 0 ); + GL_SelectTexture( 0 ); + qglBindTexture( GL_TEXTURE_2D, 0 ); + } else { + qglBindTexture( GL_TEXTURE_2D, 0 ); } } diff --git a/code/renderer/tr_init.c b/code/renderer/tr_init.c index 0434d2ad..76e0a9df 100644 --- a/code/renderer/tr_init.c +++ b/code/renderer/tr_init.c @@ -98,7 +98,6 @@ cvar_t *r_primitives; cvar_t *r_texturebits; cvar_t *r_drawBuffer; -cvar_t *r_glDriver; cvar_t *r_lightmap; cvar_t *r_vertexLight; cvar_t *r_uiFullScreen; @@ -149,8 +148,6 @@ cvar_t *r_debugSort; cvar_t *r_printShaders; cvar_t *r_saveFontData; -cvar_t *r_GLlibCoolDownMsec; - cvar_t *r_maxpolys; int max_polys; cvar_t *r_maxpolyverts; @@ -197,7 +194,6 @@ static void InitOpenGL( void ) // // GLimp_Init directly or indirectly references the following cvars: // - r_fullscreen - // - r_glDriver // - r_mode // - r_(color|depth|stencil)bits // - r_ignorehwgamma @@ -905,7 +901,6 @@ void R_Register( void ) // // latched and archived variables // - r_glDriver = ri.Cvar_Get( "r_glDriver", OPENGL_DRIVER_NAME, CVAR_ARCHIVE | CVAR_LATCH ); r_allowExtensions = ri.Cvar_Get( "r_allowExtensions", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_ext_compressed_textures = ri.Cvar_Get( "r_ext_compressed_textures", "0", CVAR_ARCHIVE | CVAR_LATCH ); r_ext_gamma_control = ri.Cvar_Get( "r_ext_gamma_control", "1", CVAR_ARCHIVE | CVAR_LATCH ); @@ -938,11 +933,7 @@ void R_Register( void ) r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH); r_mode = ri.Cvar_Get( "r_mode", "3", CVAR_ARCHIVE | CVAR_LATCH ); -#if USE_SDL_VIDEO r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE ); -#else - r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH ); -#endif r_customwidth = ri.Cvar_Get( "r_customwidth", "1600", CVAR_ARCHIVE | CVAR_LATCH ); r_customheight = ri.Cvar_Get( "r_customheight", "1024", CVAR_ARCHIVE | CVAR_LATCH ); r_customPixelAspect = ri.Cvar_Get( "r_customPixelAspect", "1", CVAR_ARCHIVE | CVAR_LATCH ); @@ -979,12 +970,8 @@ void R_Register( void ) r_dlightBacks = ri.Cvar_Get( "r_dlightBacks", "1", CVAR_ARCHIVE ); r_finish = ri.Cvar_Get ("r_finish", "0", CVAR_ARCHIVE); r_textureMode = ri.Cvar_Get( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST", CVAR_ARCHIVE ); -#if USE_SDL_VIDEO r_swapInterval = ri.Cvar_Get( "r_swapInterval", "0", CVAR_ARCHIVE | CVAR_LATCH ); -#else - r_swapInterval = ri.Cvar_Get( "r_swapInterval", "0", CVAR_ARCHIVE ); -#endif r_gamma = ri.Cvar_Get( "r_gamma", "1", CVAR_ARCHIVE ); r_facePlaneCull = ri.Cvar_Get ("r_facePlaneCull", "1", CVAR_ARCHIVE ); @@ -1046,8 +1033,6 @@ void R_Register( void ) r_maxpolys = ri.Cvar_Get( "r_maxpolys", va("%d", MAX_POLYS), 0); r_maxpolyverts = ri.Cvar_Get( "r_maxpolyverts", va("%d", MAX_POLYVERTS), 0); - r_GLlibCoolDownMsec = ri.Cvar_Get( "r_GLlibCoolDownMsec", "0", CVAR_ARCHIVE ); - // make sure all the commands added here are also // removed in R_Shutdown ri.Cmd_AddCommand( "imagelist", R_ImageList_f ); diff --git a/code/renderer/tr_light.c b/code/renderer/tr_light.c index c21ade73..4cc9cf29 100644 --- a/code/renderer/tr_light.c +++ b/code/renderer/tr_light.c @@ -160,7 +160,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent ) { VectorClear( ent->directedLight ); VectorClear( direction ); - assert( tr.world->lightGridData ); // bk010103 - NULL with -nolight maps + assert( tr.world->lightGridData ); // NULL with -nolight maps // trilerp the light value gridStep[0] = 8; @@ -380,7 +380,6 @@ int R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, ve { trRefEntity_t ent; - // bk010103 - this segfaults with -nolight maps if ( tr.world->lightGridData == NULL ) return qfalse; diff --git a/code/renderer/tr_shader.c b/code/renderer/tr_shader.c index 3f122692..275e32db 100644 --- a/code/renderer/tr_shader.c +++ b/code/renderer/tr_shader.c @@ -2360,7 +2360,7 @@ shader_t *R_FindShaderByName( const char *name ) { int hash; shader_t *sh; - if ( (name==NULL) || (name[0] == 0) ) { // bk001205 + if ( (name==NULL) || (name[0] == 0) ) { return tr.defaultShader; } @@ -2770,7 +2770,7 @@ it and returns a valid (possibly default) shader_t to be used internally. */ shader_t *R_GetShaderByHandle( qhandle_t hShader ) { if ( hShader < 0 ) { - ri.Printf( PRINT_WARNING, "R_GetShaderByHandle: out of range hShader '%d'\n", hShader ); // bk: FIXME name + ri.Printf( PRINT_WARNING, "R_GetShaderByHandle: out of range hShader '%d'\n", hShader ); return tr.defaultShader; } if ( hShader >= tr.numShaders ) { diff --git a/code/renderer/tr_types.h b/code/renderer/tr_types.h index 12b526e2..4edbaf53 100644 --- a/code/renderer/tr_types.h +++ b/code/renderer/tr_types.h @@ -202,33 +202,4 @@ typedef struct { qboolean smpActive; // dual processor } glconfig_t; -// FIXME: VM should be OS agnostic .. in theory - -/* -#ifdef Q3_VM - -#define _3DFX_DRIVER_NAME "Voodoo" -#define OPENGL_DRIVER_NAME "Default" - -#elif defined(_WIN32) -*/ - -#if defined(Q3_VM) || defined(_WIN32) - -#define _3DFX_DRIVER_NAME "3dfxvgl" -#define OPENGL_DRIVER_NAME "opengl32" - -#elif defined(MACOS_X) - -#define _3DFX_DRIVER_NAME "libMesaVoodooGL.dylib" -#define OPENGL_DRIVER_NAME "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib" - -#else - -#define _3DFX_DRIVER_NAME "libMesaVoodooGL.so" -// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=524 -#define OPENGL_DRIVER_NAME "libGL.so.1" - -#endif // !defined _WIN32 - #endif // __TR_TYPES_H diff --git a/code/sdl/sdl_gamma.c b/code/sdl/sdl_gamma.c new file mode 100644 index 00000000..69143cb1 --- /dev/null +++ b/code/sdl/sdl_gamma.c @@ -0,0 +1,84 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. + +This file is part of Quake III Arena source code. + +Quake III Arena source code is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +Quake III Arena source code is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Quake III Arena source code; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +=========================================================================== +*/ + +#include "SDL.h" +#include "../renderer/tr_local.h" +#include "../qcommon/qcommon.h" + +/* +================= +GLimp_SetGamma +================= +*/ +void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned char blue[256] ) +{ + Uint16 table[3][256]; + int i, j; + + if( !glConfig.deviceSupportsGamma || r_ignorehwgamma->integer ) + return; + + for (i = 0; i < 256; i++) + { + table[0][i] = ( ( ( Uint16 ) red[i] ) << 8 ) | red[i]; + table[1][i] = ( ( ( Uint16 ) green[i] ) << 8 ) | green[i]; + table[2][i] = ( ( ( Uint16 ) blue[i] ) << 8 ) | blue[i]; + } + +#ifdef _WIN32 +#include + + // Win2K and newer put this odd restriction on gamma ramps... + OSVERSIONINFO vinfo; + + vinfo.dwOSVersionInfoSize = sizeof( vinfo ); + GetVersionEx( &vinfo ); + if( vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) + { + Com_DPrintf( "performing gamma clamp.\n" ); + for( j = 0 ; j < 3 ; j++ ) + { + for( i = 0 ; i < 128 ; i++ ) + { + if( table[ j ] [ i] > ( ( 128 + i ) << 8 ) ) + table[ j ][ i ] = ( 128 + i ) << 8; + } + + if( table[ j ] [127 ] > 254 << 8 ) + table[ j ][ 127 ] = 254 << 8; + } + } +#endif + + // enforce constantly increasing + for (j = 0; j < 3; j++) + { + for (i = 1; i < 256; i++) + { + if (table[j][i] < table[j][i-1]) + table[j][i] = table[j][i-1]; + } + } + + SDL_SetGammaRamp(table[0], table[1], table[2]); +} + diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c new file mode 100644 index 00000000..b32dac1e --- /dev/null +++ b/code/sdl/sdl_glimp.c @@ -0,0 +1,804 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. + +This file is part of Quake III Arena source code. + +Quake III Arena source code is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +Quake III Arena source code is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Quake III Arena source code; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +=========================================================================== +*/ + +#include "SDL.h" + +#ifdef SMP +#include "SDL_thread.h" +#endif + +#include +#include +#include + +#include "../renderer/tr_local.h" +#include "../client/client.h" +#include "../sys/sys_local.h" +#include "sdl_icon.h" + +/* Just hack it for now. */ +#ifdef MACOS_X +typedef CGLContextObj QGLContext; +#define GLimp_GetCurrentContext() CGLGetCurrentContext() +#define GLimp_SetCurrentContext(ctx) CGLSetCurrentContext(ctx) +#else +typedef void *QGLContext; +#define GLimp_GetCurrentContext() (NULL) +#define GLimp_SetCurrentContext(ctx) +#endif + +static QGLContext opengl_context; + +typedef enum +{ + RSERR_OK, + + RSERR_INVALID_FULLSCREEN, + RSERR_INVALID_MODE, + + RSERR_UNKNOWN +} rserr_t; + +static SDL_Surface *screen = NULL; + +cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained + +void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t ); +void ( APIENTRY * qglActiveTextureARB )( GLenum texture ); +void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture ); + +void ( APIENTRY * qglLockArraysEXT)( GLint, GLint); +void ( APIENTRY * qglUnlockArraysEXT) ( void ); + +/* +=============== +GLimp_Shutdown +=============== +*/ +void GLimp_Shutdown( void ) +{ + IN_Shutdown(); + + SDL_QuitSubSystem( SDL_INIT_VIDEO ); + screen = NULL; + + memset( &glConfig, 0, sizeof( glConfig ) ); + memset( &glState, 0, sizeof( glState ) ); +} + +/* +=============== +GLimp_LogComment +=============== +*/ +void GLimp_LogComment( char *comment ) +{ +} + +/* +=============== +GLimp_SetMode +=============== +*/ +static int GLimp_SetMode( int mode, qboolean fullscreen ) +{ + const char* glstring; + int sdlcolorbits; + int colorbits, depthbits, stencilbits; + int tcolorbits, tdepthbits, tstencilbits; + int i = 0; + SDL_Surface *vidscreen = NULL; + + ri.Printf( PRINT_ALL, "Initializing OpenGL display\n"); + + ri.Printf (PRINT_ALL, "...setting mode %d:", mode ); + + if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) ) + { + ri.Printf( PRINT_ALL, " invalid mode\n" ); + return RSERR_INVALID_MODE; + } + ri.Printf( PRINT_ALL, " %d %d\n", glConfig.vidWidth, glConfig.vidHeight); + + Uint32 flags = SDL_OPENGL; + if (fullscreen) + { + flags |= SDL_FULLSCREEN; + glConfig.isFullscreen = qtrue; + } + else + glConfig.isFullscreen = qfalse; + + if (!r_colorbits->value) + colorbits = 24; + else + colorbits = r_colorbits->value; + + if (!r_depthbits->value) + depthbits = 24; + else + depthbits = r_depthbits->value; + stencilbits = r_stencilbits->value; + + for (i = 0; i < 16; i++) + { + // 0 - default + // 1 - minus colorbits + // 2 - minus depthbits + // 3 - minus stencil + if ((i % 4) == 0 && i) + { + // one pass, reduce + switch (i / 4) + { + case 2 : + if (colorbits == 24) + colorbits = 16; + break; + case 1 : + if (depthbits == 24) + depthbits = 16; + else if (depthbits == 16) + depthbits = 8; + case 3 : + if (stencilbits == 24) + stencilbits = 16; + else if (stencilbits == 16) + stencilbits = 8; + } + } + + tcolorbits = colorbits; + tdepthbits = depthbits; + tstencilbits = stencilbits; + + if ((i % 4) == 3) + { // reduce colorbits + if (tcolorbits == 24) + tcolorbits = 16; + } + + if ((i % 4) == 2) + { // reduce depthbits + if (tdepthbits == 24) + tdepthbits = 16; + else if (tdepthbits == 16) + tdepthbits = 8; + } + + if ((i % 4) == 1) + { // reduce stencilbits + if (tstencilbits == 24) + tstencilbits = 16; + else if (tstencilbits == 16) + tstencilbits = 8; + else + tstencilbits = 0; + } + + sdlcolorbits = 4; + if (tcolorbits == 24) + sdlcolorbits = 8; + + SDL_GL_SetAttribute( SDL_GL_RED_SIZE, sdlcolorbits ); + SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, sdlcolorbits ); + SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits ); + SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits ); + SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits ); + SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); + + // If not allowing software GL, demand accelerated + if( !r_allowSoftwareGL->integer ) + { + if( SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 ) < 0 ) + { + ri.Printf( PRINT_ALL, "Unable to guarantee accelerated " + "visual with libSDL < 1.2.10\n" ); + } + } + + if( SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, r_swapInterval->integer ) < 0 ) + ri.Printf( PRINT_ALL, "r_swapInterval requires libSDL >= 1.2.10\n" ); + +#ifdef USE_ICON + { + SDL_Surface *icon = SDL_CreateRGBSurfaceFrom( + (void *)CLIENT_WINDOW_ICON.pixel_data, + CLIENT_WINDOW_ICON.width, + CLIENT_WINDOW_ICON.height, + CLIENT_WINDOW_ICON.bytes_per_pixel * 8, + CLIENT_WINDOW_ICON.bytes_per_pixel * CLIENT_WINDOW_ICON.width, +#ifdef Q3_LITTLE_ENDIAN + 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF +#else + 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 +#endif + ); + + SDL_WM_SetIcon( icon, NULL ); + SDL_FreeSurface( icon ); + } +#endif + + SDL_WM_SetCaption(CLIENT_WINDOW_TITLE, CLIENT_WINDOW_MIN_TITLE); + SDL_ShowCursor(0); + + if (!(vidscreen = SDL_SetVideoMode(glConfig.vidWidth, glConfig.vidHeight, colorbits, flags))) + { + ri.Printf( PRINT_DEVELOPER, "SDL_SetVideoMode failed: %s\n", SDL_GetError( ) ); + continue; + } + + opengl_context = GLimp_GetCurrentContext(); + + ri.Printf( PRINT_ALL, "Using %d/%d/%d Color bits, %d depth, %d stencil display.\n", + sdlcolorbits, sdlcolorbits, sdlcolorbits, tdepthbits, tstencilbits); + + glConfig.colorBits = tcolorbits; + glConfig.depthBits = tdepthbits; + glConfig.stencilBits = tstencilbits; + break; + } + + if (!vidscreen) + { + ri.Printf( PRINT_ALL, "Couldn't get a visual\n" ); + return RSERR_INVALID_MODE; + } + + screen = vidscreen; + + glstring = (char *) qglGetString (GL_RENDERER); + ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glstring ); + + return RSERR_OK; +} + +/* +=============== +GLimp_StartDriverAndSetMode +=============== +*/ +static qboolean GLimp_StartDriverAndSetMode( int mode, qboolean fullscreen ) +{ + rserr_t err; + + if (!SDL_WasInit(SDL_INIT_VIDEO)) + { + ri.Printf( PRINT_ALL, "SDL_Init( SDL_INIT_VIDEO )... "); + if (SDL_Init(SDL_INIT_VIDEO) == -1) + { + ri.Printf( PRINT_ALL, "FAILED (%s)\n", SDL_GetError()); + return qfalse; + } + ri.Printf( PRINT_ALL, "OK\n"); + } + + if (fullscreen && Cvar_VariableIntegerValue( "in_nograb" ) ) + { + ri.Printf( PRINT_ALL, "Fullscreen not allowed with in_nograb 1\n"); + ri.Cvar_Set( "r_fullscreen", "0" ); + r_fullscreen->modified = qfalse; + fullscreen = qfalse; + } + + err = GLimp_SetMode( mode, fullscreen ); + + switch ( err ) + { + case RSERR_INVALID_FULLSCREEN: + ri.Printf( PRINT_ALL, "...WARNING: fullscreen unavailable in this mode\n" ); + return qfalse; + case RSERR_INVALID_MODE: + ri.Printf( PRINT_ALL, "...WARNING: could not set the given mode (%d)\n", mode ); + return qfalse; + default: + break; + } + + return qtrue; +} +/* +=============== +GLimp_InitExtensions +=============== +*/ +static void GLimp_InitExtensions( void ) +{ + if ( !r_allowExtensions->integer ) + { + ri.Printf( PRINT_ALL, "* IGNORING OPENGL EXTENSIONS *\n" ); + return; + } + + ri.Printf( PRINT_ALL, "Initializing OpenGL extensions\n" ); + + // GL_S3_s3tc + if ( Q_stristr( glConfig.extensions_string, "GL_S3_s3tc" ) ) + { + if ( r_ext_compressed_textures->value ) + { + glConfig.textureCompression = TC_S3TC; + ri.Printf( PRINT_ALL, "...using GL_S3_s3tc\n" ); + } + else + { + glConfig.textureCompression = TC_NONE; + ri.Printf( PRINT_ALL, "...ignoring GL_S3_s3tc\n" ); + } + } + else + { + glConfig.textureCompression = TC_NONE; + ri.Printf( PRINT_ALL, "...GL_S3_s3tc not found\n" ); + } + + // GL_EXT_texture_env_add + glConfig.textureEnvAddAvailable = qfalse; + if ( Q_stristr( glConfig.extensions_string, "EXT_texture_env_add" ) ) + { + if ( r_ext_texture_env_add->integer ) + { + glConfig.textureEnvAddAvailable = qtrue; + ri.Printf( PRINT_ALL, "...using GL_EXT_texture_env_add\n" ); + } + else + { + glConfig.textureEnvAddAvailable = qfalse; + ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_env_add\n" ); + } + } + else + { + ri.Printf( PRINT_ALL, "...GL_EXT_texture_env_add not found\n" ); + } + + // GL_ARB_multitexture + qglMultiTexCoord2fARB = NULL; + qglActiveTextureARB = NULL; + qglClientActiveTextureARB = NULL; + if ( Q_stristr( glConfig.extensions_string, "GL_ARB_multitexture" ) ) + { + if ( r_ext_multitexture->value ) + { + qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) SDL_GL_GetProcAddress( "glMultiTexCoord2fARB" ); + qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glActiveTextureARB" ); + qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glClientActiveTextureARB" ); + + if ( qglActiveTextureARB ) + { + GLint glint = 0; + qglGetIntegerv( GL_MAX_ACTIVE_TEXTURES_ARB, &glint ); + glConfig.maxActiveTextures = (int) glint; + if ( glConfig.maxActiveTextures > 1 ) + { + ri.Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" ); + } + else + { + qglMultiTexCoord2fARB = NULL; + qglActiveTextureARB = NULL; + qglClientActiveTextureARB = NULL; + ri.Printf( PRINT_ALL, "...not using GL_ARB_multitexture, < 2 texture units\n" ); + } + } + } + else + { + ri.Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" ); + } + } + else + { + ri.Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" ); + } + + // GL_EXT_compiled_vertex_array + if ( Q_stristr( glConfig.extensions_string, "GL_EXT_compiled_vertex_array" ) ) + { + if ( r_ext_compiled_vertex_array->value ) + { + ri.Printf( PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n" ); + qglLockArraysEXT = ( void ( APIENTRY * )( GLint, GLint ) ) SDL_GL_GetProcAddress( "glLockArraysEXT" ); + qglUnlockArraysEXT = ( void ( APIENTRY * )( void ) ) SDL_GL_GetProcAddress( "glUnlockArraysEXT" ); + if (!qglLockArraysEXT || !qglUnlockArraysEXT) + { + ri.Error (ERR_FATAL, "bad getprocaddress"); + } + } + else + { + ri.Printf( PRINT_ALL, "...ignoring GL_EXT_compiled_vertex_array\n" ); + } + } + else + { + ri.Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" ); + } + + textureFilterAnisotropic = qfalse; + if ( strstr( glConfig.extensions_string, "GL_EXT_texture_filter_anisotropic" ) ) + { + if ( r_ext_texture_filter_anisotropic->integer ) { + qglGetIntegerv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, (GLint *)&maxAnisotropy ); + if ( maxAnisotropy <= 0 ) { + ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not properly supported!\n" ); + maxAnisotropy = 0; + } + else + { + ri.Printf( PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic (max: %i)\n", maxAnisotropy ); + textureFilterAnisotropic = qtrue; + } + } + else + { + ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n" ); + } + } + else + { + ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" ); + } +} + +#define R_MODE_FALLBACK 3 // 640 * 480 + +/* +=============== +GLimp_Init + +This routine is responsible for initializing the OS specific portions +of OpenGL +=============== +*/ +void GLimp_Init( void ) +{ + qboolean success = qtrue; + + r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); + + // create the window and set up the context + if( !GLimp_StartDriverAndSetMode( r_mode->integer, r_fullscreen->integer ) ) + { + if( r_mode->integer != R_MODE_FALLBACK ) + { + ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d", + r_mode->integer, R_MODE_FALLBACK ); + if( !GLimp_StartDriverAndSetMode( R_MODE_FALLBACK, r_fullscreen->integer ) ) + success = qfalse; + } + else + success = qfalse; + } + + if( !success ) + ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" ); + + // This values force the UI to disable driver selection + glConfig.driverType = GLDRV_ICD; + glConfig.hardwareType = GLHW_GENERIC; + glConfig.deviceSupportsGamma = !!( SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0 ); + + // get our config strings + Q_strncpyz( glConfig.vendor_string, (char *) qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) ); + Q_strncpyz( glConfig.renderer_string, (char *) qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) ); + if (*glConfig.renderer_string && glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] == '\n') + glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] = 0; + Q_strncpyz( glConfig.version_string, (char *) qglGetString (GL_VERSION), sizeof( glConfig.version_string ) ); + Q_strncpyz( glConfig.extensions_string, (char *) qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); + + // initialize extensions + GLimp_InitExtensions( ); + + // This depends on SDL_INIT_VIDEO, hence having it here + IN_Init( ); + + return; +} + + +/* +=============== +GLimp_EndFrame + +Responsible for doing a swapbuffers +=============== +*/ +void GLimp_EndFrame( void ) +{ + // don't flip if drawing to front buffer + if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 ) + { + SDL_GL_SwapBuffers(); + } + + if( r_fullscreen->modified ) + { + qboolean fullscreen; + qboolean sdlToggled = qfalse; + SDL_Surface *s = SDL_GetVideoSurface( ); + + if( s ) + { + // Find out the current state + if( s->flags & SDL_FULLSCREEN ) + fullscreen = qtrue; + else + fullscreen = qfalse; + + // Is the state we want different from the current state? + if( !!r_fullscreen->integer != fullscreen ) + sdlToggled = SDL_WM_ToggleFullScreen( s ); + else + sdlToggled = qtrue; + } + + // SDL_WM_ToggleFullScreen didn't work, so do it the slow way + if( !sdlToggled ) + Cbuf_AddText( "vid_restart" ); + + r_fullscreen->modified = qfalse; + } +} + + + +#ifdef SMP +/* +=========================================================== + +SMP acceleration + +=========================================================== +*/ + +/* + * I have no idea if this will even work...most platforms don't offer + * thread-safe OpenGL libraries, and it looks like the original Linux + * code counted on each thread claiming the GL context with glXMakeCurrent(), + * which you can't currently do in SDL. We'll just have to hope for the best. + */ + +static SDL_mutex *smpMutex = NULL; +static SDL_cond *renderCommandsEvent = NULL; +static SDL_cond *renderCompletedEvent = NULL; +static void (*glimpRenderThread)( void ) = NULL; +static SDL_Thread *renderThread = NULL; + +/* +=============== +GLimp_ShutdownRenderThread +=============== +*/ +static void GLimp_ShutdownRenderThread(void) +{ + if (smpMutex != NULL) + { + SDL_DestroyMutex(smpMutex); + smpMutex = NULL; + } + + if (renderCommandsEvent != NULL) + { + SDL_DestroyCond(renderCommandsEvent); + renderCommandsEvent = NULL; + } + + if (renderCompletedEvent != NULL) + { + SDL_DestroyCond(renderCompletedEvent); + renderCompletedEvent = NULL; + } + + glimpRenderThread = NULL; +} + +/* +=============== +GLimp_RenderThreadWrapper +=============== +*/ +static int GLimp_RenderThreadWrapper( void *arg ) +{ + Com_Printf( "Render thread starting\n" ); + + glimpRenderThread(); + + GLimp_SetCurrentContext(NULL); + + Com_Printf( "Render thread terminating\n" ); + + return 0; +} + +/* +=============== +GLimp_SpawnRenderThread +=============== +*/ +qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) +{ + static qboolean warned = qfalse; + if (!warned) + { + Com_Printf("WARNING: You enable r_smp at your own risk!\n"); + warned = qtrue; + } + +#ifndef MACOS_X + return qfalse; /* better safe than sorry for now. */ +#endif + + if (renderThread != NULL) /* hopefully just a zombie at this point... */ + { + Com_Printf("Already a render thread? Trying to clean it up...\n"); + SDL_WaitThread(renderThread, NULL); + renderThread = NULL; + GLimp_ShutdownRenderThread(); + } + + smpMutex = SDL_CreateMutex(); + if (smpMutex == NULL) + { + Com_Printf( "smpMutex creation failed: %s\n", SDL_GetError() ); + GLimp_ShutdownRenderThread(); + return qfalse; + } + + renderCommandsEvent = SDL_CreateCond(); + if (renderCommandsEvent == NULL) + { + Com_Printf( "renderCommandsEvent creation failed: %s\n", SDL_GetError() ); + GLimp_ShutdownRenderThread(); + return qfalse; + } + + renderCompletedEvent = SDL_CreateCond(); + if (renderCompletedEvent == NULL) + { + Com_Printf( "renderCompletedEvent creation failed: %s\n", SDL_GetError() ); + GLimp_ShutdownRenderThread(); + return qfalse; + } + + glimpRenderThread = function; + renderThread = SDL_CreateThread(GLimp_RenderThreadWrapper, NULL); + if ( renderThread == NULL ) + { + ri.Printf( PRINT_ALL, "SDL_CreateThread() returned %s", SDL_GetError() ); + GLimp_ShutdownRenderThread(); + return qfalse; + } + else + { + // tma 01/09/07: don't think this is necessary anyway? + // + // !!! FIXME: No detach API available in SDL! + //ret = pthread_detach( renderThread ); + //if ( ret ) { + //ri.Printf( PRINT_ALL, "pthread_detach returned %d: %s", ret, strerror( ret ) ); + //} + } + + return qtrue; +} + +static volatile void *smpData = NULL; +static volatile qboolean smpDataReady; + +/* +=============== +GLimp_RendererSleep +=============== +*/ +void *GLimp_RendererSleep( void ) +{ + void *data = NULL; + + GLimp_SetCurrentContext(NULL); + + SDL_LockMutex(smpMutex); + { + smpData = NULL; + smpDataReady = qfalse; + + // after this, the front end can exit GLimp_FrontEndSleep + SDL_CondSignal(renderCompletedEvent); + + while ( !smpDataReady ) + SDL_CondWait(renderCommandsEvent, smpMutex); + + data = (void *)smpData; + } + SDL_UnlockMutex(smpMutex); + + GLimp_SetCurrentContext(opengl_context); + + return data; +} + +/* +=============== +GLimp_FrontEndSleep +=============== +*/ +void GLimp_FrontEndSleep( void ) +{ + SDL_LockMutex(smpMutex); + { + while ( smpData ) + SDL_CondWait(renderCompletedEvent, smpMutex); + } + SDL_UnlockMutex(smpMutex); + + GLimp_SetCurrentContext(opengl_context); +} + +/* +=============== +GLimp_WakeRenderer +=============== +*/ +void GLimp_WakeRenderer( void *data ) +{ + GLimp_SetCurrentContext(NULL); + + SDL_LockMutex(smpMutex); + { + assert( smpData == NULL ); + smpData = data; + smpDataReady = qtrue; + + // after this, the renderer can continue through GLimp_RendererSleep + SDL_CondSignal(renderCommandsEvent); + } + SDL_UnlockMutex(smpMutex); +} + +#else + +// No SMP - stubs +void GLimp_RenderThreadWrapper( void *arg ) +{ +} + +qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) +{ + ri.Printf( PRINT_WARNING, "ERROR: SMP support was disabled at compile time\n"); + return qfalse; +} + +void *GLimp_RendererSleep( void ) +{ + return NULL; +} + +void GLimp_FrontEndSleep( void ) +{ +} + +void GLimp_WakeRenderer( void *data ) +{ +} + +#endif diff --git a/code/sdl/sdl_icon.h b/code/sdl/sdl_icon.h new file mode 100644 index 00000000..866c549d --- /dev/null +++ b/code/sdl/sdl_icon.h @@ -0,0 +1,132 @@ +/* GIMP RGBA C-Source image dump (sdl_icon.h) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[32 * 32 * 4 + 1]; +} CLIENT_WINDOW_ICON = { + 32, 32, 4, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\231\0\0\377\231\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\273\0\0\377\314\0\0\377\231\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\231\0\0\377\231\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\231\0\0" + "\377\314\0\0\377\0\0\0\0\335\0\0\377\314\0\0\377\231\0\0\377\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\231\0\0\377\231\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\231\0\0\377\314\0\0\377\335" + "\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\231\0\0\377\314\0\0\377\335\0\0\377\335" + "\0\0\377\273\0\0\377\231\0\0\377\210\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\231\0\0\377\252\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\0\0\377\273\0\0\377\335\0\0\377\335\0\0" + "\377\314\0\0\377\231\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\252\0\0\377\314\0\0\377\314\0\0\377\314\0\0\377\314\0\0\377" + "\314\0\0\377\314\0\0\377\314\0\0\377\314\0\0\377\0\0\0\0\252\0\0\377\252" + "\0\0\377\0\0\0\0\314\0\0\377\314\0\0\377\314\0\0\377\314\0\0\377\314\0\0" + "\377\314\0\0\377\314\0\0\377\314\0\0\377\252\0\0\377\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\210\0\0\377\231\0\0\377\273\0\0\377\314\0\0\377\314" + "\0\0\377\0\0\0\0\252\0\0\377\252\0\0\377\0\0\0\0\314\0\0\377\314\0\0\377" + "\273\0\0\377\231\0\0\377\210\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\210\0\0\377" + "\273\0\0\377\0\0\0\0\252\0\0\377\252\0\0\377\0\0\0\0\273\0\0\377\210\0\0" + "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0w\0\0\377\273\0\0\377" + "\0\0\0\0\231\0\0\377\252\0\0\377\0\0\0\0\273\0\0\377w\0\0\377\0\0\0\0\0\0" + "\0\0\0\0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\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0", +}; + diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c new file mode 100644 index 00000000..89b8be6d --- /dev/null +++ b/code/sdl/sdl_input.c @@ -0,0 +1,801 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. + +This file is part of Quake III Arena source code. + +Quake III Arena source code is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +Quake III Arena source code is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Quake III Arena source code; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +=========================================================================== +*/ + +#include "SDL.h" + +#include +#include +#include + +#include "../renderer/tr_local.h" +#include "../client/client.h" +#include "../sys/sys_local.h" + +#ifdef MACOS_X +// Mouse acceleration needs to be disabled +#define MACOS_X_ACCELERATION_HACK +// Cursor needs hack to hide +#define MACOS_X_CURSOR_HACK +#endif + +#ifdef MACOS_X_ACCELERATION_HACK +#include +#include +#include +#endif + +//#define KBD_DBG + +static SDL_Joystick *stick = NULL; + +static qboolean mouseAvailable = qfalse; +static qboolean mouseActive = qfalse; +static qboolean keyRepeatEnabled = qfalse; + +static cvar_t *in_mouse; +#ifdef MACOS_X_ACCELERATION_HACK +static cvar_t *in_disablemacosxmouseaccel; +static double originalMouseSpeed = -1.0; +#endif +static cvar_t *in_nograb; + +static cvar_t *in_joystick = NULL; +static cvar_t *in_joystickDebug = NULL; +static cvar_t *in_joystickThreshold = NULL; + +/* +=============== +IN_TranslateSDLToQ3Key +=============== +*/ +static const char *IN_TranslateSDLToQ3Key(SDL_keysym *keysym, int *key) +{ + static char buf[2] = { '\0', '\0' }; + *buf = '\0'; + + *key = 0; + + // these happen to match the ASCII chars. + if ((keysym->sym >= ' ') && (keysym->sym <= '~')) + { + *key = (int) keysym->sym; + } + else + { + switch (keysym->sym) + { + case SDLK_PAGEUP: *key = K_PGUP; break; + case SDLK_KP9: *key = K_KP_PGUP; break; + case SDLK_PAGEDOWN: *key = K_PGDN; break; + case SDLK_KP3: *key = K_KP_PGDN; break; + case SDLK_KP7: *key = K_KP_HOME; break; + case SDLK_HOME: *key = K_HOME; break; + case SDLK_KP1: *key = K_KP_END; break; + case SDLK_END: *key = K_END; break; + case SDLK_KP4: *key = K_KP_LEFTARROW; break; + case SDLK_LEFT: *key = K_LEFTARROW; break; + case SDLK_KP6: *key = K_KP_RIGHTARROW; break; + case SDLK_RIGHT: *key = K_RIGHTARROW; break; + case SDLK_KP2: *key = K_KP_DOWNARROW; break; + case SDLK_DOWN: *key = K_DOWNARROW; break; + case SDLK_KP8: *key = K_KP_UPARROW; break; + case SDLK_UP: *key = K_UPARROW; break; + case SDLK_ESCAPE: *key = K_ESCAPE; break; + case SDLK_KP_ENTER: *key = K_KP_ENTER; break; + case SDLK_RETURN: *key = K_ENTER; break; + case SDLK_TAB: *key = K_TAB; break; + case SDLK_F1: *key = K_F1; break; + case SDLK_F2: *key = K_F2; break; + case SDLK_F3: *key = K_F3; break; + case SDLK_F4: *key = K_F4; break; + case SDLK_F5: *key = K_F5; break; + case SDLK_F6: *key = K_F6; break; + case SDLK_F7: *key = K_F7; break; + case SDLK_F8: *key = K_F8; break; + case SDLK_F9: *key = K_F9; break; + case SDLK_F10: *key = K_F10; break; + case SDLK_F11: *key = K_F11; break; + case SDLK_F12: *key = K_F12; break; + case SDLK_F13: *key = K_F13; break; + case SDLK_F14: *key = K_F14; break; + case SDLK_F15: *key = K_F15; break; + + case SDLK_BACKSPACE: *key = K_BACKSPACE; break; // ctrl-h + case SDLK_KP_PERIOD: *key = K_KP_DEL; break; + case SDLK_DELETE: *key = K_DEL; break; + case SDLK_PAUSE: *key = K_PAUSE; break; + + case SDLK_LSHIFT: + case SDLK_RSHIFT: *key = K_SHIFT; break; + + case SDLK_LCTRL: + case SDLK_RCTRL: *key = K_CTRL; break; + + case SDLK_RMETA: + case SDLK_LMETA: + case SDLK_RALT: + case SDLK_LALT: *key = K_ALT; break; + + case SDLK_LSUPER: + case SDLK_RSUPER: *key = K_SUPER; break; + + case SDLK_KP5: *key = K_KP_5; break; + case SDLK_INSERT: *key = K_INS; break; + case SDLK_KP0: *key = K_KP_INS; break; + case SDLK_KP_MULTIPLY: *key = K_KP_STAR; break; + case SDLK_KP_PLUS: *key = K_KP_PLUS; break; + case SDLK_KP_MINUS: *key = K_KP_MINUS; break; + case SDLK_KP_DIVIDE: *key = K_KP_SLASH; break; + + case SDLK_MODE: *key = K_MODE; break; + case SDLK_COMPOSE: *key = K_COMPOSE; break; + case SDLK_HELP: *key = K_HELP; break; + case SDLK_PRINT: *key = K_PRINT; break; + case SDLK_SYSREQ: *key = K_SYSREQ; break; + case SDLK_BREAK: *key = K_BREAK; break; + case SDLK_MENU: *key = K_MENU; break; + case SDLK_POWER: *key = K_POWER; break; + case SDLK_EURO: *key = K_EURO; break; + case SDLK_UNDO: *key = K_UNDO; break; + case SDLK_SCROLLOCK: *key = K_SCROLLOCK; break; + case SDLK_NUMLOCK: *key = K_KP_NUMLOCK; break; + case SDLK_CAPSLOCK: *key = K_CAPSLOCK; break; + + default: + if (keysym->sym >= SDLK_WORLD_0 && keysym->sym <= SDLK_WORLD_95) + *key = (keysym->sym - SDLK_WORLD_0) + K_WORLD_0; + break; + } + } + + if( keysym->unicode <= 127 ) // maps to ASCII? + { + char ch = (char) keysym->unicode; + if (ch == '~') + *key = '~'; // console HACK + + // translate K_BACKSPACE to ctrl-h for MACOS_X (others?) + if (ch == K_BACKSPACE && keysym->sym != SDLK_DELETE) + { + *key = 'h' - 'a' + 1; + buf[0] = *key; + } + else + buf[0] = ch; + } + + return buf; +} + +/* +=============== +IN_PrintKey +=============== +*/ +static void IN_PrintKey(const SDL_Event* event) +{ +#ifdef KBD_DBG + fprintf( stderr, "key name: %s", SDL_GetKeyName (event->key.keysym.sym ) ); + if(event->key.keysym.unicode) + { + fprintf( stderr, " unicode: %hx", event->key.keysym.unicode ); + if( event->key.keysym.unicode >= '0' && + event->key.keysym.unicode <= '~') // printable? + { + fprintf( stderr, " (%c)", (unsigned char)event->key.keysym.unicode ); + } + } + fflush( stderr ); +#endif +} + +#ifdef MACOS_X_ACCELERATION_HACK +/* +=============== +IN_GetIOHandle +=============== +*/ +static io_connect_t IN_GetIOHandle() // mac os x mouse accel hack +{ + io_connect_t iohandle = MACH_PORT_NULL; + kern_return_t status; + io_service_t iohidsystem = MACH_PORT_NULL; + mach_port_t masterport; + + status = IOMasterPort(MACH_PORT_NULL, &masterport); + if(status != KERN_SUCCESS) + return 0; + + iohidsystem = IORegistryEntryFromPath(masterport, kIOServicePlane ":/IOResources/IOHIDSystem"); + if(!iohidsystem) + return 0; + + status = IOServiceOpen(iohidsystem, mach_task_self(), kIOHIDParamConnectType, &iohandle); + IOObjectRelease(iohidsystem); + + return iohandle; +} +#endif + +/* +=============== +IN_ActivateMouse +=============== +*/ +static void IN_ActivateMouse( void ) +{ + if (!mouseAvailable || !SDL_WasInit( SDL_INIT_VIDEO ) ) + return; + +#ifdef MACOS_X_ACCELERATION_HACK + if (!mouseActive) // mac os x mouse accel hack + { + // Save the status of mouse acceleration + originalMouseSpeed = -1.0; // in case of error + if(in_disablemacosxmouseaccel->integer) + { + io_connect_t mouseDev = IN_GetIOHandle(); + if(mouseDev != 0) + { + if(IOHIDGetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), &originalMouseSpeed) == kIOReturnSuccess) + { + Com_Printf("previous mouse acceleration: %f\n", originalMouseSpeed); + if(IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), -1.0) != kIOReturnSuccess) + { + Com_Printf("Could not disable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n"); + Cvar_Set ("in_disablemacosxmouseaccel", 0); + } + } + else + { + Com_Printf("Could not disable mouse acceleration (failed at IOHIDGetAccelerationWithKey).\n"); + Cvar_Set ("in_disablemacosxmouseaccel", 0); + } + IOServiceClose(mouseDev); + } + else + { + Com_Printf("Could not disable mouse acceleration (failed at IO_GetIOHandle).\n"); + Cvar_Set ("in_disablemacosxmouseaccel", 0); + } + } + } +#endif + + if( !mouseActive ) + { + SDL_WM_GrabInput( SDL_GRAB_ON ); + SDL_ShowCursor( 0 ); + +#ifdef MACOS_X_CURSOR_HACK + // This is a bug in the current SDL/macosx...have to toggle it a few + // times to get the cursor to hide. + SDL_ShowCursor( 1 ); + SDL_ShowCursor( 0 ); +#endif + } + + // in_nograb makes no sense unless fullscreen + if( !r_fullscreen->integer ) + { + if( in_nograb->modified || !mouseActive ) + { + if( in_nograb->integer ) + SDL_WM_GrabInput( SDL_GRAB_OFF ); + else + SDL_WM_GrabInput( SDL_GRAB_ON ); + + in_nograb->modified = qfalse; + } + } + + mouseActive = qtrue; +} + +/* +=============== +IN_DeactivateMouse +=============== +*/ +static void IN_DeactivateMouse( void ) +{ + if (!mouseAvailable || !SDL_WasInit( SDL_INIT_VIDEO ) ) + return; + +#ifdef MACOS_X_ACCELERATION_HACK + if (mouseActive) // mac os x mouse accel hack + { + if(originalMouseSpeed != -1.0) + { + io_connect_t mouseDev = IN_GetIOHandle(); + if(mouseDev != 0) + { + Com_Printf("restoring mouse acceleration to: %f\n", originalMouseSpeed); + if(IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), originalMouseSpeed) != kIOReturnSuccess) + Com_Printf("Could not re-enable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n"); + IOServiceClose(mouseDev); + } + else + Com_Printf("Could not re-enable mouse acceleration (failed at IO_GetIOHandle).\n"); + } + } +#endif + + if( mouseActive ) + { + SDL_ShowCursor( 1 ); + SDL_WM_GrabInput( SDL_GRAB_OFF ); + + mouseActive = qfalse; + } +} + +// We translate axes movement into keypresses +static int joy_keys[16] = { + K_LEFTARROW, K_RIGHTARROW, + K_UPARROW, K_DOWNARROW, + K_JOY16, K_JOY17, + K_JOY18, K_JOY19, + K_JOY20, K_JOY21, + K_JOY22, K_JOY23, + + K_JOY24, K_JOY25, + K_JOY26, K_JOY27 +}; + +// translate hat events into keypresses +// the 4 highest buttons are used for the first hat ... +static int hat_keys[16] = { + K_JOY29, K_JOY30, + K_JOY31, K_JOY32, + K_JOY25, K_JOY26, + K_JOY27, K_JOY28, + K_JOY21, K_JOY22, + K_JOY23, K_JOY24, + K_JOY17, K_JOY18, + K_JOY19, K_JOY20 +}; + + +extern cvar_t * in_joystick; +extern cvar_t * in_joystickDebug; +extern cvar_t * in_joystickThreshold; +cvar_t *in_joystickNo; + +#define ARRAYLEN(x) (sizeof (x) / sizeof (x[0])) +struct +{ + qboolean buttons[16]; // !!! FIXME: these might be too many. + unsigned int oldaxes; + unsigned int oldhats; +} stick_state; + + +/* +=============== +IN_StartupJoystick +=============== +*/ +static void IN_StartupJoystick( void ) +{ + int i = 0; + int total = 0; + + if (stick != NULL) + SDL_JoystickClose(stick); + + stick = NULL; + memset(&stick_state, '\0', sizeof (stick_state)); + + if( !in_joystick->integer ) { + Com_DPrintf( "Joystick is not active.\n" ); + return; + } + + if (!SDL_WasInit(SDL_INIT_JOYSTICK)) + { + Com_DPrintf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n"); + if (SDL_Init(SDL_INIT_JOYSTICK) == -1) + { + Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError()); + return; + } + Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) passed.\n"); + } + + total = SDL_NumJoysticks(); + Com_DPrintf("%d possible joysticks\n", total); + for (i = 0; i < total; i++) + Com_DPrintf("[%d] %s\n", i, SDL_JoystickName(i)); + + in_joystickNo = Cvar_Get( "in_joystickNo", "0", CVAR_ARCHIVE ); + if( in_joystickNo->integer < 0 || in_joystickNo->integer >= total ) + Cvar_Set( "in_joystickNo", "0" ); + + stick = SDL_JoystickOpen( in_joystickNo->integer ); + + if (stick == NULL) { + Com_DPrintf( "No joystick opened.\n" ); + return; + } + + Com_DPrintf( "Joystick %d opened\n", in_joystickNo->integer ); + Com_DPrintf( "Name: %s\n", SDL_JoystickName(in_joystickNo->integer) ); + Com_DPrintf( "Axes: %d\n", SDL_JoystickNumAxes(stick) ); + Com_DPrintf( "Hats: %d\n", SDL_JoystickNumHats(stick) ); + Com_DPrintf( "Buttons: %d\n", SDL_JoystickNumButtons(stick) ); + Com_DPrintf( "Balls: %d\n", SDL_JoystickNumBalls(stick) ); + + SDL_JoystickEventState(SDL_QUERY); + + return; +} + +/* +=============== +IN_JoyMove +=============== +*/ +static void IN_JoyMove( void ) +{ + qboolean joy_pressed[ARRAYLEN(joy_keys)]; + unsigned int axes = 0; + unsigned int hats = 0; + int total = 0; + int i = 0; + + if (!stick) + return; + + SDL_JoystickUpdate(); + + memset(joy_pressed, '\0', sizeof (joy_pressed)); + + // update the ball state. + total = SDL_JoystickNumBalls(stick); + if (total > 0) + { + int balldx = 0; + int balldy = 0; + for (i = 0; i < total; i++) + { + int dx = 0; + int dy = 0; + SDL_JoystickGetBall(stick, i, &dx, &dy); + balldx += dx; + balldy += dy; + } + if (balldx || balldy) + { + // !!! FIXME: is this good for stick balls, or just mice? + // Scale like the mouse input... + if (abs(balldx) > 1) + balldx *= 2; + if (abs(balldy) > 1) + balldy *= 2; + Com_QueueEvent( 0, SE_MOUSE, balldx, balldy, 0, NULL ); + } + } + + // now query the stick buttons... + total = SDL_JoystickNumButtons(stick); + if (total > 0) + { + if (total > ARRAYLEN(stick_state.buttons)) + total = ARRAYLEN(stick_state.buttons); + for (i = 0; i < total; i++) + { + qboolean pressed = (SDL_JoystickGetButton(stick, i) != 0); + if (pressed != stick_state.buttons[i]) + { + Com_QueueEvent( 0, SE_KEY, K_JOY1 + i, pressed, 0, NULL ); + stick_state.buttons[i] = pressed; + } + } + } + + // look at the hats... + total = SDL_JoystickNumHats(stick); + if (total > 0) + { + if (total > 4) total = 4; + for (i = 0; i < total; i++) + { + ((Uint8 *)&hats)[i] = SDL_JoystickGetHat(stick, i); + } + } + + // update hat state + if (hats != stick_state.oldhats) + { + for( i = 0; i < 4; i++ ) { + if( ((Uint8 *)&hats)[i] != ((Uint8 *)&stick_state.oldhats)[i] ) { + // release event + switch( ((Uint8 *)&stick_state.oldhats)[i] ) { + case SDL_HAT_UP: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 0], qfalse, 0, NULL ); + break; + case SDL_HAT_RIGHT: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 1], qfalse, 0, NULL ); + break; + case SDL_HAT_DOWN: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 2], qfalse, 0, NULL ); + break; + case SDL_HAT_LEFT: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 3], qfalse, 0, NULL ); + break; + case SDL_HAT_RIGHTUP: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 0], qfalse, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 1], qfalse, 0, NULL ); + break; + case SDL_HAT_RIGHTDOWN: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 2], qfalse, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 1], qfalse, 0, NULL ); + break; + case SDL_HAT_LEFTUP: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 0], qfalse, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 3], qfalse, 0, NULL ); + break; + case SDL_HAT_LEFTDOWN: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 2], qfalse, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 3], qfalse, 0, NULL ); + break; + default: + break; + } + // press event + switch( ((Uint8 *)&hats)[i] ) { + case SDL_HAT_UP: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 0], qtrue, 0, NULL ); + break; + case SDL_HAT_RIGHT: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 1], qtrue, 0, NULL ); + break; + case SDL_HAT_DOWN: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 2], qtrue, 0, NULL ); + break; + case SDL_HAT_LEFT: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 3], qtrue, 0, NULL ); + break; + case SDL_HAT_RIGHTUP: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 0], qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 1], qtrue, 0, NULL ); + break; + case SDL_HAT_RIGHTDOWN: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 2], qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 1], qtrue, 0, NULL ); + break; + case SDL_HAT_LEFTUP: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 0], qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 3], qtrue, 0, NULL ); + break; + case SDL_HAT_LEFTDOWN: + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 2], qtrue, 0, NULL ); + Com_QueueEvent( 0, SE_KEY, hat_keys[4*i + 3], qtrue, 0, NULL ); + break; + default: + break; + } + } + } + } + + // save hat state + stick_state.oldhats = hats; + + // finally, look at the axes... + total = SDL_JoystickNumAxes(stick); + if (total > 0) + { + if (total > 16) total = 16; + for (i = 0; i < total; i++) + { + Sint16 axis = SDL_JoystickGetAxis(stick, i); + float f = ( (float) axis ) / 32767.0f; + if( f < -in_joystickThreshold->value ) { + axes |= ( 1 << ( i * 2 ) ); + } else if( f > in_joystickThreshold->value ) { + axes |= ( 1 << ( ( i * 2 ) + 1 ) ); + } + } + } + + /* Time to update axes state based on old vs. new. */ + if (axes != stick_state.oldaxes) + { + for( i = 0; i < 16; i++ ) { + if( ( axes & ( 1 << i ) ) && !( stick_state.oldaxes & ( 1 << i ) ) ) { + Com_QueueEvent( 0, SE_KEY, joy_keys[i], qtrue, 0, NULL ); + } + + if( !( axes & ( 1 << i ) ) && ( stick_state.oldaxes & ( 1 << i ) ) ) { + Com_QueueEvent( 0, SE_KEY, joy_keys[i], qfalse, 0, NULL ); + } + } + } + + /* Save for future generations. */ + stick_state.oldaxes = axes; +} + +/* +=============== +IN_ProcessEvents +=============== +*/ +static void IN_ProcessEvents( void ) +{ + SDL_Event e; + const char *p = NULL; + int key = 0; + + if( !SDL_WasInit( SDL_INIT_VIDEO ) ) + return; + + if( cls.keyCatchers == 0 && keyRepeatEnabled ) + { + SDL_EnableKeyRepeat( 0, 0 ); + keyRepeatEnabled = qfalse; + } + else if( !keyRepeatEnabled ) + { + SDL_EnableKeyRepeat( SDL_DEFAULT_REPEAT_DELAY, + SDL_DEFAULT_REPEAT_INTERVAL ); + keyRepeatEnabled = qtrue; + } + + while (SDL_PollEvent(&e)) + { + switch (e.type) + { + case SDL_KEYDOWN: + IN_PrintKey(&e); + p = IN_TranslateSDLToQ3Key(&e.key.keysym, &key); + if( key ) + Com_QueueEvent( 0, SE_KEY, key, qtrue, 0, NULL ); + + if( p ) + { + while( *p ) + Com_QueueEvent( 0, SE_CHAR, *p++, 0, 0, NULL ); + } + break; + + case SDL_KEYUP: + IN_TranslateSDLToQ3Key(&e.key.keysym, &key); + Com_QueueEvent( 0, SE_KEY, key, qfalse, 0, NULL ); + break; + + case SDL_MOUSEMOTION: + if (mouseActive) + Com_QueueEvent( 0, SE_MOUSE, e.motion.xrel, e.motion.yrel, 0, NULL ); + break; + + case SDL_MOUSEBUTTONDOWN: + case SDL_MOUSEBUTTONUP: + { + unsigned char b; + switch (e.button.button) + { + case 1: b = K_MOUSE1; break; + case 2: b = K_MOUSE3; break; + case 3: b = K_MOUSE2; break; + case 4: b = K_MWHEELUP; break; + case 5: b = K_MWHEELDOWN; break; + case 6: b = K_MOUSE4; break; + case 7: b = K_MOUSE5; break; + default: b = K_AUX1 + (e.button.button - 8)%16; break; + } + Com_QueueEvent( 0, SE_KEY, b, + ( e.type == SDL_MOUSEBUTTONDOWN ? qtrue : qfalse ), 0, NULL ); + } + break; + + case SDL_QUIT: + Sys_Quit(); + break; + + default: + break; + } + } +} + +/* +=============== +IN_Frame +=============== +*/ +void IN_Frame (void) +{ + IN_JoyMove( ); + + // Release the mouse if the console if down and we're windowed + if( ( cls.keyCatchers & KEYCATCH_CONSOLE ) && !r_fullscreen->integer ) + IN_DeactivateMouse( ); + else + IN_ActivateMouse( ); + + IN_ProcessEvents( ); +} + +/* +=============== +IN_Init +=============== +*/ +void IN_Init(void) +{ + if( !SDL_WasInit( SDL_INIT_VIDEO ) ) + { + Com_Error( ERR_FATAL, "IN_Init called before SDL_Init( SDL_INIT_VIDEO )\n" ); + return; + } + + Com_DPrintf ("\n------- Input Initialization -------\n"); + + // mouse variables + in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE); + in_nograb = Cvar_Get ("in_nograb", "0", CVAR_ARCHIVE); + + in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE|CVAR_LATCH); + in_joystickDebug = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP); + in_joystickThreshold = Cvar_Get ("in_joystickThreshold", "0.15", CVAR_ARCHIVE); + +#ifdef MACOS_X_ACCELERATION_HACK + in_disablemacosxmouseaccel = Cvar_Get ("in_disablemacosxmouseaccel", "1", CVAR_ARCHIVE); +#endif + + Cvar_Set( "cl_platformSensitivity", "1.0" ); + + SDL_EnableUNICODE(1); + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); + keyRepeatEnabled = qtrue; + + if (in_mouse->value) + mouseAvailable = qtrue; + else + mouseAvailable = qfalse; + + IN_StartupJoystick( ); + Com_DPrintf ("------------------------------------\n"); +} + +/* +=============== +IN_Shutdown +=============== +*/ +void IN_Shutdown(void) +{ + IN_DeactivateMouse(); + + mouseAvailable = qfalse; + + if (stick) + { + SDL_JoystickClose(stick); + stick = NULL; + } + + SDL_QuitSubSystem(SDL_INIT_JOYSTICK); +} diff --git a/code/unix/sdl_snd.c b/code/sdl/sdl_snd.c similarity index 73% rename from code/unix/sdl_snd.c rename to code/sdl/sdl_snd.c index 91f7b51f..dfc2316b 100644 --- a/code/unix/sdl_snd.c +++ b/code/sdl/sdl_snd.c @@ -1,32 +1,4 @@ -#if USE_SDL_SOUND - /* - * SDL implementation for Quake 3: Arena's GPL source release. - * - * This is a replacement of the Linux/OpenSoundSystem code with - * an SDL backend, since it allows us to trivially point just about any - * existing 2D audio backend known to man on any platform at the code, - * plus it benefits from all of SDL's tapdancing to support buggy drivers, - * etc, and gets us free ALSA support, too. - * - * This is the best idea for a direct modernization of the Linux sound code - * in Quake 3. However, it would be nice to replace this with true 3D - * positional audio, compliments of OpenAL... - * - * Written by Ryan C. Gordon (icculus@icculus.org). Please refer to - * http://ioquake3.org/ for the latest version of this code. - * - * Patches and comments are welcome at the above address. - * - * I cut-and-pasted this from linux_snd.c, and moved it to SDL line-by-line. - * There is probably some cruft that could be removed here. - * - * You should define USE_SDL=1 and then add this to the makefile. - * USE_SDL will disable the Open Sound System target. - */ - -/* -Original copyright on Q3A sources: =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. @@ -64,55 +36,16 @@ cvar_t *s_sdlChannels; cvar_t *s_sdlDevSamps; cvar_t *s_sdlMixSamps; -static qboolean use_custom_memset = qfalse; - -/* -=============== -Snd_Memset - -https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371 - - some shitty mess with DMA buffers - the mmap'ing permissions were write only - and glibc optimized for mmx would do memcpy with a prefetch and a read - causing segfaults - some other systems would not let you mmap the DMA with read permissions - so I think I ended up attempting opening with read/write, then try write only - and use my own copy instead of the glibc crap -=============== -*/ - -#ifdef Snd_Memset -#undef Snd_Memset -#endif -void Snd_Memset (void* dest, const int val, const size_t count) -{ - int *pDest; - int i, iterate; - - if (!use_custom_memset) - { - Com_Memset(dest,val,count); - return; - } - iterate = count / sizeof(int); - pDest = (int*)dest; - for(i=0; i= dmasize) @@ -167,10 +100,10 @@ static int formatToStringTableSize = /* =============== -print_audiospec +SNDDMA_PrintAudiospec =============== */ -static void print_audiospec(const char *str, const SDL_AudioSpec *spec) +static void SNDDMA_PrintAudiospec(const char *str, const SDL_AudioSpec *spec) { int i; char *fmt = NULL; @@ -209,8 +142,6 @@ qboolean SNDDMA_Init(void) if (snd_inited) return qtrue; - Com_Printf("Initializing SDL audio driver...\n"); - if (!s_sdlBits) { s_sdlBits = Cvar_Get("s_sdlBits", "16", CVAR_ARCHIVE); s_sdlSpeed = Cvar_Get("s_sdlSpeed", "0", CVAR_ARCHIVE); @@ -219,15 +150,19 @@ qboolean SNDDMA_Init(void) s_sdlMixSamps = Cvar_Get("s_sdlMixSamps", "0", CVAR_ARCHIVE); } + Com_Printf( "SDL_Init( SDL_INIT_AUDIO )... " ); + if (!SDL_WasInit(SDL_INIT_AUDIO)) { if (SDL_Init(SDL_INIT_AUDIO) == -1) { - Com_Printf("SDL_Init(SDL_INIT_AUDIO) failed: %s\n", SDL_GetError()); + Com_Printf( "FAILED (%s)\n", SDL_GetError( ) ); return qfalse; } } + Com_Printf( "OK\n" ); + if (SDL_AudioDriverName(drivername, sizeof (drivername)) == NULL) strcpy(drivername, "(UNKNOWN)"); Com_Printf("SDL audio driver is \"%s\".\n", drivername); @@ -261,16 +196,16 @@ qboolean SNDDMA_Init(void) } desired.channels = (int) s_sdlChannels->value; - desired.callback = sdl_audio_callback; + desired.callback = SNDDMA_AudioCallback; if (SDL_OpenAudio(&desired, &obtained) == -1) { Com_Printf("SDL_OpenAudio() failed: %s\n", SDL_GetError()); SDL_QuitSubSystem(SDL_INIT_AUDIO); return qfalse; - } // if + } - print_audiospec("SDL_AudioSpec", &obtained); + SNDDMA_PrintAudiospec("SDL_AudioSpec", &obtained); // dma.samples needs to be big, or id's mixer will just refuse to // work at all; we need to keep it significantly bigger than the @@ -358,5 +293,3 @@ void SNDDMA_BeginPainting (void) { SDL_LockAudio(); } - -#endif // USE_SDL_SOUND diff --git a/code/server/sv_bot.c b/code/server/sv_bot.c index 49ed0c57..2996561e 100644 --- a/code/server/sv_bot.c +++ b/code/server/sv_bot.c @@ -518,10 +518,6 @@ SV_BotInitBotLib void SV_BotInitBotLib(void) { botlib_import_t botlib_import; - if ( !Cvar_VariableValue("fs_restrict") && !Sys_CheckCD() ) { - Com_Error( ERR_NEED_CD, "Game CD not in drive" ); - } - if (debugpolygons) Z_Free(debugpolygons); bot_maxdebugpolys = Cvar_VariableIntegerValue("bot_maxdebugpolys"); debugpolygons = Z_Malloc(sizeof(bot_debugpoly_t) * bot_maxdebugpolys); @@ -558,7 +554,7 @@ void SV_BotInitBotLib(void) { botlib_import.DebugPolygonDelete = BotImport_DebugPolygonDelete; botlib_export = (botlib_export_t *)GetBotLibAPI( BOTLIB_API_VERSION, &botlib_import ); - assert(botlib_export); // bk001129 - somehow we end up with a zero import. + assert(botlib_export); // somehow we end up with a zero import. } diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c index 6d83b1df..a5804161 100644 --- a/code/server/sv_ccmds.c +++ b/code/server/sv_ccmds.c @@ -321,7 +321,7 @@ static void SV_MapRestart_f( void ) { // this generally shouldn't happen, because the client // was connected before the level change SV_DropClient( client, denied ); - Com_Printf( "SV_MapRestart_f(%d): dropped client %i - denied!\n", delay, i ); // bk010125 + Com_Printf( "SV_MapRestart_f(%d): dropped client %i - denied!\n", delay, i ); continue; } diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 71b03866..cbea6b48 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -173,12 +173,6 @@ void SV_AuthorizeIpPacket( netadr_t from ) { r = Cmd_Argv( 3 ); // reason if ( !Q_stricmp( s, "demo" ) ) { - if ( Cvar_VariableValue( "fs_restrict" ) ) { - // a demo client connecting to a demo server - NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, - "challengeResponse %i", svs.challenges[i].challenge ); - return; - } // they are a demo client trying to connect to a real server NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, "print\nServer is not a demo server\n" ); // clear the challenge record so it won't timeout and let them through diff --git a/code/server/sv_game.c b/code/server/sv_game.c index adb345e3..adf1f5a2 100644 --- a/code/server/sv_game.c +++ b/code/server/sv_game.c @@ -918,7 +918,7 @@ void SV_RestartGameProgs( void ) { // do a restart instead of a free gvm = VM_Restart( gvm ); - if ( !gvm ) { // bk001212 - as done below + if ( !gvm ) { Com_Error( ERR_FATAL, "VM_Restart on game failed" ); } diff --git a/code/server/sv_init.c b/code/server/sv_init.c index d95672ad..c941e7d7 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -416,6 +416,11 @@ void SV_SpawnServer( char *server, qboolean killBots ) { // clear the whole hunk because we're (re)loading the server Hunk_Clear(); +#ifndef DEDICATED + // Restart renderer + CL_StartHunkUsers( qtrue ); +#endif + // clear collision map data CM_ClearMap(); diff --git a/code/server/sv_main.c b/code/server/sv_main.c index 8906d003..c8c6a0a0 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA serverStatic_t svs; // persistant server info server_t sv; // local server -vm_t *gvm = NULL; // game virtual machine // bk001212 init +vm_t *gvm = NULL; // game virtual machine cvar_t *sv_fps; // time rate for running non-clients cvar_t *sv_timeout; // seconds without any message @@ -335,15 +335,6 @@ void SVC_Status( netadr_t from ) { // to prevent timed spoofed reply packets that add ghost servers Info_SetValueForKey( infostring, "challenge", Cmd_Argv(1) ); - // add "demo" to the sv_keywords if restricted - if ( Cvar_VariableValue( "fs_restrict" ) ) { - char keywords[MAX_INFO_STRING]; - - Com_sprintf( keywords, sizeof( keywords ), "demo %s", - Info_ValueForKey( infostring, "sv_keywords" ) ); - Info_SetValueForKey( infostring, "sv_keywords", keywords ); - } - status[0] = 0; statusLength = 0; @@ -780,13 +771,12 @@ void SV_Frame( int msec ) { if (!com_sv_running->integer) { - if(com_dedicated->integer) - { - // Block indefinitely until something interesting happens - // on STDIN. - NET_Sleep(-1); - } - + // Running as a server, but no map loaded +#ifdef DEDICATED + // Block until something interesting happens + NET_Sleep(-1); +#endif + return; } diff --git a/code/win32/glw_win.h b/code/sys/sys_loadlib.h similarity index 64% rename from code/win32/glw_win.h rename to code/sys/sys_loadlib.h index 7bdce144..29b21c7d 100644 --- a/code/win32/glw_win.h +++ b/code/sys/sys_loadlib.h @@ -19,33 +19,18 @@ along with Quake III Arena source code; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#ifndef _WIN32 -# error You should not be including this file on this platform -#endif - -#ifndef __GLW_WIN_H__ -#define __GLW_WIN_H__ - -typedef struct -{ - WNDPROC wndproc; - - HDC hDC; // handle to device context - HGLRC hGLRC; // handle to GL rendering context - - HINSTANCE hinstOpenGL; // HINSTANCE for the OpenGL library - - qboolean allowdisplaydepthchange; - qboolean pixelFormatSet; - - int desktopBitsPixel; - int desktopWidth, desktopHeight; - - qboolean cdsFullscreen; - - FILE *log_fp; -} glwstate_t; - -extern glwstate_t glw_state; - + +#ifdef DEDICATED +# include +# define Sys_LoadLibrary(f) dlopen(f,RTLD_NOW) +# define Sys_UnloadLibrary(h) dlclose(h) +# define Sys_LoadFunction(h,fn) dlsym(h,fn) +# define Sys_LibraryError() dlerror() +#else +# include "SDL.h" +# include "SDL_loadso.h" +# define Sys_LoadLibrary(f) SDL_LoadObject(f) +# define Sys_UnloadLibrary(h) SDL_UnloadObject(h) +# define Sys_LoadFunction(h,fn) SDL_LoadFunction(h,fn) +# define Sys_LibraryError() SDL_GetError() #endif diff --git a/code/unix/unix_glw.h b/code/sys/sys_local.h similarity index 73% rename from code/unix/unix_glw.h rename to code/sys/sys_local.h index 1d815880..2ccac5cf 100644 --- a/code/unix/unix_glw.h +++ b/code/sys/sys_local.h @@ -19,20 +19,22 @@ along with Quake III Arena source code; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#if !( defined __linux__ || defined __FreeBSD__ || defined __sun || defined MACOS_X ) -#error You should include this file only on Linux/FreeBSD/Solaris platforms -#endif - -#ifndef __GLW_LINUX_H__ -#define __GLW_LINUX_H__ - -typedef struct -{ - void *OpenGLLib; // instance of OpenGL library - - FILE *log_fp; -} glwstate_t; - -extern glwstate_t glw_state; - + +#include "../qcommon/q_shared.h" +#include "../qcommon/qcommon.h" + +// Input subsystem +void IN_Init (void); +void IN_Frame (void); +void IN_Shutdown (void); + +// TTY console +void TTY_Hide( void ); +void TTY_Show( void ); +void TTY_Shutdown( void ); +void TTY_Init( void ); +char *TTY_ConsoleInput(void); + +#ifdef MACOS_X +char *Sys_StripAppBundle( char *pwd ); #endif diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c new file mode 100644 index 00000000..df743733 --- /dev/null +++ b/code/sys/sys_main.c @@ -0,0 +1,646 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. + +This file is part of Quake III Arena source code. + +Quake III Arena source code is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +Quake III Arena source code is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Quake III Arena source code; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +=========================================================================== +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef DEDICATED +#include "SDL.h" +#endif + +#include "sys_local.h" +#include "sys_loadlib.h" + +#include "../qcommon/q_shared.h" +#include "../qcommon/qcommon.h" + +static char binaryPath[ MAX_OSPATH ] = { 0 }; +static char installPath[ MAX_OSPATH ] = { 0 }; + +/* +================= +Sys_SetBinaryPath +================= +*/ +void Sys_SetBinaryPath(const char *path) +{ + Q_strncpyz(binaryPath, path, sizeof(binaryPath)); +} + +/* +================= +Sys_BinaryPath +================= +*/ +char *Sys_BinaryPath(void) +{ + return binaryPath; +} + +/* +================= +Sys_SetDefaultInstallPath +================= +*/ +void Sys_SetDefaultInstallPath(const char *path) +{ + Q_strncpyz(installPath, path, sizeof(installPath)); +} + +/* +================= +Sys_DefaultInstallPath +================= +*/ +char *Sys_DefaultInstallPath(void) +{ + if (*installPath) + return installPath; + else + return Sys_Cwd(); +} + +/* +================= +Sys_In_Restart_f + +Restart the input subsystem +================= +*/ +void Sys_In_Restart_f( void ) +{ + IN_Shutdown(); + IN_Init(); +} + +/* +================= +Sys_ConsoleInputInit + +Start the console input subsystem +================= +*/ +void Sys_ConsoleInputInit( void ) +{ +#ifdef DEDICATED + TTY_Init( ); +#endif +} + +/* +================= +Sys_ConsoleInputShutdown + +Shutdown the console input subsystem +================= +*/ +void Sys_ConsoleInputShutdown( void ) +{ +#ifdef DEDICATED + TTY_Shutdown( ); +#endif +} + +/* +================= +Sys_ConsoleInput + +Handle new console input +================= +*/ +char *Sys_ConsoleInput(void) +{ +#ifdef DEDICATED + return TTY_ConsoleInput( ); +#endif + + return NULL; +} + +/* +================= +Sys_Exit + +Single exit point (regular exit or in case of error) +================= +*/ +void Sys_Exit( int ex ) +{ + Sys_ConsoleInputShutdown(); + +#ifndef DEDICATED + SDL_Quit( ); +#endif + +#ifdef NDEBUG + // _exit is called instead of exit since there are rumours of + // GL libraries installing atexit calls that we don't want to call + // FIXME: get some testing done with plain exit + _exit(ex); +#else + // Cause a backtrace on error exits + assert( ex == 0 ); + exit(ex); +#endif +} + +/* +================= +Sys_Quit +================= +*/ +void Sys_Quit (void) +{ + CL_Shutdown (); + Sys_Exit(0); +} + +/* +================= +Sys_GetProcessorFeatures +================= +*/ +cpuFeatures_t Sys_GetProcessorFeatures( void ) +{ + cpuFeatures_t features = 0; + +#ifndef DEDICATED + if( SDL_HasRDTSC( ) ) features |= CF_RDTSC; + if( SDL_HasMMX( ) ) features |= CF_MMX; + if( SDL_HasMMXExt( ) ) features |= CF_MMX_EXT; + if( SDL_Has3DNow( ) ) features |= CF_3DNOW; + if( SDL_Has3DNowExt( ) ) features |= CF_3DNOW_EXT; + if( SDL_HasSSE( ) ) features |= CF_SSE; + if( SDL_HasSSE2( ) ) features |= CF_SSE2; + if( SDL_HasAltiVec( ) ) features |= CF_ALTIVEC; +#endif + + return features; +} + +/* +================= +Sys_Init +================= +*/ +void Sys_Init(void) +{ + Cmd_AddCommand( "in_restart", Sys_In_Restart_f ); + Cvar_Set( "arch", OS_STRING " " ARCH_STRING ); + Cvar_Set( "username", Sys_GetCurrentUser( ) ); +} + +static struct Q3ToAnsiColorTable_s +{ + char Q3color; + char *ANSIcolor; +} TTY_colorTable[ ] = +{ + { COLOR_BLACK, "30" }, + { COLOR_RED, "31" }, + { COLOR_GREEN, "32" }, + { COLOR_YELLOW, "33" }, + { COLOR_BLUE, "34" }, + { COLOR_CYAN, "36" }, + { COLOR_MAGENTA, "35" }, + { COLOR_WHITE, "0" } +}; + +static int TTY_colorTableSize = + sizeof( TTY_colorTable ) / sizeof( TTY_colorTable[ 0 ] ); + +/* +================= +Sys_ANSIColorify + +Transform Q3 colour codes to ANSI escape sequences +================= +*/ +static void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) +{ + int msgLength, pos; + int i, j; + char *escapeCode; + char tempBuffer[ 7 ]; + + if( !msg || !buffer ) + return; + + msgLength = strlen( msg ); + pos = 0; + i = 0; + buffer[ 0 ] = '\0'; + + while( i < msgLength ) + { + if( msg[ i ] == '\n' ) + { + Com_sprintf( tempBuffer, 7, "%c[0m\n", 0x1B ); + strncat( buffer, tempBuffer, bufferSize ); + i++; + } + else if( msg[ i ] == Q_COLOR_ESCAPE ) + { + i++; + + if( i < msgLength ) + { + escapeCode = NULL; + for( j = 0; j < TTY_colorTableSize; j++ ) + { + if( msg[ i ] == TTY_colorTable[ j ].Q3color ) + { + escapeCode = TTY_colorTable[ j ].ANSIcolor; + break; + } + } + + if( escapeCode ) + { + Com_sprintf( tempBuffer, 7, "%c[%sm", 0x1B, escapeCode ); + strncat( buffer, tempBuffer, bufferSize ); + } + + i++; + } + } + else + { + Com_sprintf( tempBuffer, 7, "%c", msg[ i++ ] ); + strncat( buffer, tempBuffer, bufferSize ); + } + } +} + +/* +================= +Sys_Print +================= +*/ +void Sys_Print( const char *msg ) +{ +#ifdef DEDICATED + TTY_Hide(); +#endif + + if( com_ansiColor && com_ansiColor->integer ) + { + char ansiColorString[ MAXPRINTMSG ]; + Sys_ANSIColorify( msg, ansiColorString, MAXPRINTMSG ); + fputs( ansiColorString, stderr ); + } + else + fputs(msg, stderr); + +#ifdef DEDICATED + TTY_Show(); +#endif +} + +/* +================= +Sys_Error +================= +*/ +void Sys_Error( const char *error, ... ) +{ + va_list argptr; + char string[1024]; + +#ifdef DEDICATED + TTY_Hide(); +#endif + + CL_Shutdown (); + + va_start (argptr,error); + Q_vsnprintf (string, sizeof(string), error, argptr); + va_end (argptr); + fprintf(stderr, "Sys_Error: %s\n", string); + + Sys_Exit( 1 ); +} + +/* +================= +Sys_Warn +================= +*/ +void Sys_Warn( char *warning, ... ) +{ + va_list argptr; + char string[1024]; + + va_start (argptr,warning); + Q_vsnprintf (string, sizeof(string), warning, argptr); + va_end (argptr); + +#ifdef DEDICATED + TTY_Hide(); +#endif + + fprintf(stderr, "Warning: %s", string); + +#ifdef DEDICATED + TTY_Show(); +#endif +} + +/* +============ +Sys_FileTime + +returns -1 if not present +============ +*/ +int Sys_FileTime( char *path ) +{ + struct stat buf; + + if (stat (path,&buf) == -1) + return -1; + + return buf.st_mtime; +} + +/* +================= +Sys_UnloadDll +================= +*/ +void Sys_UnloadDll( void *dllHandle ) +{ + if( !dllHandle ) + { + Com_Printf("Sys_UnloadDll(NULL)\n"); + return; + } + + Sys_UnloadLibrary(dllHandle); +} + +/* +================= +Sys_TryLibraryLoad +================= +*/ +static void* Sys_TryLibraryLoad(const char* base, const char* gamedir, const char* fname, char* fqpath ) +{ + void* libHandle; + char* fn; + + *fqpath = 0; + + fn = FS_BuildOSPath( base, gamedir, fname ); + Com_Printf( "Sys_LoadDll(%s)... \n", fn ); + + libHandle = Sys_LoadLibrary(fn); + + if(!libHandle) { + Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, Sys_LibraryError() ); + return NULL; + } + + Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn ); + Q_strncpyz ( fqpath , fn , MAX_QPATH ) ; + + return libHandle; +} + +/* +================= +Sys_LoadDll + +Used to load a development dll instead of a virtual machine +#1 look down current path +#2 look in fs_homepath +#3 look in fs_basepath +================= +*/ +void *Sys_LoadDll( const char *name, char *fqpath , + intptr_t (**entryPoint)(int, ...), + intptr_t (*systemcalls)(intptr_t, ...) ) +{ + void *libHandle; + void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); + char curpath[MAX_OSPATH]; + char fname[MAX_OSPATH]; + char *basepath; + char *homepath; + char *pwdpath; + char *gamedir; + + assert( name ); + + getcwd(curpath, sizeof(curpath)); + snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name); + + // TODO: use fs_searchpaths from files.c + pwdpath = Sys_Cwd(); + basepath = Cvar_VariableString( "fs_basepath" ); + homepath = Cvar_VariableString( "fs_homepath" ); + gamedir = Cvar_VariableString( "fs_game" ); + + libHandle = Sys_TryLibraryLoad(pwdpath, gamedir, fname, fqpath); + + if(!libHandle && homepath) + libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath); + + if(!libHandle && basepath) + libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); + + if(!libHandle) { + Com_Printf ( "Sys_LoadDll(%s) failed to load library\n", name ); + return NULL; + } + + dllEntry = Sys_LoadFunction( libHandle, "dllEntry" ); + *entryPoint = Sys_LoadFunction( libHandle, "vmMain" ); + + if ( !*entryPoint || !dllEntry ) + { + Com_Printf ( "Sys_LoadDll(%s) failed to find vmMain function:\n\"%s\" !\n", name, Sys_LibraryError( ) ); + Sys_UnloadLibrary(libHandle); + + return NULL; + } + + Com_Printf ( "Sys_LoadDll(%s) found vmMain function at %p\n", name, *entryPoint ); + dllEntry( systemcalls ); + + return libHandle; +} + +/* +================= +Sys_Idle +================= +*/ +static void Sys_Idle( void ) +{ +#ifndef DEDICATED + int appState = SDL_GetAppState( ); + int sleep = 0; + + // If we have no input focus at all, sleep a bit + if( !( appState & ( SDL_APPMOUSEFOCUS | SDL_APPINPUTFOCUS ) ) ) + { + Cvar_SetValue( "com_unfocused", 1 ); + sleep += 16; + } + else + Cvar_SetValue( "com_unfocused", 0 ); + + // If we're minimised, sleep a bit more + if( !( appState & SDL_APPACTIVE ) ) + { + Cvar_SetValue( "com_minimized", 1 ); + sleep += 32; + } + else + Cvar_SetValue( "com_minimized", 0 ); + + if( !com_dedicated->integer && sleep ) + SDL_Delay( sleep ); +#else + // Dedicated server idles via NET_Sleep +#endif +} + +/* +================= +Sys_ParseArgs +================= +*/ +void Sys_ParseArgs( int argc, char **argv ) +{ + if( argc == 2 ) + { + if( !strcmp( argv[1], "--version" ) || + !strcmp( argv[1], "-v" ) ) + { + const char* date = __DATE__; +#ifdef DEDICATED + fprintf( stdout, Q3_VERSION " dedicated server (%s)\n", date ); +#else + fprintf( stdout, Q3_VERSION " client (%s)\n", date ); +#endif + Sys_Exit(0); + } + } +} + +#ifndef DEFAULT_BASEDIR +# ifdef MACOS_X +# define DEFAULT_BASEDIR Sys_StripAppBundle(Sys_BinaryPath()) +# else +# define DEFAULT_BASEDIR Sys_BinaryPath() +# endif +#endif + +/* +================= +Sys_SigHandler +================= +*/ +static void Sys_SigHandler( int signal ) +{ + static qboolean signalcaught = qfalse; + + if( signalcaught ) + { + fprintf( stderr, "DOUBLE SIGNAL FAULT: Received signal %d, exiting...\n", + signal ); + } + else + { + signalcaught = qtrue; + fprintf( stderr, "Received signal %d, exiting...\n", signal ); +#ifndef DEDICATED + CL_Shutdown(); +#endif + SV_Shutdown( "Signal caught" ); + } + + Sys_Exit( 0 ); // Exit with 0 to avoid recursive signals +} + +/* +================= +main +================= +*/ +int main( int argc, char **argv ) +{ + int i; + char commandLine[ MAX_STRING_CHARS ] = { 0 }; + + Sys_ParseArgs( argc, argv ); + Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); + Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); + + // Concatenate the command line for passing to Com_Init + for( i = 1; i < argc; i++ ) + { + Q_strcat( commandLine, sizeof( commandLine ), argv[ i ] ); + Q_strcat( commandLine, sizeof( commandLine ), " " ); + } + + Com_Init( commandLine ); + NET_Init(); + + Sys_ConsoleInputInit(); + +#ifndef _WIN32 + // Windows doesn't have these signals + signal( SIGHUP, Sys_SigHandler ); + signal( SIGQUIT, Sys_SigHandler ); + signal( SIGTRAP, Sys_SigHandler ); + signal( SIGIOT, Sys_SigHandler ); + signal( SIGBUS, Sys_SigHandler ); +#endif + + signal( SIGILL, Sys_SigHandler ); + signal( SIGFPE, Sys_SigHandler ); + signal( SIGSEGV, Sys_SigHandler ); + signal( SIGTERM, Sys_SigHandler ); + + while( 1 ) + { + Sys_Idle( ); + IN_Frame( ); + Com_Frame( ); + } + + return 0; +} + diff --git a/code/unix/unix_shared.c b/code/sys/sys_unix.c similarity index 50% rename from code/unix/unix_shared.c rename to code/sys/sys_unix.c index a607a2f7..8a8240bd 100644 --- a/code/unix/unix_shared.c +++ b/code/sys/sys_unix.c @@ -28,20 +28,46 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" -//============================================================================= - -// Used to determine CD Path -static char cdPath[MAX_OSPATH]; - -// Used to determine local installation path -static char installPath[MAX_OSPATH]; - // Used to determine where to store user-specific files -static char homePath[MAX_OSPATH]; +static char homePath[ MAX_OSPATH ] = { 0 }; + +/* +================== +Sys_DefaultHomePath +================== +*/ +char *Sys_DefaultHomePath(void) +{ + char *p; + + if( !*homePath ) + { + if( ( p = getenv( "HOME" ) ) != NULL ) + { + Q_strncpyz( homePath, p, sizeof( homePath ) ); +#ifdef MACOS_X + Q_strcat( homePath, sizeof( homePath ), "/Library/Application Support/Quake3" ); +#else + Q_strcat( homePath, sizeof( homePath ), "/.q3a" ); +#endif + if( mkdir( homePath, 0777 ) ) + { + if( errno != EEXIST ) + { + Sys_Error( "Unable to create directory \"%s\", error is %s(%d)\n", + homePath, strerror( errno ), errno ); + } + } + } + } + + return homePath; +} /* ================ @@ -49,7 +75,7 @@ Sys_Milliseconds ================ */ /* base time in seconds, that's our origin - timeval:tv_sec is an int: + timeval:tv_sec is an int: assuming this wraps every 0x7fffffff - ~68 years since the Epoch (1970) - we're safe till 2038 using unsigned long data type to work right with Sys_XTimeToSysTime */ unsigned long sys_timeBase = 0; @@ -64,7 +90,7 @@ int Sys_Milliseconds (void) struct timeval tp; gettimeofday(&tp, NULL); - + if (!sys_timeBase) { sys_timeBase = tp.tv_sec; @@ -72,135 +98,164 @@ int Sys_Milliseconds (void) } curtime = (tp.tv_sec - sys_timeBase)*1000 + tp.tv_usec/1000; - + return curtime; } -#if (defined(__linux__) || defined(__FreeBSD__) || defined(__sun)) && !defined(DEDICATED) +#if !id386 /* -================ -Sys_XTimeToSysTime -sub-frame timing of events returned by X -X uses the Time typedef - unsigned long -disable with in_subframe 0 - - sys_timeBase*1000 is the number of ms since the Epoch of our origin - xtime is in ms and uses the Epoch as origin - Time data type is an unsigned long: 0xffffffff ms - ~49 days period - I didn't find much info in the XWindow documentation about the wrapping - we clamp sys_timeBase*1000 to unsigned long, that gives us the current origin for xtime - the computation will still work if xtime wraps (at ~49 days period since the Epoch) after we set sys_timeBase - -================ +================== +fastftol +================== */ -extern cvar_t *in_subframe; -int Sys_XTimeToSysTime (unsigned long xtime) +long fastftol( float f ) { - int ret, time, test; - - if (!in_subframe->value) - { - // if you don't want to do any event times corrections - return Sys_Milliseconds(); - } - - // test the wrap issue -#if 0 - // reference values for test: sys_timeBase 0x3dc7b5e9 xtime 0x541ea451 (read these from a test run) - // xtime will wrap in 0xabe15bae ms >~ 0x2c0056 s (33 days from Nov 5 2002 -> 8 Dec) - // NOTE: date -d '1970-01-01 UTC 1039384002 seconds' +%c - // use sys_timeBase 0x3dc7b5e9+0x2c0056 = 0x3df3b63f - // after around 5s, xtime would have wrapped around - // we get 7132, the formula handles the wrap safely - unsigned long xtime_aux,base_aux; - int test; -// Com_Printf("sys_timeBase: %p\n", sys_timeBase); -// Com_Printf("xtime: %p\n", xtime); - xtime_aux = 500; // 500 ms after wrap - base_aux = 0x3df3b63f; // the base a few seconds before wrap - test = xtime_aux - (unsigned long)(base_aux*1000); - Com_Printf("xtime wrap test: %d\n", test); -#endif - - // some X servers (like suse 8.1's) report weird event times - // if the game is loading, resolving DNS, etc. we are also getting old events - // so we only deal with subframe corrections that look 'normal' - ret = xtime - (unsigned long)(sys_timeBase*1000); - time = Sys_Milliseconds(); - test = time - ret; - //printf("delta: %d\n", test); - if (test < 0 || test > 30) // in normal conditions I've never seen this go above - { - return time; - } - - return ret; -} -#endif - -//#if 0 // bk001215 - see snapvector.nasm for replacement -#if !id386 // rcg010206 - using this for PPC builds... -long fastftol( float f ) { // bk001213 - from win32/win_shared.c - //static int tmp; - // __asm fld f - //__asm fistp tmp - //__asm mov eax, tmp - return (long)f; + return (long)f; } -void Sys_SnapVector( float *v ) { // bk001213 - see win32/win_shared.c - // bk001213 - old linux - v[0] = rint(v[0]); - v[1] = rint(v[1]); - v[2] = rint(v[2]); -} -#endif - - -void Sys_Mkdir( const char *path ) +/* +================== +Sys_SnapVector +================== +*/ +void Sys_SnapVector( float *v ) { - mkdir (path, 0777); + v[0] = rint(v[0]); + v[1] = rint(v[1]); + v[2] = rint(v[2]); } +#endif -char *strlwr (char *s) { - if ( s==NULL ) { // bk001204 - paranoia - assert(0); - return s; - } - while (*s) { - *s = tolower(*s); - s++; - } - return s; // bk001204 - duh -} +/* +================== +Sys_RandomBytes +================== +*/ qboolean Sys_RandomBytes( byte *string, int len ) { - FILE *fp; + FILE *fp; - fp = fopen( "/dev/urandom", "r" ); - if( !fp ) - return qfalse; + fp = fopen( "/dev/urandom", "r" ); + if( !fp ) + return qfalse; + + if( !fread( string, sizeof( byte ), len, fp ) ) + { + fclose( fp ); + return qfalse; + } - if( !fread( string, sizeof( byte ), len, fp ) ) { fclose( fp ); - return qfalse; - } - fclose( fp ); - return qtrue; + return qtrue; } -//============================================ +/* +================== +Sys_GetCurrentUser +================== +*/ +char *Sys_GetCurrentUser( void ) +{ + struct passwd *p; -#define MAX_FOUND_FILES 0x1000 + if ( (p = getpwuid( getuid() )) == NULL ) { + return "player"; + } + return p->pw_name; +} -// bk001129 - new in 1.26 -void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, char **list, int *numfiles ) { - char search[MAX_OSPATH], newsubdirs[MAX_OSPATH]; - char filename[MAX_OSPATH]; - DIR *fdir; +/* +================== +Sys_GetClipboardData +================== +*/ +char *Sys_GetClipboardData(void) +{ + return NULL; +} + +#define MEM_THRESHOLD 96*1024*1024 + +/* +================== +Sys_LowPhysicalMemory + +TODO +================== +*/ +qboolean Sys_LowPhysicalMemory( void ) +{ + return qfalse; +} + +/* +================== +Sys_Basename +================== +*/ +const char *Sys_Basename( char *path ) +{ + return basename( path ); +} + +/* +================== +Sys_Dirname +================== +*/ +const char *Sys_Dirname( char *path ) +{ + return dirname( path ); +} + +/* +================== +Sys_Mkdir +================== +*/ +void Sys_Mkdir( const char *path ) +{ + mkdir( path, 0777 ); +} + +/* +================== +Sys_Cwd +================== +*/ +char *Sys_Cwd( void ) +{ + static char cwd[MAX_OSPATH]; + + getcwd( cwd, sizeof( cwd ) - 1 ); + cwd[MAX_OSPATH-1] = 0; + + return cwd; +} + +/* +============================================================== + +DIRECTORY SCANNING + +============================================================== +*/ + +#define MAX_FOUND_FILES 0x1000 + +/* +================== +Sys_ListFilteredFiles +================== +*/ +void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, char **list, int *numfiles ) +{ + char search[MAX_OSPATH], newsubdirs[MAX_OSPATH]; + char filename[MAX_OSPATH]; + DIR *fdir; struct dirent *d; - struct stat st; + struct stat st; if ( *numfiles >= MAX_FOUND_FILES - 1 ) { return; @@ -246,23 +301,24 @@ void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, ch closedir(fdir); } -// bk001129 - in 1.17 this used to be -// char **Sys_ListFiles( const char *directory, const char *extension, int *numfiles, qboolean wantsubs ) +/* +================== +Sys_ListFiles +================== +*/ char **Sys_ListFiles( const char *directory, const char *extension, char *filter, int *numfiles, qboolean wantsubs ) { struct dirent *d; - // char *p; // bk001204 - unused - DIR *fdir; - qboolean dironly = wantsubs; - char search[MAX_OSPATH]; - int nfiles; - char **listCopy; - char *list[MAX_FOUND_FILES]; - //int flag; // bk001204 - unused - int i; - struct stat st; + DIR *fdir; + qboolean dironly = wantsubs; + char search[MAX_OSPATH]; + int nfiles; + char **listCopy; + char *list[MAX_FOUND_FILES]; + int i; + struct stat st; - int extLen; + int extLen; if (filter) { @@ -312,7 +368,7 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter if (*extension) { if ( strlen( d->d_name ) < strlen( extension ) || - Q_stricmp( + Q_stricmp( d->d_name + strlen( d->d_name ) - strlen( extension ), extension ) ) { continue; // didn't match @@ -345,8 +401,14 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter return listCopy; } -void Sys_FreeFileList( char **list ) { - int i; +/* +================== +Sys_FreeFileList +================== +*/ +void Sys_FreeFileList( char **list ) +{ + int i; if ( !list ) { return; @@ -359,93 +421,30 @@ void Sys_FreeFileList( char **list ) { Z_Free( list ); } -char *Sys_Cwd( void ) +#ifdef MACOS_X +/* +================= +Sys_StripAppBundle + +Discovers if passed dir is suffixed with the directory structure of a Mac OS X +.app bundle. If it is, the .app directory structure is stripped off the end and +the result is returned. If not, dir is returned untouched. +================= +*/ +char *Sys_StripAppBundle( char *dir ) { static char cwd[MAX_OSPATH]; - getcwd( cwd, sizeof( cwd ) - 1 ); - cwd[MAX_OSPATH-1] = 0; - + Q_strncpyz(cwd, dir, sizeof(cwd)); + if(strcmp(Sys_Basename(cwd), "MacOS")) + return dir; + Q_strncpyz(cwd, Sys_Dirname(cwd), sizeof(cwd)); + if(strcmp(Sys_Basename(cwd), "Contents")) + return dir; + Q_strncpyz(cwd, Sys_Dirname(cwd), sizeof(cwd)); + if(!strstr(Sys_Basename(cwd), ".app")) + return dir; + Q_strncpyz(cwd, Sys_Dirname(cwd), sizeof(cwd)); return cwd; } - -void Sys_SetDefaultCDPath(const char *path) -{ - Q_strncpyz(cdPath, path, sizeof(cdPath)); -} - -char *Sys_DefaultCDPath(void) -{ - return cdPath; -} - -void Sys_SetDefaultInstallPath(const char *path) -{ - Q_strncpyz(installPath, path, sizeof(installPath)); -} - -char *Sys_DefaultInstallPath(void) -{ - if (*installPath) - return installPath; - else - return Sys_Cwd(); -} - -void Sys_SetDefaultHomePath(const char *path) -{ - Q_strncpyz(homePath, path, sizeof(homePath)); -} - -char *Sys_DefaultHomePath(void) -{ - char *p; - - if (*homePath) - return homePath; - - if ((p = getenv("HOME")) != NULL) { - Q_strncpyz(homePath, p, sizeof(homePath)); -#ifdef MACOS_X - Q_strcat(homePath, sizeof(homePath), "/Library/Application Support/Quake3"); -#else - Q_strcat(homePath, sizeof(homePath), "/.q3a"); -#endif - if (mkdir(homePath, 0777)) { - if (errno != EEXIST) - Sys_Error("Unable to create directory \"%s\", error is %s(%d)\n", homePath, strerror(errno), errno); - } - return homePath; - } - return ""; // assume current dir -} - -//============================================ - -int Sys_GetProcessorId( void ) -{ - return CPUID_GENERIC; -} - -void Sys_ShowConsole( int visLevel, qboolean quitOnClose ) -{ -} - -char *Sys_GetCurrentUser( void ) -{ - struct passwd *p; - - if ( (p = getpwuid( getuid() )) == NULL ) { - return "player"; - } - return p->pw_name; -} - -#if defined(__linux__) || defined(__FreeBSD__) -// TTimo -// sysconf() in libc, POSIX.1 compliant -unsigned int Sys_ProcessorCount(void) -{ - return sysconf(_SC_NPROCESSORS_ONLN); -} -#endif +#endif // MACOS_X diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c new file mode 100644 index 00000000..1ab3130b --- /dev/null +++ b/code/sys/sys_win32.c @@ -0,0 +1,510 @@ +/* +=========================================================================== +Copyright (C) 1999-2005 Id Software, Inc. + +This file is part of Quake III Arena source code. + +Quake III Arena source code is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +Quake III Arena source code is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Quake III Arena source code; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +=========================================================================== +*/ + +#include "../qcommon/q_shared.h" +#include "../qcommon/qcommon.h" +#include "sys_local.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Used to determine where to store user-specific files +static char homePath[ MAX_OSPATH ] = { 0 }; + +/* +================ +Sys_DefaultHomePath +================ +*/ +char *Sys_DefaultHomePath( void ) +{ + TCHAR szPath[MAX_PATH]; + FARPROC qSHGetFolderPath; + HMODULE shfolder = LoadLibrary("shfolder.dll"); + + if( !*homePath ) + { + if(shfolder == NULL) + { + Com_Printf("Unable to load SHFolder.dll\n"); + return NULL; + } + + qSHGetFolderPath = GetProcAddress(shfolder, "SHGetFolderPathA"); + if(qSHGetFolderPath == NULL) + { + Com_Printf("Unable to find SHGetFolderPath in SHFolder.dll\n"); + FreeLibrary(shfolder); + return NULL; + } + + if( !SUCCEEDED( qSHGetFolderPath( NULL, CSIDL_APPDATA, + NULL, 0, szPath ) ) ) + { + Com_Printf("Unable to detect CSIDL_APPDATA\n"); + FreeLibrary(shfolder); + return NULL; + } + Q_strncpyz( homePath, szPath, sizeof( homePath ) ); + Q_strcat( homePath, sizeof( homePath ), "\\Quake3" ); + FreeLibrary(shfolder); + if( !CreateDirectory( homePath, NULL ) ) + { + if( GetLastError() != ERROR_ALREADY_EXISTS ) + { + Com_Printf("Unable to create directory \"%s\"\n", homePath ); + return NULL; + } + } + } + + return homePath; +} + +/* +================ +Sys_Milliseconds +================ +*/ +int sys_timeBase; +int Sys_Milliseconds (void) +{ + int sys_curtime; + static qboolean initialized = qfalse; + + if (!initialized) { + sys_timeBase = timeGetTime(); + initialized = qtrue; + } + sys_curtime = timeGetTime() - sys_timeBase; + + return sys_curtime; +} + +#ifndef __GNUC__ //see snapvectora.s +/* +================ +Sys_SnapVector +================ +*/ +void Sys_SnapVector( float *v ) +{ + int i; + float f; + + f = *v; + __asm fld f; + __asm fistp i; + *v = i; + v++; + f = *v; + __asm fld f; + __asm fistp i; + *v = i; + v++; + f = *v; + __asm fld f; + __asm fistp i; + *v = i; +} +#endif + +/* +================ +Sys_RandomBytes +================ +*/ +qboolean Sys_RandomBytes( byte *string, int len ) +{ + HCRYPTPROV prov; + + if( !CryptAcquireContext( &prov, NULL, NULL, + PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) ) { + + return qfalse; + } + + if( !CryptGenRandom( prov, len, (BYTE *)string ) ) { + CryptReleaseContext( prov, 0 ); + return qfalse; + } + CryptReleaseContext( prov, 0 ); + return qtrue; +} + +/* +================ +Sys_GetCurrentUser +================ +*/ +char *Sys_GetCurrentUser( void ) +{ + static char s_userName[1024]; + unsigned long size = sizeof( s_userName ); + + if( !GetUserName( s_userName, &size ) ) + strcpy( s_userName, "player" ); + + if( !s_userName[0] ) + { + strcpy( s_userName, "player" ); + } + + return s_userName; +} + +/* +================ +Sys_GetClipboardData +================ +*/ +char *Sys_GetClipboardData( void ) +{ + char *data = NULL; + char *cliptext; + + if ( OpenClipboard( NULL ) != 0 ) { + HANDLE hClipboardData; + + if ( ( hClipboardData = GetClipboardData( CF_TEXT ) ) != 0 ) { + if ( ( cliptext = GlobalLock( hClipboardData ) ) != 0 ) { + data = Z_Malloc( GlobalSize( hClipboardData ) + 1 ); + Q_strncpyz( data, cliptext, GlobalSize( hClipboardData ) ); + GlobalUnlock( hClipboardData ); + + strtok( data, "\n\r\b" ); + } + } + CloseClipboard(); + } + return data; +} + +#define MEM_THRESHOLD 96*1024*1024 + +/* +================== +Sys_LowPhysicalMemory +================== +*/ +qboolean Sys_LowPhysicalMemory( void ) +{ + MEMORYSTATUS stat; + GlobalMemoryStatus (&stat); + return (stat.dwTotalPhys <= MEM_THRESHOLD) ? qtrue : qfalse; +} + +/* +============== +Sys_Basename +============== +*/ +const char *Sys_Basename( char *path ) +{ + static char base[ MAX_OSPATH ] = { 0 }; + int length; + + length = strlen( path ) - 1; + + // Skip trailing slashes + while( length > 0 && path[ length ] == '\\' ) + length--; + + while( length > 0 && path[ length - 1 ] != '\\' ) + length--; + + Q_strncpyz( base, &path[ length ], sizeof( base ) ); + + length = strlen( base ) - 1; + + // Strip trailing slashes + while( length > 0 && base[ length ] == '\\' ) + base[ length-- ] = '\0'; + + return base; +} + +/* +============== +Sys_Dirname +============== +*/ +const char *Sys_Dirname( char *path ) +{ + static char dir[ MAX_OSPATH ] = { 0 }; + int length; + + Q_strncpyz( dir, path, sizeof( dir ) ); + length = strlen( dir ) - 1; + + while( length > 0 && dir[ length ] != '\\' ) + length--; + + dir[ length ] = '\0'; + + return dir; +} + +/* +============== +Sys_Mkdir +============== +*/ +void Sys_Mkdir( const char *path ) +{ + _mkdir (path); +} + +/* +============== +Sys_Cwd +============== +*/ +char *Sys_Cwd( void ) { + static char cwd[MAX_OSPATH]; + + _getcwd( cwd, sizeof( cwd ) - 1 ); + cwd[MAX_OSPATH-1] = 0; + + return cwd; +} + +/* +============================================================== + +DIRECTORY SCANNING + +============================================================== +*/ + +#define MAX_FOUND_FILES 0x1000 + +/* +============== +Sys_ListFilteredFiles +============== +*/ +void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, char **list, int *numfiles ) +{ + char search[MAX_OSPATH], newsubdirs[MAX_OSPATH]; + char filename[MAX_OSPATH]; + int findhandle; + struct _finddata_t findinfo; + + if ( *numfiles >= MAX_FOUND_FILES - 1 ) { + return; + } + + if (strlen(subdirs)) { + Com_sprintf( search, sizeof(search), "%s\\%s\\*", basedir, subdirs ); + } + else { + Com_sprintf( search, sizeof(search), "%s\\*", basedir ); + } + + findhandle = _findfirst (search, &findinfo); + if (findhandle == -1) { + return; + } + + do { + if (findinfo.attrib & _A_SUBDIR) { + if (Q_stricmp(findinfo.name, ".") && Q_stricmp(findinfo.name, "..")) { + if (strlen(subdirs)) { + Com_sprintf( newsubdirs, sizeof(newsubdirs), "%s\\%s", subdirs, findinfo.name); + } + else { + Com_sprintf( newsubdirs, sizeof(newsubdirs), "%s", findinfo.name); + } + Sys_ListFilteredFiles( basedir, newsubdirs, filter, list, numfiles ); + } + } + if ( *numfiles >= MAX_FOUND_FILES - 1 ) { + break; + } + Com_sprintf( filename, sizeof(filename), "%s\\%s", subdirs, findinfo.name ); + if (!Com_FilterPath( filter, filename, qfalse )) + continue; + list[ *numfiles ] = CopyString( filename ); + (*numfiles)++; + } while ( _findnext (findhandle, &findinfo) != -1 ); + + _findclose (findhandle); +} + +/* +============== +strgtr +============== +*/ +static qboolean strgtr(const char *s0, const char *s1) +{ + int l0, l1, i; + + l0 = strlen(s0); + l1 = strlen(s1); + + if (l1 s0[i]) { + return qtrue; + } + if (s1[i] < s0[i]) { + return qfalse; + } + } + return qfalse; +} + +/* +============== +Sys_ListFiles +============== +*/ +char **Sys_ListFiles( const char *directory, const char *extension, char *filter, int *numfiles, qboolean wantsubs ) +{ + char search[MAX_OSPATH]; + int nfiles; + char **listCopy; + char *list[MAX_FOUND_FILES]; + struct _finddata_t findinfo; + int findhandle; + int flag; + int i; + + if (filter) { + + nfiles = 0; + Sys_ListFilteredFiles( directory, "", filter, list, &nfiles ); + + list[ nfiles ] = 0; + *numfiles = nfiles; + + if (!nfiles) + return NULL; + + listCopy = Z_Malloc( ( nfiles + 1 ) * sizeof( *listCopy ) ); + for ( i = 0 ; i < nfiles ; i++ ) { + listCopy[i] = list[i]; + } + listCopy[i] = NULL; + + return listCopy; + } + + if ( !extension) { + extension = ""; + } + + // passing a slash as extension will find directories + if ( extension[0] == '/' && extension[1] == 0 ) { + extension = ""; + flag = 0; + } else { + flag = _A_SUBDIR; + } + + Com_sprintf( search, sizeof(search), "%s\\*%s", directory, extension ); + + // search + nfiles = 0; + + findhandle = _findfirst (search, &findinfo); + if (findhandle == -1) { + *numfiles = 0; + return NULL; + } + + do { + if ( (!wantsubs && flag ^ ( findinfo.attrib & _A_SUBDIR )) || (wantsubs && findinfo.attrib & _A_SUBDIR) ) { + if ( nfiles == MAX_FOUND_FILES - 1 ) { + break; + } + list[ nfiles ] = CopyString( findinfo.name ); + nfiles++; + } + } while ( _findnext (findhandle, &findinfo) != -1 ); + + list[ nfiles ] = 0; + + _findclose (findhandle); + + // return a copy of the list + *numfiles = nfiles; + + if ( !nfiles ) { + return NULL; + } + + listCopy = Z_Malloc( ( nfiles + 1 ) * sizeof( *listCopy ) ); + for ( i = 0 ; i < nfiles ; i++ ) { + listCopy[i] = list[i]; + } + listCopy[i] = NULL; + + do { + flag = 0; + for(i=1; i +#include +#include +#include + +/* +============================================================= +tty console routines + +NOTE: if the user is editing a line when something gets printed to the early +console then it won't look good so we provide TTY_Hide and TTY_Show to be +called before and after a stdout or stderr output +============================================================= +*/ + +// general flag to tell about tty console mode +static qboolean ttycon_on = qfalse; +static int ttycon_hide = 0; + +// some key codes that the terminal may be using, initialised on start up +static int TTY_erase; +static int TTY_eof; + +static struct termios TTY_tc; + +static field_t TTY_con; + +// This is somewhat of aduplicate of the graphical console history +// but it's safer more modular to have our own here +#define TTY_HISTORY 32 +static field_t ttyEditLines[ TTY_HISTORY ]; +static int hist_current = -1, hist_count = 0; + +/* +================== +TTY_FlushIn + +Flush stdin, I suspect some terminals are sending a LOT of shit +FIXME relevant? +================== +*/ +static void TTY_FlushIn( void ) +{ + char key; + while (read(0, &key, 1)!=-1); +} + +/* +================== +TTY_Back + +Output a backspace + +NOTE: it seems on some terminals just sending '\b' is not enough so instead we +send "\b \b" +(FIXME there may be a way to find out if '\b' alone would work though) +================== +*/ +static void TTY_Back( void ) +{ + char key; + key = '\b'; + write(1, &key, 1); + key = ' '; + write(1, &key, 1); + key = '\b'; + write(1, &key, 1); +} + +/* +================== +TTY_Hide + +Clear the display of the line currently edited +bring cursor back to beginning of line +================== +*/ +void TTY_Hide( void ) +{ + if( ttycon_on ) + { + int i; + if (ttycon_hide) + { + ttycon_hide++; + return; + } + if (TTY_con.cursor>0) + { + for (i=0; i0); + ttycon_hide--; + if (ttycon_hide == 0) + { + write( 1, "]", 1 ); + if (TTY_con.cursor) + { + for (i=0; i= 0); + assert(hist_current >= -1); + assert(hist_current <= hist_count); + // make some room + for (i=TTY_HISTORY-1; i>0; i--) + { + ttyEditLines[i] = ttyEditLines[i-1]; + } + ttyEditLines[0] = *field; + if (hist_count= 0); + assert(hist_current >= -1); + assert(hist_current <= hist_count); + hist_prev = hist_current + 1; + if (hist_prev >= hist_count) + { + return NULL; + } + hist_current++; + return &(ttyEditLines[hist_current]); +} + +/* +================== +Hist_Next +================== +*/ +field_t *Hist_Next( void ) +{ + assert(hist_count <= TTY_HISTORY); + assert(hist_count >= 0); + assert(hist_current >= -1); + assert(hist_current <= hist_count); + if (hist_current >= 0) + { + hist_current--; + } + if (hist_current == -1) + { + return NULL; + } + return &(ttyEditLines[hist_current]); +} + +/* +================== +TTY_Init + +Initialize the console input (tty mode if possible) +================== +*/ +void TTY_Init( void ) +{ + struct termios tc; + + // If the process is backgrounded (running non interactively) + // then SIGTTIN or SIGTOU is emitted, if not caught, turns into a SIGSTP + signal(SIGTTIN, SIG_IGN); + signal(SIGTTOU, SIG_IGN); + + // Make stdin reads non-blocking + fcntl( 0, F_SETFL, fcntl( 0, F_GETFL, 0 ) | O_NDELAY ); + + if (isatty(STDIN_FILENO)!=1) + { + Com_Printf( "stdin is not a tty, tty console mode disabled\n"); + ttycon_on = qfalse; + return; + } + + Field_Clear(&TTY_con); + tcgetattr (0, &TTY_tc); + TTY_erase = TTY_tc.c_cc[VERASE]; + TTY_eof = TTY_tc.c_cc[VEOF]; + tc = TTY_tc; + + /* + ECHO: don't echo input characters + ICANON: enable canonical mode. This enables the special + characters EOF, EOL, EOL2, ERASE, KILL, REPRINT, + STATUS, and WERASE, and buffers by lines. + ISIG: when any of the characters INTR, QUIT, SUSP, or + DSUSP are received, generate the corresponding sig­ + nal + */ + tc.c_lflag &= ~(ECHO | ICANON); + + /* + ISTRIP strip off bit 8 + INPCK enable input parity checking + */ + tc.c_iflag &= ~(ISTRIP | INPCK); + tc.c_cc[VMIN] = 1; + tc.c_cc[VTIME] = 0; + tcsetattr (0, TCSADRAIN, &tc); + ttycon_on = qtrue; +} + +/* +================== +TTY_ConsoleInput +================== +*/ +char *TTY_ConsoleInput( void ) +{ + // we use this when sending back commands + static char text[256]; + int avail; + char key; + field_t *history; + + if( ttycon_on ) + { + avail = read(0, &key, 1); + if (avail != -1) + { + // we have something + // backspace? + // NOTE TTimo testing a lot of values .. seems it's the only way to get it to work everywhere + if ((key == TTY_erase) || (key == 127) || (key == 8)) + { + if (TTY_con.cursor > 0) + { + TTY_con.cursor--; + TTY_con.buffer[TTY_con.cursor] = '\0'; + TTY_Back(); + } + return NULL; + } + // check if this is a control char + if ((key) && (key) < ' ') + { + if (key == '\n') + { + // push it in history + Hist_Add(&TTY_con); + strcpy(text, TTY_con.buffer); + Field_Clear(&TTY_con); + key = '\n'; + write(1, &key, 1); + write( 1, "]", 1 ); + return text; + } + if (key == '\t') + { + TTY_Hide(); + Field_AutoComplete( &TTY_con ); + TTY_Show(); + return NULL; + } + avail = read(0, &key, 1); + if (avail != -1) + { + // VT 100 keys + if (key == '[' || key == 'O') + { + avail = read(0, &key, 1); + if (avail != -1) + { + switch (key) + { + case 'A': + history = Hist_Prev(); + if (history) + { + TTY_Hide(); + TTY_con = *history; + TTY_Show(); + } + TTY_FlushIn(); + return NULL; + break; + case 'B': + history = Hist_Next(); + TTY_Hide(); + if (history) + { + TTY_con = *history; + } else + { + Field_Clear(&TTY_con); + } + TTY_Show(); + TTY_FlushIn(); + return NULL; + break; + case 'C': + return NULL; + case 'D': + return NULL; + } + } + } + } + Com_DPrintf("droping ISCTL sequence: %d, TTY_erase: %d\n", key, TTY_erase); + TTY_FlushIn(); + return NULL; + } + // push regular character + TTY_con.buffer[TTY_con.cursor] = key; + TTY_con.cursor++; + // print the current line (this is differential) + write(1, &key, 1); + } + + return NULL; + } + else + { + int len; + fd_set fdset; + struct timeval timeout; + static qboolean stdin_active; + + if (!com_dedicated || !com_dedicated->value) + return NULL; + + if (!stdin_active) + return NULL; + + FD_ZERO(&fdset); + FD_SET(0, &fdset); // stdin + timeout.tv_sec = 0; + timeout.tv_usec = 0; + if (select (1, &fdset, NULL, NULL, &timeout) == -1 || !FD_ISSET(0, &fdset)) + { + return NULL; + } + + len = read (0, text, sizeof(text)); + if (len == 0) + { // eof! + stdin_active = qfalse; + return NULL; + } + + if (len < 1) + return NULL; + text[len-1] = 0; // rip off the /n and terminate + + return text; + } +} diff --git a/code/win32/resource.h b/code/sys/win_resource.h similarity index 100% rename from code/win32/resource.h rename to code/sys/win_resource.h diff --git a/code/win32/win_resource.rc b/code/sys/win_resource.rc similarity index 89% rename from code/win32/win_resource.rc rename to code/sys/win_resource.rc index 52d1355b..2654835e 100644 --- a/code/win32/win_resource.rc +++ b/code/sys/win_resource.rc @@ -1,6 +1,6 @@ //Microsoft Developer Studio generated resource script. // -#include "resource.h" +#include "win_resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -57,11 +57,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -#ifndef __MINGW32__ -IDI_ICON1 ICON DISCARDABLE "qe3.ico" -#else -IDI_ICON1 ICON DISCARDABLE "code/win32/qe3.ico" -#endif +IDI_ICON1 ICON DISCARDABLE "misc/quake3.ico" ///////////////////////////////////////////////////////////////////////////// // diff --git a/code/ui/ui_atoms.c b/code/ui/ui_atoms.c index 9130e33f..1a2780fe 100644 --- a/code/ui/ui_atoms.c +++ b/code/ui/ui_atoms.c @@ -76,7 +76,7 @@ void UI_StartDemoLoop( void ) { } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static void NeedCDAction( qboolean result ) { if ( !result ) { trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); @@ -84,7 +84,7 @@ static void NeedCDAction( qboolean result ) { } #endif // MISSIONPACK -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static void NeedCDKeyAction( qboolean result ) { if ( !result ) { trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); diff --git a/code/ui/ui_gameinfo.c b/code/ui/ui_gameinfo.c index ef82ee3e..bcb2622e 100644 --- a/code/ui/ui_gameinfo.c +++ b/code/ui/ui_gameinfo.c @@ -38,7 +38,7 @@ static char *ui_botInfos[MAX_BOTS]; static int ui_numArenas; static char *ui_arenaInfos[MAX_ARENAS]; -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int ui_numSinglePlayerArenas; static int ui_numSpecialSinglePlayerArenas; #endif diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 343ea1f9..dc09385a 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -119,7 +119,7 @@ static char* netnames[] = { NULL }; -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static char quake3worldMessage[] = "Visit www.quake3world.com - News, Community, Events, Files"; #endif @@ -203,7 +203,7 @@ intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, UI_DrawConnectScreen( arg0 ); return 0; case UI_HASUNIQUECDKEY: // mod authors need to observe this - return qtrue; // bk010117 - change this to qfalse for mods! + return qtrue; // change this to qfalse for mods! } @@ -312,7 +312,7 @@ int Text_Height(const char *text, float scale, int limit) { float max; glyphInfo_t *glyph; float useScale; - const char *s = text; // bk001206 - unsigned + const char *s = text; fontInfo_t *font = &uiInfo.uiDC.Assets.textFont; if (scale <= ui_smallFont.value) { font = &uiInfo.uiDC.Assets.smallFont; @@ -365,7 +365,7 @@ void Text_Paint(float x, float y, float scale, vec4_t color, const char *text, f } useScale = scale * font->glyphScale; if (text) { - const char *s = text; // bk001206 - unsigned + const char *s = text; trap_R_SetColor( color ); memcpy(&newColor[0], &color[0], sizeof(vec4_t)); len = strlen(text); @@ -434,7 +434,7 @@ void Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const cha } useScale = scale * font->glyphScale; if (text) { - const char *s = text; // bk001206 - unsigned + const char *s = text; trap_R_SetColor( color ); memcpy(&newColor[0], &color[0], sizeof(vec4_t)); len = strlen(text); @@ -442,7 +442,7 @@ void Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const cha len = limit; } count = 0; - glyph2 = &font->glyphs[ (int) cursor]; // bk001206 - possible signed char + glyph2 = &font->glyphs[ (int) cursor]; while (s && *s && count < len) { glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build //int yadj = Assets.textFont.glyphs[text[i]].bottom + Assets.textFont.glyphs[text[i]].top; @@ -524,7 +524,7 @@ static void Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t vec4_t newColor; glyphInfo_t *glyph; if (text) { - const char *s = text; // bk001206 - unsigned + const char *s = text; float max = *maxX; float useScale; fontInfo_t *font = &uiInfo.uiDC.Assets.textFont; @@ -1007,7 +1007,7 @@ void UI_Load(void) { } static const char *handicapValues[] = {"None","95","90","85","80","75","70","65","60","55","50","45","40","35","30","25","20","15","10","5",NULL}; -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int numHandicaps = sizeof(handicapValues) / sizeof(const char*); #endif @@ -1412,7 +1412,7 @@ static void UI_DrawTierGameType(rectDef_t *rect, float scale, vec4_t color, int } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const char *UI_OpponentLeaderName(void) { int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); return uiInfo.teamList[i].teamMembers[0]; @@ -1429,7 +1429,7 @@ static const char *UI_AIFromName(const char *name) { return "James"; } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const int UI_AIIndex(const char *name) { int j; for (j = 0; j < uiInfo.characterCount; j++) { @@ -1441,7 +1441,7 @@ static const int UI_AIIndex(const char *name) { } #endif -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const int UI_AIIndexFromName(const char *name) { int j; for (j = 0; j < uiInfo.aliasCount; j++) { @@ -1454,14 +1454,14 @@ static const int UI_AIIndexFromName(const char *name) { #endif -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const char *UI_OpponentLeaderHead(void) { const char *leader = UI_OpponentLeaderName(); return UI_AIFromName(leader); } #endif -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const char *UI_OpponentLeaderModel(void) { int i; const char *head = UI_OpponentLeaderHead(); @@ -4897,9 +4897,8 @@ static void UI_Pause(qboolean b) { } } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int UI_OwnerDraw_Width(int ownerDraw) { - // bk001205 - LCC missing return value return 0; } #endif @@ -5131,7 +5130,7 @@ void _UI_Init( qboolean inGameLoad ) { #if 0 if (uiInfo.inGameLoad) { UI_LoadMenus("ui/ingame.txt", qtrue); - } else { // bk010222: left this: UI_LoadMenus(menuSet, qtrue); + } else { } #else UI_LoadMenus(menuSet, qtrue); @@ -5697,8 +5696,6 @@ vmCvar_t ui_realCaptureLimit; vmCvar_t ui_realWarmUp; vmCvar_t ui_serverStatusTimeOut; - -// bk001129 - made static to avoid aliasing static cvarTable_t cvarTable[] = { { &ui_ffa_fraglimit, "ui_ffa_fraglimit", "20", CVAR_ARCHIVE }, { &ui_ffa_timelimit, "ui_ffa_timelimit", "0", CVAR_ARCHIVE }, @@ -5821,7 +5818,6 @@ static cvarTable_t cvarTable[] = { }; -// bk001129 - made static to avoid aliasing static int cvarTableSize = sizeof(cvarTable) / sizeof(cvarTable[0]); @@ -5885,7 +5881,7 @@ static void UI_StopServerRefresh( void ) ArenaServers_MaxPing ================= */ -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int ArenaServers_MaxPing( void ) { int maxPing; diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index 1df9779d..d2593fdc 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -534,7 +534,7 @@ qboolean PC_Script_Parse(int handle, const char **out) { } Q_strcat(script, 1024, " "); } - return qfalse; // bk001105 - LCC missing return value + return qfalse; } // display, window, menu, item code @@ -1342,13 +1342,13 @@ qboolean Item_SetFocus(itemDef_t *item, float x, float y) { itemDef_t *oldFocus; sfxHandle_t *sfx = &DC->Assets.itemFocusSound; qboolean playSound = qfalse; - menuDef_t *parent; // bk001206: = (menuDef_t*)item->parent; + menuDef_t *parent; // sanity check, non-null, not a decoration and does not already have the focus if (item == NULL || item->window.flags & WINDOW_DECORATION || item->window.flags & WINDOW_HASFOCUS || !(item->window.flags & WINDOW_VISIBLE)) { return qfalse; } - // bk001206 - this can be NULL. + // this can be NULL parent = (menuDef_t*)item->parent; // items can be enabled and disabled based on cvars @@ -2374,7 +2374,6 @@ qboolean Item_HandleKey(itemDef_t *item, int key, qboolean down) { captureFunc = 0; captureData = NULL; } else { - // bk001206 - parentheses if ( down && ( key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 ) ) { Item_StartCapture(item, key); } @@ -2629,7 +2628,6 @@ void Menu_HandleKey(menuDef_t *menu, int key, qboolean down) { // see if the mouse is within the window bounds and if so is this a mouse click if (down && !(menu->window.flags & WINDOW_POPUP) && !Rect_ContainsPoint(&menu->window.rect, DC->cursorx, DC->cursory)) { static qboolean inHandleKey = qfalse; - // bk001206 - parentheses if (!inHandleKey && ( key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 ) ) { inHandleKey = qtrue; Menus_HandleOOBClick(menu, key, down); @@ -3188,7 +3186,6 @@ static bind_t g_bindings[] = {"tauntGauntlet", K_F5, -1, -1, -1}, {"scoresUp", K_KP_PGUP, -1, -1, -1}, {"scoresDown", K_KP_PGDN, -1, -1, -1}, - // bk001205 - this one below was: '-1' {"messagemode", -1, -1, -1, -1}, {"messagemode2", -1, -1, -1, -1}, {"messagemode3", -1, -1, -1, -1}, @@ -3198,7 +3195,7 @@ static bind_t g_bindings[] = static const int g_bindCount = sizeof(g_bindings) / sizeof(bind_t); -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static configcvar_t g_configcvars[] = { {"cl_run", 0, 0}, @@ -3842,7 +3839,7 @@ void Item_OwnerDraw_Paint(itemDef_t *item) { } if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) { - memcpy(color, parent->disableColor, sizeof(vec4_t)); // bk001207 - FIXME: Com_Memcpy + Com_Memcpy(color, parent->disableColor, sizeof(vec4_t)); } if (item->text) { @@ -4964,7 +4961,7 @@ qboolean ItemParse_cvarStrList( itemDef_t *item, int handle ) { } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } qboolean ItemParse_cvarFloatList( itemDef_t *item, int handle ) { @@ -5009,7 +5006,7 @@ qboolean ItemParse_cvarFloatList( itemDef_t *item, int handle ) { } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } @@ -5188,7 +5185,7 @@ qboolean Item_Parse(int handle, itemDef_t *item) { return qfalse; } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } @@ -5242,7 +5239,7 @@ qboolean MenuParse_name( itemDef_t *item, int handle ) { qboolean MenuParse_fullscreen( itemDef_t *item, int handle ) { menuDef_t *menu = (menuDef_t*)item; - if (!PC_Int_Parse(handle, (int*) &menu->fullScreen)) { // bk001206 - cast qboolean + if (!PC_Int_Parse(handle, (int*) &menu->fullScreen)) { return qfalse; } return qtrue; @@ -5591,7 +5588,7 @@ qboolean Menu_Parse(int handle, menuDef_t *menu) { return qfalse; } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } /* @@ -5639,7 +5636,7 @@ displayContextDef_t *Display_GetContext(void) { return DC; } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static float captureX; static float captureY; #endif diff --git a/code/unix/LinuxSupport/CHANGES-1.32.txt b/code/unix/LinuxSupport/CHANGES-1.32.txt deleted file mode 100644 index 0208b824..00000000 --- a/code/unix/LinuxSupport/CHANGES-1.32.txt +++ /dev/null @@ -1,150 +0,0 @@ -CHANGES 1.32 - -11/13/2002 - 1.32b - -Update to the Linux client, fixing a number of issues: - - -- Text mode install broken on glibc 2.3 (Debian Sid) -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165358 -Current Debian Sid's glibc package break backwards compatibility -with binaries compiled on older glibc and statically linked. -This will cause the text mode setup to segfault. - -For now you can either: - - find a solution to run the graphical gtk-based setup - - roll back to glibc 2.2 - - use an updated setup binary: - run the linux setup once, with the --keep option - (this will exand all the files to setup.tmp/) - get this updated setup file: - http://zerowing.idsoftware.com/linux/165358/setup - replace setup.tmp/setup.data/bin/Linux/x86/setup by the new one - cd to setup.tmp/ and run setup.sh - - -- Current NVidia drivers don't officially support glibc 2.3 systems -This affects Debian Sid in particular, causing crashes during vid_restart -The issue is related to the SMP build depending upon libpthreads -1.32b has both SMP and non-SMP binary. Use quake3-smp to launch -the SMP version if you want to use it. - - -- SMP and non-SMP builds: -Default quake3 shortcut will spawn a non-SMP build. Use quake3-smp -for an SMP-enabled run. From the feedback we got after the 1.32 release, -the SMP support as designed in the Quake III Arena technology isn't so -much relevant anymore. It was designed for much lower CPU frequencies -and lower AGP throughputs. Modern systems won't benefit from SMP. Since -it didn't make much sense to remove the SMP binary, we have both now. - - -- Fixing broken mouse on Suse: -Starting with XFree 4.2, the event timestamps returned by the X server -are no longer matching gettimeofday. And there is currently no API in X -to provide easy synchronisation. 1.32 introduced improved event timing -by correcting event time with X server event timestamp (sub-frame timing). -This worked fine with XFree 4.1, and no longer does. 1.32b adds a safe -check to work again with XFree 4.2, but basically the input timing is -back to 1.31 quality. - -Some new cvars related to the mouse control: -in_dgamouse - not new, but be sure to have it set to 1 on any recent system -in_subframe - completely disables sub-frame timing. If XFree 4.2 - in_subframe 1 won't hurt, but it won't do anything either. -in_nograb - for mod developers. Set to 1 and run windowed, Q3 won't be - grabbing your mouse pointer (useful for debug breaks) - - -8/26/2002 - -General: - -- new network protocol, 68 - -- network code: - improved fragmented messages handling - map change while client loads map no longer causes an 'Invalid .PK3' error - map_restart while client loads map no longer causes a reload - fixing donedl being ignored after autodl if map_restart'ed -- the demo command has a list of compatible protocols, it will loop through 66 67 68 - you can do '/demo four' and it will try four.dm_66 four.dm_67 four.dm_68 - or you can explicitely give a '/demo demoname.dm_??' - -- added mousewheel support in the console: - wheel to scroll, ctrl+wheel to scroll faster, shift+wheel to scroll history - -- UI in baseq3/ and missionpack/ for PunkBuster configuration - punkbuster server in server creation dialog (sv_punkbuster) - punkbuster client in server browser (cl_punkbuster) - added PB Yes/No to the browsers -- removed obsolete MPlayer UI stuff -- bumped server browser to handle up to 4096 servers - -- IP maintained in userinfo -- cl_guid in userinfo (as part of PB integration) -- printing ports as unsigned ints, no longer printing negative port numbers -- cleaned up the legacy IP banning code - use * for IP pattern matching now instead of 0 (fixes some confusion) - ex: 192.246.12.* - made it safe from overflowing and crashing - NOTE: using PunkBuster's banning system is advised instead though -- rcon: some fixes to the buffering to avoid overflowing and dropping parts of the message -- rcon: now supports quoting /rcon g_motd "foo bar" -- added SVF_CLIENTMASK (0x00000002), works only with <= 32 players - set bitmask of players to which send entity -- pushed cl_maxpackets upper limit to 125 -- added [skipnotify] from RTCW, use to display in the console only, but not on client screen - (also fixes pb_msgprefix and pb_sv_msgprefix) - -- new cvar sv_lanForceRate (defaults 1): - forces LAN clients to the maximum rate instead of accepting client setting - (1 is the default behaviour, backward compatible) - -- new cvar sv_strictAuth (defaults 1): - server side variable to control wether strict CDKEY auth should be performed with the auth server - this is required if you want reliable cl_guid for the server (for users tracking) - -- filesystem: - client re-orders it's pk3s according to the order given by server - (fixes some 'Invalid .PK3 files referenced' situations - -- fixed invisible entities/players bug (thanks goes to Rick Johnson / Raven for this one!) -- update x86 VM code (better and safer optimisations) (Richk Johnson / Raven too) -- clearing client gentity before GAME_INIT call -- failing vote if there's only one voting client (fixes exploit on 2-player server where one player votes then disconnects, forcing vote to pass) - -- added trap_FS_Seek - -- renderer fix: - if client game code registers a shader after drawsurfaces are generated but before frame is rendered - had a one-frame visual glitch (shader indexes messed up) -- renderer fix: - r_roundImagesDown 0 + map q3dm1 -> crash (buffer overflow fix) -- renderer fix: - fixed a crash in widescreen displays (q3dm11) -- renderer fix: - MAX_SHADERS up to 2^12 -- renderer fix: - moved screenshot from frontend to backend, fixes broken r_smp 1 screenshots - -- TA fixes: - MOD_KAMIKAZE MOD_JUICED logging properly to games.log - fixed bot taunt spamming -- fixed typo in scripts/models2.shader (shader error Ursula head) - -Win32 specific: - -- fixed the DirectInput mouse init procedure -- rcon: - fixed rcon not working on NT/2000/XP workstations that have a long uptime - -Linux specific: - -- no longer trying to load libMesaVoodooGL.so - obsolete code, was confusing when trying to setup correct OpenGL acceleration -- SMP support in the renderer. Detects CPU count, r_smp 1 default if available. (thanks to Gareth Hughes for contributing this) -- changed default GL driver from libGL.so to libGL.so.1 - see LSB 1.2 spec: http://www.linuxbase.org/spec/refspecs/LSB_1.2.0/gLSB/libgl.html -- Handle Ctrl and Space key together correctly (Ctrl was disabling Space) -- sub-frame timing of input events (key/mouse) (input timing quality now equivalent to win32) diff --git a/code/unix/LinuxSupport/INSTALL b/code/unix/LinuxSupport/INSTALL deleted file mode 100644 index d654d17c..00000000 --- a/code/unix/LinuxSupport/INSTALL +++ /dev/null @@ -1,52 +0,0 @@ - Quake III Arena - Quake III: Team Arena - Installation instructions - ------ - -What you need: - -- retail CD-ROM of Quake III Arena for Windows or linux -- optionally, retail CD-ROM of Quake III: Team Arena -- a computer running linux (kernel >= 2.2 glibc >= 2.1) -- running the client requires X11 and 3D hardware acceleration with OpenGL - -Installation: - -If you have the retail CD-ROM of Quake III Arena for linux: -- install Quake III Arena from the CD-ROM -- run the Point Release installer -(to buy Quake III Arena for linux online, try http://www.tuxgames.com/) - -If you have the retail CD-ROM of Quake III Arena for Windows: -- run the Point Release installer first -- now you need to copy the main pak files from the CD-ROM - or from your win32 partition. Namely, you need to copy baseq3/pak0.pk3 - and for Team Arena, missionpack/pak0.pk3 - see below for more instructions on how to copy the files: - -WARNING: Those instructions are provided as a reference, -depending on your distribution the CD-ROM might not have the same -mount point. Please refer to your linux documentation for additional -information. - -- open a root shell and cd to the default installation path: - cd /usr/local/games/quake3 -- mount the Quake III Arena CD-ROM and install the game content - cp /mnt/cdrom/Quake3/baseq3/pak0.pk3 /usr/local/games/quake3/baseq3 -- optionally, mount the Quake III: Team Arena CD-ROM - cp /mnt/cdrom/Setup/missionpack/pak0.pk3 /usr/local/games/quake3/missionpack - -NOTES: -- If you are running Quake III Arena and Quake III: Team Arena on a - Windows partition, you can save some space by symlinking the game - assets to their windows installation: - ln -s /win/quake3/baseq3/pak0.pk3 /usr/local/games/quake3/baseq3/pak0.pk3 - ln -s /win/quake3/missionpack/pak0.pk3 /usr/local/games/quake3/missionpack/pak0.pk3 - (Windows partition is mounted as /win and Quake III Arena installation is C:\quake3) - -Getting Help: - -- consult the FAQ in Help/Q3A_FAQ.html -- head over to the Quake3World forums http://www.quake3world.com/forums -- consult the list of known issues and tips at - http://zerowing.idsoftware.com/linux diff --git a/code/unix/LinuxSupport/index.html b/code/unix/LinuxSupport/index.html deleted file mode 100644 index e87ef29e..00000000 --- a/code/unix/LinuxSupport/index.html +++ /dev/null @@ -1,283 +0,0 @@ - - Linux Quake III Arena Known issues - - -Linux Quake III Arena Known issues
    -Known issues and frequently asked questions - 1.32b
    -
    -
    TTimo
    -Changes history
    -2004.2.20 Last update
    -2001.6.18 Initial version -

    -Current topics - -
    Installation instructions -
    -
    -

    Linux Quake III Arena is using a graphical installer -(based on Loki software's Setup Graphic Installer -). However, since it's a Point Release, you need a retail CD-ROM of Quake -III Arena to perform a complete installation (and optionally your Quake III: -Team Arena CD-ROM). This process is documented in the INSTALLfile -(this file is also in the setups, it's default location is /usr/local/games/quake3/INSTALL -.. you can run the PR setup and read it to finish the installation afterwards).

    -What do I do with a .x86.run file? -
    -
    -

    Those are setup files, meant to be executed. They -come with graphical installation UI or console installation, depending on -what's available on your system. You may need to chmod +x file.x86.run -to make them executable.

    -The setup crashes with Segmentation fault "$setup" "$@" 2>/dev/null -

    This is happening on glibc 2.3 systems such as RedHat 9 and Suze. The text mode installer will crash. If you can do a graphical installation, make sure you have Gtk1 installed and avoid the text installer altogether. -If you are doing a remote installation (such as a dedicated server through ssh), you need to use a newer text mode installer. Run the installer with --keep to extract the files -(look for a setup* directory in the current directory for the extracted setup). -Then replace setup.data/bin/Linux/x86/setup by this newer version. Run setup.sh at top level and things should work fine.

    -

    -Update: Turns out this solution is working for RTCW and ET, but not for Q3 (because the last q3 setup uses an older version of the installer). Will update a specific solution for Q3 'soon'. -

    -Installation on -BSD
    -
    -

    The linux binaries will run fine on the BSD family (FreeBSD, -NetBSD and OpenBSD) with the linux binary compatibility software. However -if you are getting the error message ELF binary type "0" not known -while installing or trying to run the binaries, that means you need to run -brandelf on the files.

    -

    If it's a setup problem, proceed with the following steps: -

    -
    ./linuxq3apoint-1.31.x86.run --keep
    brandelf -t Linux setup.tmp/setup.data/bin/FreeBSD/x86/setup
    cd setup.tmp
    sh ./setup.sh
    -

    The --keep option will extract the files and leave them -somewhere below your current directory. Depending on the game (Q3 or RTCW) -and the setup version, your mileage may vary (setup.tmp or another directory).

    -

    The game binaries might need to be brandelf'ed too, with -a command such as

    -
    brandelf -t Linux /usr/local/games/quake3/quake3.x86
    -CLIENT_UNKNOWN_TO_AUTH -
    -
    -

    Graeme Devine recently updated his .plan with very -complete information about CLIENT_UNKNOWN_TO_AUTH errors.

    -

    -See some additional information from the gameadmins.com mailing list: -

    -
    If the server you are playing on and the auth server don't see you as the
    -same IP (for instance you are trying to play on a public internet server
    -that's on your LAN, and your internet access is using NAT), then it won't
    -work.
    -
    -It used to work in 1.31, and it doesn't in 1.32. PunkBuster requires
    -reliable auth of the players. What you can do:
    -
    -- run a server with sv_strictauth 0 and you'll be able to join your
    -server. This will be the same behaviour as 1.31
    -
    -- connect to a server on the internet before you connect to your local
    -server (this will trigger your IP into the cache of the auth server for
    -15mn and let you in to your local server).
    -
    -- setup two NATs, one for your client one for your server and make sure
    -your server and Id's auth see the same IP. (this one ain't for network
    -setup newbies)
    -
    -Sys_Error: Couldn't load default.cfg / Sys_Error: -FS_FreeFile( NULL )
    -

    If you get one of these errors after installing Quake III Arena or Return -To Castle Wolfenstein, it means that the engine didn't find all the required -.pk3 files. Either you didn't copy them, or you copied them to the wrong -place. Check the INSTALL instructions for the game for more details, make -sure they are in baseq3/ for quake3 (missionpack/ for TA files) and main/ -for Return To Castle Wolfenstein.

    -I get ./setup.sh {: ==: binary -operator expected when running the setup?
    -
    -

    This is a known issue to 1.29h setups and prior. -It happens on systems with bash version < 2.*. There are several solutions:
    -- Upgrade bash to something more recent and run the setup again - Run the -setup with the --keep option. It will fail but it will leave a setup-full -directory. You can then copy the files manually from that dir. - Once you -used the --keep option above, you can edit setup.sh and replace occurences -of == by =. Then run setup.sh and the installer will execute.

    -The game doesn't -start, I have performance problems, etc.
    -

    The first thing to do is to check on the forums and various FAQs (this -one, but there are others. See the links). The Quake3World -forums have a great search function.

    -

    Before reporting the problem to me -make sure it's an issue with the game, and not an issue with your OS/OpenGL/sound -configuration. Common OS issues are listed in this FAQ. You should make sure -you have OpenGL configured correctly (by checking if gearsis running -for instance, and how well it runs). And see if non-Id linux games are running -fine too.

    -

    When you are going to report a bug, first make sure you are using the -latest version of the game. Include the game version in your report.

    -

    Include general information about your OS:
    -

    -
      -
    • Motherboard brand, CPU type, RAM
    • -
    • distribution name and version
    • -
    • kernel / OS info (from uname -a)
    • -
    • libc version (ls -l /lib/libc.so.*)
      - please specify if you can if the libc is your distribution's standard -version, or if you compiled yourself, and what binary target was used (x86, -or AMD, i686 etc.)
    • -
    -

    If it's a problem with the client, send the output of glxinfo.

    -

    If you have an nvidia board, send the output of cat /proc/nv/card0 -

    -

    Send output of the run:
    -run the game with +set developer 1 option, and send the output. You -can do something like quake3 +set developer 1 &>q3run.log.

    -

    If it's a crash, you can send a backtrace of the game running through -gdb.

    -

    You can also send a log of the game running with strace:

    -
    cd /usr/local/games/quake3
    strace -o ~/strace.log ./quake3.x86
    -

    NOTE: please avoid sending me the strace of /usr/local/games/quake3/quake3, -which is a shell script wrapper and probably no interest to your problem. -

    -Aureal sound drivers
    -
    -

    It seems that some versions of the Aureal sound drivers -don't work right with Q3. Last I heard, a kernel upgrade to 2.4.17 + Aureal -1.1.3, and/or using the old 1.1.1 drivers from Aureal's websitefixed -the problem.

    -

    If you need to know more about this, have a look at this Q3W forum thread.

    -The sound doesn't work / sound crashes
    -

    The first thing to check is that it is actually a sound related. Run -the game with +set s_initsound 0 and see what happens. All problems -reported so far about sound turned out to be OS/drivers. Listed below:

    -

    On some Mandrake distributions:
    -Check if you are running the enlightenment sound daemon (esd). With ps -aux | grep esdfor instance. It is a multiplexer for /dev/dsp, and might -block use of /dev/dsp by Quake III Arena. You can disable esd with esdctl -stop (as root).

    -

    Mandrake 8's default -sound drivers seem broken, installing the Alsa drivers or the - http://www.opensound.com drivers -fixes the problem.

    -

    Some beta Alsa drivers -have been reported to crash with Q3. Non-beta ones are fine.

    -

    VIA chipset and AC97 driver:
    -This combination is known to have various issues. They have been fixed in -recent drivers (thanks to Arne Schmitz for the heads up):
    -

    -
    http://sourceforge.net/projects/gkernel has got the up to date version of 
    the AC97 kernel driver. The current version can be found here:

    http://prdownloads.sourceforge.net/gkernel/via82cxxx-1.1.15.tar.gz

    It has working mmap sound, so Q3 shouldn't be a problem any more.
    -(thanks to Arne Schmitz for the heads up)

    - -Where can I report bugs and discuss about linux Quake III -Arena?
    -
    -

    Reports bugs to bugs@idsoftware.com. If you are pretty -sure this is a linux-only issue, you can shorten the loop by emailing ttimo@idsoftware.com directly.

    -

    You will find the discussion forums for linux Quake III Arena on -Quake3World forums. There is for sure a lot of other places to talk about -linux Quake III Arena, but this is the one we read regularly to track bugs -and common issues.

    -The *.so files are not in the setups? -(cgamei386.so qagamei386.so uii386.so)
    -
    -

    If you still have baseq3/*.so and missionpack/*.so -files, then those come from the earlier 1.27g beta installation and you should -REMOVE them. They were provided in 1.27g to go around a bug in the VM code, -which made win32 VMs incompatible with linux. This problem has been fixed -and the two files are no longer required.

    -

    If you are upgrading from 1.27g, it is likely that your -q3config.cfg files are set to use the native libraries (*.so files) -instead of the bytecode. Run quake3 with the following options to set things -right:
    -quake3 +set vm_game 2 +set vm_cgame 2 +set vm_ui 2

    -I get Sys_Error: -Sys_LoadDll(..) failed dlopen() completely!when running quake3?
    -
    -

    Try running quake3 with the following options:
    -quake3 +set vm_game 2 +set vm_cgame 2 +set vm_ui 2
    -You should also read the
    above answer.

    -I have an AMD CPU and a kernel 2.4.*, -Quake III Arena is slowing down to a complete stop after a while?
    -

    It seems the 3DNow! copy routines have issues with the southbridge chip -in the KT133A, this results in performances degrading while playing for a -while. Re-compile your kernel without 3DNow! instructions to avoid the problem, -and wait for newer kernels with better support for 3DNow! / KT133A.

    -How do I set up the gamma correction?
    -

    Starting with 1.29h, you can set the gamma correction with the brightness -slider in the graphical menu (under setup). On some older systems which don't -have the appropriate XFree86 extensions, you might have to set r_gamma -manually from the console, and issue a vid_restart command.

    -Servers don't show up in the ingame -browser -

    The reason for this has not been clearly identified yet, seems to be related -to upgrade from older versions. Deleting ~/.q3a/baseq3/q3config.cfg fixes -the problem (you will have to reconfigure your bindings)

    -Detected an attempt to write across -stack boundary -

    If Quake III Arena exits with the error "Detected an attempt to write -across stack boundary", this probably means that you are running libsafe -on this system. Quake III Arena is compiled with some options that confuse -libsafe, you should disable it before running. See this page for more details. -

    -libMesaVoodooGL.so -

    The GL driver for Voodoo cards (libMesaVoodoGL.so) used to be distributed -in older Q3 setups. This is no longer the case. If you have this .so -in your Quake III Arena directory (/usr/local/games/quake3), you should -remove it. Any recent/decent linux distribution should support your Voodoo -card out of the box, otherwise it is recommended that you setup XFree 4.* -and the correct DRI infrastructure for it.

    -Running a LAN dedicated server with -multiple network interfaces -

    A LAN dedicated server will use the net_ip cvar to identify the -NIC it is going to use (default is "localhost"). As it only opens one socket, -it is not possible to have a server broadcast it's packets on all the NICs. -This can be a problem if the server is serving games for a LAN and runs several -NICs to access the various sub networks.
    -

    -

    The following Linux kernel patch (2.4.19) was provided by Rogier Mulhujzen -and John Tobin, it will force broadcasts to be emitted on all interfaces:
    -udp_wide_broadcast.patch
    -udp_wide_README.txt
    -The equivalent patch for FreeBSD -is available too.
    -

    -Setup and execution on 64 bits CPUs
    -

    If you are running Linux on a 64 bit CPU (such as AMD's Opteron), and if your system is backwards compatible so that it can execute 32 bits x86 binaries, then the regular Quake III Arena binaries should work (your mileage may vary).

    -

    It's likely that the installer scripts will get confused though, and will refuse to install giving you an error: "This installation doesn't support glibc-2.1 on Linux / unknown". You will have to extract the game files manually by passing --keep on the command line when running the setup script. Once the files are unpacked, you will need to copy them manually to /usr/local/games. You probably want to have a working installation to refer to while doing this. This also applies to RTCW and ET

    -Links
    -

    The Linux Gamer's -faq is a very good resource for general Linux Gaming topics.

    -

    Also at icculus.org, -the old -Q3 FAQ from Loki Software.

    -

    Quake3World's -linux FAQ

    -
    - diff --git a/code/unix/LinuxSupport/udp_wide_README.txt b/code/unix/LinuxSupport/udp_wide_README.txt deleted file mode 100644 index ecd0b982..00000000 --- a/code/unix/LinuxSupport/udp_wide_README.txt +++ /dev/null @@ -1,20 +0,0 @@ -UDP Wide Broadcast Patch for Kernel 2.4.19 - -Main purpose is to allow Quake 3 servers, and all games powered by the -engine, to be visible in the server browser when the servers are being run on -aliased IP addresses and multiple NICs using the +set net_ip option. - -To apply the patch run "patch -p1 < udp_wide_broadcast.patch" from your -source directory and recompile. - -Add "echo "1" > /proc/sys/net/ipv4/udp_wide_broadcast" to one of your startup -scripts, i.e./etc/rc.d/rc.local, and run thousands of servers from your -computer. - - -Patch by: -Rogier Mulhujzen -John Tobin - -A patch with the same functionality for FreeBSD is available from -http://www.bsdchicks.com/patches diff --git a/code/unix/LinuxSupport/udp_wide_broadcast.patch b/code/unix/LinuxSupport/udp_wide_broadcast.patch deleted file mode 100644 index 2f1092e5..00000000 --- a/code/unix/LinuxSupport/udp_wide_broadcast.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- linux/include/linux/sysctl.h.orig 2002-08-17 19:52:27.000000000 -0500 -+++ linux/include/linux/sysctl.h 2002-08-17 19:53:00.000000000 -0500 -@@ -291,7 +291,8 @@ - NET_IPV4_NONLOCAL_BIND=88, - NET_IPV4_ICMP_RATELIMIT=89, - NET_IPV4_ICMP_RATEMASK=90, -- NET_TCP_TW_REUSE=91 -+ NET_TCP_TW_REUSE=91, -+ NET_UDP_WIDE_BROADCAST=92 - }; - - enum { ---- linux-modified/net/ipv4/sysctl_net_ipv4.c.orig 2002-08-17 19:48:19.000000000 -0500 -+++ linux-modified/net/ipv4/sysctl_net_ipv4.c 2002-08-17 19:52:03.000000000 -0500 -@@ -45,6 +45,9 @@ - extern int inet_peer_gc_mintime; - extern int inet_peer_gc_maxtime; - -+/* From udp.c */ -+extern int sysctl_udp_wide_broadcast; -+ - #ifdef CONFIG_SYSCTL - static int tcp_retr1_max = 255; - static int ip_local_port_range_min[] = { 1, 1 }; -@@ -221,6 +224,8 @@ - &sysctl_icmp_ratemask, sizeof(int), 0644, NULL, &proc_dointvec}, - {NET_TCP_TW_REUSE, "tcp_tw_reuse", - &sysctl_tcp_tw_reuse, sizeof(int), 0644, NULL, &proc_dointvec}, -+ {NET_UDP_WIDE_BROADCAST, "udp_wide_broadcast", -+ &sysctl_udp_wide_broadcast, sizeof(int), 0644, NULL, &proc_dointvec}, - {0} - }; - ---- linux-modified/net/ipv4/udp.c.orig 2002-08-17 19:40:59.000000000 -0500 -+++ linux-modified/net/ipv4/udp.c 2002-08-17 23:37:47.000000000 -0500 -@@ -94,6 +94,8 @@ - #include - #include - -+int sysctl_udp_wide_broadcast = 0; -+ - /* - * Snmp MIB for the UDP layer - */ -@@ -272,9 +274,10 @@ - if ((s->num != hnum) || - (s->daddr && s->daddr!=rmt_addr) || - (s->dport != rmt_port && s->dport != 0) || -- (s->rcv_saddr && s->rcv_saddr != loc_addr) || -- (s->bound_dev_if && s->bound_dev_if != dif)) -+ !(sysctl_udp_wide_broadcast || !(s->rcv_saddr && s->rcv_saddr != loc_addr)) || -+ (s->bound_dev_if && s->bound_dev_if != dif)) { - continue; -+ } - break; - } - return s; diff --git a/code/unix/MacSupport/SLA-dmg.sh b/code/unix/MacSupport/SLA-dmg.sh deleted file mode 100755 index 51c6e429..00000000 --- a/code/unix/MacSupport/SLA-dmg.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# This script appends a SLA.r (Software License Agreement) resource to a .dmg -# -# usage is './SLA-dmg.sh SLA.r /path/to/ioquake3.dmg' -# - -if [ "x$1" = "x" ] || [ "x$2" = "x"]; then - echo "usage: ./SLA-dmg.sh SLAFILE DMGFILE" - exit 1; -fi - -if [ ! -r $1 ]; then - echo "$1 is not a readable .r file" - exit 1; -fi -if [ ! -w $2 ]; then - echo "$2 is not writable .dmg file" - exit 1; -fi - -hdiutil convert -format UDCO -o tmp.dmg $2 || exit 1 -hdiutil unflatten tmp.dmg || exit 1 -/Developer/Tools/Rez /Developer/Headers/FlatCarbon/*.r $1 -a -o tmp.dmg \ - || exit 1 -hdiutil flatten tmp.dmg || exit 1 -hdiutil internet-enable -yes tmp.dmg || exit 1 -mv tmp.dmg $2 || (echo "Could not copy tmp.dmg to $2" && exit 1) -rm tmp.dmg -echo "SLA $1 successfully added to $2" diff --git a/code/unix/MacSupport/SLA.r b/code/unix/MacSupport/SLA.r deleted file mode 100644 index e5edaf0e..00000000 --- a/code/unix/MacSupport/SLA.r +++ /dev/null @@ -1,260 +0,0 @@ -data 'LPic' (5000) { - $"0002 0011 0003 0001 0000 0000 0002 0000" - $"0008 0003 0000 0001 0004 0000 0004 0005" - $"0000 000E 0006 0001 0005 0007 0000 0007" - $"0008 0000 0047 0009 0000 0034 000A 0001" - $"0035 000B 0001 0020 000C 0000 0011 000D" - $"0000 005B 0004 0000 0033 000F 0001 000C" - $"0010 0000 000B 000E 0000" -}; - - -data 'TEXT' (5002, "English") { -"LIMITED USE SOFTWARE LICENSE AGREEMENT\n" -"\n" -"\n" -"\n" -"This Limited Use Software License Agreement (the \"Agreement\") is a legal" -"agreement between you, the end-user, and Id Software, Inc. (\"ID\"). BY" -"CONTINUING THE INSTALLATION OF THIS GAME DEMO PROGRAM ENTITLED QUAKE III:" -"ARENA (THE \"SOFTWARE\"), BY LOADING OR RUNNING THE SOFTWARE, OR BY PLACING" -"OR COPYING THE SOFTWARE ONTO YOUR COMPUTER HARD DRIVE, COMPUTER RAM OR" -"OTHER STORAGE, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS " -"AGREEMENT.\n" -"\n" -"\n" -"\n" -"1. Grant of License. Subject to the terms and provisions of this" -"Agreement, ID grants to you the non-exclusive and limited right to use the" -"Software only in executable or object code form. The term \"Software\"" -"includes all elements of the Software, including, without limitation, data" -"files and screen displays. You are not receiving any ownership or" -"proprietary right, title or interest in or to the Software or the " -"copyright, trademarks, or other rights related thereto. For purposes of" -"this section, \"use\" means loading the Software into RAM and/or onto " -"computer hard drive, as well as installation of the Software on a hard" -"disk or other storage device and means the uses permitted in section 3." -"hereinbelow. You agree that the Software will not be shipped," -"transferred or exported into any country in violation of the U.S. Export" -"Administration Act (or any other law governing such matters) by you or" -"anyone at your direction and that you will not utilize and will not" -"authorize anyone to utilize, in any other manner, the Software in" -"violation of any applicable law. The Software may not be downloaded" -"or otherwise exported or exported into (or to a national or resident" -"of) any country to which the U.S. has embargoed goods or to anyone" -"or into any country who/which are prohibited, by applicable law, from" -"receiving such property." -"\n" -"\n" -"\n" -"2. Prohibitions. You, either directly or indirectly, shall not do" -"any of the following acts:" -"\n" -"\n" -"\n" -"a. rent the Software;" -"\n" -"\n" -"\n" -"b. sell the Software;" -"\n" -"\n" -"\n" -"c. lease or lend the Software;" -"\n" -"\n" -"\n" -"d. offer the Software on a \"pay-per-play\" basis;" -"\n" -"\n" -"\n" -"e. distribute the Software (except as permitted by section 3." -"hereinbelow);" -"\n" -"\n" -"\n" -"f. in any other manner and through any medium whatsoever" -"commercially exploit the Software or use the Software for any commercial" -"purpose;" -"\n" -"\n" -"\n" -"g. disassemble, reverse engineer, decompile, modify or alter the" -"Software including, without limitation, creating or developing extra or" -"add-on levels for the Software;" -"\n" -"\n" -"\n" -"h. translate the Software;" -"\n" -"\n" -"\n" -"i. reproduce or copy the Software (except as permitted by section" -"3. hereinbelow);" -"\n" -"\n" -"\n" -"j. publicly display the Software;" -"\n" -"\n" -"\n" -"k. prepare or develop derivative works based upon the Software; or" -"\n" -"\n" -"\n" -"l. remove or alter any legal notices or other markings or " -"legends, such as trademark and copyright notices, affixed on or within" -"the Software." -"\n" -"\n" -"\n" -"3. Permitted Distribution and Copying. So long as this Agreement" -"accompanies each copy you make of the Software, and so long as you fully" -"comply, at all times, with this Agreement, ID grants to you the" -"non-exclusive and limited right to copy the Software and to distribute " -"such copies of the Software free of charge for non-commercial purposes " -"which shall include the free of charge distribution of copies of the" -"Software as mounted on the covers of magazines; provided, however, you" -"shall not copy or distribute the Software in any infringing manner or" -"in any manner which violates any law or third party right and you shall" -"not distribute the Software together with any material which is " -"infringing, libelous, defamatory, obscene, false, misleading, or " -"otherwise illegal or unlawful. You agree to label conspicuously as " -"\"SHAREWARE\" or \"DEMO\" each CD or other non-electronic copy of the " -"Software that you make and distribute. ID reserves all rights not" -"granted in this Agreement. You shall not commercially distribute the" -"Software unless you first enter into a separate contract with ID, a" -"copy of which you may request, but which ID may decline to execute." -"For more information visit www.quake3arena.com." -"\n" -"\n" -"\n" -"4. Intellectual Property Rights. The Software and all copyrights," -"trademarks and all other conceivable intellectual property rights related" -"to the Software are owned by ID and are protected by United States" -"copyright laws, international treaty provisions and all applicable law," -"such as the Lanham Act. You must treat the Software like any other" -"copyrighted material, as required by 17 U.S.C., §101 et seq. and othen" -"applicable law. You agree to use your best efforts to see that any user" -"of the Software licensed hereunder complies with this Agreement. You" -"agree that you are receiving a copy of the Software by license only" -"and not by sale and that the \"first sale\" doctrine of 17 U.S.C. §10" -"does not apply to your receipt or use of the Software." -"\n" -"\n" -"\n" -"5. NO WARRANTIES. ID DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR" -"IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF" -"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE" -"SOFTWARE. ID DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE WILL BE" -"UNINTERRUPTED OR ERROR FREE OR THAT THE SOFTWARE WILL MEET YOUR SPECIFIC" -"REQUIREMENTS. ADDITIONAL STATEMENTS SUCH AS PRESENTATIONS, WHETHER ORAL" -"OR WRITTEN, DO NOT CONSTITUTE WARRANTIES BY ID AND SHOULD NOT BE RELIED" -"UPON. THIS SECTION 5. SHALL SURVIVE CANCELLATION OR TERMINATION OF THIS" -"AGREEMENT." -"\n" -"\n" -"\n" -"6. Governing Law, Venue, Indemnity and Liability Limitation. This" -"Agreement shall be construed in accordance with and governed by the" -"applicable laws of the State of Texas and applicable United States federal" -"law. Copyright and other proprietary matters will be governed by United" -"States laws and international treaties. Exclusive venue for all" -"litigation regarding this Agreement shall be in Dallas County, Texas" -"and you agree to submit to the jurisdiction of the courts in Dallas," -"Texas for any such litigation. You agree to indemnify, defend and hold" -"harmless ID and ID's officers, employees, directors, agents, licensees" -"(excluding you), successors and assigns from and against all losses," -"lawsuits, damages, causes of action and claims relating to and/or" -"arising from your breach of this Agreement. You agree that your" -"unauthorized use of the Software, or any part thereof, may immediately" -"and irreparably damage ID such that ID could not be adequately" -"compensated solely by a monetary award and that at ID's option ID shall" -"be entitled to an injunctive order, in addition to all other available" -"remedies including a monetary award, appropriately restraining and/or" -"prohibiting such unauthorized use without the necessity of ID posting" -"bond or other security. IN ANY CASE, ID AND ID'S OFFICERS, EMPLOYEES," -"DIRECTORS, AGENTS, LICENSEES, SUBLICENSEES, SUCCESSORS AND ASSIGNS" -"SHALL NOT BE LIABLE FOR LOSS OF DATA, LOSS OF PROFITS, LOST SAVINGS," -"SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT, PUNITIVE OR OTHER SIMILAR" -"DAMAGES ARISING FROM ANY ALLEGED CLAIM FOR BREACH OF WARRANTY, BREACH" -"OF CONTRACT, NEGLIGENCE, STRICT PRODUCT LIABILITY, OR OTHER LEGAL" -"THEORY EVEN IF ID OR ITS AGENT HAVE BEEN ADVISED OF THE POSSIBILITY" -"OF SUCH DAMAGES OR EVEN IF SUCH DAMAGES ARE FORESEEABLE, OR LIABLE" -"FOR ANY CLAIM BY ANY OTHER PARTY. Some jurisdictions do not allow" -"the exclusion or limitation of incidental or consequential damages," -"so the above limitation or exclusion may not apply to you. This" -"Section 6. shall survive cancellation or termination of this Agreement." -"\n" -"\n" -"\n" -"7. U.S. Government Restricted Rights. To the extent applicable," -"the United States Government shall only have those rights to use the" -"Software as expressly stated and expressly limited and restricted in" -"this Agreement, as provided in 48 C.F.R. §§ 227.7201 through 227.7204," -"inclusive." -"\n" -"\n" -"\n" -"8. General Provisions. Neither this Agreement nor any part or" -"portion hereof shall be assigned or sublicensed by you. ID may assign its" -"rights under this Agreement in ID's sole discretion. Should any provision" -"of this Agreement be held to be void, invalid, unenforceable or illegal by" -"a court of competent jurisdiction, the validity and enforceability of the" -"other provisions shall not be affected thereby. If any provision is" -"determined to be unenforceable by a court of competent jurisdiction, you" -"agree to a modification of such provision to provide for enforcement of" -"the provision's intent, to the extent permitted by applicable law." -"Failure of ID to enforce any provision of this Agreement shall not" -"constitute or be construed as a waiver of such provision or of the right" -"to enforce such provision. Immediately upon your failure to comply with" -"or breach of any term or provision of this Agreement, THIS AGREEMENT" -"AND YOUR LICENSE SHALL AUTOMATICALLY TERMINATE, WITHOUT NOTICE, AND ID" -"MAY PURSUE ALL RELIEF AND REMEDIES AGAINST YOU WHICH ARE AVAILABLE UNDER" -"APPLICABLE LAW AND/OR THIS AGREEMENT. In the event this Agreement is" -"terminated, you shall have no right to use the Software, in any manner," -"and you shall immediately destroy all copies of the Software in your" -"possession, custody or control." -"\n" -"\n" -"\n" -"YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, YOU UNDERSTAND THIS" -"AGREEMENT, AND UNDERSTAND THAT BY CONTINUING THE INSTALLATION OF THE" -"SOFTWARE, BY LOADING OR RUNNING THE SOFTWARE, OR BY PLACING OR COPYING" -"THE SOFTWARE ONTO YOUR COMPUTER HARD DRIVE OR RAM, YOU AGREE TO BE BOUND" -"BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. YOU FURTHER AGREE THAT," -"EXCEPT FOR WRITTEN SEPARATE AGREEMENTS BETWEEN ID AND YOU, THIS " -"AGREEMENT IS A COMPLETE AND EXCLUSIVE STATEMENT OF THE RIGHTS AND" -"LIABILITIES OF THE PARTIES HERETO. THIS AGREEMENT SUPERSEDES ALL PRIOR" -"ORAL AGREEMENTS, PROPOSALS OR UNDERSTANDINGS, AND ANY OTHER" -"COMMUNICATIONS BETWEEN ID AND YOU RELATING TO THE SUBJECT MATTER OF" -"THIS AGREEMENT." -"\n" -}; - -resource 'STR#' (5002, "English") { - { /* array StringArray: 9 elements */ - /* [1] */ - "English", - /* [2] */ - "Agree", - /* [3] */ - "Disagree", - /* [4] */ - "Print", - /* [5] */ - "Save...", - /* [6] */ - "IMPORTANT - Read this License Agreement carefully before clicking on " - "the \"Agree\" button. By clicking on the \"Agree\" button, you agree " - "to be bound by the terms of the License Agreement.", - /* [7] */ - "Software License Agreement", - /* [8] */ - "This text cannot be saved. This disk may be full or locked, or the file " - "may be locked.", - /* [9] */ - "Unable to print. Make sure you have selected a printer." - } -}; - diff --git a/code/unix/README.Linux b/code/unix/README.Linux deleted file mode 100644 index 05822e60..00000000 --- a/code/unix/README.Linux +++ /dev/null @@ -1,352 +0,0 @@ -+----------------------------------------+ -| Q3Test | -| The Official Quake 3: Arena TEST | -| Linux version | -| Revision 1.08 | -| Released Aug 3, 1999 | -| Copyright (C) 1999 id Software, inc. | -+----------------------------------------+ -| Documentation: Paul Jaquays | -| Dave Kirsch | -+----------------------------------------+ - -Outline: - -1. Introduction -2. Bug Reporting -3. Installing Q3Test -4. Running Q3Test. Operating Instructions -5. Known Issues - -================== -== Section 1. == -== INTRODUCTION == -================== - -This is the Linux version of the test. - -Before proceeding onward, please read the README.EULA file. This is -the End User License Agreement. It's the agreement between you and id -regarding this test. Read it. Understand that the acts of loading or -running the software, or placing it on your computer hard drive, RAM, -or other storage, you are agreeing to be bound by the terms of the End -User License Agreement. So it's best to know what you are agreeing to. - -The operating instructions for the test are included in the -separate "README.Q3Test" file. For the most part, the game functions -are the same across all platforms. Differences will be noted when necessary. - -+----------------+ -| THIS IS A TEST | -+----------------+ - -We want to set the record straight from the outset. This is neither a -demo nor an ALPHA version of the final game and should not be expected -to behave as such. Q3Test is a test of Quake3: Arena's network technology -and graphics compatibility. While many of the game features that you will -see in this test are in a highly polished state, do not confuse this with -being anything other than what it is intended to be: a test. By running -this test openly on the Internet and on a multitude of local networks, -we hope to expose problems that could not otherwise be discovered on the -limited number of in-house systems and computer. That's why we need your -assistance for this test. - -Furthermore, it is anticipated that there may be revisions and additions -made to the test that will make it incompatible with earlier versions. - -+---------------------+ -| SYSTEM REQUIREMENTS | -+---------------------+ - -There is no software-only version of the game. If your computer is not -hardware accelerated with a game compatible graphics card, you will NOT be -able to run Q3Test. Currently, 3DFX based cards are the only -tested compatible cards. If your computer does not meet the -minimum requirements, you are unlikely to be able to run a satisfactory -game experience. - -A glibc compatible Linux installation is required. An easy to determine -if you have glibc support is to type this: - - ls -l /lib/libc* - -If you get a report of libc6 (you may also have libc5), you have a -glibc based system. - -The Linux version requires a supported hardware 3D acceleration card. The -following are currently supported: - - o 3Dfx Voodoo Graphics based cards - o 3Dfx Voodoo2 based cards - -Other cards of similar make and model may work, but are not supported. - -Other X11 OpenGL libraries may work with a supported hardware -accelerator, but have not been extensively tested. Performance on -untested OpenGL configurations may not produce acceptable game -speed. - -For 3Dfx based products, Linux Q3Test is distributed with a version of Mesa -3-D specifically compiled for Voodoo support. You must have 3Dfx Linux Glide -drivers installed however. These drivers are available from: - - http://glide.xxedgexx.com/3DfxRPMS.html - -Make sure that you download and install the glibc versions of the drivers -(found at the bottom of the page). - -Mirrors for this site are can be found at: - - http://glide.mirrors.sonic.net - http://glide.samiam.org - -Please follow the installation instructions presented there for adding the -correct drivers for your 3D-acceleration card. Note that there are two ways -to install the 3DFX drivers-one with support for a /dev/3dfx device that -does not require root permissions in order to use the card. If you choose to -not use the /dev/3dfx method, you will have to run Q3Test as the root user. - -NOTE: Linux Q3Test will try to load "libGL.so" before using 3Dfx drivers. -This can cause problems if you have a software or third party OpenGL driver -installed. You can specifically target the included 3Dfx based Mesa driver -by using the following command line: - - ./linuxquake3 +set r_glDriver libMesaVoodooGL.so.3.1 - -For 3DFX users, you may disable the vertical sync refresh. This can improve -proformance at the cost of some visual tearing of the image. Entering the -following command into your shell before running Q3Test will turn off -the vertical sync: - - export FX_GLIDE_SWAPINTERVAL=0 - -Then run Linux Q3Test from the same command line normally. - -+-----------+ -| X11 Setup | -+-----------+ - -Linux Q3Test requires X11 to run. There is no console-based version as in -previous id products such as GLQuake and Quake2. XFree86 version 3.2 or -later is required. - -There are two ways that mouse input is handled under XFree86: - - o By default, Q3Test will attempt to use DGA mouse handling. DGA - support features direct reading of the mouse motion and provides - more accurate control while playing the game. By default this - support is enabled, but can be disabled by adding "+set - in_dgamouse 0" to the command line at startup. - o The non-DGA method of mouse input uses pointer grabbing and warps - the pointer to the middle of the window on each mouse update. On - systems with a slow frame rate and a lot of mouse user input, the - motion can get "clipped" to the window boundaries. This method of - input is more compatible however. - -Q3Test uses the XFree86 VidModeExtension facilities if available to provide -fullscreen play. This does not apply to 3Dfx passthrough based cards, since -the passthrough cable takes over the video display upon activation anyway. - -When configuring your X11 server, make sure that you include lower -resolution modes such as 640x480 and 800x600. Q3Test will auto-switch to -these modes using the VidModeExtension if you select fullscreen from the -graphics options menu. If the lower resolution modes are not listed in the -XFree86 configuration file, Q3Test will be unable to switch to the desired -resolution for fullscreen play. - -+-------------------------+ -| Sound Support and Setup | -+-------------------------+ - -Q3Test uses the /dev/dsp sound device for sound support under Linux. This is -the default device provided by the sound drivers included with the Linux -kernel. Please note that at the time of this writing, PCI based sound cards -such as the SoundBlaster Live and Diamond Monster MX series were not -supported. They may be supported in the future. Check -http://www.opensound.com/ for support in the future. - -If you do not run Q3Test as root (recommended), you may need to make sure -the permissions for the /dev/dsp device are read and write by the user -running Q3Test. The cheap and easy way to make this happen is to do "chmod -o+rw /dev/dsp" as root. For the more security conscious, a special sound -group could be created and Q3Test could be made setgid to the sound group to -access the device. - -Q3Test uses mmap() to map the sound buffers on /dev/dsp directly in order to -provide responsive sound needs. Sound cards must be able to support this -feature in order to work. SoundBlaster 16, AWE32 and AWE64 cards are known -to work. - -+----------------------+ -| WHAT'S IN THIS TEST? | -+----------------------+ - -We have included three maps with this test version of Quake3: Arena. They -are q3test1, q3test2, and q3tourney. - -q3test1 for 4-8 players on Internet or LAN play Best with 6 players -q3test2 for 3-8 players Primarily for LAN play Best with 3 players -q3tourney is the tournament map - -=================== -== Section 2. == -== BUG REPORTING == -=================== - -What we would like from our testers are emails with descriptions of -problems that are encountered, particularly those involving video or -network bugs. Do NOT send reports to individual id employees. All bug -reports should go to the following e-mail address: - -q3feedback@idsoftware.com - -In your subject line, please describe the system the game is being played -on (Mac, Linux, Win32) and the type of problem you are reporting: video, -network, sound or game. Example Subject Line: "Mac/video problem" or -"Linux/network connection problem." - -In the body of your letter (no attached files please), briefly list and -describe the problems. Detailed descriptions of problems are good, but -remember that brevity is best. Please do NOT send screen shots unless -they are the ONLY way to show a problem. - -While we realize that you may have comments and suggestions regarding -specific game play features, please refrain from submitting such along -with bug reports. Comments on game play can be made on the official -Quake 3: Arena message board at: - -http://www.quake3arena.com - -======================== -== Section 3. == -== INSTALLING Q3TEST == -======================== - -After you have installed the needed hardware drivers for your 3D -acceleration and sound hardware, you need to install the Q3Test package. - -Q3Test is available as a Red Hat RPM file or as a tar file. To install the -RPM file, enter the following when logged in as the root user: - -rpm -Uvh q3test-1.00-glibc-1.i386.rpm - -The rpm installs the game and data files in /usr/local/games/q3test. - -[ Note: If you have not installed (or do not wish to install) the Linux -glide drivers, you may get an error message about not having libglide2x.so -installed. This can be ignored and installation can be forced by adding -the --nodeps option to the rpm command line as follows: -rpm --nodeps -Uvh q3test-1.00-glibc-1.i386.rpm ] - -If you are going to install the tar version, make a directory for -installation, untar the file as follows: - -tar xzvf q3test-1.00-glibc-i386.tar.gz - -This will untar the files into a q3test subdirectory under the current -directory. - -==================== -== Section 4. == -== RUNNING Q3TEST == -==================== - -It is recommended that you do not run Q3Test using the root account or with -root privileges. There are two exceptions to this: - - o If you are using a 3Dfx based accelerator card and do not install - the /dev/3dfx configuration option. (You will have to run as root - in order to access the card). - o If you do not have access to the /dev/dsp device and do not wish - to change the mode of the device so that non-root accounts can - access it. - -You will have to be running under X11 or have the DISPLAY variable pointed -to a OpenGL glX capable X Server. - -By default, Q3Test tries to find the following OpenGL libraries in this -order: - - o libGL.so.1 - o libMesaVoodooGL.so.3.1 - -You can override the library name by entering, "+set r_glDriver " -on the command line. This may be needed if you are using a non-standard set -up and have a different name for the OpenGL shared library. - -If everything proceeds successfully, you should have a Q3Test window on your -desktop with a menu displayed (3DFX owners will get a full screen view). If -you want to use full screen, go to the System Configuration, Graphics -Options, Fullscreen, change the value to Yes, and hit enter to apply it. - -If you intend to connect to the Internet to play Q3Test, make certain -that your net connection is open and working first. - -====================== -== Section 5. == -== KNOWN ISSUES == -====================== - -Q. My mouse is erratic. My player is constantly looking up or down and -I can't seem to move him. - -A. This happens with two issues. Some versions of XFree86 have a bug in -DGA mouse handling that confuses Q3Test. You can try turning off DGA mouse -support by entering "+set in_dgamouse 0" on the command line when you -start Q3Test. This problem can also occur after a restart of the video -system (such as after a graphic setting change). This is because some -sort of event occurred to jam up the mouse. Restarting the video system -another time and not moving the mouse during the restart should clear it. - - -Q. When I do a video restart (for example, selecting Apply in the Graphics -Options menu), Q3Test exits with a Sig11. - -A. This is a driver related problem. -On 3DFX hardware that is using the /dev/3dfx device and you are NOT running -as root, it seems that the restart doesn't clear some sort of permission. -Running Q3Test as root will fix this problem. - - -Q. Performance is so slow I can't play! The frame rate looks like one -frame per second! - -A. Most of the current drivers for Linux do not support hardware -acceleration at any bit depth other than 15 or 16 bit color. Make sure -that you specify 16 bit color when you run your X11 Server, such as: - - startx -- -bpp 16 - - -Q. I have a Voodoo3. When I start the game, I send up at a low resolution -version of my desktop. - -A. The current Voodoo3 X11 Servers have problems with DGA Mouse support. -This is a known driver issue and will be fixed in newer revisions of the -Voodoo3 X11 Server. Run the game with the following to disable it: - ./linuxquake3 +set in_dgamouse 0 - - -Q. I'm running Gnome with Englightenment and sound doesn't work. - -A. If you are using the Enlightenment Sound Daemon (esd), it will not release -the sound hardware for Quake3 Test's usage. You can disable it before running -the test as follows: - esdctl off # turn it off - start q3test the normal way - esdctl on # turn it back on - - -Q. I try to run Q3Test, but sound doesn't work. The console says "Can't -open /dev/dsp. /dev/dsp: Can't allocate memory." - -A. This can happen if the vmware kernel modules are loaded. You can unload -them by typing when logged as root: - /etc/rc.d/init.d/vmware stop -Assuming you are using a RedHat system. - - -Q. I was playing Q3Test and suddenly it quit and reported a signal error. - -A. This is probably a bug. Please report it. - diff --git a/code/unix/README.Q3Test b/code/unix/README.Q3Test deleted file mode 100644 index 65ddef27..00000000 --- a/code/unix/README.Q3Test +++ /dev/null @@ -1,306 +0,0 @@ -+----------------------------------------+ -| Q3Test | -| The Official Quake 3: Arena TEST | -| Operating Instructions Readme | -| Revision 2.1 | -| Released Friday July 16th, 1999 | -| Copyright (C) 1999 id Software, inc. | -+----------------------------------------+ -| Documentation: Paul Jaquays | -+----------------------------------------+ - -This game is not yet rated by the ESRB. It contains animated -violence and blood. A rating for mature audiences 17+ is -anticipated. - -1. Introduction -2. Operating Instructions -3. Status Readouts -4. Player Actions -5. The Arena Environment -6. The Game Console -7. Problem Icons - -================== -== Section 1. == -== INTRODUCTION == -================== - - These instructions for game play should work with the versions of the game that are targeted at different platforms. - - Before proceeding onward, click on the EULA_Readme file icon. This is the End User License Agreement. It's the agreement between you and id regarding this test. Read it. Understand that the acts of loading or running the software, or placing it on your computer hard drive, RAM, or other storage, you are agreeing to be bound by the terms of the End User License Agreement. So it's best to know what you are agreeing to. - - If you agree to the conditions of the End User License Agreement, install the game on your computer's hard drive. - If you are using the Win32 version, open the readme file included for GLSetup. This application will load the most recent versions of the GL drivers needed to play Quake3: Arena. - - The platform-specific instructions for the test are included in a separate Readme file. Refer to the appropriate Readme for your hardware. - -+----------------+ -| THIS IS A TEST | -+----------------+ - We want to set the record straight from the outset. This is neither a demo nor an ALPHA version of the final game and should not be expected to behave as such. Q3Test is a test of Quake3: Arena's network technology and graphics compatibility. While many of the game features that you will see in this test are in a highly polished state, do not confuse this with being anything other than what it is intended to be: a test. By running this test openly on the Internet and on a multitude of local networks, we hope to expose problems that could not otherwise be discovered on the limited number of in-house systems and computers we have available. That's why we need your assistance for this test. - - Furthermore, it is anticipated that there may be ongoing revisions and additions made to the test that will make it incompatible with earlier versions. - -============================ -== Section 2. == -== OPERATING INSTRUCTIONS == -============================ - - When you start Q3Test, the game does not automatically load a map. Instead it displays the Main Menu screen. At this point (or at any time during the game) you may adjust and customize the video and audio settings on your computer, change details regarding your game character, and if desired, change the default controls to ones more to your liking. - -At any time during the game, press the Escape key to bring up the Main menu and superimpose it over the game screen. Use the up and down arrow keys to navigate the menu, and press the Enter key to select a function. Press Escape to return to the main level menu (and set any selected choices). Each Main menu function brings up a list of secondary menu items. If you have problems using the secondary menu selections, please refer to the message banner at the bottom of the screen for technical details. - -If a menu selection appears in gray, you cannot select or modify it. Choosing some options in the CONTROL CUSTOMIZATION and GRAPHICS OPTIONS menus will disallow other options. This is because they are either unnecessary (as is the case with MOUSE LOOK if you select the FREE LOOK option), or are not supported (as is the case with COLOR DEPTH if you chose the VOODOO OPENGL). - -+-----------+ -| MAIN MENU | -+-----------+ -The first three Main Menu options, SEARCH FOR LAN GAME, CONNECT TO NETWORK GAME and START NETWORK GAME are only available if the player is not currently connected to an ongoing game. - -SEARCH FOR LAN GAME: -If your computer is on a Local Area Network (LAN), this will show any currently active Q3Test servers on the network, along with the number of players currently in the game and the maximum number of players that can be in that game. - -Example: idserver q3test1 1/8 - -This indicates that the server on the LAN called "idserver" is currently playing the map "q3test1" and has one player in it out of the possible 8 that can be in the game at one time. - -Use the up/down arrow keys to select a server and hit ENTER to command your computer to connect to that game. - -CONNECT TO NETWORK GAME: - SERVER: If your computer is connected to the Internet, you can enter the IP address of a server and hit ENTER to attempt to make a connection to that server. For server id's Q3Test server listings, go to http://www.quake3arena.com or check with your favorite 3D gaming web sites for other servers. - RATE: Set the type of network connection you are using. Choices are: "<=28.8K", "33.6K", "56K", "ISDN", and "LAN/cable/xDSL". - -START NETWORK GAME: -To start a network game, whether on a LAN or over the Internet, select this option. The secondary menu screen has the following options: - -START: Launches the game using the parameters currently set on this menu. -MAP: This gives access to the list of maps located in the Quake3/Baseq3/Maps directory/folder. For the purposes of this test, there are only two maps. Use the left and right arrow keys to toggle between the two maps. -DEDICATED: This is either "no", "dedicated LAN," or "dedicated Internet." -A dedicated server (set to YES) runs the game, but does not display a graphic version of the game on the screen of the computer running the game. The default value for this is no. This means that you are running the server and participating as a player at the same time. -TIME LIMIT: entering a non-zero number here sets a time limit (in minutes) for the game duration. If the game has not ended because a frag limit has been set, then it will end when time runs out. -FRAG LIMIT: Entering a non-zero number here sets the number of "frags" or "kills" needed to win the game. If the game has not ended because a time limit has been set, then it will end when one player in the game reaches this number of frags. -MAX PLAYERS: This is the total number of players that may be in the game at any one time. -HOSTNAME: This is the name of the server. In the LAN example above, the hostname is "idserver." - -CUSTOMIZE PLAYER: -Allows the player to change information about his in-game persona. - -NAME: This is the player's name as it will appear on-screen during the game. It may be up to 33 characters long. - -SKIN: Visor is the only model in the test. Two skins (red and blue) are available for the model. Use the left and right arrow keys to select one. - -EFFECTS COLOR: You can choose an identifying color for your rail gun projectile trails. Use the left and right arrow keys to select a color. - -HANDICAP: Better players can choose to handicap themselves to balance a match against players of less skill by limiting the maximum amount of health and armor that they can have during the game. Use the left and right arrows to select a value from 25 to 100 points. Certain items and power ups will temporarily raise this value, but will then count down to the preset value. The default is 100. - -CUSTOMIZE CONTROLS: -Allows the player to change the assignment of game controls to other keyboard and mouse buttons. When you visit this menu for the first time, the default assignments for all controls are shown. To change an assignment, use the up/down arrow keys to select a game function. Press ENTER to activate the change process. Press the keyboard key or mouse input that you want to use for that function. Up to two keys/buttons may be assigned to each game function in this manner by repeating the process. If you inadvertently use a key assigned to another function, three question marks ("???") appear next to the function that previously used that key. - -ALWAYS RUN: setting this to YES causes your player to move faster, but make more noise as he moves. The RUN/WALK key allows the player to switch between fast/noisy and slow/silent movement modes. -FREELOOK: If YES, then you may look freely in all directions as if you were moving only your head by moving the mouse around. If this is Set to NO you must bind a key to mouse look. -INVERT MOUSE: Selecting YES inverts the up and down view movement directions. -MOUSE SPEED: This is set on the menu with a slide control. The faster your mouse speed, the greater the on-screen response to small movements of the mouse. Mouse speed can also be adjusted from the console. Bring the console down and type in "sensitivity". The game will respond by printing "sensitivity" is: "__" (the blank indicating the number value currently assigned to mouse speed) default is "5". Use the up arrow key to display sensitivity on the console again, enter a different number value and hit enter. Higher numbers are more sensitive. Lower numbers are less sensitive. - -SYSTEM CONFIGURATION: -EFFECTS VOLUME: Use the slide control to adjust game sound playback volume to your liking. -SOUND QUALITY: Select either Low (16 bit sound running at 11 megahertz) or High (32 bit sound running at 22 megahertz). -BRIGHTNESS: First, try running the game with the brightness set to 1.0 (the default level used by the designer when making the map). If the map is too dark to see in dimly lighted areas or too light in sunny areas, use this slide control to compensate for differences in the way some monitors and video cards draw the game world. Remember that the arenas are supposed to be dark and foreboding places. - -GRAPHICS OPTIONS: -This drops you down into another menu layer. The controls here are designed to help you optimize graphics and or/enhance the game's playability on your system. When you are satisfied with your selections, you must move the cursor to the bottom of the screen to the APPLY option to activate them. Pressing Escape to return to the SYSTEM CONFIGURATION MENU does not activate changes in the graphics settings. Changing anything on this menu will cause the game to restart the video. - -GRAPHICS MODE: This is a global setting for the display of the game's screen graphics. The settings are HIGH QUALITY, NORMAL, FAST, FASTEST, and CUSTOM. Selecting one of these choices affects most of the other settings on this page. If you make any adjustments to other settings on this page, the graphics mode changes to CUSTOM. -DRIVER: Consult the platform specific readme for the drivers that will work with your platform. -VIDEO MODE: This is the screen resolution size. Smaller resolutions can improve performance speed on slower machines. -COLOR DEPTH: Determines whether you are using 16-bit textures or 32-bit textures. Default means you run with the color depth currently set for your computer's desktop. -FULLSCREEN: A YES selection allows you to choose to run with the test filling the entire screen. A NO selection will run the game in a window. If run in a window, COLOR DEPTH is disabled because you are limited to whatever has been selected for the desktop. -LIGHTING: Allows you to chose either a LIGHTMAP or VERTEX lighting. Using the LIGHTMAP is recommended for best appearance. VERTEX lighting may improve game performance, but at a cost to appearance. -GEOMETRIC DETAIL: Lets you adjust the number subdivisions used to define curves in the arena on both world geometry and items, weapons and characters. HIGH is the normal setting. LOW greatly reduces curve complexity. -SCREEN SIZE: The slide control changes the amount of screen area devoted to display of the game. Reducing screen size can improve performance. -TEXTURE DETAIL: This sliding control allows you to adjust the level of detail displayed. Unless you have an extremely fast computer, the normal setting gives the best balance of detail vs. game speed. -TEXTURE QUALITY: This determines whether you wish to use 32-bit textures, 16-bit textures, or compressed textures. Many of the game's special effects will appear at their best only when defined by 32-bit textures. -OPENGL EXTENSIONS: Allows you to enable or disable OPENGL extensions. -DRIVER INFORMATION: Brings up a display of information regarding the drivers currently operating in your machine. It is not interactive. Hit ESC to return to the previous menu. - - -PREFERENCES: Hitting ENTER here will drop you into another menu that allows you to adjust other game features. -CROSSHAIR: choose one of four options, none, cross, dot, or angle. -MARKS ON WALLS: Enable or Disable weapons scars and blood smears. Disabling this feature may improve performance. -DYNAMIC LIGHTS: Enable or Disable lights that move through the world (such as light generated by weapon projectile trails). Disabling this feature may improve performance. -LIGHT FLARES: Enable or DISABLE glowing light halos around lights. Disabling this feature may improve performance. -IDENTIFY TARGET: Enable or Disable the ability to see the name of your foe when you put your crosshair on him (does not function if target is in fog). -SKY: Set the sky for either HIGH SPEED or HIGH QUALITY. - -RESET DEFAULTS: Restore all game settings and controls to their default value by reloading the default configuration. - -APPLY: You must select this and hit ENTER to lock in your choices. Doing so will restart the game video. - -SCREENSHOT: -Makes a targa file screen shot of what is currently in view on the screen. Look for it in the Screenshot folder within your Quake 3/Baseq3/screenshots folder. - -LEAVE ARENA: -This disconnects you from the arena you are currently playing, but does not quit you out of the game. From here you can connect to other servers or start your own. You can also leave an arena by typing "disconnect" on the command line of the console. - -QUIT GAME: -Returns you to the desktop. - - -====================== -== Section 6. == -== STATUS READOUTS == -====================== - - Your player status is shown as numbers and icons floating in your view at the bottom of the screen. There is an indicator for your ammo (far left) including the type of ammo currently in use, current health (left-center), your character portrait (center), armor (center-right), and Frag Count (far right). The digital timer in the upper right shows the amount of time you have been in this arena. When you have a one-use item in your inventory (such as the personal teleporter), its icon will appear on the right side of your display. When you are fragged, the character portrait and name of the foe who killed you appears in the upper right corner of the display. When you change weapons, icons representing the ammo of the weapons in your inventory will appear above your character portrait. If you have a weapon, but no ammunition for it, a negation symbol will be superimposed over the ammo icon. - -+----------------------------+ -| INTERPRETING THE LAGOMETER | -+----------------------------+ - The Lagometer is the graph in the lower right corner of the status display. It is a test function and not a part of regular game play. The upper graph (blue/yellow) slides one pixel for every rendered frame. Blue lines below the baseline mean that the frame is interpolating between two valid snapshots. Yellow lines above the baseline mean the frame is extrapolating beyond the latest valid time. The length of the line is proportional to the time. -The lower graph (green/yellow/red) slides one pixel for every received snapshot. By default, snapshots come 20 times a second, so if you are running >20 fps, the top graph will move faster, and vice versa. A red bar means the snapshot was dropped by the network. Green and yellow bars are properly received snapshots, with the height of the bar proportional to the ping. A yellow bar indicates that the previous snapshot was intentionally suppressed to stay under the rate limit. -The upper graph indicates the consistency of your connection. Ideally, you should always have blue bars of only a pixel or two in height. If you are commonly getting big triangles of yellow on the graph, your connection is inconsistent. - In a heavy firefight, it is normal for modem players to see yellow bars in the bottom graph, which should return to green when the action quiets down. If you are getting several red bars visible, you may want to look for a server that drops less packets. - There are a few tuning variables for people trying to optimize their connection: The most important one is "rate", which is what the connection speed option in the menu sets. We are fairly conservative with the values we set for the given modem speeds: 2500 for 28.8, 3000 for 33, and 3500 for 56k. You may actually be connecting faster than that, and modem compression may be buying you something, so you might get a better play experience by increasing the values slightly. If you connect at 50000 bps, try a rate of 5000, etc. Quake 3 errs on the conservative side, because too low of a rate will only make the movement of other things in the world choppy, while too high of a rate can cause huge amounts of lag. - Note that the optimal rate will be somewhat lower than a rate for QW or Q2, because Quake 3 now includes the UDP packet header length in the bandwidth estimate. You can ask for a different number of snapshots by changing the "snaps" variable, but there isn't a lot of benefit to that. Dedicated servers run at 40hz, so stick to divisors of that: 40, 20 (default), 10. A "snaps" of 40 will usually just cause you to hit your rate limit a lot faster. It may be useful for tuning rate, if nothing else. - You can adjust the local timing point with "cg_timenudge ", which effectively adds local lag to try to make sure you interpolate instead of extrapolate. If you really want to play on a server that is dropping a ton of packets, a timenudge of 100 or so might make the game smoother. - -===================== -== Section 7. == -== PLAYER ACTIONS == -===================== - - The descriptions below are based on the preset default configurations for the game controls. If you have played first person shooting games previously (such as Quake or Quake 2), you may want to reconfigure the controls to match your preferences. - -+----------+ -| ACTIONS | -+----------+ -WALKING: Use the four arrow keys or the mouse to walk around. To walk steadily forward, hold down the "forward" key (the up arrow or center button on a 3-button mouse). Turn left or right with the left or right arrow keys, or by sliding your mouse in the desired direction. - -RUNNING: To run, simply hold down the left Shift key to increase your -Speed (unless you have selected "Always Run", in which case it reverts you to a walk. If you prefer to always run during the game, open the Main menu, then the Customize Controls menu, and select Always Run. - -SHOOTING: Tap the Ctrl key or the left mouse button to fire. Hold the -fire key down to keep firing. - -LOOKING UP AND DOWN: The letters A and Z allow you to look up and down, -respectively. Start walking forward and your line of vision will -automatically readjust to the center position. You may also choose to -select Free Look under the Controls menu which will allow you to move the -mouse around as if it was your head movement. - -SWIMMING: While underwater, aim yourself in the direction you wish to go -and press the forward key to go in that direction. Unfortunately, as in -real life, you may lose your bearings while underwater. Use the jump key, -(default is the Space Bar), to kick straight up towards the surface. Once on -the surface, tread water by holding down the jump key. To get out of the -drink, swim toward the shore and you can either jump up onto the land or -walk straight out if it is shallow enough. There is always a way out of -water, but you may have to submerge even deeper in order to find it. - -CROUCHING: Press and hold down the C key to duck and move forward to "duck walk." When you release the C key, you will return to an upright position. It is also possible to avoid rockets in this manner. - -JUMPING: Tap the space bar to jump. You jump farther if you're moving -forward at the time. - -STRAFING: Hold down the ALT key and the left or right arrow key and you will side-step in that particular direction. This is perfect for avoiding incoming weapon attacks. - -PICKING UP OBJECTS: To pick up items, weapons, and power-ups, simply walk -over them. The weapon cross-hair will pulse larger briefly to indicate you have acquired a new weapon or supply. If you are unable to pick something up, it means you already have the maximum amount possible for that object. - -TALKING: To communicate with other players, press the T key -and type in your message. Press Enter when finished and your words will -appear at the top of the screen. You can also enter communications on the command line of the console. - -ATTACKING: Point your weapon at an opponent and press the fire button. Default fire keys are the left mouse and the control key). If a weapon runs out of ammo, it switches to the next available weapon with ammo the next time you fire it. If you have no ammo at all, you fight with the gauntlet. - -+--------+ -| DYING: | -+--------+ - When you die, the weapon you were using (except for the gauntlet and the machine gun), and any active power ups drop where you died. Armor, ammo and one-use items like the teleporter are lost. To respawn into the game, press the fire key. When you re-enter the game you are once again armed with only your starting equipment. - -=========================== -== Section 8. == -== THE ARENA ENVIRONMENT == -=========================== - -+-----------------------+ -| RAPID TRANSIT DEVICES | -+-----------------------+ -TELEPORTERS: These devices instantaneously move you to a pre-selected destination. - -PORTALS: These are devices that generate holes in space through which you can see your ultimate destination and move to it like walking through a doorway. - -JUMP PADS: Jump pads throw you upwards to land on higher portions of the arena. You have some "air" control over your final landing point. - -ACCELERATION PADS: Acceleration pads turn you into a human cannon ball, launching you to distant locations in the arena. As with the jump pads, you have some "air" control over your final landing point. - -+-----------------------+ -| ENVIRONMENTAL HAZARDS | -+-----------------------+ -LAVA: Walking on lava is not instantly fatal, but even with good armor protection, it can be a relatively quick (and noisy) doom. - -THE VOID: Falling off into the infinite blackness of the void is a near inescapable death. - -+--------------+ -| TEST ARSENAL | -+--------------+ -MACHINE GUN: This is your default weapon. It's an instant hit attack and reasonably accurate even at long range. It uses bullets. - -GAUNTLET: This is either your weapon of last resort when you're out of ammo or a cool tool to humiliate other players. When it hits, it does damage and knocks a foe back. It does not require ammunition, but you have to be in direct contact with a foe and activating (firing) it to cause injury and knockback. - -SHOTGUN: This uses shells for ammunition. The spread of the shotgun blast makes it deadly in close combat, but not the best choice for long-range attacks. - -ROCKET LAUNCHER: The rocket launcher delivers heavy fire power to your target, but travels slower compared to other attacks. Be careful when you use this weapon in close combat. - -PLASMA GUN: Powered by Energy cells, this rapid-fire weapon delivers deadly gouts of glowing energy quickly and accurately. - -RAIL GUN: The Rail Gun fires depleted uranium slugs at super high velocities. It hits instantly and can pass through the bodies of multiple opponents. But be warned, it recharges slowly and can be a liability in close combat. Take note of the distinctive trail of atmospheric disturbance -caused by the projectile. The color of the rail gun's trail can be changed under the CUSTOMIZE PLAYER menu on the EFFECTS COLOR line. - -LIGHTNING GUN: Zap them! - -+------------------+ -| COMBAT SUPPLIES: | -+------------------+ -Pick up these helpful items whenever possible. Some items take effect when -picked up, others you must activate during play. - -AMMO: With the exception of the gauntlet, each weapon has a corresponding ammo type. The color of the ammo boxes corresponds with the color of the graphic weapon icons displayed briefly in your heads up display. Each ammo type has a maximum you can carry. - -ARMOR: There are three armor types: Green armor shards, yellow combat armor and red body armor. Collecting them increases your armor protection. The red armor and the green armor shards can increase your total armor protection above the maximum for short duration. The points "decay" back to the normal maximum value. - -HEALTH: There are three types of standard health kits: small (green), medium (yellow) and large (red) encased in crystalline shells. The green health can increase your total health value above the maximum. Like armor, it "decays" back to your maximum possible health value. - -QUAD DAMAGE: The quad temporarily multiplies all your weapon's strengths. - -MEGA HEALTH: This blue health power up provides a temporary but significant boost to your health, taking it above your maximum level. Like armor, it "decays" back to your maximum possible health value. - -PERSONAL TELEPORTER: Grab this single-use power up and use it to escape from dangerous situations. Activating it immediately teleports you to one of the arena's spawn spots. - -======================= -== Section 9. == -== THE GAME CONSOLE == -======================= - - The game console (or just the console) is a pull down window shade that shows recent game information, including the text of conversations and recently executed game commands. The bottom line of the console is the command line. While playing Q3test, you can enter into console mode by pressing the tilde (~) key and exit by pressing it again. The console is where you enter all the commands to change the game state. - - For example, one console command is "map " which will load a map -and start it up. Starting up a map actually starts a local Server and a Client. For the purposes of this test, most of the console commands will be executed to optimize graphics. Pressing the up and down arrows in the console will change to the last command entered. You can backspace over the command and enter new values if you'd like. There is also a command-completion function. Type in the first few letters of a command. By pressing the TAB key, you can have the console automatically finish the name of the command for you. - - When you are in console mode (or when you have selected to "talk" by typing in words to appear on the screen), a blue "voice balloon" will appear over your head. Common game courtesy is to NOT shoot players who are in this mode. - -======================= -== Section 10. == -== PROBLEM ICONS == -======================= - -Q3Test has a Problem Icon that you may see on your screen from time to time. When you are disconnected from a Quake Server or the network packet flow is disturbed, you will see a Network Disconnect icon above the spot where your frag count is displayed. Other players will see it displayed over your character's head (similar to the way the talk balloon is displayed). If you are not immediately reconnected to the server, you will need to disconnect (leave arena) and attempt to reconnect with the server by either using the menu commands or by typing "connect" in the console command line. - NOTE: Courteous players will refrain from getting cheap points by fragging lagged out opponents. - -======================= -== Section 11. == -== MESSAGE OF THE DAY == -======================= - -When Quake 3 Arena starts a map up, it sends the GL_RENDERER string to the Message Of The Day server at id. This responds back with a message of the day to the client. If you wish to switch this option off, set CL_MOTD to 0 (+set CL_MOTD 0 from the command line). - diff --git a/code/unix/linux_glimp.c b/code/unix/linux_glimp.c deleted file mode 100644 index 4cdc799f..00000000 --- a/code/unix/linux_glimp.c +++ /dev/null @@ -1,1851 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** GLW_IMP.C -** -** This file contains ALL Linux specific stuff having to do with the -** OpenGL refresh. When a port is being made the following functions -** must be implemented by the port: -** -** GLimp_EndFrame -** GLimp_Init -** GLimp_Shutdown -** GLimp_SwitchFullscreen -** GLimp_SetGamma -** -*/ - -#if !USE_SDL_VIDEO - -#include -#include -#ifdef __linux__ - #include - #include -#endif -#include -#include -#include -#include -#include - -// bk001204 -#include - -// bk001206 - from my Heretic2 by way of Ryan's Fakk2 -// Needed for the new X11_PendingInput() function. -#include -#include -#include - -#include "../renderer/tr_local.h" -#include "../client/client.h" -#include "linux_local.h" // bk001130 - -#include "unix_glw.h" - -#include - -#include -#include - -#if !defined(__sun) -#include -#include -#endif - -#if defined(__sun) -#include -#endif - -#ifdef _XF86DGA_H_ -#define HAVE_XF86DGA -#endif - -typedef enum -{ - RSERR_OK, - - RSERR_INVALID_FULLSCREEN, - RSERR_INVALID_MODE, - - RSERR_UNKNOWN -} rserr_t; - -glwstate_t glw_state; - -static Display *dpy = NULL; -static int scrnum; -static Window win = 0; -static GLXContext ctx = NULL; - -// bk001206 - not needed anymore -// static qboolean autorepeaton = qtrue; - -#define KEY_MASK (KeyPressMask | KeyReleaseMask) -#define MOUSE_MASK (ButtonPressMask | ButtonReleaseMask | \ - PointerMotionMask | ButtonMotionMask ) -#define X_MASK (KEY_MASK | MOUSE_MASK | VisibilityChangeMask | StructureNotifyMask ) - -static qboolean mouse_avail; -static qboolean mouse_active = qfalse; -static int mwx, mwy; -static int mx = 0, my = 0; - -// Time mouse was reset, we ignore the first 50ms of the mouse to allow settling of events -static int mouseResetTime = 0; -#define MOUSE_RESET_DELAY 50 - -static cvar_t *in_mouse; -static cvar_t *in_dgamouse; // user pref for dga mouse -static cvar_t *in_shiftedKeys; // obey modifiers for certain keys in non-console (comma, numbers, etc) -cvar_t *in_subframe; -cvar_t *in_nograb; // this is strictly for developers - -// bk001130 - from cvs1.17 (mkv), but not static -cvar_t *in_joystick = NULL; -cvar_t *in_joystickDebug = NULL; -cvar_t *joy_threshold = NULL; - -cvar_t *r_allowSoftwareGL; // don't abort out if the pixelformat claims software -cvar_t *r_previousglDriver; - -qboolean vidmode_ext = qfalse; -#ifdef HAVE_XF86DGA -static int vidmode_MajorVersion = 0, vidmode_MinorVersion = 0; // major and minor of XF86VidExtensions - -// gamma value of the X display before we start playing with it -static XF86VidModeGamma vidmode_InitialGamma; -#endif /* HAVE_XF86DGA */ - -static int win_x, win_y; - -#ifdef HAVE_XF86DGA -static XF86VidModeModeInfo **vidmodes; -#endif /* HAVE_XF86DGA */ -//static int default_dotclock_vidmode; // bk001204 - unused -static int num_vidmodes; -static qboolean vidmode_active = qfalse; - -static int mouse_accel_numerator; -static int mouse_accel_denominator; -static int mouse_threshold; - -/* -* Find the first occurrence of find in s. -*/ -// bk001130 - from cvs1.17 (mkv), const -// bk001130 - made first argument const -static const char *Q_stristr( const char *s, const char *find) -{ - register char c, sc; - register size_t len; - - if ((c = *find++) != 0) - { - if (c >= 'a' && c <= 'z') - { - c -= ('a' - 'A'); - } - len = strlen(find); - do - { - do - { - if ((sc = *s++) == 0) - return NULL; - if (sc >= 'a' && sc <= 'z') - { - sc -= ('a' - 'A'); - } - } while (sc != c); - } while (Q_stricmpn(s, find, len) != 0); - s--; - } - return s; -} - -/***************************************************************************** -** KEYBOARD -** NOTE TTimo the keyboard handling is done with KeySyms -** that means relying on the keyboard mapping provided by X -** in-game it would probably be better to use KeyCode (i.e. hardware key codes) -** you would still need the KeySyms in some cases, such as for the console and all entry textboxes -** (cause there's nothing worse than a qwerty mapping on a french keyboard) -** -** you can turn on some debugging and verbose of the keyboard code with #define KBD_DBG -******************************************************************************/ - -//#define KBD_DBG - -static char *XLateKey(XKeyEvent *ev, int *key) -{ - static unsigned char buf[64]; - static unsigned char bufnomod[2]; - KeySym keysym; - int XLookupRet; - - *key = 0; - - XLookupRet = XLookupString(ev, buf, sizeof buf, &keysym, 0); -#ifdef KBD_DBG - ri.Printf(PRINT_ALL, "XLookupString ret: %d buf: %s keysym: %x\n", XLookupRet, buf, keysym); -#endif - - if (!in_shiftedKeys->integer) { - // also get a buffer without modifiers held - ev->state = 0; - XLookupRet = XLookupString(ev, bufnomod, sizeof bufnomod, &keysym, 0); -#ifdef KBD_DBG - ri.Printf(PRINT_ALL, "XLookupString (minus modifiers) ret: %d buf: %s keysym: %x\n", XLookupRet, buf, keysym); -#endif - } - - switch (keysym) - { - case XK_KP_Page_Up: - case XK_KP_9: *key = K_KP_PGUP; break; - case XK_Page_Up: *key = K_PGUP; break; - - case XK_KP_Page_Down: - case XK_KP_3: *key = K_KP_PGDN; break; - case XK_Page_Down: *key = K_PGDN; break; - - case XK_KP_Home: *key = K_KP_HOME; break; - case XK_KP_7: *key = K_KP_HOME; break; - case XK_Home: *key = K_HOME; break; - - case XK_KP_End: - case XK_KP_1: *key = K_KP_END; break; - case XK_End: *key = K_END; break; - - case XK_KP_Left: *key = K_KP_LEFTARROW; break; - case XK_KP_4: *key = K_KP_LEFTARROW; break; - case XK_Left: *key = K_LEFTARROW; break; - - case XK_KP_Right: *key = K_KP_RIGHTARROW; break; - case XK_KP_6: *key = K_KP_RIGHTARROW; break; - case XK_Right: *key = K_RIGHTARROW; break; - - case XK_KP_Down: - case XK_KP_2: *key = K_KP_DOWNARROW; break; - case XK_Down: *key = K_DOWNARROW; break; - - case XK_KP_Up: - case XK_KP_8: *key = K_KP_UPARROW; break; - case XK_Up: *key = K_UPARROW; break; - - case XK_Escape: *key = K_ESCAPE; break; - - case XK_KP_Enter: *key = K_KP_ENTER; break; - case XK_Return: *key = K_ENTER; break; - - case XK_Tab: *key = K_TAB; break; - - case XK_F1: *key = K_F1; break; - - case XK_F2: *key = K_F2; break; - - case XK_F3: *key = K_F3; break; - - case XK_F4: *key = K_F4; break; - - case XK_F5: *key = K_F5; break; - - case XK_F6: *key = K_F6; break; - - case XK_F7: *key = K_F7; break; - - case XK_F8: *key = K_F8; break; - - case XK_F9: *key = K_F9; break; - - case XK_F10: *key = K_F10; break; - - case XK_F11: *key = K_F11; break; - - case XK_F12: *key = K_F12; break; - - // bk001206 - from Ryan's Fakk2 - //case XK_BackSpace: *key = 8; break; // ctrl-h - case XK_BackSpace: *key = K_BACKSPACE; break; // ctrl-h - - case XK_KP_Delete: - case XK_KP_Decimal: *key = K_KP_DEL; break; - case XK_Delete: *key = K_DEL; break; - - case XK_Pause: *key = K_PAUSE; break; - - case XK_Shift_L: - case XK_Shift_R: *key = K_SHIFT; break; - - case XK_Execute: - case XK_Control_L: - case XK_Control_R: *key = K_CTRL; break; - - case XK_Alt_L: - case XK_Meta_L: - case XK_Alt_R: - case XK_Meta_R: *key = K_ALT; break; - - case XK_KP_Begin: *key = K_KP_5; break; - - case XK_Insert: *key = K_INS; break; - case XK_KP_Insert: - case XK_KP_0: *key = K_KP_INS; break; - - case XK_KP_Multiply: *key = '*'; break; - case XK_KP_Add: *key = K_KP_PLUS; break; - case XK_KP_Subtract: *key = K_KP_MINUS; break; - case XK_KP_Divide: *key = K_KP_SLASH; break; - - // bk001130 - from cvs1.17 (mkv) - case XK_exclam: *key = '1'; break; - case XK_at: *key = '2'; break; - case XK_numbersign: *key = '3'; break; - case XK_dollar: *key = '4'; break; - case XK_percent: *key = '5'; break; - case XK_asciicircum: *key = '6'; break; - case XK_ampersand: *key = '7'; break; - case XK_asterisk: *key = '8'; break; - case XK_parenleft: *key = '9'; break; - case XK_parenright: *key = '0'; break; - - // weird french keyboards .. - // NOTE: console toggle is hardcoded in cl_keys.c, can't be unbound - // cleaner would be .. using hardware key codes instead of the key syms - // could also add a new K_KP_CONSOLE - case XK_twosuperior: *key = '~'; break; - - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=472 - case XK_space: - case XK_KP_Space: *key = K_SPACE; break; - - default: - if (XLookupRet == 0) - { - if (com_developer->value) - { - ri.Printf(PRINT_ALL, "Warning: XLookupString failed on KeySym %d\n", keysym); - } - return NULL; - } - else - { - // XK_* tests failed, but XLookupString got a buffer, so let's try it - if (in_shiftedKeys->integer) { - *key = *(unsigned char *)buf; - if (*key >= 'A' && *key <= 'Z') - *key = *key - 'A' + 'a'; - // if ctrl is pressed, the keys are not between 'A' and 'Z', for instance ctrl-z == 26 ^Z ^C etc. - // see https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=19 - else if (*key >= 1 && *key <= 26) - *key = *key + 'a' - 1; - } else { - *key = bufnomod[0]; - } - } - break; - } - - return buf; -} - -// ======================================================================== -// makes a null cursor -// ======================================================================== - -static Cursor CreateNullCursor(Display *display, Window root) -{ - Pixmap cursormask; - XGCValues xgc; - GC gc; - XColor dummycolour; - Cursor cursor; - - cursormask = XCreatePixmap(display, root, 1, 1, 1/*depth*/); - xgc.function = GXclear; - gc = XCreateGC(display, cursormask, GCFunction, &xgc); - XFillRectangle(display, cursormask, gc, 0, 0, 1, 1); - dummycolour.pixel = 0; - dummycolour.red = 0; - dummycolour.flags = 04; - cursor = XCreatePixmapCursor(display, cursormask, cursormask, - &dummycolour,&dummycolour, 0,0); - XFreePixmap(display,cursormask); - XFreeGC(display,gc); - return cursor; -} - -static void install_grabs(void) -{ - // inviso cursor - XWarpPointer(dpy, None, win, - 0, 0, 0, 0, - glConfig.vidWidth / 2, glConfig.vidHeight / 2); - XSync(dpy, False); - - XDefineCursor(dpy, win, CreateNullCursor(dpy, win)); - - XGrabPointer(dpy, win, // bk010108 - do this earlier? - False, - MOUSE_MASK, - GrabModeAsync, GrabModeAsync, - win, - None, - CurrentTime); - - XGetPointerControl(dpy, &mouse_accel_numerator, &mouse_accel_denominator, - &mouse_threshold); - - XChangePointerControl(dpy, True, True, 1, 1, 0); - - XSync(dpy, False); - - mouseResetTime = Sys_Milliseconds (); - -#ifdef HAVE_XF86DGA - if (in_dgamouse->value) - { - int MajorVersion, MinorVersion; - - if (!XF86DGAQueryVersion(dpy, &MajorVersion, &MinorVersion)) - { - // unable to query, probalby not supported, force the setting to 0 - ri.Printf( PRINT_ALL, "Failed to detect XF86DGA Mouse\n" ); - ri.Cvar_Set( "in_dgamouse", "0" ); - } else - { - XF86DGADirectVideo(dpy, DefaultScreen(dpy), XF86DGADirectMouse); - XWarpPointer(dpy, None, win, 0, 0, 0, 0, 0, 0); - } - } else -#endif /* HAVE_XF86DGA */ - { - mwx = glConfig.vidWidth / 2; - mwy = glConfig.vidHeight / 2; - mx = my = 0; - } - - XGrabKeyboard(dpy, win, - False, - GrabModeAsync, GrabModeAsync, - CurrentTime); - - XSync(dpy, False); -} - -static void uninstall_grabs(void) -{ -#ifdef HAVE_XF86DGA - if (in_dgamouse->value) - { - if (com_developer->value) - ri.Printf( PRINT_ALL, "DGA Mouse - Disabling DGA DirectVideo\n" ); - XF86DGADirectVideo(dpy, DefaultScreen(dpy), 0); - } -#endif /* HAVE_XF86DGA */ - - XChangePointerControl(dpy, qtrue, qtrue, mouse_accel_numerator, - mouse_accel_denominator, mouse_threshold); - - XUngrabPointer(dpy, CurrentTime); - XUngrabKeyboard(dpy, CurrentTime); - - XWarpPointer(dpy, None, win, - 0, 0, 0, 0, - glConfig.vidWidth / 2, glConfig.vidHeight / 2); - - // inviso cursor - XUndefineCursor(dpy, win); -} - -// bk001206 - from Ryan's Fakk2 -/** - * XPending() actually performs a blocking read - * if no events available. From Fakk2, by way of - * Heretic2, by way of SDL, original idea GGI project. - * The benefit of this approach over the quite - * badly behaved XAutoRepeatOn/Off is that you get - * focus handling for free, which is a major win - * with debug and windowed mode. It rests on the - * assumption that the X server will use the - * same timestamp on press/release event pairs - * for key repeats. - */ -static qboolean X11_PendingInput(void) { - - assert(dpy != NULL); - - // Flush the display connection - // and look to see if events are queued - XFlush( dpy ); - if ( XEventsQueued( dpy, QueuedAlready) ) - { - return qtrue; - } - - // More drastic measures are required -- see if X is ready to talk - { - static struct timeval zero_time; - int x11_fd; - fd_set fdset; - - x11_fd = ConnectionNumber( dpy ); - FD_ZERO(&fdset); - FD_SET(x11_fd, &fdset); - if ( select(x11_fd+1, &fdset, NULL, NULL, &zero_time) == 1 ) - { - return(XPending(dpy)); - } - } - - // Oh well, nothing is ready .. - return qfalse; -} - -// bk001206 - from Ryan's Fakk2. See above. -static qboolean repeated_press(XEvent *event) -{ - XEvent peekevent; - qboolean repeated = qfalse; - - assert(dpy != NULL); - - if (X11_PendingInput()) - { - XPeekEvent(dpy, &peekevent); - - if ((peekevent.type == KeyPress) && - (peekevent.xkey.keycode == event->xkey.keycode) && - (peekevent.xkey.time == event->xkey.time)) - { - repeated = qtrue; - XNextEvent(dpy, &peekevent); // skip event. - } // if - } // if - - return(repeated); -} // repeated_press - -int Sys_XTimeToSysTime (Time xtime); -static void HandleEvents(void) -{ - int b; - int key; - XEvent event; - qboolean dowarp = qfalse; - char *p; - int dx, dy; - int t = 0; // default to 0 in case we don't set - - if (!dpy) - return; - - while (XPending(dpy)) - { - XNextEvent(dpy, &event); - switch (event.type) - { - case KeyPress: - t = Sys_XTimeToSysTime(event.xkey.time); - p = XLateKey(&event.xkey, &key); - if (key) - { - Sys_QueEvent( t, SE_KEY, key, qtrue, 0, NULL ); - } - if (p) - { - while (*p) - { - Sys_QueEvent( t, SE_CHAR, *p++, 0, 0, NULL ); - } - } - break; - - case KeyRelease: - t = Sys_XTimeToSysTime(event.xkey.time); - // bk001206 - handle key repeat w/o XAutRepatOn/Off - // also: not done if console/menu is active. - // From Ryan's Fakk2. - // see game/q_shared.h, KEYCATCH_* . 0 == in 3d game. - if (cls.keyCatchers == 0) - { // FIXME: KEYCATCH_NONE - if (repeated_press(&event) == qtrue) - continue; - } // if - XLateKey(&event.xkey, &key); - - Sys_QueEvent( t, SE_KEY, key, qfalse, 0, NULL ); - break; - - case MotionNotify: - t = Sys_XTimeToSysTime(event.xkey.time); - if (mouse_active) - { -#ifdef HAVE_XF86DGA - if (in_dgamouse->value) - { - mx += event.xmotion.x_root; - my += event.xmotion.y_root; - if (t - mouseResetTime > MOUSE_RESET_DELAY ) - { - Sys_QueEvent( t, SE_MOUSE, mx, my, 0, NULL ); - } - mx = my = 0; - } else -#endif /* HAVE_XF86DGA */ - { - // If it's a center motion, we've just returned from our warp - if (event.xmotion.x == glConfig.vidWidth/2 && - event.xmotion.y == glConfig.vidHeight/2) - { - mwx = glConfig.vidWidth/2; - mwy = glConfig.vidHeight/2; - if (t - mouseResetTime > MOUSE_RESET_DELAY ) - { - Sys_QueEvent( t, SE_MOUSE, mx, my, 0, NULL ); - } - mx = my = 0; - break; - } - - dx = ((int)event.xmotion.x - mwx); - dy = ((int)event.xmotion.y - mwy); - mx += dx; - my += dy; - - mwx = event.xmotion.x; - mwy = event.xmotion.y; - dowarp = qtrue; - } - } - break; - - case ButtonPress: - t = Sys_XTimeToSysTime(event.xkey.time); - if (event.xbutton.button == 4) - { - Sys_QueEvent( t, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); - } else if (event.xbutton.button == 5) - { - Sys_QueEvent( t, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); - } else - { - // NOTE TTimo there seems to be a weird mapping for K_MOUSE1 K_MOUSE2 K_MOUSE3 .. - b=-1; - if (event.xbutton.button == 1) - { - b = 0; // K_MOUSE1 - } else if (event.xbutton.button == 2) - { - b = 2; // K_MOUSE3 - } else if (event.xbutton.button == 3) - { - b = 1; // K_MOUSE2 - } else if (event.xbutton.button == 6) - { - b = 3; // K_MOUSE4 - } else if (event.xbutton.button == 7) - { - b = 4; // K_MOUSE5 - }; - - Sys_QueEvent( t, SE_KEY, K_MOUSE1 + b, qtrue, 0, NULL ); - } - break; - - case ButtonRelease: - t = Sys_XTimeToSysTime(event.xkey.time); - if (event.xbutton.button == 4) - { - Sys_QueEvent( t, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); - } else if (event.xbutton.button == 5) - { - Sys_QueEvent( t, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); - } else - { - b=-1; - if (event.xbutton.button == 1) - { - b = 0; - } else if (event.xbutton.button == 2) - { - b = 2; - } else if (event.xbutton.button == 3) - { - b = 1; - } else if (event.xbutton.button == 6) - { - b = 3; // K_MOUSE4 - } else if (event.xbutton.button == 7) - { - b = 4; // K_MOUSE5 - }; - Sys_QueEvent( t, SE_KEY, K_MOUSE1 + b, qfalse, 0, NULL ); - } - break; - - case CreateNotify : - win_x = event.xcreatewindow.x; - win_y = event.xcreatewindow.y; - break; - - case ConfigureNotify : - win_x = event.xconfigure.x; - win_y = event.xconfigure.y; - break; - } - } - - if (dowarp) - { - XWarpPointer(dpy,None,win,0,0,0,0, - (glConfig.vidWidth/2),(glConfig.vidHeight/2)); - } -} - -// NOTE TTimo for the tty console input, we didn't rely on those .. -// it's not very surprising actually cause they are not used otherwise -void KBD_Init(void) -{ -} - -void KBD_Close(void) -{ -} - -void IN_ActivateMouse( void ) -{ - if (!mouse_avail || !dpy || !win) - return; - - if (!mouse_active) - { - if (!in_nograb->value) - install_grabs(); - else if (in_dgamouse->value) // force dga mouse to 0 if using nograb - ri.Cvar_Set("in_dgamouse", "0"); - mouse_active = qtrue; - } -} - -void IN_DeactivateMouse( void ) -{ - if (!mouse_avail || !dpy || !win) - return; - - if (mouse_active) - { - if (!in_nograb->value) - uninstall_grabs(); - else if (in_dgamouse->value) // force dga mouse to 0 if using nograb - ri.Cvar_Set("in_dgamouse", "0"); - mouse_active = qfalse; - } -} -/*****************************************************************************/ - -/* -** GLimp_SetGamma -** -** This routine should only be called if glConfig.deviceSupportsGamma is TRUE -*/ -void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned char blue[256] ) -{ - // NOTE TTimo we get the gamma value from cvar, because we can't work with the s_gammatable - // the API wasn't changed to avoid breaking other OSes -#ifdef HAVE_XF86DGA - float g = Cvar_Get("r_gamma", "1.0", 0)->value; - XF86VidModeGamma gamma; - assert(glConfig.deviceSupportsGamma); - gamma.red = g; - gamma.green = g; - gamma.blue = g; - XF86VidModeSetGamma(dpy, scrnum, &gamma); -#endif /* HAVE_XF86DGA */ -} - -/* -** GLimp_Shutdown -** -** This routine does all OS specific shutdown procedures for the OpenGL -** subsystem. Under OpenGL this means NULLing out the current DC and -** HGLRC, deleting the rendering context, and releasing the DC acquired -** for the window. The state structure is also nulled out. -** -*/ -void GLimp_Shutdown( void ) -{ - if (!ctx || !dpy) - return; - IN_DeactivateMouse(); - // bk001206 - replaced with H2/Fakk2 solution - // XAutoRepeatOn(dpy); - // autorepeaton = qfalse; // bk001130 - from cvs1.17 (mkv) - if (dpy) - { - if (ctx) - qglXDestroyContext(dpy, ctx); - if (win) - XDestroyWindow(dpy, win); -#ifdef HAVE_XF86DGA - if (vidmode_active) - XF86VidModeSwitchToMode(dpy, scrnum, vidmodes[0]); - if (glConfig.deviceSupportsGamma) - { - XF86VidModeSetGamma(dpy, scrnum, &vidmode_InitialGamma); - } -#endif /* HAVE_XF86DGA */ - // NOTE TTimo opening/closing the display should be necessary only once per run - // but it seems QGL_Shutdown gets called in a lot of occasion - // in some cases, this XCloseDisplay is known to raise some X errors - // ( https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=33 ) - XCloseDisplay(dpy); - } - vidmode_active = qfalse; - dpy = NULL; - win = 0; - ctx = NULL; - - memset( &glConfig, 0, sizeof( glConfig ) ); - memset( &glState, 0, sizeof( glState ) ); - - QGL_Shutdown(); -} - -/* -** GLimp_LogComment -*/ -void GLimp_LogComment( char *comment ) -{ - if ( glw_state.log_fp ) - { - fprintf( glw_state.log_fp, "%s", comment ); - } -} - -/* -** GLW_StartDriverAndSetMode -*/ -// bk001204 - prototype needed -int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen ); -static qboolean GLW_StartDriverAndSetMode( const char *drivername, - int mode, - qboolean fullscreen ) -{ - rserr_t err; - - // don't ever bother going into fullscreen with a voodoo card -#if 1 // JDC: I reenabled this - if ( Q_stristr( drivername, "Voodoo" ) ) - { - ri.Cvar_Set( "r_fullscreen", "0" ); - r_fullscreen->modified = qfalse; - fullscreen = qfalse; - } -#endif - - if (fullscreen && in_nograb->value) - { - ri.Printf( PRINT_ALL, "Fullscreen not allowed with in_nograb 1\n"); - ri.Cvar_Set( "r_fullscreen", "0" ); - r_fullscreen->modified = qfalse; - fullscreen = qfalse; - } - - err = GLW_SetMode( drivername, mode, fullscreen ); - - switch ( err ) - { - case RSERR_INVALID_FULLSCREEN: - ri.Printf( PRINT_ALL, "...WARNING: fullscreen unavailable in this mode\n" ); - return qfalse; - case RSERR_INVALID_MODE: - ri.Printf( PRINT_ALL, "...WARNING: could not set the given mode (%d)\n", mode ); - return qfalse; - default: - break; - } - return qtrue; -} - -/* -** GLW_SetMode -*/ -int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen ) -{ - int attrib[] = { - GLX_RGBA, // 0 - GLX_RED_SIZE, 4, // 1, 2 - GLX_GREEN_SIZE, 4, // 3, 4 - GLX_BLUE_SIZE, 4, // 5, 6 - GLX_DOUBLEBUFFER, // 7 - GLX_DEPTH_SIZE, 1, // 8, 9 - GLX_STENCIL_SIZE, 1, // 10, 11 - None - }; - // these match in the array -#define ATTR_RED_IDX 2 -#define ATTR_GREEN_IDX 4 -#define ATTR_BLUE_IDX 6 -#define ATTR_DEPTH_IDX 9 -#define ATTR_STENCIL_IDX 11 - Window root; - XVisualInfo *visinfo; - XSetWindowAttributes attr; - XSizeHints sizehints; - unsigned long mask; - int colorbits, depthbits, stencilbits; - int tcolorbits, tdepthbits, tstencilbits; - int dga_MajorVersion, dga_MinorVersion; - int actualWidth, actualHeight; - int i; - const char* glstring; // bk001130 - from cvs1.17 (mkv) - - ri.Printf( PRINT_ALL, "Initializing OpenGL display\n"); - - ri.Printf (PRINT_ALL, "...setting mode %d:", mode ); - - if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) ) - { - ri.Printf( PRINT_ALL, " invalid mode\n" ); - return RSERR_INVALID_MODE; - } - ri.Printf( PRINT_ALL, " %d %d\n", glConfig.vidWidth, glConfig.vidHeight); - - if (!(dpy = XOpenDisplay(NULL))) - { - fprintf(stderr, "Error couldn't open the X display\n"); - return RSERR_INVALID_MODE; - } - - scrnum = DefaultScreen(dpy); - root = RootWindow(dpy, scrnum); - - actualWidth = glConfig.vidWidth; - actualHeight = glConfig.vidHeight; - - // Get video mode list -#ifdef HAVE_XF86DGA - if (!XF86VidModeQueryVersion(dpy, &vidmode_MajorVersion, &vidmode_MinorVersion)) - { -#endif /* HAVE_XF86DGA */ - vidmode_ext = qfalse; -#ifdef HAVE_XF86DGA - } else - { - ri.Printf(PRINT_ALL, "Using XFree86-VidModeExtension Version %d.%d\n", - vidmode_MajorVersion, vidmode_MinorVersion); - vidmode_ext = qtrue; - } -#endif /* HAVE_XF86DGA */ - - // Check for DGA - dga_MajorVersion = 0, dga_MinorVersion = 0; -#ifdef HAVE_XF86DGA - if (in_dgamouse->value) - { - if (!XF86DGAQueryVersion(dpy, &dga_MajorVersion, &dga_MinorVersion)) - { - // unable to query, probably not supported - ri.Printf( PRINT_ALL, "Failed to detect XF86DGA Mouse\n" ); - ri.Cvar_Set( "in_dgamouse", "0" ); - } else - { - ri.Printf( PRINT_ALL, "XF86DGA Mouse (Version %d.%d) initialized\n", - dga_MajorVersion, dga_MinorVersion); - } - } -#endif /* HAVE_XF86DGA */ - -#ifdef HAVE_XF86DGA - if (vidmode_ext) - { - int best_fit, best_dist, dist, x, y; - - XF86VidModeGetAllModeLines(dpy, scrnum, &num_vidmodes, &vidmodes); - - // Are we going fullscreen? If so, let's change video mode - if (fullscreen) - { - best_dist = 9999999; - best_fit = -1; - - for (i = 0; i < num_vidmodes; i++) - { - if (glConfig.vidWidth > vidmodes[i]->hdisplay || - glConfig.vidHeight > vidmodes[i]->vdisplay) - continue; - - x = glConfig.vidWidth - vidmodes[i]->hdisplay; - y = glConfig.vidHeight - vidmodes[i]->vdisplay; - dist = (x * x) + (y * y); - if (dist < best_dist) - { - best_dist = dist; - best_fit = i; - } - } - - if (best_fit != -1) - { - actualWidth = vidmodes[best_fit]->hdisplay; - actualHeight = vidmodes[best_fit]->vdisplay; - - // change to the mode - XF86VidModeSwitchToMode(dpy, scrnum, vidmodes[best_fit]); - vidmode_active = qtrue; - - // Move the viewport to top left - XF86VidModeSetViewPort(dpy, scrnum, 0, 0); - - ri.Printf(PRINT_ALL, "XFree86-VidModeExtension Activated at %dx%d\n", - actualWidth, actualHeight); - - } else - { - fullscreen = 0; - ri.Printf(PRINT_ALL, "XFree86-VidModeExtension: No acceptable modes found\n"); - } - } else - { - ri.Printf(PRINT_ALL, "XFree86-VidModeExtension: Ignored on non-fullscreen/Voodoo\n"); - } - } -#endif /* HAVE_XF86DGA */ - - - if (!r_colorbits->value) - colorbits = 24; - else - colorbits = r_colorbits->value; - - if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) ) - colorbits = 16; - - if (!r_depthbits->value) - depthbits = 24; - else - depthbits = r_depthbits->value; - stencilbits = r_stencilbits->value; - - for (i = 0; i < 16; i++) - { - // 0 - default - // 1 - minus colorbits - // 2 - minus depthbits - // 3 - minus stencil - if ((i % 4) == 0 && i) - { - // one pass, reduce - switch (i / 4) - { - case 2 : - if (colorbits == 24) - colorbits = 16; - break; - case 1 : - if (depthbits == 24) - depthbits = 16; - else if (depthbits == 16) - depthbits = 8; - case 3 : - if (stencilbits == 24) - stencilbits = 16; - else if (stencilbits == 16) - stencilbits = 8; - } - } - - tcolorbits = colorbits; - tdepthbits = depthbits; - tstencilbits = stencilbits; - - if ((i % 4) == 3) - { // reduce colorbits - if (tcolorbits == 24) - tcolorbits = 16; - } - - if ((i % 4) == 2) - { // reduce depthbits - if (tdepthbits == 24) - tdepthbits = 16; - else if (tdepthbits == 16) - tdepthbits = 8; - } - - if ((i % 4) == 1) - { // reduce stencilbits - if (tstencilbits == 24) - tstencilbits = 16; - else if (tstencilbits == 16) - tstencilbits = 8; - else - tstencilbits = 0; - } - - if (tcolorbits == 24) - { - attrib[ATTR_RED_IDX] = 8; - attrib[ATTR_GREEN_IDX] = 8; - attrib[ATTR_BLUE_IDX] = 8; - } else - { - // must be 16 bit - attrib[ATTR_RED_IDX] = 4; - attrib[ATTR_GREEN_IDX] = 4; - attrib[ATTR_BLUE_IDX] = 4; - } - - attrib[ATTR_DEPTH_IDX] = tdepthbits; // default to 24 depth - attrib[ATTR_STENCIL_IDX] = tstencilbits; - - visinfo = qglXChooseVisual(dpy, scrnum, attrib); - if (!visinfo) - { - continue; - } - - ri.Printf( PRINT_ALL, "Using %d/%d/%d Color bits, %d depth, %d stencil display.\n", - attrib[ATTR_RED_IDX], attrib[ATTR_GREEN_IDX], attrib[ATTR_BLUE_IDX], - attrib[ATTR_DEPTH_IDX], attrib[ATTR_STENCIL_IDX]); - - glConfig.colorBits = tcolorbits; - glConfig.depthBits = tdepthbits; - glConfig.stencilBits = tstencilbits; - break; - } - - if (!visinfo) - { - ri.Printf( PRINT_ALL, "Couldn't get a visual\n" ); - return RSERR_INVALID_MODE; - } - - /* window attributes */ - attr.background_pixel = BlackPixel(dpy, scrnum); - attr.border_pixel = 0; - attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone); - attr.event_mask = X_MASK; - if (vidmode_active) - { - mask = CWBackPixel | CWColormap | CWSaveUnder | CWBackingStore | - CWEventMask | CWOverrideRedirect; - attr.override_redirect = True; - attr.backing_store = NotUseful; - attr.save_under = False; - } else - mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - win = XCreateWindow(dpy, root, 0, 0, - actualWidth, actualHeight, - 0, visinfo->depth, InputOutput, - visinfo->visual, mask, &attr); - - XStoreName( dpy, win, CLIENT_WINDOW_TITLE ); - - /* GH: Don't let the window be resized */ - sizehints.flags = PMinSize | PMaxSize; - sizehints.min_width = sizehints.max_width = actualWidth; - sizehints.min_height = sizehints.max_height = actualHeight; - - XSetWMNormalHints( dpy, win, &sizehints ); - - XMapWindow( dpy, win ); - - if (vidmode_active) - XMoveWindow(dpy, win, 0, 0); - - XFlush(dpy); - XSync(dpy,False); // bk001130 - from cvs1.17 (mkv) - ctx = qglXCreateContext(dpy, visinfo, NULL, True); - XSync(dpy,False); // bk001130 - from cvs1.17 (mkv) - - /* GH: Free the visinfo after we're done with it */ - XFree( visinfo ); - - qglXMakeCurrent(dpy, win, ctx); - - // bk001130 - from cvs1.17 (mkv) - glstring = (char *)qglGetString (GL_RENDERER); - ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glstring ); - - // bk010122 - new software token (Indirect) - if ( !Q_stricmp( glstring, "Mesa X11") - || !Q_stricmp( glstring, "Mesa GLX Indirect") ) - { - if ( !r_allowSoftwareGL->integer ) - { - ri.Printf( PRINT_ALL, "\n\n***********************************************************\n" ); - ri.Printf( PRINT_ALL, " You are using software Mesa (no hardware acceleration)! \n" ); - ri.Printf( PRINT_ALL, " Driver DLL used: %s\n", drivername ); - ri.Printf( PRINT_ALL, " If this is intentional, add\n" ); - ri.Printf( PRINT_ALL, " \"+set r_allowSoftwareGL 1\"\n" ); - ri.Printf( PRINT_ALL, " to the command line when starting the game.\n" ); - ri.Printf( PRINT_ALL, "***********************************************************\n"); - GLimp_Shutdown( ); - return RSERR_INVALID_MODE; - } else - { - ri.Printf( PRINT_ALL, "...using software Mesa (r_allowSoftwareGL==1).\n" ); - } - } - - return RSERR_OK; -} - -/* -** GLW_InitExtensions -*/ -static void GLW_InitExtensions( void ) -{ - if ( !r_allowExtensions->integer ) - { - ri.Printf( PRINT_ALL, "*** IGNORING OPENGL EXTENSIONS ***\n" ); - return; - } - - ri.Printf( PRINT_ALL, "Initializing OpenGL extensions\n" ); - - // GL_S3_s3tc - if ( Q_stristr( glConfig.extensions_string, "GL_S3_s3tc" ) ) - { - if ( r_ext_compressed_textures->value ) - { - glConfig.textureCompression = TC_S3TC; - ri.Printf( PRINT_ALL, "...using GL_S3_s3tc\n" ); - } else - { - glConfig.textureCompression = TC_NONE; - ri.Printf( PRINT_ALL, "...ignoring GL_S3_s3tc\n" ); - } - } else - { - glConfig.textureCompression = TC_NONE; - ri.Printf( PRINT_ALL, "...GL_S3_s3tc not found\n" ); - } - - // GL_EXT_texture_env_add - glConfig.textureEnvAddAvailable = qfalse; - if ( Q_stristr( glConfig.extensions_string, "EXT_texture_env_add" ) ) - { - if ( r_ext_texture_env_add->integer ) - { - glConfig.textureEnvAddAvailable = qtrue; - ri.Printf( PRINT_ALL, "...using GL_EXT_texture_env_add\n" ); - } else - { - glConfig.textureEnvAddAvailable = qfalse; - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_env_add\n" ); - } - } else - { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_env_add not found\n" ); - } - - // GL_ARB_multitexture - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - if ( Q_stristr( glConfig.extensions_string, "GL_ARB_multitexture" ) ) - { - if ( r_ext_multitexture->value ) - { - qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) dlsym( glw_state.OpenGLLib, "glMultiTexCoord2fARB" ); - qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) dlsym( glw_state.OpenGLLib, "glActiveTextureARB" ); - qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) dlsym( glw_state.OpenGLLib, "glClientActiveTextureARB" ); - - if ( qglActiveTextureARB ) - { - GLint glint = 0; - qglGetIntegerv( GL_MAX_ACTIVE_TEXTURES_ARB, &glint ); - glConfig.maxActiveTextures = (int) glint; - - if ( glConfig.maxActiveTextures > 1 ) - { - ri.Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" ); - } else - { - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - ri.Printf( PRINT_ALL, "...not using GL_ARB_multitexture, < 2 texture units\n" ); - } - } - } else - { - ri.Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" ); - } - } else - { - ri.Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" ); - } - - // GL_EXT_compiled_vertex_array - if ( Q_stristr( glConfig.extensions_string, "GL_EXT_compiled_vertex_array" ) ) - { - if ( r_ext_compiled_vertex_array->value ) - { - ri.Printf( PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n" ); - qglLockArraysEXT = ( void ( APIENTRY * )( int, int ) ) dlsym( glw_state.OpenGLLib, "glLockArraysEXT" ); - qglUnlockArraysEXT = ( void ( APIENTRY * )( void ) ) dlsym( glw_state.OpenGLLib, "glUnlockArraysEXT" ); - if (!qglLockArraysEXT || !qglUnlockArraysEXT) - { - ri.Error (ERR_FATAL, "bad getprocaddress"); - } - } else - { - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_compiled_vertex_array\n" ); - } - } else - { - ri.Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" ); - } - - textureFilterAnisotropic = qfalse; - if ( strstr( glConfig.extensions_string, "GL_EXT_texture_filter_anisotropic" ) ) - { - if ( r_ext_texture_filter_anisotropic->integer ) { - qglGetIntegerv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy ); - if ( maxAnisotropy <= 0 ) { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not properly supported!\n" ); - maxAnisotropy = 0; - } - else - { - ri.Printf( PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic (max: %i)\n", maxAnisotropy ); - textureFilterAnisotropic = qtrue; - } - } - else - { - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" ); - } -} - -static void GLW_InitGamma(void) -{ - /* Minimum extension version required */ - #define GAMMA_MINMAJOR 2 - #define GAMMA_MINMINOR 0 - - glConfig.deviceSupportsGamma = qfalse; - -#ifdef HAVE_XF86DGA - if (vidmode_ext) - { - if (vidmode_MajorVersion < GAMMA_MINMAJOR || - (vidmode_MajorVersion == GAMMA_MINMAJOR && vidmode_MinorVersion < GAMMA_MINMINOR)) { - ri.Printf( PRINT_ALL, "XF86 Gamma extension not supported in this version\n"); - return; - } - XF86VidModeGetGamma(dpy, scrnum, &vidmode_InitialGamma); - ri.Printf( PRINT_ALL, "XF86 Gamma extension initialized\n"); - glConfig.deviceSupportsGamma = qtrue; - } -#endif /* HAVE_XF86DGA */ -} - -/* -** GLW_LoadOpenGL -** -** GLimp_win.c internal function that that attempts to load and use -** a specific OpenGL DLL. -*/ -static qboolean GLW_LoadOpenGL( const char *name ) -{ - qboolean fullscreen; - - ri.Printf( PRINT_ALL, "...loading %s: ", name ); - - // disable the 3Dfx splash screen and set gamma - // we do this all the time, but it shouldn't hurt anything - // on non-3Dfx stuff - putenv("FX_GLIDE_NO_SPLASH=0"); - - // Mesa VooDoo hacks - putenv("MESA_GLX_FX=fullscreen\n"); - - // load the QGL layer - if ( QGL_Init( name ) ) - { - fullscreen = r_fullscreen->integer; - - // create the window and set up the context - if ( !GLW_StartDriverAndSetMode( name, r_mode->integer, fullscreen ) ) - { - if (r_mode->integer != 3) - { - if ( !GLW_StartDriverAndSetMode( name, 3, fullscreen ) ) - { - goto fail; - } - } else - goto fail; - } - - return qtrue; - } else - { - ri.Printf( PRINT_ALL, "failed\n" ); - } - fail: - - QGL_Shutdown(); - - return qfalse; -} - -/* -** XErrorHandler -** the default X error handler exits the application -** I found out that on some hosts some operations would raise X errors (GLXUnsupportedPrivateRequest) -** but those don't seem to be fatal .. so the default would be to just ignore them -** our implementation mimics the default handler behaviour (not completely cause I'm lazy) -*/ -int qXErrorHandler(Display *dpy, XErrorEvent *ev) -{ - static char buf[1024]; - XGetErrorText(dpy, ev->error_code, buf, 1024); - ri.Printf( PRINT_ALL, "X Error of failed request: %s\n", buf); - ri.Printf( PRINT_ALL, " Major opcode of failed request: %d\n", ev->request_code, buf); - ri.Printf( PRINT_ALL, " Minor opcode of failed request: %d\n", ev->minor_code); - ri.Printf( PRINT_ALL, " Serial number of failed request: %d\n", ev->serial); - return 0; -} - -/* -** GLimp_Init -** -** This routine is responsible for initializing the OS specific portions -** of OpenGL. -*/ -void GLimp_Init( void ) -{ - qboolean attemptedlibGL = qfalse; - qboolean attempted3Dfx = qfalse; - qboolean success = qfalse; - char buf[1024]; - cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE ); - - // guarded, as this is only relevant to SMP renderer thread -#ifdef SMP - if (!XInitThreads()) - { - Com_Printf("GLimp_Init() - XInitThreads() failed, disabling r_smp\n"); - ri.Cvar_Set( "r_smp", "0" ); - } -#endif - - r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); - - r_previousglDriver = ri.Cvar_Get( "r_previousglDriver", "", CVAR_ROM ); - - InitSig(); - - IN_Init(); // rcg08312005 moved into glimp. - - // Hack here so that if the UI - if ( *r_previousglDriver->string ) - { - // The UI changed it on us, hack it back - // This means the renderer can't be changed on the fly - ri.Cvar_Set( "r_glDriver", r_previousglDriver->string ); - } - - // set up our custom error handler for X failures - XSetErrorHandler(&qXErrorHandler); - - // - // load and initialize the specific OpenGL driver - // - if ( !GLW_LoadOpenGL( r_glDriver->string ) ) - { - if ( !Q_stricmp( r_glDriver->string, OPENGL_DRIVER_NAME ) ) - { - attemptedlibGL = qtrue; - } else if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) ) - { - attempted3Dfx = qtrue; - } - - #if 0 - // TTimo - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=455 - // old legacy load code, was confusing people who had a bad OpenGL setup - if ( !attempted3Dfx && !success ) - { - attempted3Dfx = qtrue; - if ( GLW_LoadOpenGL( _3DFX_DRIVER_NAME ) ) - { - ri.Cvar_Set( "r_glDriver", _3DFX_DRIVER_NAME ); - r_glDriver->modified = qfalse; - success = qtrue; - } - } - #endif - - // try ICD before trying 3Dfx standalone driver - if ( !attemptedlibGL && !success ) - { - attemptedlibGL = qtrue; - if ( GLW_LoadOpenGL( OPENGL_DRIVER_NAME ) ) - { - ri.Cvar_Set( "r_glDriver", OPENGL_DRIVER_NAME ); - r_glDriver->modified = qfalse; - success = qtrue; - } - } - - if (!success) - ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" ); - - } - - // Save it in case the UI stomps it - ri.Cvar_Set( "r_previousglDriver", r_glDriver->string ); - - // This values force the UI to disable driver selection - glConfig.driverType = GLDRV_ICD; - glConfig.hardwareType = GLHW_GENERIC; - - // get our config strings - Q_strncpyz( glConfig.vendor_string, (char *)qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) ); - Q_strncpyz( glConfig.renderer_string, (char *)qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) ); - if (*glConfig.renderer_string && glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] == '\n') - glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] = 0; - Q_strncpyz( glConfig.version_string, (char *)qglGetString (GL_VERSION), sizeof( glConfig.version_string ) ); - Q_strncpyz( glConfig.extensions_string, (char *)qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); - - // - // chipset specific configuration - // - strcpy( buf, glConfig.renderer_string ); - strlwr( buf ); - - // - // NOTE: if changing cvars, do it within this block. This allows them - // to be overridden when testing driver fixes, etc. but only sets - // them to their default state when the hardware is first installed/run. - // - if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) - { - glConfig.hardwareType = GLHW_GENERIC; - - ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - - // VOODOO GRAPHICS w/ 2MB - if ( Q_stristr( buf, "voodoo graphics/1 tmu/2 mb" ) ) - { - ri.Cvar_Set( "r_picmip", "2" ); - ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); - } else - { - ri.Cvar_Set( "r_picmip", "1" ); - - if ( Q_stristr( buf, "rage 128" ) || Q_stristr( buf, "rage128" ) ) - { - ri.Cvar_Set( "r_finish", "0" ); - } - // Savage3D and Savage4 should always have trilinear enabled - else if ( Q_stristr( buf, "savage3d" ) || Q_stristr( buf, "s3 savage4" ) ) - { - ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); - } - } - } - - // - // this is where hardware specific workarounds that should be - // detected/initialized every startup should go. - // - if ( Q_stristr( buf, "banshee" ) || Q_stristr( buf, "Voodoo_Graphics" ) ) - { - glConfig.hardwareType = GLHW_3DFX_2D3D; - } else if ( Q_stristr( buf, "rage pro" ) || Q_stristr( buf, "RagePro" ) ) - { - glConfig.hardwareType = GLHW_RAGEPRO; - } else if ( Q_stristr( buf, "permedia2" ) ) - { - glConfig.hardwareType = GLHW_PERMEDIA2; - } else if ( Q_stristr( buf, "riva 128" ) ) - { - glConfig.hardwareType = GLHW_RIVA128; - } else if ( Q_stristr( buf, "riva tnt " ) ) - { - } - - ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); - - // initialize extensions - GLW_InitExtensions(); - GLW_InitGamma(); - - InitSig(); // not clear why this is at begin & end of function - - return; -} - - -/* -** GLimp_EndFrame -** -** Responsible for doing a swapbuffers and possibly for other stuff -** as yet to be determined. Probably better not to make this a GLimp -** function and instead do a call to GLimp_SwapBuffers. -*/ -void GLimp_EndFrame (void) -{ - // don't flip if drawing to front buffer - if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 ) - { - qglXSwapBuffers(dpy, win); - } - - // check logging - QGL_EnableLogging( (qboolean)r_logFile->integer ); // bk001205 - was ->value -} - -#ifdef SMP -/* -=========================================================== - -SMP acceleration - -=========================================================== -*/ - -static pthread_mutex_t smpMutex = PTHREAD_MUTEX_INITIALIZER; - -static pthread_cond_t renderCommandsEvent = PTHREAD_COND_INITIALIZER; -static pthread_cond_t renderCompletedEvent = PTHREAD_COND_INITIALIZER; - -static void (*glimpRenderThread)( void ); - -static void *GLimp_RenderThreadWrapper( void *arg ) -{ - Com_Printf( "Render thread starting\n" ); - - glimpRenderThread(); - - qglXMakeCurrent( dpy, None, NULL ); - - Com_Printf( "Render thread terminating\n" ); - - return arg; -} - -qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) -{ - pthread_t renderThread; - int ret; - - pthread_mutex_init( &smpMutex, NULL ); - - pthread_cond_init( &renderCommandsEvent, NULL ); - pthread_cond_init( &renderCompletedEvent, NULL ); - - glimpRenderThread = function; - - ret = pthread_create( &renderThread, - NULL, // attributes - GLimp_RenderThreadWrapper, - NULL ); // argument - if ( ret ) { - ri.Printf( PRINT_ALL, "pthread_create returned %d: %s", ret, strerror( ret ) ); - return qfalse; - } else { - ret = pthread_detach( renderThread ); - if ( ret ) { - ri.Printf( PRINT_ALL, "pthread_detach returned %d: %s", ret, strerror( ret ) ); - } - } - - return qtrue; -} - -static volatile void *smpData = NULL; -static volatile qboolean smpDataReady; - -void *GLimp_RendererSleep( void ) -{ - void *data; - - qglXMakeCurrent( dpy, None, NULL ); - - pthread_mutex_lock( &smpMutex ); - { - smpData = NULL; - smpDataReady = qfalse; - - // after this, the front end can exit GLimp_FrontEndSleep - pthread_cond_signal( &renderCompletedEvent ); - - while ( !smpDataReady ) { - pthread_cond_wait( &renderCommandsEvent, &smpMutex ); - } - - data = (void *)smpData; - } - pthread_mutex_unlock( &smpMutex ); - - qglXMakeCurrent( dpy, win, ctx ); - - return data; -} - -void GLimp_FrontEndSleep( void ) -{ - pthread_mutex_lock( &smpMutex ); - { - while ( smpData ) { - pthread_cond_wait( &renderCompletedEvent, &smpMutex ); - } - } - pthread_mutex_unlock( &smpMutex ); - - qglXMakeCurrent( dpy, win, ctx ); -} - -void GLimp_WakeRenderer( void *data ) -{ - qglXMakeCurrent( dpy, None, NULL ); - - pthread_mutex_lock( &smpMutex ); - { - assert( smpData == NULL ); - smpData = data; - smpDataReady = qtrue; - - // after this, the renderer can continue through GLimp_RendererSleep - pthread_cond_signal( &renderCommandsEvent ); - } - pthread_mutex_unlock( &smpMutex ); -} - -#else - -void GLimp_RenderThreadWrapper( void *stub ) {} -qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) { - ri.Printf( PRINT_WARNING, "ERROR: SMP support was disabled at compile time\n"); - return qfalse; -} -void *GLimp_RendererSleep( void ) { - return NULL; -} -void GLimp_FrontEndSleep( void ) {} -void GLimp_WakeRenderer( void *data ) {} - -#endif - -/*****************************************************************************/ -/* MOUSE */ -/*****************************************************************************/ - -void IN_Init(void) { - Com_DPrintf ("\n------- Input Initialization -------\n"); - // mouse variables - in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE); - in_dgamouse = Cvar_Get ("in_dgamouse", "1", CVAR_ARCHIVE); - in_shiftedKeys = Cvar_Get ("in_shiftedKeys", "0", CVAR_ARCHIVE); - - // turn on-off sub-frame timing of X events - in_subframe = Cvar_Get ("in_subframe", "1", CVAR_ARCHIVE); - - // developer feature, allows to break without loosing mouse pointer - in_nograb = Cvar_Get ("in_nograb", "0", 0); - - // bk001130 - from cvs.17 (mkv), joystick variables - in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE|CVAR_LATCH); - // bk001130 - changed this to match win32 - in_joystickDebug = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP); - joy_threshold = Cvar_Get ("joy_threshold", "0.15", CVAR_ARCHIVE); // FIXME: in_joythreshold - - Cvar_Set( "cl_platformSensitivity", "2.0" ); - - if (in_mouse->value) - mouse_avail = qtrue; - else - mouse_avail = qfalse; - - IN_StartupJoystick( ); // bk001130 - from cvs1.17 (mkv) - Com_DPrintf ("------------------------------------\n"); -} - -void IN_Shutdown(void) -{ - mouse_avail = qfalse; -} - -void IN_Frame (void) { - - // bk001130 - from cvs 1.17 (mkv) - IN_JoyMove(); // FIXME: disable if on desktop? - - if ( cls.keyCatchers & KEYCATCH_CONSOLE ) - { - // temporarily deactivate if not in the game and - // running on the desktop - // voodoo always counts as full screen - if (Cvar_VariableValue ("r_fullscreen") == 0 - && strcmp( Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME ) ) - { - IN_DeactivateMouse (); - return; - } - } - - IN_ActivateMouse(); -} - -void IN_Activate(void) -{ -} - -// bk001130 - cvs1.17 joystick code (mkv) was here, no linux_joystick.c - -void Sys_SendKeyEvents (void) { - // XEvent event; // bk001204 - unused - - if (!dpy) - return; - HandleEvents(); -} - - -// bk010216 - added stubs for non-Linux UNIXes here -// FIXME - use NO_JOYSTICK or something else generic - -#if (defined( __FreeBSD__ ) || defined( __sun)) // rb010123 -void IN_StartupJoystick( void ) {} -void IN_JoyMove( void ) {} -#endif - -#endif // !USE_SDL_VIDEO - diff --git a/code/unix/linux_joystick.c b/code/unix/linux_joystick.c deleted file mode 100644 index d0720f26..00000000 --- a/code/unix/linux_joystick.c +++ /dev/null @@ -1,211 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** linux_joystick.c -** -** This file contains ALL Linux specific stuff having to do with the -** Joystick input. When a port is being made the following functions -** must be implemented by the port: -** -** Authors: mkv, bk -** -*/ - -#if !USE_SDL_VIDEO - -#include -#include -#include -#include -#include // bk001204 - - -#include "../client/client.h" -#include "linux_local.h" - -/* We translate axes movement into keypresses. */ -int joy_keys[16] = { - K_LEFTARROW, K_RIGHTARROW, - K_UPARROW, K_DOWNARROW, - K_JOY16, K_JOY17, - K_JOY18, K_JOY19, - K_JOY20, K_JOY21, - K_JOY22, K_JOY23, - - K_JOY24, K_JOY25, - K_JOY26, K_JOY27 -}; - -/* Our file descriptor for the joystick device. */ -static int joy_fd = -1; - - -// bk001130 - from linux_glimp.c -extern cvar_t * in_joystick; -extern cvar_t * in_joystickDebug; -extern cvar_t * joy_threshold; - - -/**********************************************/ -/* Joystick routines. */ -/**********************************************/ -// bk001130 - from cvs1.17 (mkv), removed from linux_glimp.c -void IN_StartupJoystick( void ) -{ - int i = 0; - - joy_fd = -1; - - if( !in_joystick->integer ) { - Com_DPrintf( "Joystick is not active.\n" ); - return; - } - - for( i = 0; i < 4; i++ ) { - char filename[PATH_MAX]; - - snprintf( filename, PATH_MAX, "/dev/js%d", i ); - - joy_fd = open( filename, O_RDONLY | O_NONBLOCK ); - - if( joy_fd != -1 ) { - struct js_event event; - char axes = 0; - char buttons = 0; - char name[128]; - int n = -1; - - Com_DPrintf( "Joystick %s found\n", filename ); - - /* Get rid of initialization messages. */ - do { - n = read( joy_fd, &event, sizeof( event ) ); - - if( n == -1 ) { - break; - } - - } while( ( event.type & JS_EVENT_INIT ) ); - - /* Get joystick statistics. */ - ioctl( joy_fd, JSIOCGAXES, &axes ); - ioctl( joy_fd, JSIOCGBUTTONS, &buttons ); - - if( ioctl( joy_fd, JSIOCGNAME( sizeof( name ) ), name ) < 0 ) { - strncpy( name, "Unknown", sizeof( name ) ); - } - - Com_DPrintf( "Name: %s\n", name ); - Com_DPrintf( "Axes: %d\n", axes ); - Com_DPrintf( "Buttons: %d\n", buttons ); - - /* Our work here is done. */ - return; - } - - } - - /* No soup for you. */ - if( joy_fd == -1 ) { - Com_DPrintf( "No joystick found.\n" ); - return; - } - -} - -void IN_JoyMove( void ) -{ - /* Store instantaneous joystick state. Hack to get around - * event model used in Linux joystick driver. - */ - static int axes_state[16]; - /* Old bits for Quake-style input compares. */ - static unsigned int old_axes = 0; - /* Our current goodies. */ - unsigned int axes = 0; - int i = 0; - - if( joy_fd == -1 ) { - return; - } - - /* Empty the queue, dispatching button presses immediately - * and updating the instantaneous state for the axes. - */ - do { - int n = -1; - struct js_event event; - - n = read( joy_fd, &event, sizeof( event ) ); - - if( n == -1 ) { - /* No error, we're non-blocking. */ - break; - } - - if( event.type & JS_EVENT_BUTTON ) { - Sys_QueEvent( 0, SE_KEY, K_JOY1 + event.number, event.value, 0, NULL ); - } else if( event.type & JS_EVENT_AXIS ) { - - if( event.number >= 16 ) { - continue; - } - - axes_state[event.number] = event.value; - } else { - Com_Printf( "Unknown joystick event type\n" ); - } - - } while( 1 ); - - - /* Translate our instantaneous state to bits. */ - for( i = 0; i < 16; i++ ) { - float f = ( (float) axes_state[i] ) / 32767.0f; - - if( f < -joy_threshold->value ) { - axes |= ( 1 << ( i * 2 ) ); - } else if( f > joy_threshold->value ) { - axes |= ( 1 << ( ( i * 2 ) + 1 ) ); - } - - } - - /* Time to update axes state based on old vs. new. */ - for( i = 0; i < 16; i++ ) { - - if( ( axes & ( 1 << i ) ) && !( old_axes & ( 1 << i ) ) ) { - Sys_QueEvent( 0, SE_KEY, joy_keys[i], qtrue, 0, NULL ); - } - - if( !( axes & ( 1 << i ) ) && ( old_axes & ( 1 << i ) ) ) { - Sys_QueEvent( 0, SE_KEY, joy_keys[i], qfalse, 0, NULL ); - } - } - - /* Save for future generations. */ - old_axes = axes; -} - -#endif // !USE_SDL_VIDEO - - diff --git a/code/unix/linux_local.h b/code/unix/linux_local.h deleted file mode 100644 index 9a50141c..00000000 --- a/code/unix/linux_local.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// linux_local.h: Linux-specific Quake3 header file - -void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ); -qboolean Sys_GetPacket ( netadr_t *net_from, msg_t *net_message ); -void Sys_SendKeyEvents (void); - -// Input subsystem - -void IN_Init (void); -void IN_Frame (void); -void IN_Shutdown (void); - - -void IN_JoyMove( void ); -void IN_StartupJoystick( void ); - -// GL subsystem -qboolean QGL_Init( const char *dllname ); -void QGL_EnableLogging( qboolean enable ); -void QGL_Shutdown( void ); - -// bk001130 - win32 -// void IN_JoystickCommands (void); - -char *strlwr (char *s); - -// signals.c -void InitSig(void); diff --git a/code/unix/linux_qgl.c b/code/unix/linux_qgl.c deleted file mode 100644 index 241e5661..00000000 --- a/code/unix/linux_qgl.c +++ /dev/null @@ -1,4205 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** LINUX_QGL.C -** -** This file implements the operating system binding of GL to QGL function -** pointers. When doing a port of Quake2 you must implement the following -** two functions: -** -** QGL_Init() - loads libraries, assigns function pointers, etc. -** QGL_Shutdown() - unloads libraries, NULLs function pointers -*/ - -// bk001204 -#include -#include - - -#include -#include "../renderer/tr_local.h" -#include "unix_glw.h" - -// bk001129 - from cvs1.17 (mkv) -//#if defined(__FX__) -//#include -//#endif -//#include // bk010216 - FIXME: all of the above redundant? renderer/qgl.h - -#if defined(USE_SDL_VIDEO) -#include "SDL.h" -#include "SDL_loadso.h" -#else -#include -#endif - -// bk001129 - from cvs1.17 (mkv) -#if defined(__FX__) -//FX Mesa Functions -fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]); -fxMesaContext (*qfxMesaCreateBestContext)(GLuint win, GLint width, GLint height, const GLint attribList[]); -void (*qfxMesaDestroyContext)(fxMesaContext ctx); -void (*qfxMesaMakeCurrent)(fxMesaContext ctx); -fxMesaContext (*qfxMesaGetCurrentContext)(void); -void (*qfxMesaSwapBuffers)(void); -#endif - -//GLX Functions -#if !defined(USE_SDL_VIDEO) -XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList ); -GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct ); -void (*qglXDestroyContext)( Display *dpy, GLXContext ctx ); -Bool (*qglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx); -void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask ); -void (*qglXSwapBuffers)( Display *dpy, GLXDrawable drawable ); -#endif - -void ( APIENTRY * qglAccum )(GLenum op, GLfloat value); -void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref); -GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences); -void ( APIENTRY * qglArrayElement )(GLint i); -void ( APIENTRY * qglBegin )(GLenum mode); -void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture); -void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor); -void ( APIENTRY * qglCallList )(GLuint list); -void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists); -void ( APIENTRY * qglClear )(GLbitfield mask); -void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -void ( APIENTRY * qglClearDepth )(GLclampd depth); -void ( APIENTRY * qglClearIndex )(GLfloat c); -void ( APIENTRY * qglClearStencil )(GLint s); -void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation); -void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue); -void ( APIENTRY * qglColor3bv )(const GLbyte *v); -void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue); -void ( APIENTRY * qglColor3dv )(const GLdouble *v); -void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue); -void ( APIENTRY * qglColor3fv )(const GLfloat *v); -void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue); -void ( APIENTRY * qglColor3iv )(const GLint *v); -void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue); -void ( APIENTRY * qglColor3sv )(const GLshort *v); -void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue); -void ( APIENTRY * qglColor3ubv )(const GLubyte *v); -void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue); -void ( APIENTRY * qglColor3uiv )(const GLuint *v); -void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue); -void ( APIENTRY * qglColor3usv )(const GLushort *v); -void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -void ( APIENTRY * qglColor4bv )(const GLbyte *v); -void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -void ( APIENTRY * qglColor4dv )(const GLdouble *v); -void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -void ( APIENTRY * qglColor4fv )(const GLfloat *v); -void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha); -void ( APIENTRY * qglColor4iv )(const GLint *v); -void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha); -void ( APIENTRY * qglColor4sv )(const GLshort *v); -void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -void ( APIENTRY * qglColor4ubv )(const GLubyte *v); -void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha); -void ( APIENTRY * qglColor4uiv )(const GLuint *v); -void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha); -void ( APIENTRY * qglColor4usv )(const GLushort *v); -void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode); -void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -void ( APIENTRY * qglCullFace )(GLenum mode); -void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range); -void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures); -void ( APIENTRY * qglDepthFunc )(GLenum func); -void ( APIENTRY * qglDepthMask )(GLboolean flag); -void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar); -void ( APIENTRY * qglDisable )(GLenum cap); -void ( APIENTRY * qglDisableClientState )(GLenum array); -void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count); -void ( APIENTRY * qglDrawBuffer )(GLenum mode); -void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglEdgeFlag )(GLboolean flag); -void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag); -void ( APIENTRY * qglEnable )(GLenum cap); -void ( APIENTRY * qglEnableClientState )(GLenum array); -void ( APIENTRY * qglEnd )(void); -void ( APIENTRY * qglEndList )(void); -void ( APIENTRY * qglEvalCoord1d )(GLdouble u); -void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u); -void ( APIENTRY * qglEvalCoord1f )(GLfloat u); -void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u); -void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v); -void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u); -void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v); -void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u); -void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2); -void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -void ( APIENTRY * qglEvalPoint1 )(GLint i); -void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j); -void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer); -void ( APIENTRY * qglFinish )(void); -void ( APIENTRY * qglFlush )(void); -void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param); -void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params); -void ( APIENTRY * qglFogi )(GLenum pname, GLint param); -void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params); -void ( APIENTRY * qglFrontFace )(GLenum mode); -void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLuint ( APIENTRY * qglGenLists )(GLsizei range); -void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures); -void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params); -void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation); -void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params); -GLenum ( APIENTRY * qglGetError )(void); -void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params); -void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params); -void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v); -void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v); -void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v); -void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params); -void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values); -void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values); -void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values); -void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params); -void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask); -const GLubyte * ( APIENTRY * qglGetString )(GLenum name); -void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params); -void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params); -void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params); -void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params); -void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params); -void ( APIENTRY * qglHint )(GLenum target, GLenum mode); -void ( APIENTRY * qglIndexMask )(GLuint mask); -void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglIndexd )(GLdouble c); -void ( APIENTRY * qglIndexdv )(const GLdouble *c); -void ( APIENTRY * qglIndexf )(GLfloat c); -void ( APIENTRY * qglIndexfv )(const GLfloat *c); -void ( APIENTRY * qglIndexi )(GLint c); -void ( APIENTRY * qglIndexiv )(const GLint *c); -void ( APIENTRY * qglIndexs )(GLshort c); -void ( APIENTRY * qglIndexsv )(const GLshort *c); -void ( APIENTRY * qglIndexub )(GLubyte c); -void ( APIENTRY * qglIndexubv )(const GLubyte *c); -void ( APIENTRY * qglInitNames )(void); -void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer); -GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap); -GLboolean ( APIENTRY * qglIsList )(GLuint list); -GLboolean ( APIENTRY * qglIsTexture )(GLuint texture); -void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param); -void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params); -void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param); -void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params); -void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param); -void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param); -void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params); -void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern); -void ( APIENTRY * qglLineWidth )(GLfloat width); -void ( APIENTRY * qglListBase )(GLuint base); -void ( APIENTRY * qglLoadIdentity )(void); -void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m); -void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m); -void ( APIENTRY * qglLoadName )(GLuint name); -void ( APIENTRY * qglLogicOp )(GLenum opcode); -void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2); -void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2); -void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param); -void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param); -void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params); -void ( APIENTRY * qglMatrixMode )(GLenum mode); -void ( APIENTRY * qglMultMatrixd )(const GLdouble *m); -void ( APIENTRY * qglMultMatrixf )(const GLfloat *m); -void ( APIENTRY * qglNewList )(GLuint list, GLenum mode); -void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz); -void ( APIENTRY * qglNormal3bv )(const GLbyte *v); -void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz); -void ( APIENTRY * qglNormal3dv )(const GLdouble *v); -void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz); -void ( APIENTRY * qglNormal3fv )(const GLfloat *v); -void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz); -void ( APIENTRY * qglNormal3iv )(const GLint *v); -void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz); -void ( APIENTRY * qglNormal3sv )(const GLshort *v); -void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -void ( APIENTRY * qglPassThrough )(GLfloat token); -void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values); -void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values); -void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values); -void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param); -void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param); -void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param); -void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param); -void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor); -void ( APIENTRY * qglPointSize )(GLfloat size); -void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode); -void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units); -void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask); -void ( APIENTRY * qglPopAttrib )(void); -void ( APIENTRY * qglPopClientAttrib )(void); -void ( APIENTRY * qglPopMatrix )(void); -void ( APIENTRY * qglPopName )(void); -void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities); -void ( APIENTRY * qglPushAttrib )(GLbitfield mask); -void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask); -void ( APIENTRY * qglPushMatrix )(void); -void ( APIENTRY * qglPushName )(GLuint name); -void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y); -void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v); -void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y); -void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v); -void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y); -void ( APIENTRY * qglRasterPos2iv )(const GLint *v); -void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y); -void ( APIENTRY * qglRasterPos2sv )(const GLshort *v); -void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v); -void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v); -void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z); -void ( APIENTRY * qglRasterPos3iv )(const GLint *v); -void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z); -void ( APIENTRY * qglRasterPos3sv )(const GLshort *v); -void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v); -void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v); -void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w); -void ( APIENTRY * qglRasterPos4iv )(const GLint *v); -void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w); -void ( APIENTRY * qglRasterPos4sv )(const GLshort *v); -void ( APIENTRY * qglReadBuffer )(GLenum mode); -void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2); -void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2); -void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2); -void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2); -void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2); -GLint ( APIENTRY * qglRenderMode )(GLenum mode); -void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height); -void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer); -void ( APIENTRY * qglShadeModel )(GLenum mode); -void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask); -void ( APIENTRY * qglStencilMask )(GLuint mask); -void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass); -void ( APIENTRY * qglTexCoord1d )(GLdouble s); -void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord1f )(GLfloat s); -void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord1i )(GLint s); -void ( APIENTRY * qglTexCoord1iv )(const GLint *v); -void ( APIENTRY * qglTexCoord1s )(GLshort s); -void ( APIENTRY * qglTexCoord1sv )(const GLshort *v); -void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t); -void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t); -void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t); -void ( APIENTRY * qglTexCoord2iv )(const GLint *v); -void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t); -void ( APIENTRY * qglTexCoord2sv )(const GLshort *v); -void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r); -void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r); -void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r); -void ( APIENTRY * qglTexCoord3iv )(const GLint *v); -void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r); -void ( APIENTRY * qglTexCoord3sv )(const GLshort *v); -void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q); -void ( APIENTRY * qglTexCoord4iv )(const GLint *v); -void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q); -void ( APIENTRY * qglTexCoord4sv )(const GLshort *v); -void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param); -void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param); -void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params); -void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param); -void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params); -void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param); -void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param); -void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params); -void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param); -void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param); -void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params); -void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y); -void ( APIENTRY * qglVertex2dv )(const GLdouble *v); -void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y); -void ( APIENTRY * qglVertex2fv )(const GLfloat *v); -void ( APIENTRY * qglVertex2i )(GLint x, GLint y); -void ( APIENTRY * qglVertex2iv )(const GLint *v); -void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y); -void ( APIENTRY * qglVertex2sv )(const GLshort *v); -void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglVertex3dv )(const GLdouble *v); -void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglVertex3fv )(const GLfloat *v); -void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z); -void ( APIENTRY * qglVertex3iv )(const GLint *v); -void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z); -void ( APIENTRY * qglVertex3sv )(const GLshort *v); -void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -void ( APIENTRY * qglVertex4dv )(const GLdouble *v); -void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -void ( APIENTRY * qglVertex4fv )(const GLfloat *v); -void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w); -void ( APIENTRY * qglVertex4iv )(const GLint *v); -void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w); -void ( APIENTRY * qglVertex4sv )(const GLshort *v); -void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height); - -void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t ); -void ( APIENTRY * qglActiveTextureARB )( GLenum texture ); -void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture ); - -void ( APIENTRY * qglLockArraysEXT)( GLint, GLint); -void ( APIENTRY * qglUnlockArraysEXT) ( void ); - -void ( APIENTRY * qglPointParameterfEXT)( GLenum param, GLfloat value ); -void ( APIENTRY * qglPointParameterfvEXT)( GLenum param, const GLfloat *value ); -void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * ); -void ( APIENTRY * qgl3DfxSetPaletteEXT)( GLuint * ); -void ( APIENTRY * qglSelectTextureSGIS)( GLenum ); -void ( APIENTRY * qglMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat ); - -static void ( APIENTRY * dllAccum )(GLenum op, GLfloat value); -static void ( APIENTRY * dllAlphaFunc )(GLenum func, GLclampf ref); -GLboolean ( APIENTRY * dllAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences); -static void ( APIENTRY * dllArrayElement )(GLint i); -static void ( APIENTRY * dllBegin )(GLenum mode); -static void ( APIENTRY * dllBindTexture )(GLenum target, GLuint texture); -static void ( APIENTRY * dllBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -static void ( APIENTRY * dllBlendFunc )(GLenum sfactor, GLenum dfactor); -static void ( APIENTRY * dllCallList )(GLuint list); -static void ( APIENTRY * dllCallLists )(GLsizei n, GLenum type, const GLvoid *lists); -static void ( APIENTRY * dllClear )(GLbitfield mask); -static void ( APIENTRY * dllClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -static void ( APIENTRY * dllClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -static void ( APIENTRY * dllClearDepth )(GLclampd depth); -static void ( APIENTRY * dllClearIndex )(GLfloat c); -static void ( APIENTRY * dllClearStencil )(GLint s); -static void ( APIENTRY * dllClipPlane )(GLenum plane, const GLdouble *equation); -static void ( APIENTRY * dllColor3b )(GLbyte red, GLbyte green, GLbyte blue); -static void ( APIENTRY * dllColor3bv )(const GLbyte *v); -static void ( APIENTRY * dllColor3d )(GLdouble red, GLdouble green, GLdouble blue); -static void ( APIENTRY * dllColor3dv )(const GLdouble *v); -static void ( APIENTRY * dllColor3f )(GLfloat red, GLfloat green, GLfloat blue); -static void ( APIENTRY * dllColor3fv )(const GLfloat *v); -static void ( APIENTRY * dllColor3i )(GLint red, GLint green, GLint blue); -static void ( APIENTRY * dllColor3iv )(const GLint *v); -static void ( APIENTRY * dllColor3s )(GLshort red, GLshort green, GLshort blue); -static void ( APIENTRY * dllColor3sv )(const GLshort *v); -static void ( APIENTRY * dllColor3ub )(GLubyte red, GLubyte green, GLubyte blue); -static void ( APIENTRY * dllColor3ubv )(const GLubyte *v); -static void ( APIENTRY * dllColor3ui )(GLuint red, GLuint green, GLuint blue); -static void ( APIENTRY * dllColor3uiv )(const GLuint *v); -static void ( APIENTRY * dllColor3us )(GLushort red, GLushort green, GLushort blue); -static void ( APIENTRY * dllColor3usv )(const GLushort *v); -static void ( APIENTRY * dllColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -static void ( APIENTRY * dllColor4bv )(const GLbyte *v); -static void ( APIENTRY * dllColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -static void ( APIENTRY * dllColor4dv )(const GLdouble *v); -static void ( APIENTRY * dllColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -static void ( APIENTRY * dllColor4fv )(const GLfloat *v); -static void ( APIENTRY * dllColor4i )(GLint red, GLint green, GLint blue, GLint alpha); -static void ( APIENTRY * dllColor4iv )(const GLint *v); -static void ( APIENTRY * dllColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha); -static void ( APIENTRY * dllColor4sv )(const GLshort *v); -static void ( APIENTRY * dllColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -static void ( APIENTRY * dllColor4ubv )(const GLubyte *v); -static void ( APIENTRY * dllColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha); -static void ( APIENTRY * dllColor4uiv )(const GLuint *v); -static void ( APIENTRY * dllColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha); -static void ( APIENTRY * dllColor4usv )(const GLushort *v); -static void ( APIENTRY * dllColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -static void ( APIENTRY * dllColorMaterial )(GLenum face, GLenum mode); -static void ( APIENTRY * dllColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -static void ( APIENTRY * dllCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -static void ( APIENTRY * dllCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -static void ( APIENTRY * dllCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -static void ( APIENTRY * dllCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -static void ( APIENTRY * dllCullFace )(GLenum mode); -static void ( APIENTRY * dllDeleteLists )(GLuint list, GLsizei range); -static void ( APIENTRY * dllDeleteTextures )(GLsizei n, const GLuint *textures); -static void ( APIENTRY * dllDepthFunc )(GLenum func); -static void ( APIENTRY * dllDepthMask )(GLboolean flag); -static void ( APIENTRY * dllDepthRange )(GLclampd zNear, GLclampd zFar); -static void ( APIENTRY * dllDisable )(GLenum cap); -static void ( APIENTRY * dllDisableClientState )(GLenum array); -static void ( APIENTRY * dllDrawArrays )(GLenum mode, GLint first, GLsizei count); -static void ( APIENTRY * dllDrawBuffer )(GLenum mode); -static void ( APIENTRY * dllDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -static void ( APIENTRY * dllDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllEdgeFlag )(GLboolean flag); -static void ( APIENTRY * dllEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllEdgeFlagv )(const GLboolean *flag); -static void ( APIENTRY * dllEnable )(GLenum cap); -static void ( APIENTRY * dllEnableClientState )(GLenum array); -static void ( APIENTRY * dllEnd )(void); -static void ( APIENTRY * dllEndList )(void); -static void ( APIENTRY * dllEvalCoord1d )(GLdouble u); -static void ( APIENTRY * dllEvalCoord1dv )(const GLdouble *u); -static void ( APIENTRY * dllEvalCoord1f )(GLfloat u); -static void ( APIENTRY * dllEvalCoord1fv )(const GLfloat *u); -static void ( APIENTRY * dllEvalCoord2d )(GLdouble u, GLdouble v); -static void ( APIENTRY * dllEvalCoord2dv )(const GLdouble *u); -static void ( APIENTRY * dllEvalCoord2f )(GLfloat u, GLfloat v); -static void ( APIENTRY * dllEvalCoord2fv )(const GLfloat *u); -static void ( APIENTRY * dllEvalMesh1 )(GLenum mode, GLint i1, GLint i2); -static void ( APIENTRY * dllEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -static void ( APIENTRY * dllEvalPoint1 )(GLint i); -static void ( APIENTRY * dllEvalPoint2 )(GLint i, GLint j); -static void ( APIENTRY * dllFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer); -static void ( APIENTRY * dllFinish )(void); -static void ( APIENTRY * dllFlush )(void); -static void ( APIENTRY * dllFogf )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllFogfv )(GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllFogi )(GLenum pname, GLint param); -static void ( APIENTRY * dllFogiv )(GLenum pname, const GLint *params); -static void ( APIENTRY * dllFrontFace )(GLenum mode); -static void ( APIENTRY * dllFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLuint ( APIENTRY * dllGenLists )(GLsizei range); -static void ( APIENTRY * dllGenTextures )(GLsizei n, GLuint *textures); -static void ( APIENTRY * dllGetBooleanv )(GLenum pname, GLboolean *params); -static void ( APIENTRY * dllGetClipPlane )(GLenum plane, GLdouble *equation); -static void ( APIENTRY * dllGetDoublev )(GLenum pname, GLdouble *params); -GLenum ( APIENTRY * dllGetError )(void); -static void ( APIENTRY * dllGetFloatv )(GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetIntegerv )(GLenum pname, GLint *params); -static void ( APIENTRY * dllGetLightfv )(GLenum light, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetLightiv )(GLenum light, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetMapdv )(GLenum target, GLenum query, GLdouble *v); -static void ( APIENTRY * dllGetMapfv )(GLenum target, GLenum query, GLfloat *v); -static void ( APIENTRY * dllGetMapiv )(GLenum target, GLenum query, GLint *v); -static void ( APIENTRY * dllGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetMaterialiv )(GLenum face, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetPixelMapfv )(GLenum map, GLfloat *values); -static void ( APIENTRY * dllGetPixelMapuiv )(GLenum map, GLuint *values); -static void ( APIENTRY * dllGetPixelMapusv )(GLenum map, GLushort *values); -static void ( APIENTRY * dllGetPointerv )(GLenum pname, GLvoid* *params); -static void ( APIENTRY * dllGetPolygonStipple )(GLubyte *mask); -const GLubyte * ( APIENTRY * dllGetString )(GLenum name); -static void ( APIENTRY * dllGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexEnviv )(GLenum target, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params); -static void ( APIENTRY * dllGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexGeniv )(GLenum coord, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -static void ( APIENTRY * dllGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexParameteriv )(GLenum target, GLenum pname, GLint *params); -static void ( APIENTRY * dllHint )(GLenum target, GLenum mode); -static void ( APIENTRY * dllIndexMask )(GLuint mask); -static void ( APIENTRY * dllIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllIndexd )(GLdouble c); -static void ( APIENTRY * dllIndexdv )(const GLdouble *c); -static void ( APIENTRY * dllIndexf )(GLfloat c); -static void ( APIENTRY * dllIndexfv )(const GLfloat *c); -static void ( APIENTRY * dllIndexi )(GLint c); -static void ( APIENTRY * dllIndexiv )(const GLint *c); -static void ( APIENTRY * dllIndexs )(GLshort c); -static void ( APIENTRY * dllIndexsv )(const GLshort *c); -static void ( APIENTRY * dllIndexub )(GLubyte c); -static void ( APIENTRY * dllIndexubv )(const GLubyte *c); -static void ( APIENTRY * dllInitNames )(void); -static void ( APIENTRY * dllInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer); -GLboolean ( APIENTRY * dllIsEnabled )(GLenum cap); -GLboolean ( APIENTRY * dllIsList )(GLuint list); -GLboolean ( APIENTRY * dllIsTexture )(GLuint texture); -static void ( APIENTRY * dllLightModelf )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllLightModelfv )(GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllLightModeli )(GLenum pname, GLint param); -static void ( APIENTRY * dllLightModeliv )(GLenum pname, const GLint *params); -static void ( APIENTRY * dllLightf )(GLenum light, GLenum pname, GLfloat param); -static void ( APIENTRY * dllLightfv )(GLenum light, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllLighti )(GLenum light, GLenum pname, GLint param); -static void ( APIENTRY * dllLightiv )(GLenum light, GLenum pname, const GLint *params); -static void ( APIENTRY * dllLineStipple )(GLint factor, GLushort pattern); -static void ( APIENTRY * dllLineWidth )(GLfloat width); -static void ( APIENTRY * dllListBase )(GLuint base); -static void ( APIENTRY * dllLoadIdentity )(void); -static void ( APIENTRY * dllLoadMatrixd )(const GLdouble *m); -static void ( APIENTRY * dllLoadMatrixf )(const GLfloat *m); -static void ( APIENTRY * dllLoadName )(GLuint name); -static void ( APIENTRY * dllLogicOp )(GLenum opcode); -static void ( APIENTRY * dllMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -static void ( APIENTRY * dllMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -static void ( APIENTRY * dllMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -static void ( APIENTRY * dllMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -static void ( APIENTRY * dllMapGrid1d )(GLint un, GLdouble u1, GLdouble u2); -static void ( APIENTRY * dllMapGrid1f )(GLint un, GLfloat u1, GLfloat u2); -static void ( APIENTRY * dllMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -static void ( APIENTRY * dllMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -static void ( APIENTRY * dllMaterialf )(GLenum face, GLenum pname, GLfloat param); -static void ( APIENTRY * dllMaterialfv )(GLenum face, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllMateriali )(GLenum face, GLenum pname, GLint param); -static void ( APIENTRY * dllMaterialiv )(GLenum face, GLenum pname, const GLint *params); -static void ( APIENTRY * dllMatrixMode )(GLenum mode); -static void ( APIENTRY * dllMultMatrixd )(const GLdouble *m); -static void ( APIENTRY * dllMultMatrixf )(const GLfloat *m); -static void ( APIENTRY * dllNewList )(GLuint list, GLenum mode); -static void ( APIENTRY * dllNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz); -static void ( APIENTRY * dllNormal3bv )(const GLbyte *v); -static void ( APIENTRY * dllNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz); -static void ( APIENTRY * dllNormal3dv )(const GLdouble *v); -static void ( APIENTRY * dllNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz); -static void ( APIENTRY * dllNormal3fv )(const GLfloat *v); -static void ( APIENTRY * dllNormal3i )(GLint nx, GLint ny, GLint nz); -static void ( APIENTRY * dllNormal3iv )(const GLint *v); -static void ( APIENTRY * dllNormal3s )(GLshort nx, GLshort ny, GLshort nz); -static void ( APIENTRY * dllNormal3sv )(const GLshort *v); -static void ( APIENTRY * dllNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -static void ( APIENTRY * dllPassThrough )(GLfloat token); -static void ( APIENTRY * dllPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values); -static void ( APIENTRY * dllPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values); -static void ( APIENTRY * dllPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values); -static void ( APIENTRY * dllPixelStoref )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllPixelStorei )(GLenum pname, GLint param); -static void ( APIENTRY * dllPixelTransferf )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllPixelTransferi )(GLenum pname, GLint param); -static void ( APIENTRY * dllPixelZoom )(GLfloat xfactor, GLfloat yfactor); -static void ( APIENTRY * dllPointSize )(GLfloat size); -static void ( APIENTRY * dllPolygonMode )(GLenum face, GLenum mode); -static void ( APIENTRY * dllPolygonOffset )(GLfloat factor, GLfloat units); -static void ( APIENTRY * dllPolygonStipple )(const GLubyte *mask); -static void ( APIENTRY * dllPopAttrib )(void); -static void ( APIENTRY * dllPopClientAttrib )(void); -static void ( APIENTRY * dllPopMatrix )(void); -static void ( APIENTRY * dllPopName )(void); -static void ( APIENTRY * dllPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities); -static void ( APIENTRY * dllPushAttrib )(GLbitfield mask); -static void ( APIENTRY * dllPushClientAttrib )(GLbitfield mask); -static void ( APIENTRY * dllPushMatrix )(void); -static void ( APIENTRY * dllPushName )(GLuint name); -static void ( APIENTRY * dllRasterPos2d )(GLdouble x, GLdouble y); -static void ( APIENTRY * dllRasterPos2dv )(const GLdouble *v); -static void ( APIENTRY * dllRasterPos2f )(GLfloat x, GLfloat y); -static void ( APIENTRY * dllRasterPos2fv )(const GLfloat *v); -static void ( APIENTRY * dllRasterPos2i )(GLint x, GLint y); -static void ( APIENTRY * dllRasterPos2iv )(const GLint *v); -static void ( APIENTRY * dllRasterPos2s )(GLshort x, GLshort y); -static void ( APIENTRY * dllRasterPos2sv )(const GLshort *v); -static void ( APIENTRY * dllRasterPos3d )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllRasterPos3dv )(const GLdouble *v); -static void ( APIENTRY * dllRasterPos3f )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllRasterPos3fv )(const GLfloat *v); -static void ( APIENTRY * dllRasterPos3i )(GLint x, GLint y, GLint z); -static void ( APIENTRY * dllRasterPos3iv )(const GLint *v); -static void ( APIENTRY * dllRasterPos3s )(GLshort x, GLshort y, GLshort z); -static void ( APIENTRY * dllRasterPos3sv )(const GLshort *v); -static void ( APIENTRY * dllRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -static void ( APIENTRY * dllRasterPos4dv )(const GLdouble *v); -static void ( APIENTRY * dllRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -static void ( APIENTRY * dllRasterPos4fv )(const GLfloat *v); -static void ( APIENTRY * dllRasterPos4i )(GLint x, GLint y, GLint z, GLint w); -static void ( APIENTRY * dllRasterPos4iv )(const GLint *v); -static void ( APIENTRY * dllRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w); -static void ( APIENTRY * dllRasterPos4sv )(const GLshort *v); -static void ( APIENTRY * dllReadBuffer )(GLenum mode); -static void ( APIENTRY * dllReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -static void ( APIENTRY * dllRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -static void ( APIENTRY * dllRectdv )(const GLdouble *v1, const GLdouble *v2); -static void ( APIENTRY * dllRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -static void ( APIENTRY * dllRectfv )(const GLfloat *v1, const GLfloat *v2); -static void ( APIENTRY * dllRecti )(GLint x1, GLint y1, GLint x2, GLint y2); -static void ( APIENTRY * dllRectiv )(const GLint *v1, const GLint *v2); -static void ( APIENTRY * dllRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -static void ( APIENTRY * dllRectsv )(const GLshort *v1, const GLshort *v2); -GLint ( APIENTRY * dllRenderMode )(GLenum mode); -static void ( APIENTRY * dllRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllScaled )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllScalef )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllScissor )(GLint x, GLint y, GLsizei width, GLsizei height); -static void ( APIENTRY * dllSelectBuffer )(GLsizei size, GLuint *buffer); -static void ( APIENTRY * dllShadeModel )(GLenum mode); -static void ( APIENTRY * dllStencilFunc )(GLenum func, GLint ref, GLuint mask); -static void ( APIENTRY * dllStencilMask )(GLuint mask); -static void ( APIENTRY * dllStencilOp )(GLenum fail, GLenum zfail, GLenum zpass); -static void ( APIENTRY * dllTexCoord1d )(GLdouble s); -static void ( APIENTRY * dllTexCoord1dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord1f )(GLfloat s); -static void ( APIENTRY * dllTexCoord1fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord1i )(GLint s); -static void ( APIENTRY * dllTexCoord1iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord1s )(GLshort s); -static void ( APIENTRY * dllTexCoord1sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoord2d )(GLdouble s, GLdouble t); -static void ( APIENTRY * dllTexCoord2dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord2f )(GLfloat s, GLfloat t); -static void ( APIENTRY * dllTexCoord2fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord2i )(GLint s, GLint t); -static void ( APIENTRY * dllTexCoord2iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord2s )(GLshort s, GLshort t); -static void ( APIENTRY * dllTexCoord2sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoord3d )(GLdouble s, GLdouble t, GLdouble r); -static void ( APIENTRY * dllTexCoord3dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord3f )(GLfloat s, GLfloat t, GLfloat r); -static void ( APIENTRY * dllTexCoord3fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord3i )(GLint s, GLint t, GLint r); -static void ( APIENTRY * dllTexCoord3iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord3s )(GLshort s, GLshort t, GLshort r); -static void ( APIENTRY * dllTexCoord3sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -static void ( APIENTRY * dllTexCoord4dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -static void ( APIENTRY * dllTexCoord4fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord4i )(GLint s, GLint t, GLint r, GLint q); -static void ( APIENTRY * dllTexCoord4iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q); -static void ( APIENTRY * dllTexCoord4sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllTexEnvf )(GLenum target, GLenum pname, GLfloat param); -static void ( APIENTRY * dllTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllTexEnvi )(GLenum target, GLenum pname, GLint param); -static void ( APIENTRY * dllTexEnviv )(GLenum target, GLenum pname, const GLint *params); -static void ( APIENTRY * dllTexGend )(GLenum coord, GLenum pname, GLdouble param); -static void ( APIENTRY * dllTexGendv )(GLenum coord, GLenum pname, const GLdouble *params); -static void ( APIENTRY * dllTexGenf )(GLenum coord, GLenum pname, GLfloat param); -static void ( APIENTRY * dllTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllTexGeni )(GLenum coord, GLenum pname, GLint param); -static void ( APIENTRY * dllTexGeniv )(GLenum coord, GLenum pname, const GLint *params); -static void ( APIENTRY * dllTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTexParameterf )(GLenum target, GLenum pname, GLfloat param); -static void ( APIENTRY * dllTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllTexParameteri )(GLenum target, GLenum pname, GLint param); -static void ( APIENTRY * dllTexParameteriv )(GLenum target, GLenum pname, const GLint *params); -static void ( APIENTRY * dllTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTranslated )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllTranslatef )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllVertex2d )(GLdouble x, GLdouble y); -static void ( APIENTRY * dllVertex2dv )(const GLdouble *v); -static void ( APIENTRY * dllVertex2f )(GLfloat x, GLfloat y); -static void ( APIENTRY * dllVertex2fv )(const GLfloat *v); -static void ( APIENTRY * dllVertex2i )(GLint x, GLint y); -static void ( APIENTRY * dllVertex2iv )(const GLint *v); -static void ( APIENTRY * dllVertex2s )(GLshort x, GLshort y); -static void ( APIENTRY * dllVertex2sv )(const GLshort *v); -static void ( APIENTRY * dllVertex3d )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllVertex3dv )(const GLdouble *v); -static void ( APIENTRY * dllVertex3f )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllVertex3fv )(const GLfloat *v); -static void ( APIENTRY * dllVertex3i )(GLint x, GLint y, GLint z); -static void ( APIENTRY * dllVertex3iv )(const GLint *v); -static void ( APIENTRY * dllVertex3s )(GLshort x, GLshort y, GLshort z); -static void ( APIENTRY * dllVertex3sv )(const GLshort *v); -static void ( APIENTRY * dllVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -static void ( APIENTRY * dllVertex4dv )(const GLdouble *v); -static void ( APIENTRY * dllVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -static void ( APIENTRY * dllVertex4fv )(const GLfloat *v); -static void ( APIENTRY * dllVertex4i )(GLint x, GLint y, GLint z, GLint w); -static void ( APIENTRY * dllVertex4iv )(const GLint *v); -static void ( APIENTRY * dllVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w); -static void ( APIENTRY * dllVertex4sv )(const GLshort *v); -static void ( APIENTRY * dllVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllViewport )(GLint x, GLint y, GLsizei width, GLsizei height); - -static void APIENTRY logAccum(GLenum op, GLfloat value) -{ - fprintf( glw_state.log_fp, "glAccum\n" ); - dllAccum( op, value ); -} - -static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref) -{ - fprintf( glw_state.log_fp, "glAlphaFunc( 0x%x, %f )\n", (unsigned int) func, ref ); - dllAlphaFunc( func, ref ); -} - -static GLboolean APIENTRY logAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) -{ - fprintf( glw_state.log_fp, "glAreTexturesResident\n" ); - return dllAreTexturesResident( n, textures, residences ); -} - -static void APIENTRY logArrayElement(GLint i) -{ - fprintf( glw_state.log_fp, "glArrayElement\n" ); - dllArrayElement( i ); -} - -static void APIENTRY logBegin(GLenum mode) -{ - fprintf( glw_state.log_fp, "glBegin( 0x%x )\n", (unsigned int) mode ); - dllBegin( mode ); -} - -static void APIENTRY logBindTexture(GLenum target, GLuint texture) -{ - fprintf( glw_state.log_fp, "glBindTexture( 0x%x, %u )\n", (unsigned int) target, (unsigned int) texture ); - dllBindTexture( target, texture ); -} - -static void APIENTRY logBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) -{ - fprintf( glw_state.log_fp, "glBitmap\n" ); - dllBitmap( width, height, xorig, yorig, xmove, ymove, bitmap ); -} - -static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor) -{ - fprintf( glw_state.log_fp, "glBlendFunc( 0x%x, 0x%x )\n", (unsigned int) sfactor, (unsigned int) dfactor ); - dllBlendFunc( sfactor, dfactor ); -} - -static void APIENTRY logCallList(GLuint list) -{ - fprintf( glw_state.log_fp, "glCallList( %u )\n", (unsigned int) list ); - dllCallList( list ); -} - -static void APIENTRY logCallLists(GLsizei n, GLenum type, const void *lists) -{ - fprintf( glw_state.log_fp, "glCallLists\n" ); - dllCallLists( n, type, lists ); -} - -static void APIENTRY logClear(GLbitfield mask) -{ - fprintf( glw_state.log_fp, "glClear\n" ); - dllClear( mask ); -} - -static void APIENTRY logClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - fprintf( glw_state.log_fp, "glClearAccum\n" ); - dllClearAccum( red, green, blue, alpha ); -} - -static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - fprintf( glw_state.log_fp, "glClearColor\n" ); - dllClearColor( red, green, blue, alpha ); -} - -static void APIENTRY logClearDepth(GLclampd depth) -{ - fprintf( glw_state.log_fp, "glClearDepth\n" ); - dllClearDepth( depth ); -} - -static void APIENTRY logClearIndex(GLfloat c) -{ - fprintf( glw_state.log_fp, "glClearIndex\n" ); - dllClearIndex( c ); -} - -static void APIENTRY logClearStencil(GLint s) -{ - fprintf( glw_state.log_fp, "glClearStencil\n" ); - dllClearStencil( s ); -} - -static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation) -{ - fprintf( glw_state.log_fp, "glClipPlane\n" ); - dllClipPlane( plane, equation ); -} - -static void APIENTRY logColor3b(GLbyte red, GLbyte green, GLbyte blue) -{ - fprintf( glw_state.log_fp, "glColor3b\n" ); - dllColor3b( red, green, blue ); -} - -static void APIENTRY logColor3bv(const GLbyte *v) -{ - fprintf( glw_state.log_fp, "glColor3bv\n" ); - dllColor3bv( v ); -} - -static void APIENTRY logColor3d(GLdouble red, GLdouble green, GLdouble blue) -{ - fprintf( glw_state.log_fp, "glColor3d\n" ); - dllColor3d( red, green, blue ); -} - -static void APIENTRY logColor3dv(const GLdouble *v) -{ - fprintf( glw_state.log_fp, "glColor3dv\n" ); - dllColor3dv( v ); -} - -static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue) -{ - fprintf( glw_state.log_fp, "glColor3f\n" ); - dllColor3f( red, green, blue ); -} - -static void APIENTRY logColor3fv(const GLfloat *v) -{ - fprintf( glw_state.log_fp, "glColor3fv\n" ); - dllColor3fv( v ); -} - -static void APIENTRY logColor3i(GLint red, GLint green, GLint blue) -{ - fprintf( glw_state.log_fp, "glColor3i\n" ); - dllColor3i( red, green, blue ); -} - -static void APIENTRY logColor3iv(const GLint *v) -{ - fprintf( glw_state.log_fp, "glColor3iv\n" ); - dllColor3iv( v ); -} - -static void APIENTRY logColor3s(GLshort red, GLshort green, GLshort blue) -{ - fprintf( glw_state.log_fp, "glColor3s\n" ); - dllColor3s( red, green, blue ); -} - -static void APIENTRY logColor3sv(const GLshort *v) -{ - fprintf( glw_state.log_fp, "glColor3sv\n" ); - dllColor3sv( v ); -} - -static void APIENTRY logColor3ub(GLubyte red, GLubyte green, GLubyte blue) -{ - fprintf( glw_state.log_fp, "glColor3ub\n" ); - dllColor3ub( red, green, blue ); -} - -static void APIENTRY logColor3ubv(const GLubyte *v) -{ - fprintf( glw_state.log_fp, "glColor3ubv\n" ); - dllColor3ubv( v ); -} - -#define SIG( x ) fprintf( glw_state.log_fp, x "\n" ) - -static void APIENTRY logColor3ui(GLuint red, GLuint green, GLuint blue) -{ - SIG( "glColor3ui" ); - dllColor3ui( red, green, blue ); -} - -static void APIENTRY logColor3uiv(const GLuint *v) -{ - SIG( "glColor3uiv" ); - dllColor3uiv( v ); -} - -static void APIENTRY logColor3us(GLushort red, GLushort green, GLushort blue) -{ - SIG( "glColor3us" ); - dllColor3us( red, green, blue ); -} - -static void APIENTRY logColor3usv(const GLushort *v) -{ - SIG( "glColor3usv" ); - dllColor3usv( v ); -} - -static void APIENTRY logColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - SIG( "glColor4b" ); - dllColor4b( red, green, blue, alpha ); -} - -static void APIENTRY logColor4bv(const GLbyte *v) -{ - SIG( "glColor4bv" ); - dllColor4bv( v ); -} - -static void APIENTRY logColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - SIG( "glColor4d" ); - dllColor4d( red, green, blue, alpha ); -} -static void APIENTRY logColor4dv(const GLdouble *v) -{ - SIG( "glColor4dv" ); - dllColor4dv( v ); -} -static void APIENTRY logColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - fprintf( glw_state.log_fp, "glColor4f( %f,%f,%f,%f )\n", red, green, blue, alpha ); - dllColor4f( red, green, blue, alpha ); -} -static void APIENTRY logColor4fv(const GLfloat *v) -{ - fprintf( glw_state.log_fp, "glColor4fv( %f,%f,%f,%f )\n", v[0], v[1], v[2], v[3] ); - dllColor4fv( v ); -} -static void APIENTRY logColor4i(GLint red, GLint green, GLint blue, GLint alpha) -{ - SIG( "glColor4i" ); - dllColor4i( red, green, blue, alpha ); -} -static void APIENTRY logColor4iv(const GLint *v) -{ - SIG( "glColor4iv" ); - dllColor4iv( v ); -} -static void APIENTRY logColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - SIG( "glColor4s" ); - dllColor4s( red, green, blue, alpha ); -} -static void APIENTRY logColor4sv(const GLshort *v) -{ - SIG( "glColor4sv" ); - dllColor4sv( v ); -} -static void APIENTRY logColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - SIG( "glColor4b" ); - dllColor4b( red, green, blue, alpha ); -} -static void APIENTRY logColor4ubv(const GLubyte *v) -{ - SIG( "glColor4ubv" ); - dllColor4ubv( v ); -} -static void APIENTRY logColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - SIG( "glColor4ui" ); - dllColor4ui( red, green, blue, alpha ); -} -static void APIENTRY logColor4uiv(const GLuint *v) -{ - SIG( "glColor4uiv" ); - dllColor4uiv( v ); -} -static void APIENTRY logColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - SIG( "glColor4us" ); - dllColor4us( red, green, blue, alpha ); -} -static void APIENTRY logColor4usv(const GLushort *v) -{ - SIG( "glColor4usv" ); - dllColor4usv( v ); -} -static void APIENTRY logColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - SIG( "glColorMask" ); - dllColorMask( red, green, blue, alpha ); -} -static void APIENTRY logColorMaterial(GLenum face, GLenum mode) -{ - SIG( "glColorMaterial" ); - dllColorMaterial( face, mode ); -} - -static void APIENTRY logColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glColorPointer" ); - dllColorPointer( size, type, stride, pointer ); -} - -static void APIENTRY logCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) -{ - SIG( "glCopyPixels" ); - dllCopyPixels( x, y, width, height, type ); -} - -static void APIENTRY logCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border) -{ - SIG( "glCopyTexImage1D" ); - dllCopyTexImage1D( target, level, internalFormat, x, y, width, border ); -} - -static void APIENTRY logCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - SIG( "glCopyTexImage2D" ); - dllCopyTexImage2D( target, level, internalFormat, x, y, width, height, border ); -} - -static void APIENTRY logCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - SIG( "glCopyTexSubImage1D" ); - dllCopyTexSubImage1D( target, level, xoffset, x, y, width ); -} - -static void APIENTRY logCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - SIG( "glCopyTexSubImage2D" ); - dllCopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height ); -} - -static void APIENTRY logCullFace(GLenum mode) -{ - SIG( "glCullFace" ); - dllCullFace( mode ); -} - -static void APIENTRY logDeleteLists(GLuint list, GLsizei range) -{ - SIG( "glDeleteLists" ); - dllDeleteLists( list, range ); -} - -static void APIENTRY logDeleteTextures(GLsizei n, const GLuint *textures) -{ - SIG( "glDeleteTextures" ); - dllDeleteTextures( n, textures ); -} - -static void APIENTRY logDepthFunc(GLenum func) -{ - SIG( "glDepthFunc" ); - dllDepthFunc( func ); -} - -static void APIENTRY logDepthMask(GLboolean flag) -{ - SIG( "glDepthMask" ); - dllDepthMask( flag ); -} - -static void APIENTRY logDepthRange(GLclampd zNear, GLclampd zFar) -{ - SIG( "glDepthRange" ); - dllDepthRange( zNear, zFar ); -} - -static void APIENTRY logDisable(GLenum cap) -{ - fprintf( glw_state.log_fp, "glDisable( 0x%x )\n", (unsigned int) cap ); - dllDisable( cap ); -} - -static void APIENTRY logDisableClientState(GLenum array) -{ - SIG( "glDisableClientState" ); - dllDisableClientState( array ); -} - -static void APIENTRY logDrawArrays(GLenum mode, GLint first, GLsizei count) -{ - SIG( "glDrawArrays" ); - dllDrawArrays( mode, first, count ); -} - -static void APIENTRY logDrawBuffer(GLenum mode) -{ - SIG( "glDrawBuffer" ); - dllDrawBuffer( mode ); -} - -static void APIENTRY logDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) -{ - SIG( "glDrawElements" ); - dllDrawElements( mode, count, type, indices ); -} - -static void APIENTRY logDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glDrawPixels" ); - dllDrawPixels( width, height, format, type, pixels ); -} - -static void APIENTRY logEdgeFlag(GLboolean flag) -{ - SIG( "glEdgeFlag" ); - dllEdgeFlag( flag ); -} - -static void APIENTRY logEdgeFlagPointer(GLsizei stride, const void *pointer) -{ - SIG( "glEdgeFlagPointer" ); - dllEdgeFlagPointer( stride, pointer ); -} - -static void APIENTRY logEdgeFlagv(const GLboolean *flag) -{ - SIG( "glEdgeFlagv" ); - dllEdgeFlagv( flag ); -} - -static void APIENTRY logEnable(GLenum cap) -{ - fprintf( glw_state.log_fp, "glEnable( 0x%x )\n", (unsigned int) cap ); - dllEnable( cap ); -} - -static void APIENTRY logEnableClientState(GLenum array) -{ - SIG( "glEnableClientState" ); - dllEnableClientState( array ); -} - -static void APIENTRY logEnd(void) -{ - SIG( "glEnd" ); - dllEnd(); -} - -static void APIENTRY logEndList(void) -{ - SIG( "glEndList" ); - dllEndList(); -} - -static void APIENTRY logEvalCoord1d(GLdouble u) -{ - SIG( "glEvalCoord1d" ); - dllEvalCoord1d( u ); -} - -static void APIENTRY logEvalCoord1dv(const GLdouble *u) -{ - SIG( "glEvalCoord1dv" ); - dllEvalCoord1dv( u ); -} - -static void APIENTRY logEvalCoord1f(GLfloat u) -{ - SIG( "glEvalCoord1f" ); - dllEvalCoord1f( u ); -} - -static void APIENTRY logEvalCoord1fv(const GLfloat *u) -{ - SIG( "glEvalCoord1fv" ); - dllEvalCoord1fv( u ); -} -static void APIENTRY logEvalCoord2d(GLdouble u, GLdouble v) -{ - SIG( "glEvalCoord2d" ); - dllEvalCoord2d( u, v ); -} -static void APIENTRY logEvalCoord2dv(const GLdouble *u) -{ - SIG( "glEvalCoord2dv" ); - dllEvalCoord2dv( u ); -} -static void APIENTRY logEvalCoord2f(GLfloat u, GLfloat v) -{ - SIG( "glEvalCoord2f" ); - dllEvalCoord2f( u, v ); -} -static void APIENTRY logEvalCoord2fv(const GLfloat *u) -{ - SIG( "glEvalCoord2fv" ); - dllEvalCoord2fv( u ); -} - -static void APIENTRY logEvalMesh1(GLenum mode, GLint i1, GLint i2) -{ - SIG( "glEvalMesh1" ); - dllEvalMesh1( mode, i1, i2 ); -} -static void APIENTRY logEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ - SIG( "glEvalMesh2" ); - dllEvalMesh2( mode, i1, i2, j1, j2 ); -} -static void APIENTRY logEvalPoint1(GLint i) -{ - SIG( "glEvalPoint1" ); - dllEvalPoint1( i ); -} -static void APIENTRY logEvalPoint2(GLint i, GLint j) -{ - SIG( "glEvalPoint2" ); - dllEvalPoint2( i, j ); -} - -static void APIENTRY logFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) -{ - SIG( "glFeedbackBuffer" ); - dllFeedbackBuffer( size, type, buffer ); -} - -static void APIENTRY logFinish(void) -{ - SIG( "glFinish" ); - dllFinish(); -} - -static void APIENTRY logFlush(void) -{ - SIG( "glFlush" ); - dllFlush(); -} - -static void APIENTRY logFogf(GLenum pname, GLfloat param) -{ - SIG( "glFogf" ); - dllFogf( pname, param ); -} - -static void APIENTRY logFogfv(GLenum pname, const GLfloat *params) -{ - SIG( "glFogfv" ); - dllFogfv( pname, params ); -} - -static void APIENTRY logFogi(GLenum pname, GLint param) -{ - SIG( "glFogi" ); - dllFogi( pname, param ); -} - -static void APIENTRY logFogiv(GLenum pname, const GLint *params) -{ - SIG( "glFogiv" ); - dllFogiv( pname, params ); -} - -static void APIENTRY logFrontFace(GLenum mode) -{ - SIG( "glFrontFace" ); - dllFrontFace( mode ); -} - -static void APIENTRY logFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - SIG( "glFrustum" ); - dllFrustum( left, right, bottom, top, zNear, zFar ); -} - -static GLuint APIENTRY logGenLists(GLsizei range) -{ - SIG( "glGenLists" ); - return dllGenLists( range ); -} - -static void APIENTRY logGenTextures(GLsizei n, GLuint *textures) -{ - SIG( "glGenTextures" ); - dllGenTextures( n, textures ); -} - -static void APIENTRY logGetBooleanv(GLenum pname, GLboolean *params) -{ - SIG( "glGetBooleanv" ); - dllGetBooleanv( pname, params ); -} - -static void APIENTRY logGetClipPlane(GLenum plane, GLdouble *equation) -{ - SIG( "glGetClipPlane" ); - dllGetClipPlane( plane, equation ); -} - -static void APIENTRY logGetDoublev(GLenum pname, GLdouble *params) -{ - SIG( "glGetDoublev" ); - dllGetDoublev( pname, params ); -} - -static GLenum APIENTRY logGetError(void) -{ - SIG( "glGetError" ); - return dllGetError(); -} - -static void APIENTRY logGetFloatv(GLenum pname, GLfloat *params) -{ - SIG( "glGetFloatv" ); - dllGetFloatv( pname, params ); -} - -static void APIENTRY logGetIntegerv(GLenum pname, GLint *params) -{ - SIG( "glGetIntegerv" ); - dllGetIntegerv( pname, params ); -} - -static void APIENTRY logGetLightfv(GLenum light, GLenum pname, GLfloat *params) -{ - SIG( "glGetLightfv" ); - dllGetLightfv( light, pname, params ); -} - -static void APIENTRY logGetLightiv(GLenum light, GLenum pname, GLint *params) -{ - SIG( "glGetLightiv" ); - dllGetLightiv( light, pname, params ); -} - -static void APIENTRY logGetMapdv(GLenum target, GLenum query, GLdouble *v) -{ - SIG( "glGetMapdv" ); - dllGetMapdv( target, query, v ); -} - -static void APIENTRY logGetMapfv(GLenum target, GLenum query, GLfloat *v) -{ - SIG( "glGetMapfv" ); - dllGetMapfv( target, query, v ); -} - -static void APIENTRY logGetMapiv(GLenum target, GLenum query, GLint *v) -{ - SIG( "glGetMapiv" ); - dllGetMapiv( target, query, v ); -} - -static void APIENTRY logGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) -{ - SIG( "glGetMaterialfv" ); - dllGetMaterialfv( face, pname, params ); -} - -static void APIENTRY logGetMaterialiv(GLenum face, GLenum pname, GLint *params) -{ - SIG( "glGetMaterialiv" ); - dllGetMaterialiv( face, pname, params ); -} - -static void APIENTRY logGetPixelMapfv(GLenum map, GLfloat *values) -{ - SIG( "glGetPixelMapfv" ); - dllGetPixelMapfv( map, values ); -} - -static void APIENTRY logGetPixelMapuiv(GLenum map, GLuint *values) -{ - SIG( "glGetPixelMapuiv" ); - dllGetPixelMapuiv( map, values ); -} - -static void APIENTRY logGetPixelMapusv(GLenum map, GLushort *values) -{ - SIG( "glGetPixelMapusv" ); - dllGetPixelMapusv( map, values ); -} - -static void APIENTRY logGetPointerv(GLenum pname, GLvoid* *params) -{ - SIG( "glGetPointerv" ); - dllGetPointerv( pname, params ); -} - -static void APIENTRY logGetPolygonStipple(GLubyte *mask) -{ - SIG( "glGetPolygonStipple" ); - dllGetPolygonStipple( mask ); -} - -static const GLubyte * APIENTRY logGetString(GLenum name) -{ - SIG( "glGetString" ); - return dllGetString( name ); -} - -static void APIENTRY logGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) -{ - SIG( "glGetTexEnvfv" ); - dllGetTexEnvfv( target, pname, params ); -} - -static void APIENTRY logGetTexEnviv(GLenum target, GLenum pname, GLint *params) -{ - SIG( "glGetTexEnviv" ); - dllGetTexEnviv( target, pname, params ); -} - -static void APIENTRY logGetTexGendv(GLenum coord, GLenum pname, GLdouble *params) -{ - SIG( "glGetTexGendv" ); - dllGetTexGendv( coord, pname, params ); -} - -static void APIENTRY logGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params) -{ - SIG( "glGetTexGenfv" ); - dllGetTexGenfv( coord, pname, params ); -} - -static void APIENTRY logGetTexGeniv(GLenum coord, GLenum pname, GLint *params) -{ - SIG( "glGetTexGeniv" ); - dllGetTexGeniv( coord, pname, params ); -} - -static void APIENTRY logGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels) -{ - SIG( "glGetTexImage" ); - dllGetTexImage( target, level, format, type, pixels ); -} -static void APIENTRY logGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params ) -{ - SIG( "glGetTexLevelParameterfv" ); - dllGetTexLevelParameterfv( target, level, pname, params ); -} - -static void APIENTRY logGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) -{ - SIG( "glGetTexLevelParameteriv" ); - dllGetTexLevelParameteriv( target, level, pname, params ); -} - -static void APIENTRY logGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ - SIG( "glGetTexParameterfv" ); - dllGetTexParameterfv( target, pname, params ); -} - -static void APIENTRY logGetTexParameteriv(GLenum target, GLenum pname, GLint *params) -{ - SIG( "glGetTexParameteriv" ); - dllGetTexParameteriv( target, pname, params ); -} - -static void APIENTRY logHint(GLenum target, GLenum mode) -{ - fprintf( glw_state.log_fp, "glHint( 0x%x, 0x%x )\n", (unsigned int) target, (unsigned int) mode ); - dllHint( target, mode ); -} - -static void APIENTRY logIndexMask(GLuint mask) -{ - SIG( "glIndexMask" ); - dllIndexMask( mask ); -} - -static void APIENTRY logIndexPointer(GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glIndexPointer" ); - dllIndexPointer( type, stride, pointer ); -} - -static void APIENTRY logIndexd(GLdouble c) -{ - SIG( "glIndexd" ); - dllIndexd( c ); -} - -static void APIENTRY logIndexdv(const GLdouble *c) -{ - SIG( "glIndexdv" ); - dllIndexdv( c ); -} - -static void APIENTRY logIndexf(GLfloat c) -{ - SIG( "glIndexf" ); - dllIndexf( c ); -} - -static void APIENTRY logIndexfv(const GLfloat *c) -{ - SIG( "glIndexfv" ); - dllIndexfv( c ); -} - -static void APIENTRY logIndexi(GLint c) -{ - SIG( "glIndexi" ); - dllIndexi( c ); -} - -static void APIENTRY logIndexiv(const GLint *c) -{ - SIG( "glIndexiv" ); - dllIndexiv( c ); -} - -static void APIENTRY logIndexs(GLshort c) -{ - SIG( "glIndexs" ); - dllIndexs( c ); -} - -static void APIENTRY logIndexsv(const GLshort *c) -{ - SIG( "glIndexsv" ); - dllIndexsv( c ); -} - -static void APIENTRY logIndexub(GLubyte c) -{ - SIG( "glIndexub" ); - dllIndexub( c ); -} - -static void APIENTRY logIndexubv(const GLubyte *c) -{ - SIG( "glIndexubv" ); - dllIndexubv( c ); -} - -static void APIENTRY logInitNames(void) -{ - SIG( "glInitNames" ); - dllInitNames(); -} - -static void APIENTRY logInterleavedArrays(GLenum format, GLsizei stride, const void *pointer) -{ - SIG( "glInterleavedArrays" ); - dllInterleavedArrays( format, stride, pointer ); -} - -static GLboolean APIENTRY logIsEnabled(GLenum cap) -{ - SIG( "glIsEnabled" ); - return dllIsEnabled( cap ); -} -static GLboolean APIENTRY logIsList(GLuint list) -{ - SIG( "glIsList" ); - return dllIsList( list ); -} -static GLboolean APIENTRY logIsTexture(GLuint texture) -{ - SIG( "glIsTexture" ); - return dllIsTexture( texture ); -} - -static void APIENTRY logLightModelf(GLenum pname, GLfloat param) -{ - SIG( "glLightModelf" ); - dllLightModelf( pname, param ); -} - -static void APIENTRY logLightModelfv(GLenum pname, const GLfloat *params) -{ - SIG( "glLightModelfv" ); - dllLightModelfv( pname, params ); -} - -static void APIENTRY logLightModeli(GLenum pname, GLint param) -{ - SIG( "glLightModeli" ); - dllLightModeli( pname, param ); - -} - -static void APIENTRY logLightModeliv(GLenum pname, const GLint *params) -{ - SIG( "glLightModeliv" ); - dllLightModeliv( pname, params ); -} - -static void APIENTRY logLightf(GLenum light, GLenum pname, GLfloat param) -{ - SIG( "glLightf" ); - dllLightf( light, pname, param ); -} - -static void APIENTRY logLightfv(GLenum light, GLenum pname, const GLfloat *params) -{ - SIG( "glLightfv" ); - dllLightfv( light, pname, params ); -} - -static void APIENTRY logLighti(GLenum light, GLenum pname, GLint param) -{ - SIG( "glLighti" ); - dllLighti( light, pname, param ); -} - -static void APIENTRY logLightiv(GLenum light, GLenum pname, const GLint *params) -{ - SIG( "glLightiv" ); - dllLightiv( light, pname, params ); -} - -static void APIENTRY logLineStipple(GLint factor, GLushort pattern) -{ - SIG( "glLineStipple" ); - dllLineStipple( factor, pattern ); -} - -static void APIENTRY logLineWidth(GLfloat width) -{ - SIG( "glLineWidth" ); - dllLineWidth( width ); -} - -static void APIENTRY logListBase(GLuint base) -{ - SIG( "glListBase" ); - dllListBase( base ); -} - -static void APIENTRY logLoadIdentity(void) -{ - SIG( "glLoadIdentity" ); - dllLoadIdentity(); -} - -static void APIENTRY logLoadMatrixd(const GLdouble *m) -{ - SIG( "glLoadMatrixd" ); - dllLoadMatrixd( m ); -} - -static void APIENTRY logLoadMatrixf(const GLfloat *m) -{ - SIG( "glLoadMatrixf" ); - dllLoadMatrixf( m ); -} - -static void APIENTRY logLoadName(GLuint name) -{ - SIG( "glLoadName" ); - dllLoadName( name ); -} - -static void APIENTRY logLogicOp(GLenum opcode) -{ - SIG( "glLogicOp" ); - dllLogicOp( opcode ); -} - -static void APIENTRY logMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) -{ - SIG( "glMap1d" ); - dllMap1d( target, u1, u2, stride, order, points ); -} - -static void APIENTRY logMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) -{ - SIG( "glMap1f" ); - dllMap1f( target, u1, u2, stride, order, points ); -} - -static void APIENTRY logMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) -{ - SIG( "glMap2d" ); - dllMap2d( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); -} - -static void APIENTRY logMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) -{ - SIG( "glMap2f" ); - dllMap2f( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); -} - -static void APIENTRY logMapGrid1d(GLint un, GLdouble u1, GLdouble u2) -{ - SIG( "glMapGrid1d" ); - dllMapGrid1d( un, u1, u2 ); -} - -static void APIENTRY logMapGrid1f(GLint un, GLfloat u1, GLfloat u2) -{ - SIG( "glMapGrid1f" ); - dllMapGrid1f( un, u1, u2 ); -} - -static void APIENTRY logMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - SIG( "glMapGrid2d" ); - dllMapGrid2d( un, u1, u2, vn, v1, v2 ); -} -static void APIENTRY logMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - SIG( "glMapGrid2f" ); - dllMapGrid2f( un, u1, u2, vn, v1, v2 ); -} -static void APIENTRY logMaterialf(GLenum face, GLenum pname, GLfloat param) -{ - SIG( "glMaterialf" ); - dllMaterialf( face, pname, param ); -} -static void APIENTRY logMaterialfv(GLenum face, GLenum pname, const GLfloat *params) -{ - SIG( "glMaterialfv" ); - dllMaterialfv( face, pname, params ); -} - -static void APIENTRY logMateriali(GLenum face, GLenum pname, GLint param) -{ - SIG( "glMateriali" ); - dllMateriali( face, pname, param ); -} - -static void APIENTRY logMaterialiv(GLenum face, GLenum pname, const GLint *params) -{ - SIG( "glMaterialiv" ); - dllMaterialiv( face, pname, params ); -} - -static void APIENTRY logMatrixMode(GLenum mode) -{ - SIG( "glMatrixMode" ); - dllMatrixMode( mode ); -} - -static void APIENTRY logMultMatrixd(const GLdouble *m) -{ - SIG( "glMultMatrixd" ); - dllMultMatrixd( m ); -} - -static void APIENTRY logMultMatrixf(const GLfloat *m) -{ - SIG( "glMultMatrixf" ); - dllMultMatrixf( m ); -} - -static void APIENTRY logNewList(GLuint list, GLenum mode) -{ - SIG( "glNewList" ); - dllNewList( list, mode ); -} - -static void APIENTRY logNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) -{ - SIG ("glNormal3b" ); - dllNormal3b( nx, ny, nz ); -} - -static void APIENTRY logNormal3bv(const GLbyte *v) -{ - SIG( "glNormal3bv" ); - dllNormal3bv( v ); -} - -static void APIENTRY logNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) -{ - SIG( "glNormal3d" ); - dllNormal3d( nx, ny, nz ); -} - -static void APIENTRY logNormal3dv(const GLdouble *v) -{ - SIG( "glNormal3dv" ); - dllNormal3dv( v ); -} - -static void APIENTRY logNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) -{ - SIG( "glNormal3f" ); - dllNormal3f( nx, ny, nz ); -} - -static void APIENTRY logNormal3fv(const GLfloat *v) -{ - SIG( "glNormal3fv" ); - dllNormal3fv( v ); -} -static void APIENTRY logNormal3i(GLint nx, GLint ny, GLint nz) -{ - SIG( "glNormal3i" ); - dllNormal3i( nx, ny, nz ); -} -static void APIENTRY logNormal3iv(const GLint *v) -{ - SIG( "glNormal3iv" ); - dllNormal3iv( v ); -} -static void APIENTRY logNormal3s(GLshort nx, GLshort ny, GLshort nz) -{ - SIG( "glNormal3s" ); - dllNormal3s( nx, ny, nz ); -} -static void APIENTRY logNormal3sv(const GLshort *v) -{ - SIG( "glNormal3sv" ); - dllNormal3sv( v ); -} -static void APIENTRY logNormalPointer(GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glNormalPointer" ); - dllNormalPointer( type, stride, pointer ); -} -static void APIENTRY logOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - SIG( "glOrtho" ); - dllOrtho( left, right, bottom, top, zNear, zFar ); -} - -static void APIENTRY logPassThrough(GLfloat token) -{ - SIG( "glPassThrough" ); - dllPassThrough( token ); -} - -static void APIENTRY logPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values) -{ - SIG( "glPixelMapfv" ); - dllPixelMapfv( map, mapsize, values ); -} - -static void APIENTRY logPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values) -{ - SIG( "glPixelMapuiv" ); - dllPixelMapuiv( map, mapsize, values ); -} - -static void APIENTRY logPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values) -{ - SIG( "glPixelMapusv" ); - dllPixelMapusv( map, mapsize, values ); -} -static void APIENTRY logPixelStoref(GLenum pname, GLfloat param) -{ - SIG( "glPixelStoref" ); - dllPixelStoref( pname, param ); -} -static void APIENTRY logPixelStorei(GLenum pname, GLint param) -{ - SIG( "glPixelStorei" ); - dllPixelStorei( pname, param ); -} -static void APIENTRY logPixelTransferf(GLenum pname, GLfloat param) -{ - SIG( "glPixelTransferf" ); - dllPixelTransferf( pname, param ); -} - -static void APIENTRY logPixelTransferi(GLenum pname, GLint param) -{ - SIG( "glPixelTransferi" ); - dllPixelTransferi( pname, param ); -} - -static void APIENTRY logPixelZoom(GLfloat xfactor, GLfloat yfactor) -{ - SIG( "glPixelZoom" ); - dllPixelZoom( xfactor, yfactor ); -} - -static void APIENTRY logPointSize(GLfloat size) -{ - SIG( "glPointSize" ); - dllPointSize( size ); -} - -static void APIENTRY logPolygonMode(GLenum face, GLenum mode) -{ - fprintf( glw_state.log_fp, "glPolygonMode( 0x%x, 0x%x )\n", (unsigned int) face, (unsigned int) mode ); - dllPolygonMode( face, mode ); -} - -static void APIENTRY logPolygonOffset(GLfloat factor, GLfloat units) -{ - SIG( "glPolygonOffset" ); - dllPolygonOffset( factor, units ); -} -static void APIENTRY logPolygonStipple(const GLubyte *mask ) -{ - SIG( "glPolygonStipple" ); - dllPolygonStipple( mask ); -} -static void APIENTRY logPopAttrib(void) -{ - SIG( "glPopAttrib" ); - dllPopAttrib(); -} - -static void APIENTRY logPopClientAttrib(void) -{ - SIG( "glPopClientAttrib" ); - dllPopClientAttrib(); -} - -static void APIENTRY logPopMatrix(void) -{ - SIG( "glPopMatrix" ); - dllPopMatrix(); -} - -static void APIENTRY logPopName(void) -{ - SIG( "glPopName" ); - dllPopName(); -} - -static void APIENTRY logPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) -{ - SIG( "glPrioritizeTextures" ); - dllPrioritizeTextures( n, textures, priorities ); -} - -static void APIENTRY logPushAttrib(GLbitfield mask) -{ - SIG( "glPushAttrib" ); - dllPushAttrib( mask ); -} - -static void APIENTRY logPushClientAttrib(GLbitfield mask) -{ - SIG( "glPushClientAttrib" ); - dllPushClientAttrib( mask ); -} - -static void APIENTRY logPushMatrix(void) -{ - SIG( "glPushMatrix" ); - dllPushMatrix(); -} - -static void APIENTRY logPushName(GLuint name) -{ - SIG( "glPushName" ); - dllPushName( name ); -} - -static void APIENTRY logRasterPos2d(GLdouble x, GLdouble y) -{ - SIG ("glRasterPot2d" ); - dllRasterPos2d( x, y ); -} - -static void APIENTRY logRasterPos2dv(const GLdouble *v) -{ - SIG( "glRasterPos2dv" ); - dllRasterPos2dv( v ); -} - -static void APIENTRY logRasterPos2f(GLfloat x, GLfloat y) -{ - SIG( "glRasterPos2f" ); - dllRasterPos2f( x, y ); -} -static void APIENTRY logRasterPos2fv(const GLfloat *v) -{ - SIG( "glRasterPos2dv" ); - dllRasterPos2fv( v ); -} -static void APIENTRY logRasterPos2i(GLint x, GLint y) -{ - SIG( "glRasterPos2if" ); - dllRasterPos2i( x, y ); -} -static void APIENTRY logRasterPos2iv(const GLint *v) -{ - SIG( "glRasterPos2iv" ); - dllRasterPos2iv( v ); -} -static void APIENTRY logRasterPos2s(GLshort x, GLshort y) -{ - SIG( "glRasterPos2s" ); - dllRasterPos2s( x, y ); -} -static void APIENTRY logRasterPos2sv(const GLshort *v) -{ - SIG( "glRasterPos2sv" ); - dllRasterPos2sv( v ); -} -static void APIENTRY logRasterPos3d(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glRasterPos3d" ); - dllRasterPos3d( x, y, z ); -} -static void APIENTRY logRasterPos3dv(const GLdouble *v) -{ - SIG( "glRasterPos3dv" ); - dllRasterPos3dv( v ); -} -static void APIENTRY logRasterPos3f(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glRasterPos3f" ); - dllRasterPos3f( x, y, z ); -} -static void APIENTRY logRasterPos3fv(const GLfloat *v) -{ - SIG( "glRasterPos3fv" ); - dllRasterPos3fv( v ); -} -static void APIENTRY logRasterPos3i(GLint x, GLint y, GLint z) -{ - SIG( "glRasterPos3i" ); - dllRasterPos3i( x, y, z ); -} -static void APIENTRY logRasterPos3iv(const GLint *v) -{ - SIG( "glRasterPos3iv" ); - dllRasterPos3iv( v ); -} -static void APIENTRY logRasterPos3s(GLshort x, GLshort y, GLshort z) -{ - SIG( "glRasterPos3s" ); - dllRasterPos3s( x, y, z ); -} -static void APIENTRY logRasterPos3sv(const GLshort *v) -{ - SIG( "glRasterPos3sv" ); - dllRasterPos3sv( v ); -} -static void APIENTRY logRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - SIG( "glRasterPos4d" ); - dllRasterPos4d( x, y, z, w ); -} -static void APIENTRY logRasterPos4dv(const GLdouble *v) -{ - SIG( "glRasterPos4dv" ); - dllRasterPos4dv( v ); -} -static void APIENTRY logRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - SIG( "glRasterPos4f" ); - dllRasterPos4f( x, y, z, w ); -} -static void APIENTRY logRasterPos4fv(const GLfloat *v) -{ - SIG( "glRasterPos4fv" ); - dllRasterPos4fv( v ); -} -static void APIENTRY logRasterPos4i(GLint x, GLint y, GLint z, GLint w) -{ - SIG( "glRasterPos4i" ); - dllRasterPos4i( x, y, z, w ); -} -static void APIENTRY logRasterPos4iv(const GLint *v) -{ - SIG( "glRasterPos4iv" ); - dllRasterPos4iv( v ); -} -static void APIENTRY logRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - SIG( "glRasterPos4s" ); - dllRasterPos4s( x, y, z, w ); -} -static void APIENTRY logRasterPos4sv(const GLshort *v) -{ - SIG( "glRasterPos4sv" ); - dllRasterPos4sv( v ); -} -static void APIENTRY logReadBuffer(GLenum mode) -{ - SIG( "glReadBuffer" ); - dllReadBuffer( mode ); -} -static void APIENTRY logReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels) -{ - SIG( "glReadPixels" ); - dllReadPixels( x, y, width, height, format, type, pixels ); -} - -static void APIENTRY logRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - SIG( "glRectd" ); - dllRectd( x1, y1, x2, y2 ); -} - -static void APIENTRY logRectdv(const GLdouble *v1, const GLdouble *v2) -{ - SIG( "glRectdv" ); - dllRectdv( v1, v2 ); -} - -static void APIENTRY logRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - SIG( "glRectf" ); - dllRectf( x1, y1, x2, y2 ); -} - -static void APIENTRY logRectfv(const GLfloat *v1, const GLfloat *v2) -{ - SIG( "glRectfv" ); - dllRectfv( v1, v2 ); -} -static void APIENTRY logRecti(GLint x1, GLint y1, GLint x2, GLint y2) -{ - SIG( "glRecti" ); - dllRecti( x1, y1, x2, y2 ); -} -static void APIENTRY logRectiv(const GLint *v1, const GLint *v2) -{ - SIG( "glRectiv" ); - dllRectiv( v1, v2 ); -} -static void APIENTRY logRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - SIG( "glRects" ); - dllRects( x1, y1, x2, y2 ); -} -static void APIENTRY logRectsv(const GLshort *v1, const GLshort *v2) -{ - SIG( "glRectsv" ); - dllRectsv( v1, v2 ); -} -static GLint APIENTRY logRenderMode(GLenum mode) -{ - SIG( "glRenderMode" ); - return dllRenderMode( mode ); -} -static void APIENTRY logRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glRotated" ); - dllRotated( angle, x, y, z ); -} - -static void APIENTRY logRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glRotatef" ); - dllRotatef( angle, x, y, z ); -} - -static void APIENTRY logScaled(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glScaled" ); - dllScaled( x, y, z ); -} - -static void APIENTRY logScalef(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glScalef" ); - dllScalef( x, y, z ); -} - -static void APIENTRY logScissor(GLint x, GLint y, GLsizei width, GLsizei height) -{ - SIG( "glScissor" ); - dllScissor( x, y, width, height ); -} - -static void APIENTRY logSelectBuffer(GLsizei size, GLuint *buffer) -{ - SIG( "glSelectBuffer" ); - dllSelectBuffer( size, buffer ); -} - -static void APIENTRY logShadeModel(GLenum mode) -{ - SIG( "glShadeModel" ); - dllShadeModel( mode ); -} - -static void APIENTRY logStencilFunc(GLenum func, GLint ref, GLuint mask) -{ - SIG( "glStencilFunc" ); - dllStencilFunc( func, ref, mask ); -} - -static void APIENTRY logStencilMask(GLuint mask) -{ - SIG( "glStencilMask" ); - dllStencilMask( mask ); -} - -static void APIENTRY logStencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ - SIG( "glStencilOp" ); - dllStencilOp( fail, zfail, zpass ); -} - -static void APIENTRY logTexCoord1d(GLdouble s) -{ - SIG( "glTexCoord1d" ); - dllTexCoord1d( s ); -} - -static void APIENTRY logTexCoord1dv(const GLdouble *v) -{ - SIG( "glTexCoord1dv" ); - dllTexCoord1dv( v ); -} - -static void APIENTRY logTexCoord1f(GLfloat s) -{ - SIG( "glTexCoord1f" ); - dllTexCoord1f( s ); -} -static void APIENTRY logTexCoord1fv(const GLfloat *v) -{ - SIG( "glTexCoord1fv" ); - dllTexCoord1fv( v ); -} -static void APIENTRY logTexCoord1i(GLint s) -{ - SIG( "glTexCoord1i" ); - dllTexCoord1i( s ); -} -static void APIENTRY logTexCoord1iv(const GLint *v) -{ - SIG( "glTexCoord1iv" ); - dllTexCoord1iv( v ); -} -static void APIENTRY logTexCoord1s(GLshort s) -{ - SIG( "glTexCoord1s" ); - dllTexCoord1s( s ); -} -static void APIENTRY logTexCoord1sv(const GLshort *v) -{ - SIG( "glTexCoord1sv" ); - dllTexCoord1sv( v ); -} -static void APIENTRY logTexCoord2d(GLdouble s, GLdouble t) -{ - SIG( "glTexCoord2d" ); - dllTexCoord2d( s, t ); -} - -static void APIENTRY logTexCoord2dv(const GLdouble *v) -{ - SIG( "glTexCoord2dv" ); - dllTexCoord2dv( v ); -} -static void APIENTRY logTexCoord2f(GLfloat s, GLfloat t) -{ - SIG( "glTexCoord2f" ); - dllTexCoord2f( s, t ); -} -static void APIENTRY logTexCoord2fv(const GLfloat *v) -{ - SIG( "glTexCoord2fv" ); - dllTexCoord2fv( v ); -} -static void APIENTRY logTexCoord2i(GLint s, GLint t) -{ - SIG( "glTexCoord2i" ); - dllTexCoord2i( s, t ); -} -static void APIENTRY logTexCoord2iv(const GLint *v) -{ - SIG( "glTexCoord2iv" ); - dllTexCoord2iv( v ); -} -static void APIENTRY logTexCoord2s(GLshort s, GLshort t) -{ - SIG( "glTexCoord2s" ); - dllTexCoord2s( s, t ); -} -static void APIENTRY logTexCoord2sv(const GLshort *v) -{ - SIG( "glTexCoord2sv" ); - dllTexCoord2sv( v ); -} -static void APIENTRY logTexCoord3d(GLdouble s, GLdouble t, GLdouble r) -{ - SIG( "glTexCoord3d" ); - dllTexCoord3d( s, t, r ); -} -static void APIENTRY logTexCoord3dv(const GLdouble *v) -{ - SIG( "glTexCoord3dv" ); - dllTexCoord3dv( v ); -} -static void APIENTRY logTexCoord3f(GLfloat s, GLfloat t, GLfloat r) -{ - SIG( "glTexCoord3f" ); - dllTexCoord3f( s, t, r ); -} -static void APIENTRY logTexCoord3fv(const GLfloat *v) -{ - SIG( "glTexCoord3fv" ); - dllTexCoord3fv( v ); -} -static void APIENTRY logTexCoord3i(GLint s, GLint t, GLint r) -{ - SIG( "glTexCoord3i" ); - dllTexCoord3i( s, t, r ); -} -static void APIENTRY logTexCoord3iv(const GLint *v) -{ - SIG( "glTexCoord3iv" ); - dllTexCoord3iv( v ); -} -static void APIENTRY logTexCoord3s(GLshort s, GLshort t, GLshort r) -{ - SIG( "glTexCoord3s" ); - dllTexCoord3s( s, t, r ); -} -static void APIENTRY logTexCoord3sv(const GLshort *v) -{ - SIG( "glTexCoord3sv" ); - dllTexCoord3sv( v ); -} -static void APIENTRY logTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - SIG( "glTexCoord4d" ); - dllTexCoord4d( s, t, r, q ); -} -static void APIENTRY logTexCoord4dv(const GLdouble *v) -{ - SIG( "glTexCoord4dv" ); - dllTexCoord4dv( v ); -} -static void APIENTRY logTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - SIG( "glTexCoord4f" ); - dllTexCoord4f( s, t, r, q ); -} -static void APIENTRY logTexCoord4fv(const GLfloat *v) -{ - SIG( "glTexCoord4fv" ); - dllTexCoord4fv( v ); -} -static void APIENTRY logTexCoord4i(GLint s, GLint t, GLint r, GLint q) -{ - SIG( "glTexCoord4i" ); - dllTexCoord4i( s, t, r, q ); -} -static void APIENTRY logTexCoord4iv(const GLint *v) -{ - SIG( "glTexCoord4iv" ); - dllTexCoord4iv( v ); -} -static void APIENTRY logTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) -{ - SIG( "glTexCoord4s" ); - dllTexCoord4s( s, t, r, q ); -} -static void APIENTRY logTexCoord4sv(const GLshort *v) -{ - SIG( "glTexCoord4sv" ); - dllTexCoord4sv( v ); -} -static void APIENTRY logTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glTexCoordPointer" ); - dllTexCoordPointer( size, type, stride, pointer ); -} - -static void APIENTRY logTexEnvf(GLenum target, GLenum pname, GLfloat param) -{ - fprintf( glw_state.log_fp, "glTexEnvf( 0x%x, 0x%x, %f )\n", (unsigned int) target, (unsigned int) pname, param ); - dllTexEnvf( target, pname, param ); -} - -static void APIENTRY logTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) -{ - SIG( "glTexEnvfv" ); - dllTexEnvfv( target, pname, params ); -} - -static void APIENTRY logTexEnvi(GLenum target, GLenum pname, GLint param) -{ - fprintf( glw_state.log_fp, "glTexEnvi( 0x%x, 0x%x, 0x%x )\n", (unsigned int) target, (unsigned int) pname, (unsigned int) param ); - dllTexEnvi( target, pname, param ); -} -static void APIENTRY logTexEnviv(GLenum target, GLenum pname, const GLint *params) -{ - SIG( "glTexEnviv" ); - dllTexEnviv( target, pname, params ); -} - -static void APIENTRY logTexGend(GLenum coord, GLenum pname, GLdouble param) -{ - SIG( "glTexGend" ); - dllTexGend( coord, pname, param ); -} - -static void APIENTRY logTexGendv(GLenum coord, GLenum pname, const GLdouble *params) -{ - SIG( "glTexGendv" ); - dllTexGendv( coord, pname, params ); -} - -static void APIENTRY logTexGenf(GLenum coord, GLenum pname, GLfloat param) -{ - SIG( "glTexGenf" ); - dllTexGenf( coord, pname, param ); -} -static void APIENTRY logTexGenfv(GLenum coord, GLenum pname, const GLfloat *params) -{ - SIG( "glTexGenfv" ); - dllTexGenfv( coord, pname, params ); -} -static void APIENTRY logTexGeni(GLenum coord, GLenum pname, GLint param) -{ - SIG( "glTexGeni" ); - dllTexGeni( coord, pname, param ); -} -static void APIENTRY logTexGeniv(GLenum coord, GLenum pname, const GLint *params) -{ - SIG( "glTexGeniv" ); - dllTexGeniv( coord, pname, params ); -} -static void APIENTRY logTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexImage1D" ); - dllTexImage1D( target, level, internalformat, width, border, format, type, pixels ); -} -static void APIENTRY logTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexImage2D" ); - dllTexImage2D( target, level, internalformat, width, height, border, format, type, pixels ); -} - -static void APIENTRY logTexParameterf(GLenum target, GLenum pname, GLfloat param) -{ - fprintf( glw_state.log_fp, "glTexParameterf( 0x%x, 0x%x, %f )\n", (unsigned int) target, (unsigned int) pname, param ); - dllTexParameterf( target, pname, param ); -} - -static void APIENTRY logTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - SIG( "glTexParameterfv" ); - dllTexParameterfv( target, pname, params ); -} -static void APIENTRY logTexParameteri(GLenum target, GLenum pname, GLint param) -{ - fprintf( glw_state.log_fp, "glTexParameteri( 0x%x, 0x%x, 0x%x )\n", (unsigned int) target, (unsigned int) pname, (unsigned int) param ); - dllTexParameteri( target, pname, param ); -} -static void APIENTRY logTexParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - SIG( "glTexParameteriv" ); - dllTexParameteriv( target, pname, params ); -} -static void APIENTRY logTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexSubImage1D" ); - dllTexSubImage1D( target, level, xoffset, width, format, type, pixels ); -} -static void APIENTRY logTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexSubImage2D" ); - dllTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels ); -} -static void APIENTRY logTranslated(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glTranslated" ); - dllTranslated( x, y, z ); -} - -static void APIENTRY logTranslatef(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glTranslatef" ); - dllTranslatef( x, y, z ); -} - -static void APIENTRY logVertex2d(GLdouble x, GLdouble y) -{ - SIG( "glVertex2d" ); - dllVertex2d( x, y ); -} - -static void APIENTRY logVertex2dv(const GLdouble *v) -{ - SIG( "glVertex2dv" ); - dllVertex2dv( v ); -} -static void APIENTRY logVertex2f(GLfloat x, GLfloat y) -{ - SIG( "glVertex2f" ); - dllVertex2f( x, y ); -} -static void APIENTRY logVertex2fv(const GLfloat *v) -{ - SIG( "glVertex2fv" ); - dllVertex2fv( v ); -} -static void APIENTRY logVertex2i(GLint x, GLint y) -{ - SIG( "glVertex2i" ); - dllVertex2i( x, y ); -} -static void APIENTRY logVertex2iv(const GLint *v) -{ - SIG( "glVertex2iv" ); - dllVertex2iv( v ); -} -static void APIENTRY logVertex2s(GLshort x, GLshort y) -{ - SIG( "glVertex2s" ); - dllVertex2s( x, y ); -} -static void APIENTRY logVertex2sv(const GLshort *v) -{ - SIG( "glVertex2sv" ); - dllVertex2sv( v ); -} -static void APIENTRY logVertex3d(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glVertex3d" ); - dllVertex3d( x, y, z ); -} -static void APIENTRY logVertex3dv(const GLdouble *v) -{ - SIG( "glVertex3dv" ); - dllVertex3dv( v ); -} -static void APIENTRY logVertex3f(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glVertex3f" ); - dllVertex3f( x, y, z ); -} -static void APIENTRY logVertex3fv(const GLfloat *v) -{ - SIG( "glVertex3fv" ); - dllVertex3fv( v ); -} -static void APIENTRY logVertex3i(GLint x, GLint y, GLint z) -{ - SIG( "glVertex3i" ); - dllVertex3i( x, y, z ); -} -static void APIENTRY logVertex3iv(const GLint *v) -{ - SIG( "glVertex3iv" ); - dllVertex3iv( v ); -} -static void APIENTRY logVertex3s(GLshort x, GLshort y, GLshort z) -{ - SIG( "glVertex3s" ); - dllVertex3s( x, y, z ); -} -static void APIENTRY logVertex3sv(const GLshort *v) -{ - SIG( "glVertex3sv" ); - dllVertex3sv( v ); -} -static void APIENTRY logVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - SIG( "glVertex4d" ); - dllVertex4d( x, y, z, w ); -} -static void APIENTRY logVertex4dv(const GLdouble *v) -{ - SIG( "glVertex4dv" ); - dllVertex4dv( v ); -} -static void APIENTRY logVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - SIG( "glVertex4f" ); - dllVertex4f( x, y, z, w ); -} -static void APIENTRY logVertex4fv(const GLfloat *v) -{ - SIG( "glVertex4fv" ); - dllVertex4fv( v ); -} -static void APIENTRY logVertex4i(GLint x, GLint y, GLint z, GLint w) -{ - SIG( "glVertex4i" ); - dllVertex4i( x, y, z, w ); -} -static void APIENTRY logVertex4iv(const GLint *v) -{ - SIG( "glVertex4iv" ); - dllVertex4iv( v ); -} -static void APIENTRY logVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - SIG( "glVertex4s" ); - dllVertex4s( x, y, z, w ); -} -static void APIENTRY logVertex4sv(const GLshort *v) -{ - SIG( "glVertex4sv" ); - dllVertex4sv( v ); -} -static void APIENTRY logVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glVertexPointer" ); - dllVertexPointer( size, type, stride, pointer ); -} -static void APIENTRY logViewport(GLint x, GLint y, GLsizei width, GLsizei height) -{ - SIG( "glViewport" ); - dllViewport( x, y, width, height ); -} - -/* -** QGL_Shutdown -** -** Unloads the specified DLL then nulls out all the proc pointers. -*/ -void QGL_Shutdown( void ) -{ - if ( glw_state.OpenGLLib ) - { - // 25/09/05 Tim Angus - // Certain combinations of hardware and software, specifically - // Linux/SMP/Nvidia/agpgart (OK, OK. MY combination of hardware and - // software), seem to cause a catastrophic (hard reboot required) crash - // when libGL is dynamically unloaded. I'm unsure of the precise cause, - // suffice to say I don't see anything in the Q3 code that could cause it. - // I suspect it's an Nvidia driver bug, but without the source or means to - // debug I obviously can't prove (or disprove) this. Interestingly (though - // perhaps not suprisingly), Enemy Territory and Doom 3 both exhibit the - // same problem. - // - // After many, many reboots and prodding here and there, it seems that a - // placing a short delay before libGL is unloaded works around the problem. - // This delay is changable via the r_GLlibCoolDownMsec cvar (nice name - // huh?), and it defaults to 0. For me, 500 seems to work. - if( r_GLlibCoolDownMsec->integer ) - usleep( r_GLlibCoolDownMsec->integer * 1000 ); - - #if USE_SDL_VIDEO - SDL_QuitSubSystem(SDL_INIT_VIDEO); - #else - dlclose ( glw_state.OpenGLLib ); - #endif - glw_state.OpenGLLib = NULL; - } - - qglAccum = NULL; - qglAlphaFunc = NULL; - qglAreTexturesResident = NULL; - qglArrayElement = NULL; - qglBegin = NULL; - qglBindTexture = NULL; - qglBitmap = NULL; - qglBlendFunc = NULL; - qglCallList = NULL; - qglCallLists = NULL; - qglClear = NULL; - qglClearAccum = NULL; - qglClearColor = NULL; - qglClearDepth = NULL; - qglClearIndex = NULL; - qglClearStencil = NULL; - qglClipPlane = NULL; - qglColor3b = NULL; - qglColor3bv = NULL; - qglColor3d = NULL; - qglColor3dv = NULL; - qglColor3f = NULL; - qglColor3fv = NULL; - qglColor3i = NULL; - qglColor3iv = NULL; - qglColor3s = NULL; - qglColor3sv = NULL; - qglColor3ub = NULL; - qglColor3ubv = NULL; - qglColor3ui = NULL; - qglColor3uiv = NULL; - qglColor3us = NULL; - qglColor3usv = NULL; - qglColor4b = NULL; - qglColor4bv = NULL; - qglColor4d = NULL; - qglColor4dv = NULL; - qglColor4f = NULL; - qglColor4fv = NULL; - qglColor4i = NULL; - qglColor4iv = NULL; - qglColor4s = NULL; - qglColor4sv = NULL; - qglColor4ub = NULL; - qglColor4ubv = NULL; - qglColor4ui = NULL; - qglColor4uiv = NULL; - qglColor4us = NULL; - qglColor4usv = NULL; - qglColorMask = NULL; - qglColorMaterial = NULL; - qglColorPointer = NULL; - qglCopyPixels = NULL; - qglCopyTexImage1D = NULL; - qglCopyTexImage2D = NULL; - qglCopyTexSubImage1D = NULL; - qglCopyTexSubImage2D = NULL; - qglCullFace = NULL; - qglDeleteLists = NULL; - qglDeleteTextures = NULL; - qglDepthFunc = NULL; - qglDepthMask = NULL; - qglDepthRange = NULL; - qglDisable = NULL; - qglDisableClientState = NULL; - qglDrawArrays = NULL; - qglDrawBuffer = NULL; - qglDrawElements = NULL; - qglDrawPixels = NULL; - qglEdgeFlag = NULL; - qglEdgeFlagPointer = NULL; - qglEdgeFlagv = NULL; - qglEnable = NULL; - qglEnableClientState = NULL; - qglEnd = NULL; - qglEndList = NULL; - qglEvalCoord1d = NULL; - qglEvalCoord1dv = NULL; - qglEvalCoord1f = NULL; - qglEvalCoord1fv = NULL; - qglEvalCoord2d = NULL; - qglEvalCoord2dv = NULL; - qglEvalCoord2f = NULL; - qglEvalCoord2fv = NULL; - qglEvalMesh1 = NULL; - qglEvalMesh2 = NULL; - qglEvalPoint1 = NULL; - qglEvalPoint2 = NULL; - qglFeedbackBuffer = NULL; - qglFinish = NULL; - qglFlush = NULL; - qglFogf = NULL; - qglFogfv = NULL; - qglFogi = NULL; - qglFogiv = NULL; - qglFrontFace = NULL; - qglFrustum = NULL; - qglGenLists = NULL; - qglGenTextures = NULL; - qglGetBooleanv = NULL; - qglGetClipPlane = NULL; - qglGetDoublev = NULL; - qglGetError = NULL; - qglGetFloatv = NULL; - qglGetIntegerv = NULL; - qglGetLightfv = NULL; - qglGetLightiv = NULL; - qglGetMapdv = NULL; - qglGetMapfv = NULL; - qglGetMapiv = NULL; - qglGetMaterialfv = NULL; - qglGetMaterialiv = NULL; - qglGetPixelMapfv = NULL; - qglGetPixelMapuiv = NULL; - qglGetPixelMapusv = NULL; - qglGetPointerv = NULL; - qglGetPolygonStipple = NULL; - qglGetString = NULL; - qglGetTexEnvfv = NULL; - qglGetTexEnviv = NULL; - qglGetTexGendv = NULL; - qglGetTexGenfv = NULL; - qglGetTexGeniv = NULL; - qglGetTexImage = NULL; - qglGetTexLevelParameterfv = NULL; - qglGetTexLevelParameteriv = NULL; - qglGetTexParameterfv = NULL; - qglGetTexParameteriv = NULL; - qglHint = NULL; - qglIndexMask = NULL; - qglIndexPointer = NULL; - qglIndexd = NULL; - qglIndexdv = NULL; - qglIndexf = NULL; - qglIndexfv = NULL; - qglIndexi = NULL; - qglIndexiv = NULL; - qglIndexs = NULL; - qglIndexsv = NULL; - qglIndexub = NULL; - qglIndexubv = NULL; - qglInitNames = NULL; - qglInterleavedArrays = NULL; - qglIsEnabled = NULL; - qglIsList = NULL; - qglIsTexture = NULL; - qglLightModelf = NULL; - qglLightModelfv = NULL; - qglLightModeli = NULL; - qglLightModeliv = NULL; - qglLightf = NULL; - qglLightfv = NULL; - qglLighti = NULL; - qglLightiv = NULL; - qglLineStipple = NULL; - qglLineWidth = NULL; - qglListBase = NULL; - qglLoadIdentity = NULL; - qglLoadMatrixd = NULL; - qglLoadMatrixf = NULL; - qglLoadName = NULL; - qglLogicOp = NULL; - qglMap1d = NULL; - qglMap1f = NULL; - qglMap2d = NULL; - qglMap2f = NULL; - qglMapGrid1d = NULL; - qglMapGrid1f = NULL; - qglMapGrid2d = NULL; - qglMapGrid2f = NULL; - qglMaterialf = NULL; - qglMaterialfv = NULL; - qglMateriali = NULL; - qglMaterialiv = NULL; - qglMatrixMode = NULL; - qglMultMatrixd = NULL; - qglMultMatrixf = NULL; - qglNewList = NULL; - qglNormal3b = NULL; - qglNormal3bv = NULL; - qglNormal3d = NULL; - qglNormal3dv = NULL; - qglNormal3f = NULL; - qglNormal3fv = NULL; - qglNormal3i = NULL; - qglNormal3iv = NULL; - qglNormal3s = NULL; - qglNormal3sv = NULL; - qglNormalPointer = NULL; - qglOrtho = NULL; - qglPassThrough = NULL; - qglPixelMapfv = NULL; - qglPixelMapuiv = NULL; - qglPixelMapusv = NULL; - qglPixelStoref = NULL; - qglPixelStorei = NULL; - qglPixelTransferf = NULL; - qglPixelTransferi = NULL; - qglPixelZoom = NULL; - qglPointSize = NULL; - qglPolygonMode = NULL; - qglPolygonOffset = NULL; - qglPolygonStipple = NULL; - qglPopAttrib = NULL; - qglPopClientAttrib = NULL; - qglPopMatrix = NULL; - qglPopName = NULL; - qglPrioritizeTextures = NULL; - qglPushAttrib = NULL; - qglPushClientAttrib = NULL; - qglPushMatrix = NULL; - qglPushName = NULL; - qglRasterPos2d = NULL; - qglRasterPos2dv = NULL; - qglRasterPos2f = NULL; - qglRasterPos2fv = NULL; - qglRasterPos2i = NULL; - qglRasterPos2iv = NULL; - qglRasterPos2s = NULL; - qglRasterPos2sv = NULL; - qglRasterPos3d = NULL; - qglRasterPos3dv = NULL; - qglRasterPos3f = NULL; - qglRasterPos3fv = NULL; - qglRasterPos3i = NULL; - qglRasterPos3iv = NULL; - qglRasterPos3s = NULL; - qglRasterPos3sv = NULL; - qglRasterPos4d = NULL; - qglRasterPos4dv = NULL; - qglRasterPos4f = NULL; - qglRasterPos4fv = NULL; - qglRasterPos4i = NULL; - qglRasterPos4iv = NULL; - qglRasterPos4s = NULL; - qglRasterPos4sv = NULL; - qglReadBuffer = NULL; - qglReadPixels = NULL; - qglRectd = NULL; - qglRectdv = NULL; - qglRectf = NULL; - qglRectfv = NULL; - qglRecti = NULL; - qglRectiv = NULL; - qglRects = NULL; - qglRectsv = NULL; - qglRenderMode = NULL; - qglRotated = NULL; - qglRotatef = NULL; - qglScaled = NULL; - qglScalef = NULL; - qglScissor = NULL; - qglSelectBuffer = NULL; - qglShadeModel = NULL; - qglStencilFunc = NULL; - qglStencilMask = NULL; - qglStencilOp = NULL; - qglTexCoord1d = NULL; - qglTexCoord1dv = NULL; - qglTexCoord1f = NULL; - qglTexCoord1fv = NULL; - qglTexCoord1i = NULL; - qglTexCoord1iv = NULL; - qglTexCoord1s = NULL; - qglTexCoord1sv = NULL; - qglTexCoord2d = NULL; - qglTexCoord2dv = NULL; - qglTexCoord2f = NULL; - qglTexCoord2fv = NULL; - qglTexCoord2i = NULL; - qglTexCoord2iv = NULL; - qglTexCoord2s = NULL; - qglTexCoord2sv = NULL; - qglTexCoord3d = NULL; - qglTexCoord3dv = NULL; - qglTexCoord3f = NULL; - qglTexCoord3fv = NULL; - qglTexCoord3i = NULL; - qglTexCoord3iv = NULL; - qglTexCoord3s = NULL; - qglTexCoord3sv = NULL; - qglTexCoord4d = NULL; - qglTexCoord4dv = NULL; - qglTexCoord4f = NULL; - qglTexCoord4fv = NULL; - qglTexCoord4i = NULL; - qglTexCoord4iv = NULL; - qglTexCoord4s = NULL; - qglTexCoord4sv = NULL; - qglTexCoordPointer = NULL; - qglTexEnvf = NULL; - qglTexEnvfv = NULL; - qglTexEnvi = NULL; - qglTexEnviv = NULL; - qglTexGend = NULL; - qglTexGendv = NULL; - qglTexGenf = NULL; - qglTexGenfv = NULL; - qglTexGeni = NULL; - qglTexGeniv = NULL; - qglTexImage1D = NULL; - qglTexImage2D = NULL; - qglTexParameterf = NULL; - qglTexParameterfv = NULL; - qglTexParameteri = NULL; - qglTexParameteriv = NULL; - qglTexSubImage1D = NULL; - qglTexSubImage2D = NULL; - qglTranslated = NULL; - qglTranslatef = NULL; - qglVertex2d = NULL; - qglVertex2dv = NULL; - qglVertex2f = NULL; - qglVertex2fv = NULL; - qglVertex2i = NULL; - qglVertex2iv = NULL; - qglVertex2s = NULL; - qglVertex2sv = NULL; - qglVertex3d = NULL; - qglVertex3dv = NULL; - qglVertex3f = NULL; - qglVertex3fv = NULL; - qglVertex3i = NULL; - qglVertex3iv = NULL; - qglVertex3s = NULL; - qglVertex3sv = NULL; - qglVertex4d = NULL; - qglVertex4dv = NULL; - qglVertex4f = NULL; - qglVertex4fv = NULL; - qglVertex4i = NULL; - qglVertex4iv = NULL; - qglVertex4s = NULL; - qglVertex4sv = NULL; - qglVertexPointer = NULL; - qglViewport = NULL; - -// bk001129 - from cvs1.17 (mkv) -#if defined(__FX__) - qfxMesaCreateContext = NULL; - qfxMesaCreateBestContext = NULL; - qfxMesaDestroyContext = NULL; - qfxMesaMakeCurrent = NULL; - qfxMesaGetCurrentContext = NULL; - qfxMesaSwapBuffers = NULL; -#endif - -#if !defined(USE_SDL_VIDEO) - qglXChooseVisual = NULL; - qglXCreateContext = NULL; - qglXDestroyContext = NULL; - qglXMakeCurrent = NULL; - qglXCopyContext = NULL; - qglXSwapBuffers = NULL; -#endif -} - -#if USE_SDL_VIDEO -#define GPA( a ) SDL_GL_GetProcAddress( a ) -qboolean GLimp_sdl_init_video(void); -#else -#define GPA( a ) dlsym( glw_state.OpenGLLib, a ) -#endif - -void *qwglGetProcAddress(char *symbol) -{ - if (glw_state.OpenGLLib) - return GPA ( symbol ); - return NULL; -} - -char *do_dlerror(void); - -/* -** QGL_Init -** -** This is responsible for binding our qgl function pointers to -** the appropriate GL stuff. In Windows this means doing a -** LoadLibrary and a bunch of calls to GetProcAddress. On other -** operating systems we need to do the right thing, whatever that -** might be. -** -*/ - -qboolean QGL_Init( const char *dllname ) -{ - if (glw_state.OpenGLLib == 0) - { - #if USE_SDL_VIDEO - if (GLimp_sdl_init_video() == qfalse) - return qfalse; - glw_state.OpenGLLib = (void*)(long)((SDL_GL_LoadLibrary(dllname) == -1) ? 0 : 1); - #else - glw_state.OpenGLLib = dlopen( dllname, RTLD_LAZY|RTLD_GLOBAL ); - #endif - } - - if (glw_state.OpenGLLib == 0) - { - char fn[1024]; - // FILE *fp; // bk001204 - unused - - // if we are not setuid, try current directory - if (dllname != NULL) { - getcwd(fn, sizeof(fn)); - Q_strcat(fn, sizeof(fn), "/"); - Q_strcat(fn, sizeof(fn), dllname); - - #if USE_SDL_VIDEO - glw_state.OpenGLLib = (void*)(long)((SDL_GL_LoadLibrary(fn) == -1) ? 0 : 1); - #else - glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ); - #endif - if ( glw_state.OpenGLLib == 0 ) { - ri.Printf(PRINT_ALL, "QGL_Init: Can't load %s from /etc/ld.so.conf or current dir: %s\n", dllname, do_dlerror()); - return qfalse; - } - } else { - ri.Printf(PRINT_ALL, "QGL_Init: Can't load %s from /etc/ld.so.conf: %s\n", dllname, do_dlerror()); - return qfalse; - } - } - - qglAccum = dllAccum = GPA( "glAccum" ); - qglAlphaFunc = dllAlphaFunc = GPA( "glAlphaFunc" ); - qglAreTexturesResident = dllAreTexturesResident = GPA( "glAreTexturesResident" ); - qglArrayElement = dllArrayElement = GPA( "glArrayElement" ); - qglBegin = dllBegin = GPA( "glBegin" ); - qglBindTexture = dllBindTexture = GPA( "glBindTexture" ); - qglBitmap = dllBitmap = GPA( "glBitmap" ); - qglBlendFunc = dllBlendFunc = GPA( "glBlendFunc" ); - qglCallList = dllCallList = GPA( "glCallList" ); - qglCallLists = dllCallLists = GPA( "glCallLists" ); - qglClear = dllClear = GPA( "glClear" ); - qglClearAccum = dllClearAccum = GPA( "glClearAccum" ); - qglClearColor = dllClearColor = GPA( "glClearColor" ); - qglClearDepth = dllClearDepth = GPA( "glClearDepth" ); - qglClearIndex = dllClearIndex = GPA( "glClearIndex" ); - qglClearStencil = dllClearStencil = GPA( "glClearStencil" ); - qglClipPlane = dllClipPlane = GPA( "glClipPlane" ); - qglColor3b = dllColor3b = GPA( "glColor3b" ); - qglColor3bv = dllColor3bv = GPA( "glColor3bv" ); - qglColor3d = dllColor3d = GPA( "glColor3d" ); - qglColor3dv = dllColor3dv = GPA( "glColor3dv" ); - qglColor3f = dllColor3f = GPA( "glColor3f" ); - qglColor3fv = dllColor3fv = GPA( "glColor3fv" ); - qglColor3i = dllColor3i = GPA( "glColor3i" ); - qglColor3iv = dllColor3iv = GPA( "glColor3iv" ); - qglColor3s = dllColor3s = GPA( "glColor3s" ); - qglColor3sv = dllColor3sv = GPA( "glColor3sv" ); - qglColor3ub = dllColor3ub = GPA( "glColor3ub" ); - qglColor3ubv = dllColor3ubv = GPA( "glColor3ubv" ); - qglColor3ui = dllColor3ui = GPA( "glColor3ui" ); - qglColor3uiv = dllColor3uiv = GPA( "glColor3uiv" ); - qglColor3us = dllColor3us = GPA( "glColor3us" ); - qglColor3usv = dllColor3usv = GPA( "glColor3usv" ); - qglColor4b = dllColor4b = GPA( "glColor4b" ); - qglColor4bv = dllColor4bv = GPA( "glColor4bv" ); - qglColor4d = dllColor4d = GPA( "glColor4d" ); - qglColor4dv = dllColor4dv = GPA( "glColor4dv" ); - qglColor4f = dllColor4f = GPA( "glColor4f" ); - qglColor4fv = dllColor4fv = GPA( "glColor4fv" ); - qglColor4i = dllColor4i = GPA( "glColor4i" ); - qglColor4iv = dllColor4iv = GPA( "glColor4iv" ); - qglColor4s = dllColor4s = GPA( "glColor4s" ); - qglColor4sv = dllColor4sv = GPA( "glColor4sv" ); - qglColor4ub = dllColor4ub = GPA( "glColor4ub" ); - qglColor4ubv = dllColor4ubv = GPA( "glColor4ubv" ); - qglColor4ui = dllColor4ui = GPA( "glColor4ui" ); - qglColor4uiv = dllColor4uiv = GPA( "glColor4uiv" ); - qglColor4us = dllColor4us = GPA( "glColor4us" ); - qglColor4usv = dllColor4usv = GPA( "glColor4usv" ); - qglColorMask = dllColorMask = GPA( "glColorMask" ); - qglColorMaterial = dllColorMaterial = GPA( "glColorMaterial" ); - qglColorPointer = dllColorPointer = GPA( "glColorPointer" ); - qglCopyPixels = dllCopyPixels = GPA( "glCopyPixels" ); - qglCopyTexImage1D = dllCopyTexImage1D = GPA( "glCopyTexImage1D" ); - qglCopyTexImage2D = dllCopyTexImage2D = GPA( "glCopyTexImage2D" ); - qglCopyTexSubImage1D = dllCopyTexSubImage1D = GPA( "glCopyTexSubImage1D" ); - qglCopyTexSubImage2D = dllCopyTexSubImage2D = GPA( "glCopyTexSubImage2D" ); - qglCullFace = dllCullFace = GPA( "glCullFace" ); - qglDeleteLists = dllDeleteLists = GPA( "glDeleteLists" ); - qglDeleteTextures = dllDeleteTextures = GPA( "glDeleteTextures" ); - qglDepthFunc = dllDepthFunc = GPA( "glDepthFunc" ); - qglDepthMask = dllDepthMask = GPA( "glDepthMask" ); - qglDepthRange = dllDepthRange = GPA( "glDepthRange" ); - qglDisable = dllDisable = GPA( "glDisable" ); - qglDisableClientState = dllDisableClientState = GPA( "glDisableClientState" ); - qglDrawArrays = dllDrawArrays = GPA( "glDrawArrays" ); - qglDrawBuffer = dllDrawBuffer = GPA( "glDrawBuffer" ); - qglDrawElements = dllDrawElements = GPA( "glDrawElements" ); - qglDrawPixels = dllDrawPixels = GPA( "glDrawPixels" ); - qglEdgeFlag = dllEdgeFlag = GPA( "glEdgeFlag" ); - qglEdgeFlagPointer = dllEdgeFlagPointer = GPA( "glEdgeFlagPointer" ); - qglEdgeFlagv = dllEdgeFlagv = GPA( "glEdgeFlagv" ); - qglEnable = dllEnable = GPA( "glEnable" ); - qglEnableClientState = dllEnableClientState = GPA( "glEnableClientState" ); - qglEnd = dllEnd = GPA( "glEnd" ); - qglEndList = dllEndList = GPA( "glEndList" ); - qglEvalCoord1d = dllEvalCoord1d = GPA( "glEvalCoord1d" ); - qglEvalCoord1dv = dllEvalCoord1dv = GPA( "glEvalCoord1dv" ); - qglEvalCoord1f = dllEvalCoord1f = GPA( "glEvalCoord1f" ); - qglEvalCoord1fv = dllEvalCoord1fv = GPA( "glEvalCoord1fv" ); - qglEvalCoord2d = dllEvalCoord2d = GPA( "glEvalCoord2d" ); - qglEvalCoord2dv = dllEvalCoord2dv = GPA( "glEvalCoord2dv" ); - qglEvalCoord2f = dllEvalCoord2f = GPA( "glEvalCoord2f" ); - qglEvalCoord2fv = dllEvalCoord2fv = GPA( "glEvalCoord2fv" ); - qglEvalMesh1 = dllEvalMesh1 = GPA( "glEvalMesh1" ); - qglEvalMesh2 = dllEvalMesh2 = GPA( "glEvalMesh2" ); - qglEvalPoint1 = dllEvalPoint1 = GPA( "glEvalPoint1" ); - qglEvalPoint2 = dllEvalPoint2 = GPA( "glEvalPoint2" ); - qglFeedbackBuffer = dllFeedbackBuffer = GPA( "glFeedbackBuffer" ); - qglFinish = dllFinish = GPA( "glFinish" ); - qglFlush = dllFlush = GPA( "glFlush" ); - qglFogf = dllFogf = GPA( "glFogf" ); - qglFogfv = dllFogfv = GPA( "glFogfv" ); - qglFogi = dllFogi = GPA( "glFogi" ); - qglFogiv = dllFogiv = GPA( "glFogiv" ); - qglFrontFace = dllFrontFace = GPA( "glFrontFace" ); - qglFrustum = dllFrustum = GPA( "glFrustum" ); - qglGenLists = dllGenLists = GPA( "glGenLists" ); - qglGenTextures = dllGenTextures = GPA( "glGenTextures" ); - qglGetBooleanv = dllGetBooleanv = GPA( "glGetBooleanv" ); - qglGetClipPlane = dllGetClipPlane = GPA( "glGetClipPlane" ); - qglGetDoublev = dllGetDoublev = GPA( "glGetDoublev" ); - qglGetError = dllGetError = GPA( "glGetError" ); - qglGetFloatv = dllGetFloatv = GPA( "glGetFloatv" ); - qglGetIntegerv = dllGetIntegerv = GPA( "glGetIntegerv" ); - qglGetLightfv = dllGetLightfv = GPA( "glGetLightfv" ); - qglGetLightiv = dllGetLightiv = GPA( "glGetLightiv" ); - qglGetMapdv = dllGetMapdv = GPA( "glGetMapdv" ); - qglGetMapfv = dllGetMapfv = GPA( "glGetMapfv" ); - qglGetMapiv = dllGetMapiv = GPA( "glGetMapiv" ); - qglGetMaterialfv = dllGetMaterialfv = GPA( "glGetMaterialfv" ); - qglGetMaterialiv = dllGetMaterialiv = GPA( "glGetMaterialiv" ); - qglGetPixelMapfv = dllGetPixelMapfv = GPA( "glGetPixelMapfv" ); - qglGetPixelMapuiv = dllGetPixelMapuiv = GPA( "glGetPixelMapuiv" ); - qglGetPixelMapusv = dllGetPixelMapusv = GPA( "glGetPixelMapusv" ); - qglGetPointerv = dllGetPointerv = GPA( "glGetPointerv" ); - qglGetPolygonStipple = dllGetPolygonStipple = GPA( "glGetPolygonStipple" ); - qglGetString = dllGetString = GPA( "glGetString" ); - qglGetTexEnvfv = dllGetTexEnvfv = GPA( "glGetTexEnvfv" ); - qglGetTexEnviv = dllGetTexEnviv = GPA( "glGetTexEnviv" ); - qglGetTexGendv = dllGetTexGendv = GPA( "glGetTexGendv" ); - qglGetTexGenfv = dllGetTexGenfv = GPA( "glGetTexGenfv" ); - qglGetTexGeniv = dllGetTexGeniv = GPA( "glGetTexGeniv" ); - qglGetTexImage = dllGetTexImage = GPA( "glGetTexImage" ); - qglGetTexParameterfv = dllGetTexParameterfv = GPA( "glGetTexParameterfv" ); - qglGetTexParameteriv = dllGetTexParameteriv = GPA( "glGetTexParameteriv" ); - qglHint = dllHint = GPA( "glHint" ); - qglIndexMask = dllIndexMask = GPA( "glIndexMask" ); - qglIndexPointer = dllIndexPointer = GPA( "glIndexPointer" ); - qglIndexd = dllIndexd = GPA( "glIndexd" ); - qglIndexdv = dllIndexdv = GPA( "glIndexdv" ); - qglIndexf = dllIndexf = GPA( "glIndexf" ); - qglIndexfv = dllIndexfv = GPA( "glIndexfv" ); - qglIndexi = dllIndexi = GPA( "glIndexi" ); - qglIndexiv = dllIndexiv = GPA( "glIndexiv" ); - qglIndexs = dllIndexs = GPA( "glIndexs" ); - qglIndexsv = dllIndexsv = GPA( "glIndexsv" ); - qglIndexub = dllIndexub = GPA( "glIndexub" ); - qglIndexubv = dllIndexubv = GPA( "glIndexubv" ); - qglInitNames = dllInitNames = GPA( "glInitNames" ); - qglInterleavedArrays = dllInterleavedArrays = GPA( "glInterleavedArrays" ); - qglIsEnabled = dllIsEnabled = GPA( "glIsEnabled" ); - qglIsList = dllIsList = GPA( "glIsList" ); - qglIsTexture = dllIsTexture = GPA( "glIsTexture" ); - qglLightModelf = dllLightModelf = GPA( "glLightModelf" ); - qglLightModelfv = dllLightModelfv = GPA( "glLightModelfv" ); - qglLightModeli = dllLightModeli = GPA( "glLightModeli" ); - qglLightModeliv = dllLightModeliv = GPA( "glLightModeliv" ); - qglLightf = dllLightf = GPA( "glLightf" ); - qglLightfv = dllLightfv = GPA( "glLightfv" ); - qglLighti = dllLighti = GPA( "glLighti" ); - qglLightiv = dllLightiv = GPA( "glLightiv" ); - qglLineStipple = dllLineStipple = GPA( "glLineStipple" ); - qglLineWidth = dllLineWidth = GPA( "glLineWidth" ); - qglListBase = dllListBase = GPA( "glListBase" ); - qglLoadIdentity = dllLoadIdentity = GPA( "glLoadIdentity" ); - qglLoadMatrixd = dllLoadMatrixd = GPA( "glLoadMatrixd" ); - qglLoadMatrixf = dllLoadMatrixf = GPA( "glLoadMatrixf" ); - qglLoadName = dllLoadName = GPA( "glLoadName" ); - qglLogicOp = dllLogicOp = GPA( "glLogicOp" ); - qglMap1d = dllMap1d = GPA( "glMap1d" ); - qglMap1f = dllMap1f = GPA( "glMap1f" ); - qglMap2d = dllMap2d = GPA( "glMap2d" ); - qglMap2f = dllMap2f = GPA( "glMap2f" ); - qglMapGrid1d = dllMapGrid1d = GPA( "glMapGrid1d" ); - qglMapGrid1f = dllMapGrid1f = GPA( "glMapGrid1f" ); - qglMapGrid2d = dllMapGrid2d = GPA( "glMapGrid2d" ); - qglMapGrid2f = dllMapGrid2f = GPA( "glMapGrid2f" ); - qglMaterialf = dllMaterialf = GPA( "glMaterialf" ); - qglMaterialfv = dllMaterialfv = GPA( "glMaterialfv" ); - qglMateriali = dllMateriali = GPA( "glMateriali" ); - qglMaterialiv = dllMaterialiv = GPA( "glMaterialiv" ); - qglMatrixMode = dllMatrixMode = GPA( "glMatrixMode" ); - qglMultMatrixd = dllMultMatrixd = GPA( "glMultMatrixd" ); - qglMultMatrixf = dllMultMatrixf = GPA( "glMultMatrixf" ); - qglNewList = dllNewList = GPA( "glNewList" ); - qglNormal3b = dllNormal3b = GPA( "glNormal3b" ); - qglNormal3bv = dllNormal3bv = GPA( "glNormal3bv" ); - qglNormal3d = dllNormal3d = GPA( "glNormal3d" ); - qglNormal3dv = dllNormal3dv = GPA( "glNormal3dv" ); - qglNormal3f = dllNormal3f = GPA( "glNormal3f" ); - qglNormal3fv = dllNormal3fv = GPA( "glNormal3fv" ); - qglNormal3i = dllNormal3i = GPA( "glNormal3i" ); - qglNormal3iv = dllNormal3iv = GPA( "glNormal3iv" ); - qglNormal3s = dllNormal3s = GPA( "glNormal3s" ); - qglNormal3sv = dllNormal3sv = GPA( "glNormal3sv" ); - qglNormalPointer = dllNormalPointer = GPA( "glNormalPointer" ); - qglOrtho = dllOrtho = GPA( "glOrtho" ); - qglPassThrough = dllPassThrough = GPA( "glPassThrough" ); - qglPixelMapfv = dllPixelMapfv = GPA( "glPixelMapfv" ); - qglPixelMapuiv = dllPixelMapuiv = GPA( "glPixelMapuiv" ); - qglPixelMapusv = dllPixelMapusv = GPA( "glPixelMapusv" ); - qglPixelStoref = dllPixelStoref = GPA( "glPixelStoref" ); - qglPixelStorei = dllPixelStorei = GPA( "glPixelStorei" ); - qglPixelTransferf = dllPixelTransferf = GPA( "glPixelTransferf" ); - qglPixelTransferi = dllPixelTransferi = GPA( "glPixelTransferi" ); - qglPixelZoom = dllPixelZoom = GPA( "glPixelZoom" ); - qglPointSize = dllPointSize = GPA( "glPointSize" ); - qglPolygonMode = dllPolygonMode = GPA( "glPolygonMode" ); - qglPolygonOffset = dllPolygonOffset = GPA( "glPolygonOffset" ); - qglPolygonStipple = dllPolygonStipple = GPA( "glPolygonStipple" ); - qglPopAttrib = dllPopAttrib = GPA( "glPopAttrib" ); - qglPopClientAttrib = dllPopClientAttrib = GPA( "glPopClientAttrib" ); - qglPopMatrix = dllPopMatrix = GPA( "glPopMatrix" ); - qglPopName = dllPopName = GPA( "glPopName" ); - qglPrioritizeTextures = dllPrioritizeTextures = GPA( "glPrioritizeTextures" ); - qglPushAttrib = dllPushAttrib = GPA( "glPushAttrib" ); - qglPushClientAttrib = dllPushClientAttrib = GPA( "glPushClientAttrib" ); - qglPushMatrix = dllPushMatrix = GPA( "glPushMatrix" ); - qglPushName = dllPushName = GPA( "glPushName" ); - qglRasterPos2d = dllRasterPos2d = GPA( "glRasterPos2d" ); - qglRasterPos2dv = dllRasterPos2dv = GPA( "glRasterPos2dv" ); - qglRasterPos2f = dllRasterPos2f = GPA( "glRasterPos2f" ); - qglRasterPos2fv = dllRasterPos2fv = GPA( "glRasterPos2fv" ); - qglRasterPos2i = dllRasterPos2i = GPA( "glRasterPos2i" ); - qglRasterPos2iv = dllRasterPos2iv = GPA( "glRasterPos2iv" ); - qglRasterPos2s = dllRasterPos2s = GPA( "glRasterPos2s" ); - qglRasterPos2sv = dllRasterPos2sv = GPA( "glRasterPos2sv" ); - qglRasterPos3d = dllRasterPos3d = GPA( "glRasterPos3d" ); - qglRasterPos3dv = dllRasterPos3dv = GPA( "glRasterPos3dv" ); - qglRasterPos3f = dllRasterPos3f = GPA( "glRasterPos3f" ); - qglRasterPos3fv = dllRasterPos3fv = GPA( "glRasterPos3fv" ); - qglRasterPos3i = dllRasterPos3i = GPA( "glRasterPos3i" ); - qglRasterPos3iv = dllRasterPos3iv = GPA( "glRasterPos3iv" ); - qglRasterPos3s = dllRasterPos3s = GPA( "glRasterPos3s" ); - qglRasterPos3sv = dllRasterPos3sv = GPA( "glRasterPos3sv" ); - qglRasterPos4d = dllRasterPos4d = GPA( "glRasterPos4d" ); - qglRasterPos4dv = dllRasterPos4dv = GPA( "glRasterPos4dv" ); - qglRasterPos4f = dllRasterPos4f = GPA( "glRasterPos4f" ); - qglRasterPos4fv = dllRasterPos4fv = GPA( "glRasterPos4fv" ); - qglRasterPos4i = dllRasterPos4i = GPA( "glRasterPos4i" ); - qglRasterPos4iv = dllRasterPos4iv = GPA( "glRasterPos4iv" ); - qglRasterPos4s = dllRasterPos4s = GPA( "glRasterPos4s" ); - qglRasterPos4sv = dllRasterPos4sv = GPA( "glRasterPos4sv" ); - qglReadBuffer = dllReadBuffer = GPA( "glReadBuffer" ); - qglReadPixels = dllReadPixels = GPA( "glReadPixels" ); - qglRectd = dllRectd = GPA( "glRectd" ); - qglRectdv = dllRectdv = GPA( "glRectdv" ); - qglRectf = dllRectf = GPA( "glRectf" ); - qglRectfv = dllRectfv = GPA( "glRectfv" ); - qglRecti = dllRecti = GPA( "glRecti" ); - qglRectiv = dllRectiv = GPA( "glRectiv" ); - qglRects = dllRects = GPA( "glRects" ); - qglRectsv = dllRectsv = GPA( "glRectsv" ); - qglRenderMode = dllRenderMode = GPA( "glRenderMode" ); - qglRotated = dllRotated = GPA( "glRotated" ); - qglRotatef = dllRotatef = GPA( "glRotatef" ); - qglScaled = dllScaled = GPA( "glScaled" ); - qglScalef = dllScalef = GPA( "glScalef" ); - qglScissor = dllScissor = GPA( "glScissor" ); - qglSelectBuffer = dllSelectBuffer = GPA( "glSelectBuffer" ); - qglShadeModel = dllShadeModel = GPA( "glShadeModel" ); - qglStencilFunc = dllStencilFunc = GPA( "glStencilFunc" ); - qglStencilMask = dllStencilMask = GPA( "glStencilMask" ); - qglStencilOp = dllStencilOp = GPA( "glStencilOp" ); - qglTexCoord1d = dllTexCoord1d = GPA( "glTexCoord1d" ); - qglTexCoord1dv = dllTexCoord1dv = GPA( "glTexCoord1dv" ); - qglTexCoord1f = dllTexCoord1f = GPA( "glTexCoord1f" ); - qglTexCoord1fv = dllTexCoord1fv = GPA( "glTexCoord1fv" ); - qglTexCoord1i = dllTexCoord1i = GPA( "glTexCoord1i" ); - qglTexCoord1iv = dllTexCoord1iv = GPA( "glTexCoord1iv" ); - qglTexCoord1s = dllTexCoord1s = GPA( "glTexCoord1s" ); - qglTexCoord1sv = dllTexCoord1sv = GPA( "glTexCoord1sv" ); - qglTexCoord2d = dllTexCoord2d = GPA( "glTexCoord2d" ); - qglTexCoord2dv = dllTexCoord2dv = GPA( "glTexCoord2dv" ); - qglTexCoord2f = dllTexCoord2f = GPA( "glTexCoord2f" ); - qglTexCoord2fv = dllTexCoord2fv = GPA( "glTexCoord2fv" ); - qglTexCoord2i = dllTexCoord2i = GPA( "glTexCoord2i" ); - qglTexCoord2iv = dllTexCoord2iv = GPA( "glTexCoord2iv" ); - qglTexCoord2s = dllTexCoord2s = GPA( "glTexCoord2s" ); - qglTexCoord2sv = dllTexCoord2sv = GPA( "glTexCoord2sv" ); - qglTexCoord3d = dllTexCoord3d = GPA( "glTexCoord3d" ); - qglTexCoord3dv = dllTexCoord3dv = GPA( "glTexCoord3dv" ); - qglTexCoord3f = dllTexCoord3f = GPA( "glTexCoord3f" ); - qglTexCoord3fv = dllTexCoord3fv = GPA( "glTexCoord3fv" ); - qglTexCoord3i = dllTexCoord3i = GPA( "glTexCoord3i" ); - qglTexCoord3iv = dllTexCoord3iv = GPA( "glTexCoord3iv" ); - qglTexCoord3s = dllTexCoord3s = GPA( "glTexCoord3s" ); - qglTexCoord3sv = dllTexCoord3sv = GPA( "glTexCoord3sv" ); - qglTexCoord4d = dllTexCoord4d = GPA( "glTexCoord4d" ); - qglTexCoord4dv = dllTexCoord4dv = GPA( "glTexCoord4dv" ); - qglTexCoord4f = dllTexCoord4f = GPA( "glTexCoord4f" ); - qglTexCoord4fv = dllTexCoord4fv = GPA( "glTexCoord4fv" ); - qglTexCoord4i = dllTexCoord4i = GPA( "glTexCoord4i" ); - qglTexCoord4iv = dllTexCoord4iv = GPA( "glTexCoord4iv" ); - qglTexCoord4s = dllTexCoord4s = GPA( "glTexCoord4s" ); - qglTexCoord4sv = dllTexCoord4sv = GPA( "glTexCoord4sv" ); - qglTexCoordPointer = dllTexCoordPointer = GPA( "glTexCoordPointer" ); - qglTexEnvf = dllTexEnvf = GPA( "glTexEnvf" ); - qglTexEnvfv = dllTexEnvfv = GPA( "glTexEnvfv" ); - qglTexEnvi = dllTexEnvi = GPA( "glTexEnvi" ); - qglTexEnviv = dllTexEnviv = GPA( "glTexEnviv" ); - qglTexGend = dllTexGend = GPA( "glTexGend" ); - qglTexGendv = dllTexGendv = GPA( "glTexGendv" ); - qglTexGenf = dllTexGenf = GPA( "glTexGenf" ); - qglTexGenfv = dllTexGenfv = GPA( "glTexGenfv" ); - qglTexGeni = dllTexGeni = GPA( "glTexGeni" ); - qglTexGeniv = dllTexGeniv = GPA( "glTexGeniv" ); - qglTexImage1D = dllTexImage1D = GPA( "glTexImage1D" ); - qglTexImage2D = dllTexImage2D = GPA( "glTexImage2D" ); - qglTexParameterf = dllTexParameterf = GPA( "glTexParameterf" ); - qglTexParameterfv = dllTexParameterfv = GPA( "glTexParameterfv" ); - qglTexParameteri = dllTexParameteri = GPA( "glTexParameteri" ); - qglTexParameteriv = dllTexParameteriv = GPA( "glTexParameteriv" ); - qglTexSubImage1D = dllTexSubImage1D = GPA( "glTexSubImage1D" ); - qglTexSubImage2D = dllTexSubImage2D = GPA( "glTexSubImage2D" ); - qglTranslated = dllTranslated = GPA( "glTranslated" ); - qglTranslatef = dllTranslatef = GPA( "glTranslatef" ); - qglVertex2d = dllVertex2d = GPA( "glVertex2d" ); - qglVertex2dv = dllVertex2dv = GPA( "glVertex2dv" ); - qglVertex2f = dllVertex2f = GPA( "glVertex2f" ); - qglVertex2fv = dllVertex2fv = GPA( "glVertex2fv" ); - qglVertex2i = dllVertex2i = GPA( "glVertex2i" ); - qglVertex2iv = dllVertex2iv = GPA( "glVertex2iv" ); - qglVertex2s = dllVertex2s = GPA( "glVertex2s" ); - qglVertex2sv = dllVertex2sv = GPA( "glVertex2sv" ); - qglVertex3d = dllVertex3d = GPA( "glVertex3d" ); - qglVertex3dv = dllVertex3dv = GPA( "glVertex3dv" ); - qglVertex3f = dllVertex3f = GPA( "glVertex3f" ); - qglVertex3fv = dllVertex3fv = GPA( "glVertex3fv" ); - qglVertex3i = dllVertex3i = GPA( "glVertex3i" ); - qglVertex3iv = dllVertex3iv = GPA( "glVertex3iv" ); - qglVertex3s = dllVertex3s = GPA( "glVertex3s" ); - qglVertex3sv = dllVertex3sv = GPA( "glVertex3sv" ); - qglVertex4d = dllVertex4d = GPA( "glVertex4d" ); - qglVertex4dv = dllVertex4dv = GPA( "glVertex4dv" ); - qglVertex4f = dllVertex4f = GPA( "glVertex4f" ); - qglVertex4fv = dllVertex4fv = GPA( "glVertex4fv" ); - qglVertex4i = dllVertex4i = GPA( "glVertex4i" ); - qglVertex4iv = dllVertex4iv = GPA( "glVertex4iv" ); - qglVertex4s = dllVertex4s = GPA( "glVertex4s" ); - qglVertex4sv = dllVertex4sv = GPA( "glVertex4sv" ); - qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" ); - qglViewport = dllViewport = GPA( "glViewport" ); - -// bk001129 - from cvs1.17 (mkv) -#if defined(__FX__) - qfxMesaCreateContext = GPA("fxMesaCreateContext"); - qfxMesaCreateBestContext = GPA("fxMesaCreateBestContext"); - qfxMesaDestroyContext = GPA("fxMesaDestroyContext"); - qfxMesaMakeCurrent = GPA("fxMesaMakeCurrent"); - qfxMesaGetCurrentContext = GPA("fxMesaGetCurrentContext"); - qfxMesaSwapBuffers = GPA("fxMesaSwapBuffers"); -#endif - -#if !defined(USE_SDL_VIDEO) - qglXChooseVisual = GPA("glXChooseVisual"); - qglXCreateContext = GPA("glXCreateContext"); - qglXDestroyContext = GPA("glXDestroyContext"); - qglXMakeCurrent = GPA("glXMakeCurrent"); - qglXCopyContext = GPA("glXCopyContext"); - qglXSwapBuffers = GPA("glXSwapBuffers"); -#endif - - qglLockArraysEXT = NULL; - qglUnlockArraysEXT = NULL; - qglPointParameterfEXT = NULL; - qglPointParameterfvEXT = NULL; - qglColorTableEXT = NULL; - qgl3DfxSetPaletteEXT = NULL; - qglSelectTextureSGIS = NULL; - qglMTexCoord2fSGIS = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - qglMultiTexCoord2fARB = NULL; - - return qtrue; -} - -void QGL_EnableLogging( qboolean enable ) { - // bk001205 - fixed for new countdown - static qboolean isEnabled = qfalse; // init - - // return if we're already active - if ( isEnabled && enable ) { - // decrement log counter and stop if it has reached 0 - ri.Cvar_Set( "r_logFile", va("%d", r_logFile->integer - 1 ) ); - if ( r_logFile->integer ) { - return; - } - enable = qfalse; - } - - // return if we're already disabled - if ( !enable && !isEnabled ) - return; - - isEnabled = enable; - - // bk001205 - old code starts here - if ( enable ) { - if ( !glw_state.log_fp ) { - struct tm *newtime; - time_t aclock; - char buffer[1024]; - cvar_t *basedir; - - time( &aclock ); - newtime = localtime( &aclock ); - - asctime( newtime ); - - basedir = ri.Cvar_Get( "fs_basepath", "", 0 ); // FIXME: userdir? - assert(basedir); - Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", basedir->string ); - glw_state.log_fp = fopen( buffer, "wt" ); - assert(glw_state.log_fp); - ri.Printf(PRINT_ALL, "QGL_EnableLogging(%d): writing %s\n", r_logFile->integer, buffer ); - - fprintf( glw_state.log_fp, "%s\n", asctime( newtime ) ); - } - - qglAccum = logAccum; - qglAlphaFunc = logAlphaFunc; - qglAreTexturesResident = logAreTexturesResident; - qglArrayElement = logArrayElement; - qglBegin = logBegin; - qglBindTexture = logBindTexture; - qglBitmap = logBitmap; - qglBlendFunc = logBlendFunc; - qglCallList = logCallList; - qglCallLists = logCallLists; - qglClear = logClear; - qglClearAccum = logClearAccum; - qglClearColor = logClearColor; - qglClearDepth = logClearDepth; - qglClearIndex = logClearIndex; - qglClearStencil = logClearStencil; - qglClipPlane = logClipPlane; - qglColor3b = logColor3b; - qglColor3bv = logColor3bv; - qglColor3d = logColor3d; - qglColor3dv = logColor3dv; - qglColor3f = logColor3f; - qglColor3fv = logColor3fv; - qglColor3i = logColor3i; - qglColor3iv = logColor3iv; - qglColor3s = logColor3s; - qglColor3sv = logColor3sv; - qglColor3ub = logColor3ub; - qglColor3ubv = logColor3ubv; - qglColor3ui = logColor3ui; - qglColor3uiv = logColor3uiv; - qglColor3us = logColor3us; - qglColor3usv = logColor3usv; - qglColor4b = logColor4b; - qglColor4bv = logColor4bv; - qglColor4d = logColor4d; - qglColor4dv = logColor4dv; - qglColor4f = logColor4f; - qglColor4fv = logColor4fv; - qglColor4i = logColor4i; - qglColor4iv = logColor4iv; - qglColor4s = logColor4s; - qglColor4sv = logColor4sv; - qglColor4ub = logColor4ub; - qglColor4ubv = logColor4ubv; - qglColor4ui = logColor4ui; - qglColor4uiv = logColor4uiv; - qglColor4us = logColor4us; - qglColor4usv = logColor4usv; - qglColorMask = logColorMask; - qglColorMaterial = logColorMaterial; - qglColorPointer = logColorPointer; - qglCopyPixels = logCopyPixels; - qglCopyTexImage1D = logCopyTexImage1D; - qglCopyTexImage2D = logCopyTexImage2D; - qglCopyTexSubImage1D = logCopyTexSubImage1D; - qglCopyTexSubImage2D = logCopyTexSubImage2D; - qglCullFace = logCullFace; - qglDeleteLists = logDeleteLists ; - qglDeleteTextures = logDeleteTextures ; - qglDepthFunc = logDepthFunc ; - qglDepthMask = logDepthMask ; - qglDepthRange = logDepthRange ; - qglDisable = logDisable ; - qglDisableClientState = logDisableClientState ; - qglDrawArrays = logDrawArrays ; - qglDrawBuffer = logDrawBuffer ; - qglDrawElements = logDrawElements ; - qglDrawPixels = logDrawPixels ; - qglEdgeFlag = logEdgeFlag ; - qglEdgeFlagPointer = logEdgeFlagPointer ; - qglEdgeFlagv = logEdgeFlagv ; - qglEnable = logEnable ; - qglEnableClientState = logEnableClientState ; - qglEnd = logEnd ; - qglEndList = logEndList ; - qglEvalCoord1d = logEvalCoord1d ; - qglEvalCoord1dv = logEvalCoord1dv ; - qglEvalCoord1f = logEvalCoord1f ; - qglEvalCoord1fv = logEvalCoord1fv ; - qglEvalCoord2d = logEvalCoord2d ; - qglEvalCoord2dv = logEvalCoord2dv ; - qglEvalCoord2f = logEvalCoord2f ; - qglEvalCoord2fv = logEvalCoord2fv ; - qglEvalMesh1 = logEvalMesh1 ; - qglEvalMesh2 = logEvalMesh2 ; - qglEvalPoint1 = logEvalPoint1 ; - qglEvalPoint2 = logEvalPoint2 ; - qglFeedbackBuffer = logFeedbackBuffer ; - qglFinish = logFinish ; - qglFlush = logFlush ; - qglFogf = logFogf ; - qglFogfv = logFogfv ; - qglFogi = logFogi ; - qglFogiv = logFogiv ; - qglFrontFace = logFrontFace ; - qglFrustum = logFrustum ; - qglGenLists = logGenLists ; - qglGenTextures = logGenTextures ; - qglGetBooleanv = logGetBooleanv ; - qglGetClipPlane = logGetClipPlane ; - qglGetDoublev = logGetDoublev ; - qglGetError = logGetError ; - qglGetFloatv = logGetFloatv ; - qglGetIntegerv = logGetIntegerv ; - qglGetLightfv = logGetLightfv ; - qglGetLightiv = logGetLightiv ; - qglGetMapdv = logGetMapdv ; - qglGetMapfv = logGetMapfv ; - qglGetMapiv = logGetMapiv ; - qglGetMaterialfv = logGetMaterialfv ; - qglGetMaterialiv = logGetMaterialiv ; - qglGetPixelMapfv = logGetPixelMapfv ; - qglGetPixelMapuiv = logGetPixelMapuiv ; - qglGetPixelMapusv = logGetPixelMapusv ; - qglGetPointerv = logGetPointerv ; - qglGetPolygonStipple = logGetPolygonStipple ; - qglGetString = logGetString ; - qglGetTexEnvfv = logGetTexEnvfv ; - qglGetTexEnviv = logGetTexEnviv ; - qglGetTexGendv = logGetTexGendv ; - qglGetTexGenfv = logGetTexGenfv ; - qglGetTexGeniv = logGetTexGeniv ; - qglGetTexImage = logGetTexImage ; - qglGetTexLevelParameterfv = logGetTexLevelParameterfv ; - qglGetTexLevelParameteriv = logGetTexLevelParameteriv ; - qglGetTexParameterfv = logGetTexParameterfv ; - qglGetTexParameteriv = logGetTexParameteriv ; - qglHint = logHint ; - qglIndexMask = logIndexMask ; - qglIndexPointer = logIndexPointer ; - qglIndexd = logIndexd ; - qglIndexdv = logIndexdv ; - qglIndexf = logIndexf ; - qglIndexfv = logIndexfv ; - qglIndexi = logIndexi ; - qglIndexiv = logIndexiv ; - qglIndexs = logIndexs ; - qglIndexsv = logIndexsv ; - qglIndexub = logIndexub ; - qglIndexubv = logIndexubv ; - qglInitNames = logInitNames ; - qglInterleavedArrays = logInterleavedArrays ; - qglIsEnabled = logIsEnabled ; - qglIsList = logIsList ; - qglIsTexture = logIsTexture ; - qglLightModelf = logLightModelf ; - qglLightModelfv = logLightModelfv ; - qglLightModeli = logLightModeli ; - qglLightModeliv = logLightModeliv ; - qglLightf = logLightf ; - qglLightfv = logLightfv ; - qglLighti = logLighti ; - qglLightiv = logLightiv ; - qglLineStipple = logLineStipple ; - qglLineWidth = logLineWidth ; - qglListBase = logListBase ; - qglLoadIdentity = logLoadIdentity ; - qglLoadMatrixd = logLoadMatrixd ; - qglLoadMatrixf = logLoadMatrixf ; - qglLoadName = logLoadName ; - qglLogicOp = logLogicOp ; - qglMap1d = logMap1d ; - qglMap1f = logMap1f ; - qglMap2d = logMap2d ; - qglMap2f = logMap2f ; - qglMapGrid1d = logMapGrid1d ; - qglMapGrid1f = logMapGrid1f ; - qglMapGrid2d = logMapGrid2d ; - qglMapGrid2f = logMapGrid2f ; - qglMaterialf = logMaterialf ; - qglMaterialfv = logMaterialfv ; - qglMateriali = logMateriali ; - qglMaterialiv = logMaterialiv ; - qglMatrixMode = logMatrixMode ; - qglMultMatrixd = logMultMatrixd ; - qglMultMatrixf = logMultMatrixf ; - qglNewList = logNewList ; - qglNormal3b = logNormal3b ; - qglNormal3bv = logNormal3bv ; - qglNormal3d = logNormal3d ; - qglNormal3dv = logNormal3dv ; - qglNormal3f = logNormal3f ; - qglNormal3fv = logNormal3fv ; - qglNormal3i = logNormal3i ; - qglNormal3iv = logNormal3iv ; - qglNormal3s = logNormal3s ; - qglNormal3sv = logNormal3sv ; - qglNormalPointer = logNormalPointer ; - qglOrtho = logOrtho ; - qglPassThrough = logPassThrough ; - qglPixelMapfv = logPixelMapfv ; - qglPixelMapuiv = logPixelMapuiv ; - qglPixelMapusv = logPixelMapusv ; - qglPixelStoref = logPixelStoref ; - qglPixelStorei = logPixelStorei ; - qglPixelTransferf = logPixelTransferf ; - qglPixelTransferi = logPixelTransferi ; - qglPixelZoom = logPixelZoom ; - qglPointSize = logPointSize ; - qglPolygonMode = logPolygonMode ; - qglPolygonOffset = logPolygonOffset ; - qglPolygonStipple = logPolygonStipple ; - qglPopAttrib = logPopAttrib ; - qglPopClientAttrib = logPopClientAttrib ; - qglPopMatrix = logPopMatrix ; - qglPopName = logPopName ; - qglPrioritizeTextures = logPrioritizeTextures ; - qglPushAttrib = logPushAttrib ; - qglPushClientAttrib = logPushClientAttrib ; - qglPushMatrix = logPushMatrix ; - qglPushName = logPushName ; - qglRasterPos2d = logRasterPos2d ; - qglRasterPos2dv = logRasterPos2dv ; - qglRasterPos2f = logRasterPos2f ; - qglRasterPos2fv = logRasterPos2fv ; - qglRasterPos2i = logRasterPos2i ; - qglRasterPos2iv = logRasterPos2iv ; - qglRasterPos2s = logRasterPos2s ; - qglRasterPos2sv = logRasterPos2sv ; - qglRasterPos3d = logRasterPos3d ; - qglRasterPos3dv = logRasterPos3dv ; - qglRasterPos3f = logRasterPos3f ; - qglRasterPos3fv = logRasterPos3fv ; - qglRasterPos3i = logRasterPos3i ; - qglRasterPos3iv = logRasterPos3iv ; - qglRasterPos3s = logRasterPos3s ; - qglRasterPos3sv = logRasterPos3sv ; - qglRasterPos4d = logRasterPos4d ; - qglRasterPos4dv = logRasterPos4dv ; - qglRasterPos4f = logRasterPos4f ; - qglRasterPos4fv = logRasterPos4fv ; - qglRasterPos4i = logRasterPos4i ; - qglRasterPos4iv = logRasterPos4iv ; - qglRasterPos4s = logRasterPos4s ; - qglRasterPos4sv = logRasterPos4sv ; - qglReadBuffer = logReadBuffer ; - qglReadPixels = logReadPixels ; - qglRectd = logRectd ; - qglRectdv = logRectdv ; - qglRectf = logRectf ; - qglRectfv = logRectfv ; - qglRecti = logRecti ; - qglRectiv = logRectiv ; - qglRects = logRects ; - qglRectsv = logRectsv ; - qglRenderMode = logRenderMode ; - qglRotated = logRotated ; - qglRotatef = logRotatef ; - qglScaled = logScaled ; - qglScalef = logScalef ; - qglScissor = logScissor ; - qglSelectBuffer = logSelectBuffer ; - qglShadeModel = logShadeModel ; - qglStencilFunc = logStencilFunc ; - qglStencilMask = logStencilMask ; - qglStencilOp = logStencilOp ; - qglTexCoord1d = logTexCoord1d ; - qglTexCoord1dv = logTexCoord1dv ; - qglTexCoord1f = logTexCoord1f ; - qglTexCoord1fv = logTexCoord1fv ; - qglTexCoord1i = logTexCoord1i ; - qglTexCoord1iv = logTexCoord1iv ; - qglTexCoord1s = logTexCoord1s ; - qglTexCoord1sv = logTexCoord1sv ; - qglTexCoord2d = logTexCoord2d ; - qglTexCoord2dv = logTexCoord2dv ; - qglTexCoord2f = logTexCoord2f ; - qglTexCoord2fv = logTexCoord2fv ; - qglTexCoord2i = logTexCoord2i ; - qglTexCoord2iv = logTexCoord2iv ; - qglTexCoord2s = logTexCoord2s ; - qglTexCoord2sv = logTexCoord2sv ; - qglTexCoord3d = logTexCoord3d ; - qglTexCoord3dv = logTexCoord3dv ; - qglTexCoord3f = logTexCoord3f ; - qglTexCoord3fv = logTexCoord3fv ; - qglTexCoord3i = logTexCoord3i ; - qglTexCoord3iv = logTexCoord3iv ; - qglTexCoord3s = logTexCoord3s ; - qglTexCoord3sv = logTexCoord3sv ; - qglTexCoord4d = logTexCoord4d ; - qglTexCoord4dv = logTexCoord4dv ; - qglTexCoord4f = logTexCoord4f ; - qglTexCoord4fv = logTexCoord4fv ; - qglTexCoord4i = logTexCoord4i ; - qglTexCoord4iv = logTexCoord4iv ; - qglTexCoord4s = logTexCoord4s ; - qglTexCoord4sv = logTexCoord4sv ; - qglTexCoordPointer = logTexCoordPointer ; - qglTexEnvf = logTexEnvf ; - qglTexEnvfv = logTexEnvfv ; - qglTexEnvi = logTexEnvi ; - qglTexEnviv = logTexEnviv ; - qglTexGend = logTexGend ; - qglTexGendv = logTexGendv ; - qglTexGenf = logTexGenf ; - qglTexGenfv = logTexGenfv ; - qglTexGeni = logTexGeni ; - qglTexGeniv = logTexGeniv ; - qglTexImage1D = logTexImage1D ; - qglTexImage2D = logTexImage2D ; - qglTexParameterf = logTexParameterf ; - qglTexParameterfv = logTexParameterfv ; - qglTexParameteri = logTexParameteri ; - qglTexParameteriv = logTexParameteriv ; - qglTexSubImage1D = logTexSubImage1D ; - qglTexSubImage2D = logTexSubImage2D ; - qglTranslated = logTranslated ; - qglTranslatef = logTranslatef ; - qglVertex2d = logVertex2d ; - qglVertex2dv = logVertex2dv ; - qglVertex2f = logVertex2f ; - qglVertex2fv = logVertex2fv ; - qglVertex2i = logVertex2i ; - qglVertex2iv = logVertex2iv ; - qglVertex2s = logVertex2s ; - qglVertex2sv = logVertex2sv ; - qglVertex3d = logVertex3d ; - qglVertex3dv = logVertex3dv ; - qglVertex3f = logVertex3f ; - qglVertex3fv = logVertex3fv ; - qglVertex3i = logVertex3i ; - qglVertex3iv = logVertex3iv ; - qglVertex3s = logVertex3s ; - qglVertex3sv = logVertex3sv ; - qglVertex4d = logVertex4d ; - qglVertex4dv = logVertex4dv ; - qglVertex4f = logVertex4f ; - qglVertex4fv = logVertex4fv ; - qglVertex4i = logVertex4i ; - qglVertex4iv = logVertex4iv ; - qglVertex4s = logVertex4s ; - qglVertex4sv = logVertex4sv ; - qglVertexPointer = logVertexPointer ; - qglViewport = logViewport ; - } - else - { - qglAccum = dllAccum; - qglAlphaFunc = dllAlphaFunc; - qglAreTexturesResident = dllAreTexturesResident; - qglArrayElement = dllArrayElement; - qglBegin = dllBegin; - qglBindTexture = dllBindTexture; - qglBitmap = dllBitmap; - qglBlendFunc = dllBlendFunc; - qglCallList = dllCallList; - qglCallLists = dllCallLists; - qglClear = dllClear; - qglClearAccum = dllClearAccum; - qglClearColor = dllClearColor; - qglClearDepth = dllClearDepth; - qglClearIndex = dllClearIndex; - qglClearStencil = dllClearStencil; - qglClipPlane = dllClipPlane; - qglColor3b = dllColor3b; - qglColor3bv = dllColor3bv; - qglColor3d = dllColor3d; - qglColor3dv = dllColor3dv; - qglColor3f = dllColor3f; - qglColor3fv = dllColor3fv; - qglColor3i = dllColor3i; - qglColor3iv = dllColor3iv; - qglColor3s = dllColor3s; - qglColor3sv = dllColor3sv; - qglColor3ub = dllColor3ub; - qglColor3ubv = dllColor3ubv; - qglColor3ui = dllColor3ui; - qglColor3uiv = dllColor3uiv; - qglColor3us = dllColor3us; - qglColor3usv = dllColor3usv; - qglColor4b = dllColor4b; - qglColor4bv = dllColor4bv; - qglColor4d = dllColor4d; - qglColor4dv = dllColor4dv; - qglColor4f = dllColor4f; - qglColor4fv = dllColor4fv; - qglColor4i = dllColor4i; - qglColor4iv = dllColor4iv; - qglColor4s = dllColor4s; - qglColor4sv = dllColor4sv; - qglColor4ub = dllColor4ub; - qglColor4ubv = dllColor4ubv; - qglColor4ui = dllColor4ui; - qglColor4uiv = dllColor4uiv; - qglColor4us = dllColor4us; - qglColor4usv = dllColor4usv; - qglColorMask = dllColorMask; - qglColorMaterial = dllColorMaterial; - qglColorPointer = dllColorPointer; - qglCopyPixels = dllCopyPixels; - qglCopyTexImage1D = dllCopyTexImage1D; - qglCopyTexImage2D = dllCopyTexImage2D; - qglCopyTexSubImage1D = dllCopyTexSubImage1D; - qglCopyTexSubImage2D = dllCopyTexSubImage2D; - qglCullFace = dllCullFace; - qglDeleteLists = dllDeleteLists ; - qglDeleteTextures = dllDeleteTextures ; - qglDepthFunc = dllDepthFunc ; - qglDepthMask = dllDepthMask ; - qglDepthRange = dllDepthRange ; - qglDisable = dllDisable ; - qglDisableClientState = dllDisableClientState ; - qglDrawArrays = dllDrawArrays ; - qglDrawBuffer = dllDrawBuffer ; - qglDrawElements = dllDrawElements ; - qglDrawPixels = dllDrawPixels ; - qglEdgeFlag = dllEdgeFlag ; - qglEdgeFlagPointer = dllEdgeFlagPointer ; - qglEdgeFlagv = dllEdgeFlagv ; - qglEnable = dllEnable ; - qglEnableClientState = dllEnableClientState ; - qglEnd = dllEnd ; - qglEndList = dllEndList ; - qglEvalCoord1d = dllEvalCoord1d ; - qglEvalCoord1dv = dllEvalCoord1dv ; - qglEvalCoord1f = dllEvalCoord1f ; - qglEvalCoord1fv = dllEvalCoord1fv ; - qglEvalCoord2d = dllEvalCoord2d ; - qglEvalCoord2dv = dllEvalCoord2dv ; - qglEvalCoord2f = dllEvalCoord2f ; - qglEvalCoord2fv = dllEvalCoord2fv ; - qglEvalMesh1 = dllEvalMesh1 ; - qglEvalMesh2 = dllEvalMesh2 ; - qglEvalPoint1 = dllEvalPoint1 ; - qglEvalPoint2 = dllEvalPoint2 ; - qglFeedbackBuffer = dllFeedbackBuffer ; - qglFinish = dllFinish ; - qglFlush = dllFlush ; - qglFogf = dllFogf ; - qglFogfv = dllFogfv ; - qglFogi = dllFogi ; - qglFogiv = dllFogiv ; - qglFrontFace = dllFrontFace ; - qglFrustum = dllFrustum ; - qglGenLists = dllGenLists ; - qglGenTextures = dllGenTextures ; - qglGetBooleanv = dllGetBooleanv ; - qglGetClipPlane = dllGetClipPlane ; - qglGetDoublev = dllGetDoublev ; - qglGetError = dllGetError ; - qglGetFloatv = dllGetFloatv ; - qglGetIntegerv = dllGetIntegerv ; - qglGetLightfv = dllGetLightfv ; - qglGetLightiv = dllGetLightiv ; - qglGetMapdv = dllGetMapdv ; - qglGetMapfv = dllGetMapfv ; - qglGetMapiv = dllGetMapiv ; - qglGetMaterialfv = dllGetMaterialfv ; - qglGetMaterialiv = dllGetMaterialiv ; - qglGetPixelMapfv = dllGetPixelMapfv ; - qglGetPixelMapuiv = dllGetPixelMapuiv ; - qglGetPixelMapusv = dllGetPixelMapusv ; - qglGetPointerv = dllGetPointerv ; - qglGetPolygonStipple = dllGetPolygonStipple ; - qglGetString = dllGetString ; - qglGetTexEnvfv = dllGetTexEnvfv ; - qglGetTexEnviv = dllGetTexEnviv ; - qglGetTexGendv = dllGetTexGendv ; - qglGetTexGenfv = dllGetTexGenfv ; - qglGetTexGeniv = dllGetTexGeniv ; - qglGetTexImage = dllGetTexImage ; - qglGetTexLevelParameterfv = dllGetTexLevelParameterfv ; - qglGetTexLevelParameteriv = dllGetTexLevelParameteriv ; - qglGetTexParameterfv = dllGetTexParameterfv ; - qglGetTexParameteriv = dllGetTexParameteriv ; - qglHint = dllHint ; - qglIndexMask = dllIndexMask ; - qglIndexPointer = dllIndexPointer ; - qglIndexd = dllIndexd ; - qglIndexdv = dllIndexdv ; - qglIndexf = dllIndexf ; - qglIndexfv = dllIndexfv ; - qglIndexi = dllIndexi ; - qglIndexiv = dllIndexiv ; - qglIndexs = dllIndexs ; - qglIndexsv = dllIndexsv ; - qglIndexub = dllIndexub ; - qglIndexubv = dllIndexubv ; - qglInitNames = dllInitNames ; - qglInterleavedArrays = dllInterleavedArrays ; - qglIsEnabled = dllIsEnabled ; - qglIsList = dllIsList ; - qglIsTexture = dllIsTexture ; - qglLightModelf = dllLightModelf ; - qglLightModelfv = dllLightModelfv ; - qglLightModeli = dllLightModeli ; - qglLightModeliv = dllLightModeliv ; - qglLightf = dllLightf ; - qglLightfv = dllLightfv ; - qglLighti = dllLighti ; - qglLightiv = dllLightiv ; - qglLineStipple = dllLineStipple ; - qglLineWidth = dllLineWidth ; - qglListBase = dllListBase ; - qglLoadIdentity = dllLoadIdentity ; - qglLoadMatrixd = dllLoadMatrixd ; - qglLoadMatrixf = dllLoadMatrixf ; - qglLoadName = dllLoadName ; - qglLogicOp = dllLogicOp ; - qglMap1d = dllMap1d ; - qglMap1f = dllMap1f ; - qglMap2d = dllMap2d ; - qglMap2f = dllMap2f ; - qglMapGrid1d = dllMapGrid1d ; - qglMapGrid1f = dllMapGrid1f ; - qglMapGrid2d = dllMapGrid2d ; - qglMapGrid2f = dllMapGrid2f ; - qglMaterialf = dllMaterialf ; - qglMaterialfv = dllMaterialfv ; - qglMateriali = dllMateriali ; - qglMaterialiv = dllMaterialiv ; - qglMatrixMode = dllMatrixMode ; - qglMultMatrixd = dllMultMatrixd ; - qglMultMatrixf = dllMultMatrixf ; - qglNewList = dllNewList ; - qglNormal3b = dllNormal3b ; - qglNormal3bv = dllNormal3bv ; - qglNormal3d = dllNormal3d ; - qglNormal3dv = dllNormal3dv ; - qglNormal3f = dllNormal3f ; - qglNormal3fv = dllNormal3fv ; - qglNormal3i = dllNormal3i ; - qglNormal3iv = dllNormal3iv ; - qglNormal3s = dllNormal3s ; - qglNormal3sv = dllNormal3sv ; - qglNormalPointer = dllNormalPointer ; - qglOrtho = dllOrtho ; - qglPassThrough = dllPassThrough ; - qglPixelMapfv = dllPixelMapfv ; - qglPixelMapuiv = dllPixelMapuiv ; - qglPixelMapusv = dllPixelMapusv ; - qglPixelStoref = dllPixelStoref ; - qglPixelStorei = dllPixelStorei ; - qglPixelTransferf = dllPixelTransferf ; - qglPixelTransferi = dllPixelTransferi ; - qglPixelZoom = dllPixelZoom ; - qglPointSize = dllPointSize ; - qglPolygonMode = dllPolygonMode ; - qglPolygonOffset = dllPolygonOffset ; - qglPolygonStipple = dllPolygonStipple ; - qglPopAttrib = dllPopAttrib ; - qglPopClientAttrib = dllPopClientAttrib ; - qglPopMatrix = dllPopMatrix ; - qglPopName = dllPopName ; - qglPrioritizeTextures = dllPrioritizeTextures ; - qglPushAttrib = dllPushAttrib ; - qglPushClientAttrib = dllPushClientAttrib ; - qglPushMatrix = dllPushMatrix ; - qglPushName = dllPushName ; - qglRasterPos2d = dllRasterPos2d ; - qglRasterPos2dv = dllRasterPos2dv ; - qglRasterPos2f = dllRasterPos2f ; - qglRasterPos2fv = dllRasterPos2fv ; - qglRasterPos2i = dllRasterPos2i ; - qglRasterPos2iv = dllRasterPos2iv ; - qglRasterPos2s = dllRasterPos2s ; - qglRasterPos2sv = dllRasterPos2sv ; - qglRasterPos3d = dllRasterPos3d ; - qglRasterPos3dv = dllRasterPos3dv ; - qglRasterPos3f = dllRasterPos3f ; - qglRasterPos3fv = dllRasterPos3fv ; - qglRasterPos3i = dllRasterPos3i ; - qglRasterPos3iv = dllRasterPos3iv ; - qglRasterPos3s = dllRasterPos3s ; - qglRasterPos3sv = dllRasterPos3sv ; - qglRasterPos4d = dllRasterPos4d ; - qglRasterPos4dv = dllRasterPos4dv ; - qglRasterPos4f = dllRasterPos4f ; - qglRasterPos4fv = dllRasterPos4fv ; - qglRasterPos4i = dllRasterPos4i ; - qglRasterPos4iv = dllRasterPos4iv ; - qglRasterPos4s = dllRasterPos4s ; - qglRasterPos4sv = dllRasterPos4sv ; - qglReadBuffer = dllReadBuffer ; - qglReadPixels = dllReadPixels ; - qglRectd = dllRectd ; - qglRectdv = dllRectdv ; - qglRectf = dllRectf ; - qglRectfv = dllRectfv ; - qglRecti = dllRecti ; - qglRectiv = dllRectiv ; - qglRects = dllRects ; - qglRectsv = dllRectsv ; - qglRenderMode = dllRenderMode ; - qglRotated = dllRotated ; - qglRotatef = dllRotatef ; - qglScaled = dllScaled ; - qglScalef = dllScalef ; - qglScissor = dllScissor ; - qglSelectBuffer = dllSelectBuffer ; - qglShadeModel = dllShadeModel ; - qglStencilFunc = dllStencilFunc ; - qglStencilMask = dllStencilMask ; - qglStencilOp = dllStencilOp ; - qglTexCoord1d = dllTexCoord1d ; - qglTexCoord1dv = dllTexCoord1dv ; - qglTexCoord1f = dllTexCoord1f ; - qglTexCoord1fv = dllTexCoord1fv ; - qglTexCoord1i = dllTexCoord1i ; - qglTexCoord1iv = dllTexCoord1iv ; - qglTexCoord1s = dllTexCoord1s ; - qglTexCoord1sv = dllTexCoord1sv ; - qglTexCoord2d = dllTexCoord2d ; - qglTexCoord2dv = dllTexCoord2dv ; - qglTexCoord2f = dllTexCoord2f ; - qglTexCoord2fv = dllTexCoord2fv ; - qglTexCoord2i = dllTexCoord2i ; - qglTexCoord2iv = dllTexCoord2iv ; - qglTexCoord2s = dllTexCoord2s ; - qglTexCoord2sv = dllTexCoord2sv ; - qglTexCoord3d = dllTexCoord3d ; - qglTexCoord3dv = dllTexCoord3dv ; - qglTexCoord3f = dllTexCoord3f ; - qglTexCoord3fv = dllTexCoord3fv ; - qglTexCoord3i = dllTexCoord3i ; - qglTexCoord3iv = dllTexCoord3iv ; - qglTexCoord3s = dllTexCoord3s ; - qglTexCoord3sv = dllTexCoord3sv ; - qglTexCoord4d = dllTexCoord4d ; - qglTexCoord4dv = dllTexCoord4dv ; - qglTexCoord4f = dllTexCoord4f ; - qglTexCoord4fv = dllTexCoord4fv ; - qglTexCoord4i = dllTexCoord4i ; - qglTexCoord4iv = dllTexCoord4iv ; - qglTexCoord4s = dllTexCoord4s ; - qglTexCoord4sv = dllTexCoord4sv ; - qglTexCoordPointer = dllTexCoordPointer ; - qglTexEnvf = dllTexEnvf ; - qglTexEnvfv = dllTexEnvfv ; - qglTexEnvi = dllTexEnvi ; - qglTexEnviv = dllTexEnviv ; - qglTexGend = dllTexGend ; - qglTexGendv = dllTexGendv ; - qglTexGenf = dllTexGenf ; - qglTexGenfv = dllTexGenfv ; - qglTexGeni = dllTexGeni ; - qglTexGeniv = dllTexGeniv ; - qglTexImage1D = dllTexImage1D ; - qglTexImage2D = dllTexImage2D ; - qglTexParameterf = dllTexParameterf ; - qglTexParameterfv = dllTexParameterfv ; - qglTexParameteri = dllTexParameteri ; - qglTexParameteriv = dllTexParameteriv ; - qglTexSubImage1D = dllTexSubImage1D ; - qglTexSubImage2D = dllTexSubImage2D ; - qglTranslated = dllTranslated ; - qglTranslatef = dllTranslatef ; - qglVertex2d = dllVertex2d ; - qglVertex2dv = dllVertex2dv ; - qglVertex2f = dllVertex2f ; - qglVertex2fv = dllVertex2fv ; - qglVertex2i = dllVertex2i ; - qglVertex2iv = dllVertex2iv ; - qglVertex2s = dllVertex2s ; - qglVertex2sv = dllVertex2sv ; - qglVertex3d = dllVertex3d ; - qglVertex3dv = dllVertex3dv ; - qglVertex3f = dllVertex3f ; - qglVertex3fv = dllVertex3fv ; - qglVertex3i = dllVertex3i ; - qglVertex3iv = dllVertex3iv ; - qglVertex3s = dllVertex3s ; - qglVertex3sv = dllVertex3sv ; - qglVertex4d = dllVertex4d ; - qglVertex4dv = dllVertex4dv ; - qglVertex4f = dllVertex4f ; - qglVertex4fv = dllVertex4fv ; - qglVertex4i = dllVertex4i ; - qglVertex4iv = dllVertex4iv ; - qglVertex4s = dllVertex4s ; - qglVertex4sv = dllVertex4sv ; - qglVertexPointer = dllVertexPointer ; - qglViewport = dllViewport ; - } -} - - -void GLimp_LogNewFrame( void ) -{ - fprintf( glw_state.log_fp, "*** R_BeginFrame ***\n" ); -} - - diff --git a/code/unix/linux_signals.c b/code/unix/linux_signals.c deleted file mode 100644 index 4653fbe9..00000000 --- a/code/unix/linux_signals.c +++ /dev/null @@ -1,64 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -#include - -#include "../qcommon/q_shared.h" -#include "../qcommon/qcommon.h" -#ifndef DEDICATED -#include "../renderer/tr_local.h" -#endif - -static qboolean signalcaught = qfalse; - -void Sys_Exit(int); // bk010104 - abstraction - -static void signal_handler(int sig) // bk010104 - replace this... (NOTE TTimo huh?) -{ - if (signalcaught) - { - printf("DOUBLE SIGNAL FAULT: Received signal %d, exiting...\n", sig); - Sys_Exit(1); // bk010104 - abstraction - } - - signalcaught = qtrue; - printf("Received signal %d, exiting...\n", sig); -#ifndef DEDICATED - //GLimp_Shutdown(); // bk010104 - shouldn't this be CL_Shutdown - // rcg08312005 Agreed: changed to CL_Shutdown... --ryan. - CL_Shutdown(); -#endif - SV_Shutdown("Signal caught"); - Sys_Exit(0); // bk010104 - abstraction NOTE TTimo send a 0 to avoid DOUBLE SIGNAL FAULT -} - -void InitSig(void) -{ - signal(SIGHUP, signal_handler); - signal(SIGQUIT, signal_handler); - signal(SIGILL, signal_handler); - signal(SIGTRAP, signal_handler); - signal(SIGIOT, signal_handler); - signal(SIGBUS, signal_handler); - signal(SIGFPE, signal_handler); - signal(SIGSEGV, signal_handler); - signal(SIGTERM, signal_handler); -} diff --git a/code/unix/linux_snd.c b/code/unix/linux_snd.c deleted file mode 100644 index 51937695..00000000 --- a/code/unix/linux_snd.c +++ /dev/null @@ -1,294 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ - -#if !USE_SDL_SOUND - -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef __linux__ // rb0101023 - guard this -#include -#endif -#ifdef __FreeBSD__ // rb0101023 - added -#include -#endif -#include - -#include "../qcommon/q_shared.h" -#include "../client/snd_local.h" - -int audio_fd; -int snd_inited=0; - -cvar_t *sndbits; -cvar_t *sndspeed; -cvar_t *sndchannels; - -cvar_t *snddevice; - -/* Some devices may work only with 48000 */ -static int tryrates[] = { 22050, 11025, 44100, 48000, 8000 }; - -static qboolean use_custom_memset = qfalse; -// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371 -void Snd_Memset (void* dest, const int val, const size_t count) -{ - int *pDest; - int i, iterate; - - if (!use_custom_memset) - { - Com_Memset(dest,val,count); - return; - } - iterate = count / sizeof(int); - pDest = (int*)dest; - for(i=0; istring, O_RDWR); - - if (audio_fd < 0) { - perror(snddevice->string); - Com_Printf("Could not open %s\n", snddevice->string); - return 0; - } - } - - if (ioctl(audio_fd, SNDCTL_DSP_GETCAPS, &caps) == -1) { - perror(snddevice->string); - Com_Printf("Sound driver too old\n"); - close(audio_fd); - return 0; - } - - if (!(caps & DSP_CAP_TRIGGER) || !(caps & DSP_CAP_MMAP)) { - Com_Printf("Sorry but your soundcard can't do this\n"); - close(audio_fd); - return 0; - } - - - /* SNDCTL_DSP_GETOSPACE moved to be called later */ - - // set sample bits & speed - dma.samplebits = (int)sndbits->value; - if (dma.samplebits != 16 && dma.samplebits != 8) { - ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &fmt); - if (fmt & AFMT_S16_LE) - dma.samplebits = 16; - else if (fmt & AFMT_U8) - dma.samplebits = 8; - } - - dma.speed = (int)sndspeed->value; - if (!dma.speed) { - for (i=0 ; ivalue; - if (dma.channels < 1 || dma.channels > 2) - dma.channels = 2; - -/* mmap() call moved forward */ - - tmp = 0; - if (dma.channels == 2) - tmp = 1; - rc = ioctl(audio_fd, SNDCTL_DSP_STEREO, &tmp); - if (rc < 0) { - perror(snddevice->string); - Com_Printf("Could not set %s to stereo=%d", snddevice->string, dma.channels); - close(audio_fd); - return 0; - } - - if (tmp) - dma.channels = 2; - else - dma.channels = 1; - - rc = ioctl(audio_fd, SNDCTL_DSP_SPEED, &dma.speed); - if (rc < 0) { - perror(snddevice->string); - Com_Printf("Could not set %s speed to %d", snddevice->string, dma.speed); - close(audio_fd); - return 0; - } - - if (dma.samplebits == 16) { - rc = AFMT_S16_LE; - rc = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &rc); - if (rc < 0) { - perror(snddevice->string); - Com_Printf("Could not support 16-bit data. Try 8-bit.\n"); - close(audio_fd); - return 0; - } - } else if (dma.samplebits == 8) { - rc = AFMT_U8; - rc = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &rc); - if (rc < 0) { - perror(snddevice->string); - Com_Printf("Could not support 8-bit data.\n"); - close(audio_fd); - return 0; - } - } else { - perror(snddevice->string); - Com_Printf("%d-bit sound not supported.", dma.samplebits); - close(audio_fd); - return 0; - } - - if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1) { - perror("GETOSPACE"); - Com_Printf("Um, can't do GETOSPACE?\n"); - close(audio_fd); - return 0; - } - - dma.samples = info.fragstotal * info.fragsize / (dma.samplebits/8); - dma.submission_chunk = 1; - - // memory map the dma buffer - - // TTimo 2001/10/08 added PROT_READ to the mmap - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371 - // checking Alsa bug, doesn't allow dma alloc with PROT_READ? - - if (!dma.buffer) - dma.buffer = (unsigned char *) mmap(NULL, info.fragstotal - * info.fragsize, PROT_WRITE|PROT_READ, MAP_FILE|MAP_SHARED, audio_fd, 0); - - if (dma.buffer == MAP_FAILED) - { - Com_Printf("Could not mmap dma buffer PROT_WRITE|PROT_READ\n"); - Com_Printf("trying mmap PROT_WRITE (with associated better compatibility / less performance code)\n"); - dma.buffer = (unsigned char *) mmap(NULL, info.fragstotal - * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0); - // NOTE TTimo could add a variable to force using regular memset on systems that are known to be safe - use_custom_memset = qtrue; - } - - if (dma.buffer == MAP_FAILED) { - perror(snddevice->string); - Com_Printf("Could not mmap %s\n", snddevice->string); - close(audio_fd); - return 0; - } - - // toggle the trigger & start her up - - tmp = 0; - rc = ioctl(audio_fd, SNDCTL_DSP_SETTRIGGER, &tmp); - if (rc < 0) { - perror(snddevice->string); - Com_Printf("Could not toggle.\n"); - close(audio_fd); - return 0; - } - - tmp = PCM_ENABLE_OUTPUT; - rc = ioctl(audio_fd, SNDCTL_DSP_SETTRIGGER, &tmp); - if (rc < 0) { - perror(snddevice->string); - Com_Printf("Could not toggle.\n"); - close(audio_fd); - - return 0; - } - - snd_inited = 1; - return 1; -} - -int SNDDMA_GetDMAPos(void) -{ - struct count_info count; - - if (!snd_inited) return 0; - - if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &count) == -1) { - perror(snddevice->string); - Com_Printf("Uh, sound dead.\n"); - close(audio_fd); - snd_inited = 0; - return 0; - } - return count.ptr / (dma.samplebits / 8); -} - -void SNDDMA_Shutdown(void) -{ -} - -/* -============== -SNDDMA_Submit - -Send sound to device if buffer isn't really the dma buffer -=============== -*/ -void SNDDMA_Submit(void) -{ -} - -void SNDDMA_BeginPainting (void) -{ -} - -#endif // !USE_SDL_SOUND - diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c deleted file mode 100644 index 87bf8c7d..00000000 --- a/code/unix/sdl_glimp.c +++ /dev/null @@ -1,1814 +0,0 @@ - -#if USE_SDL_VIDEO - -/* - * SDL implementation for Quake 3: Arena's GPL source release. - * - * I wrote such a beast originally for Loki's port of Heavy Metal: FAKK2, - * and then wrote it again for the Linux client of Medal of Honor: Allied - * Assault. Third time's a charm, so I'm rewriting this once more for the - * GPL release of Quake 3. - * - * Written by Ryan C. Gordon (icculus@icculus.org). Please refer to - * http://ioquake3.org/ for the latest version of this code. - * - * Patches and comments are welcome at the above address. - * - * I cut-and-pasted this from linux_glimp.c, and moved it to SDL line-by-line. - * There is probably some cruft that could be removed here. - * - * You should define USE_SDL=1 and then add this to the makefile. - * USE_SDL will disable the X11 target. - */ - -/* -Original copyright on Q3A sources: -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** GLW_IMP.C -** -** This file contains ALL Linux specific stuff having to do with the -** OpenGL refresh. When a port is being made the following functions -** must be implemented by the port: -** -** GLimp_EndFrame -** GLimp_Init -** GLimp_Shutdown -** GLimp_SwitchFullscreen -** GLimp_SetGamma -** -*/ - -#include "SDL.h" - -#ifdef SMP -#include "SDL_thread.h" -#endif - -#include -#include -#include -#if USE_SDL_VIDEO -#include "SDL.h" -#include "SDL_loadso.h" -#else -#include -#endif - -#include "../renderer/tr_local.h" -#include "../client/client.h" -#include "linux_local.h" // bk001130 - -#include "unix_glw.h" - - -/* Just hack it for now. */ -#ifdef MACOS_X -#include -#include -#include -typedef CGLContextObj QGLContext; -#define GLimp_GetCurrentContext() CGLGetCurrentContext() -#define GLimp_SetCurrentContext(ctx) CGLSetCurrentContext(ctx) -#else -typedef void *QGLContext; -#define GLimp_GetCurrentContext() (NULL) -#define GLimp_SetCurrentContext(ctx) -#endif - -static QGLContext opengl_context; - -//#define KBD_DBG - -typedef enum -{ - RSERR_OK, - - RSERR_INVALID_FULLSCREEN, - RSERR_INVALID_MODE, - - RSERR_UNKNOWN -} rserr_t; - -glwstate_t glw_state; - -static SDL_Surface *screen = NULL; -static SDL_Joystick *stick = NULL; - -static qboolean mouse_avail = qfalse; -static qboolean mouse_active = qfalse; -static qboolean sdlrepeatenabled = qfalse; - -static cvar_t *in_mouse; -static cvar_t *in_disablemacosxmouseaccel; -#ifdef MACOS_X -static double originalMouseSpeed = -1.0; -#endif -cvar_t *in_subframe; -cvar_t *in_nograb; // this is strictly for developers - -// bk001130 - from cvs1.17 (mkv), but not static -cvar_t *in_joystick = NULL; -cvar_t *in_joystickDebug = NULL; -cvar_t *joy_threshold = NULL; - -cvar_t *r_allowSoftwareGL; // don't abort out if the pixelformat claims software -cvar_t *r_previousglDriver; - -qboolean GLimp_sdl_init_video(void) -{ - if (!SDL_WasInit(SDL_INIT_VIDEO)) - { - ri.Printf( PRINT_ALL, "Calling SDL_Init(SDL_INIT_VIDEO)...\n"); - if (SDL_Init(SDL_INIT_VIDEO) == -1) - { - ri.Printf( PRINT_ALL, "SDL_Init(SDL_INIT_VIDEO) failed: %s\n", SDL_GetError()); - return qfalse; - } - ri.Printf( PRINT_ALL, "SDL_Init(SDL_INIT_VIDEO) passed.\n"); - } - - return qtrue; -} - - -/* -* Find the first occurrence of find in s. -*/ -// bk001130 - from cvs1.17 (mkv), const -// bk001130 - made first argument const -static const char *Q_stristr( const char *s, const char *find) -{ - register char c, sc; - register size_t len; - - if ((c = *find++) != 0) - { - if (c >= 'a' && c <= 'z') - { - c -= ('a' - 'A'); - } - len = strlen(find); - do - { - do - { - if ((sc = *s++) == 0) - return NULL; - if (sc >= 'a' && sc <= 'z') - { - sc -= ('a' - 'A'); - } - } while (sc != c); - } while (Q_stricmpn(s, find, len) != 0); - s--; - } - return s; -} - -static const char *XLateKey(SDL_keysym *keysym, int *key) -{ - static char buf[2] = { '\0', '\0' }; - *key = 0; - - *buf = '\0'; - - // these happen to match the ASCII chars. - if ((keysym->sym >= ' ') && (keysym->sym <= '~')) - { - *key = (int) keysym->sym; - } - else - switch (keysym->sym) - { - case SDLK_PAGEUP: *key = K_PGUP; break; - case SDLK_KP9: *key = K_KP_PGUP; break; - case SDLK_PAGEDOWN: *key = K_PGDN; break; - case SDLK_KP3: *key = K_KP_PGDN; break; - case SDLK_KP7: *key = K_KP_HOME; break; - case SDLK_HOME: *key = K_HOME; break; - case SDLK_KP1: *key = K_KP_END; break; - case SDLK_END: *key = K_END; break; - case SDLK_KP4: *key = K_KP_LEFTARROW; break; - case SDLK_LEFT: *key = K_LEFTARROW; break; - case SDLK_KP6: *key = K_KP_RIGHTARROW; break; - case SDLK_RIGHT: *key = K_RIGHTARROW; break; - case SDLK_KP2: *key = K_KP_DOWNARROW; break; - case SDLK_DOWN: *key = K_DOWNARROW; break; - case SDLK_KP8: *key = K_KP_UPARROW; break; - case SDLK_UP: *key = K_UPARROW; break; - case SDLK_ESCAPE: *key = K_ESCAPE; break; - case SDLK_KP_ENTER: *key = K_KP_ENTER; break; - case SDLK_RETURN: *key = K_ENTER; break; - case SDLK_TAB: *key = K_TAB; break; - case SDLK_F1: *key = K_F1; break; - case SDLK_F2: *key = K_F2; break; - case SDLK_F3: *key = K_F3; break; - case SDLK_F4: *key = K_F4; break; - case SDLK_F5: *key = K_F5; break; - case SDLK_F6: *key = K_F6; break; - case SDLK_F7: *key = K_F7; break; - case SDLK_F8: *key = K_F8; break; - case SDLK_F9: *key = K_F9; break; - case SDLK_F10: *key = K_F10; break; - case SDLK_F11: *key = K_F11; break; - case SDLK_F12: *key = K_F12; break; - case SDLK_F13: *key = K_F13; break; - case SDLK_F14: *key = K_F14; break; - case SDLK_F15: *key = K_F15; break; - - // bk001206 - from Ryan's Fakk2 - case SDLK_BACKSPACE: *key = K_BACKSPACE; break; // ctrl-h - case SDLK_KP_PERIOD: *key = K_KP_DEL; break; - case SDLK_DELETE: *key = K_DEL; break; - case SDLK_PAUSE: *key = K_PAUSE; break; - - case SDLK_LSHIFT: - case SDLK_RSHIFT: *key = K_SHIFT; break; - - case SDLK_LCTRL: - case SDLK_RCTRL: *key = K_CTRL; break; - - case SDLK_RMETA: - case SDLK_LMETA: - case SDLK_RALT: - case SDLK_LALT: *key = K_ALT; break; - - case SDLK_LSUPER: - case SDLK_RSUPER: *key = K_SUPER; break; - - case SDLK_KP5: *key = K_KP_5; break; - case SDLK_INSERT: *key = K_INS; break; - case SDLK_KP0: *key = K_KP_INS; break; - case SDLK_KP_MULTIPLY: *key = K_KP_STAR; break; - case SDLK_KP_PLUS: *key = K_KP_PLUS; break; - case SDLK_KP_MINUS: *key = K_KP_MINUS; break; - case SDLK_KP_DIVIDE: *key = K_KP_SLASH; break; - - case SDLK_MODE: *key = K_MODE; break; - case SDLK_COMPOSE: *key = K_COMPOSE; break; - case SDLK_HELP: *key = K_HELP; break; - case SDLK_PRINT: *key = K_PRINT; break; - case SDLK_SYSREQ: *key = K_SYSREQ; break; - case SDLK_BREAK: *key = K_BREAK; break; - case SDLK_MENU: *key = K_MENU; break; - case SDLK_POWER: *key = K_POWER; break; - case SDLK_EURO: *key = K_EURO; break; - case SDLK_UNDO: * key = K_UNDO; break; - case SDLK_SCROLLOCK: *key = K_SCROLLOCK; break; - case SDLK_NUMLOCK: *key = K_KP_NUMLOCK; break; - case SDLK_CAPSLOCK: *key = K_CAPSLOCK; break; - - default: - if (keysym->sym >= SDLK_WORLD_0 && keysym->sym <= SDLK_WORLD_95) - *key = (keysym->sym - SDLK_WORLD_0) + K_WORLD_0; - break; - } - - if( keysym->unicode <= 127 ) // maps to ASCII? - { - char ch = (char) keysym->unicode; - if (ch == '~') - *key = '~'; // console HACK - - // The X11 driver converts to lowercase, but apparently we shouldn't. - // There's possibly somewhere else where they covert back. Passing - // uppercase to the engine works fine and fixes all-lower input. - // (https://bugzilla.icculus.org/show_bug.cgi?id=2364) --ryan. - //else if (ch >= 'A' && ch <= 'Z') - // ch = ch - 'A' + 'a'; - - // translate K_BACKSPACE to ctrl-h for MACOS_X (others?) - if (ch == K_BACKSPACE && keysym->sym != SDLK_DELETE) - { - *key = 'h' - 'a' + 1; - buf[0] = *key; - } - else - buf[0] = ch; - } - - return buf; -} - -static void install_grabs(void) -{ - SDL_WM_GrabInput(SDL_GRAB_ON); - SDL_ShowCursor(0); - - // This is a bug in the current SDL/macosx...have to toggle it a few - // times to get the cursor to hide. -#if defined(MACOS_X) - SDL_ShowCursor(1); - SDL_ShowCursor(0); -#endif -} - -static void uninstall_grabs(void) -{ - SDL_ShowCursor(1); - SDL_WM_GrabInput(SDL_GRAB_OFF); -} - -static void printkey(const SDL_Event* event) -{ -#ifdef KBD_DBG - printf("key name: %s", SDL_GetKeyName(event->key.keysym.sym)); - if(event->key.keysym.unicode) - { - printf(" unicode: %hx", event->key.keysym.unicode); - if (event->key.keysym.unicode >= '0' - && event->key.keysym.unicode <= '~') // printable? - printf(" (%c)", (unsigned char)(event->key.keysym.unicode)); - } - puts(""); -#endif -} - -static void HandleEvents(void) -{ - const int t = 0; // always just use the current time. - SDL_Event e; - const char *p = NULL; - int key = 0; - - if (screen == NULL) - return; // no SDL context. - - if (cls.keyCatchers == 0) - { - if (sdlrepeatenabled) - { - SDL_EnableKeyRepeat(0, 0); - sdlrepeatenabled = qfalse; - } - } - else - { - if (!sdlrepeatenabled) - { - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); - sdlrepeatenabled = qtrue; - } - } - - while (SDL_PollEvent(&e)) - { - switch (e.type) - { - case SDL_KEYDOWN: - printkey(&e); - p = XLateKey(&e.key.keysym, &key); - if (key) - { - Sys_QueEvent( t, SE_KEY, key, qtrue, 0, NULL ); - } - if (p) - { - while (*p) - { - Sys_QueEvent( t, SE_CHAR, *p++, 0, 0, NULL ); - } - } - break; - - case SDL_KEYUP: - XLateKey(&e.key.keysym, &key); - Sys_QueEvent( t, SE_KEY, key, qfalse, 0, NULL ); - break; - - case SDL_MOUSEMOTION: - if (mouse_active) - { - Sys_QueEvent( t, SE_MOUSE, e.motion.xrel, e.motion.yrel, 0, NULL ); - } - break; - - case SDL_MOUSEBUTTONDOWN: - case SDL_MOUSEBUTTONUP: - { - unsigned char b; - switch (e.button.button) - { - case 1: b = K_MOUSE1; break; - case 2: b = K_MOUSE3; break; - case 3: b = K_MOUSE2; break; - case 4: b = K_MWHEELUP; break; - case 5: b = K_MWHEELDOWN; break; - case 6: b = K_MOUSE4; break; - case 7: b = K_MOUSE5; break; - default: b = K_AUX1 + (e.button.button - 8)%16; break; - } - Sys_QueEvent( t, SE_KEY, b, (e.type == SDL_MOUSEBUTTONDOWN?qtrue:qfalse), 0, NULL ); - } - break; - - case SDL_QUIT: - Sys_Quit(); - break; - } - } -} - -// NOTE TTimo for the tty console input, we didn't rely on those .. -// it's not very surprising actually cause they are not used otherwise -void KBD_Init(void) -{ -} - -void KBD_Close(void) -{ -} - -#ifdef MACOS_X -io_connect_t IN_GetIOHandle() // mac os x mouse accel hack - { - io_connect_t iohandle = MACH_PORT_NULL; - kern_return_t status; - io_service_t iohidsystem = MACH_PORT_NULL; - mach_port_t masterport; - - status = IOMasterPort(MACH_PORT_NULL, &masterport); - if(status != KERN_SUCCESS) - return 0; - - iohidsystem = IORegistryEntryFromPath(masterport, kIOServicePlane ":/IOResources/IOHIDSystem"); - if(!iohidsystem) - return 0; - - status = IOServiceOpen(iohidsystem, mach_task_self(), kIOHIDParamConnectType, &iohandle); - IOObjectRelease(iohidsystem); - - return iohandle; - } -#endif - -void IN_ActivateMouse( void ) -{ - if (!mouse_avail || !screen) - return; - - #ifdef MACOS_X - if (!mouse_active && mouse_avail) // mac os x mouse accel hack - { - // Save the status of mouse acceleration - originalMouseSpeed = -1.0; // in case of error - if(in_disablemacosxmouseaccel->integer) - { - io_connect_t mouseDev = IN_GetIOHandle(); - if(mouseDev != 0) - { - if(IOHIDGetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), &originalMouseSpeed) == kIOReturnSuccess) - { - Com_Printf("previous mouse acceleration: %f\n", originalMouseSpeed); - if(IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), -1.0) != kIOReturnSuccess) - { - Com_Printf("Could not disable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n"); - Cvar_Set ("in_disablemacosxmouseaccel", 0); - } - } - else - { - Com_Printf("Could not disable mouse acceleration (failed at IOHIDGetAccelerationWithKey).\n"); - Cvar_Set ("in_disablemacosxmouseaccel", 0); - } - IOServiceClose(mouseDev); - } - else - { - Com_Printf("Could not disable mouse acceleration (failed at IO_GetIOHandle).\n"); - Cvar_Set ("in_disablemacosxmouseaccel", 0); - } - } - } - #endif - - if (!mouse_active) - { - if (!in_nograb->value) - install_grabs(); - mouse_active = qtrue; - } -} - -void IN_DeactivateMouse( void ) -{ - if (!mouse_avail || !screen) - return; - - #ifdef MACOS_X - if (mouse_active) // mac os x mouse accel hack - { - if(originalMouseSpeed != -1.0) - { - io_connect_t mouseDev = IN_GetIOHandle(); - if(mouseDev != 0) - { - Com_Printf("restoring mouse acceleration to: %f\n", originalMouseSpeed); - if(IOHIDSetAccelerationWithKey(mouseDev, CFSTR(kIOHIDMouseAccelerationType), originalMouseSpeed) != kIOReturnSuccess) - Com_Printf("Could not re-enable mouse acceleration (failed at IOHIDSetAccelerationWithKey).\n"); - IOServiceClose(mouseDev); - } - else - Com_Printf("Could not re-enable mouse acceleration (failed at IO_GetIOHandle).\n"); - } - } - #endif - - if (mouse_active) - { - if (!in_nograb->value) - uninstall_grabs(); - mouse_active = qfalse; - } -} -/*****************************************************************************/ - -/* -** GLimp_SetGamma -** -** This routine should only be called if glConfig.deviceSupportsGamma is TRUE -*/ -void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned char blue[256] ) -{ - Uint16 table[3][256]; - int i, j; -// float g; - - if(r_ignorehwgamma->integer) - return; - - // taken from win_gamma.c: - for (i = 0; i < 256; i++) - { - table[0][i] = ( ( ( Uint16 ) red[i] ) << 8 ) | red[i]; - table[1][i] = ( ( ( Uint16 ) green[i] ) << 8 ) | green[i]; - table[2][i] = ( ( ( Uint16 ) blue[i] ) << 8 ) | blue[i]; - } - - // enforce constantly increasing - for (j = 0; j < 3; j++) - { - for (i = 1; i < 256; i++) - { - if (table[j][i] < table[j][i-1]) - table[j][i] = table[j][i-1]; - } - } - - SDL_SetGammaRamp(table[0], table[1], table[2]); - -// g = Cvar_Get("r_gamma", "1.0", 0)->value; -// SDL_SetGamma(g, g, g); -} - -/* -** GLimp_Shutdown -** -** This routine does all OS specific shutdown procedures for the OpenGL -** subsystem. Under OpenGL this means NULLing out the current DC and -** HGLRC, deleting the rendering context, and releasing the DC acquired -** for the window. The state structure is also nulled out. -** -*/ -void GLimp_Shutdown( void ) -{ - IN_Shutdown(); - screen = NULL; - - memset( &glConfig, 0, sizeof( glConfig ) ); - memset( &glState, 0, sizeof( glState ) ); - - QGL_Shutdown(); -} - -/* -** GLimp_LogComment -*/ -void GLimp_LogComment( char *comment ) -{ - if ( glw_state.log_fp ) - { - fprintf( glw_state.log_fp, "%s", comment ); - } -} - -/* -** GLW_StartDriverAndSetMode -*/ -// bk001204 - prototype needed -static int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen ); -static qboolean GLW_StartDriverAndSetMode( const char *drivername, - int mode, - qboolean fullscreen ) -{ - rserr_t err; - - if (GLimp_sdl_init_video() == qfalse) - return qfalse; - - // don't ever bother going into fullscreen with a voodoo card -#if 1 // JDC: I reenabled this - if ( Q_stristr( drivername, "Voodoo" ) ) - { - ri.Cvar_Set( "r_fullscreen", "0" ); - r_fullscreen->modified = qfalse; - fullscreen = qfalse; - } -#endif - - if (fullscreen && in_nograb->value) - { - ri.Printf( PRINT_ALL, "Fullscreen not allowed with in_nograb 1\n"); - ri.Cvar_Set( "r_fullscreen", "0" ); - r_fullscreen->modified = qfalse; - fullscreen = qfalse; - } - - err = GLW_SetMode( drivername, mode, fullscreen ); - - switch ( err ) - { - case RSERR_INVALID_FULLSCREEN: - ri.Printf( PRINT_ALL, "...WARNING: fullscreen unavailable in this mode\n" ); - return qfalse; - case RSERR_INVALID_MODE: - ri.Printf( PRINT_ALL, "...WARNING: could not set the given mode (%d)\n", mode ); - return qfalse; - default: - break; - } - return qtrue; -} - -/* -** GLW_SetMode -*/ -static int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen ) -{ - const char* glstring; // bk001130 - from cvs1.17 (mkv) - int sdlcolorbits; - int colorbits, depthbits, stencilbits; - int tcolorbits, tdepthbits, tstencilbits; - int i = 0; - SDL_Surface *vidscreen = NULL; - - ri.Printf( PRINT_ALL, "Initializing OpenGL display\n"); - - ri.Printf (PRINT_ALL, "...setting mode %d:", mode ); - - if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) ) - { - ri.Printf( PRINT_ALL, " invalid mode\n" ); - return RSERR_INVALID_MODE; - } - ri.Printf( PRINT_ALL, " %d %d\n", glConfig.vidWidth, glConfig.vidHeight); - - Uint32 flags = SDL_OPENGL; - if (fullscreen) - { - flags |= SDL_FULLSCREEN; - glConfig.isFullscreen = qtrue; - } - else - glConfig.isFullscreen = qfalse; - - if (!r_colorbits->value) - colorbits = 24; - else - colorbits = r_colorbits->value; - - if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) ) - colorbits = 16; - - if (!r_depthbits->value) - depthbits = 24; - else - depthbits = r_depthbits->value; - stencilbits = r_stencilbits->value; - - for (i = 0; i < 16; i++) - { - // 0 - default - // 1 - minus colorbits - // 2 - minus depthbits - // 3 - minus stencil - if ((i % 4) == 0 && i) - { - // one pass, reduce - switch (i / 4) - { - case 2 : - if (colorbits == 24) - colorbits = 16; - break; - case 1 : - if (depthbits == 24) - depthbits = 16; - else if (depthbits == 16) - depthbits = 8; - case 3 : - if (stencilbits == 24) - stencilbits = 16; - else if (stencilbits == 16) - stencilbits = 8; - } - } - - tcolorbits = colorbits; - tdepthbits = depthbits; - tstencilbits = stencilbits; - - if ((i % 4) == 3) - { // reduce colorbits - if (tcolorbits == 24) - tcolorbits = 16; - } - - if ((i % 4) == 2) - { // reduce depthbits - if (tdepthbits == 24) - tdepthbits = 16; - else if (tdepthbits == 16) - tdepthbits = 8; - } - - if ((i % 4) == 1) - { // reduce stencilbits - if (tstencilbits == 24) - tstencilbits = 16; - else if (tstencilbits == 16) - tstencilbits = 8; - else - tstencilbits = 0; - } - - sdlcolorbits = 4; - if (tcolorbits == 24) - sdlcolorbits = 8; - - SDL_GL_SetAttribute( SDL_GL_RED_SIZE, sdlcolorbits ); - SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, sdlcolorbits ); - SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits ); - SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits ); - SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits ); - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); - -#if SDL_VERSION_ATLEAST( 1, 2, 10 ) - if( SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, r_swapInterval->integer ) ) - ri.Printf( PRINT_ALL, "r_swapInterval requires libSDL >= 1.2.10\n" ); -#else - #warning libSDL >= 1.2.10 required for r_swapInterval support -#endif // SDL_GL_SWAP_CONTROL - - SDL_WM_SetCaption(CLIENT_WINDOW_TITLE, CLIENT_WINDOW_ICON); - SDL_ShowCursor(0); - SDL_EnableUNICODE(1); - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); - sdlrepeatenabled = qtrue; - - if (!(vidscreen = SDL_SetVideoMode(glConfig.vidWidth, glConfig.vidHeight, colorbits, flags))) - { - fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError()); - continue; - } - - opengl_context = GLimp_GetCurrentContext(); - - ri.Printf( PRINT_ALL, "Using %d/%d/%d Color bits, %d depth, %d stencil display.\n", - sdlcolorbits, sdlcolorbits, sdlcolorbits, - tdepthbits, tstencilbits); - - glConfig.colorBits = tcolorbits; - glConfig.depthBits = tdepthbits; - glConfig.stencilBits = tstencilbits; - break; - } - - if (!vidscreen) - { - ri.Printf( PRINT_ALL, "Couldn't get a visual\n" ); - return RSERR_INVALID_MODE; - } - - screen = vidscreen; - - // bk001130 - from cvs1.17 (mkv) - glstring = (char *) qglGetString (GL_RENDERER); - ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glstring ); - - // bk010122 - new software token (Indirect) - if ( !Q_stricmp( glstring, "Mesa X11") - || !Q_stricmp( glstring, "Mesa GLX Indirect") ) - { - if ( !r_allowSoftwareGL->integer ) - { - ri.Printf( PRINT_ALL, "\n\n***********************************************************\n" ); - ri.Printf( PRINT_ALL, " You are using software Mesa (no hardware acceleration)! \n" ); - ri.Printf( PRINT_ALL, " Driver DLL used: %s\n", drivername ); - ri.Printf( PRINT_ALL, " If this is intentional, add\n" ); - ri.Printf( PRINT_ALL, " \"+set r_allowSoftwareGL 1\"\n" ); - ri.Printf( PRINT_ALL, " to the command line when starting the game.\n" ); - ri.Printf( PRINT_ALL, "***********************************************************\n"); - GLimp_Shutdown( ); - return RSERR_INVALID_MODE; - } else - { - ri.Printf( PRINT_ALL, "...using software Mesa (r_allowSoftwareGL==1).\n" ); - } - } - - return RSERR_OK; -} - -/* -** GLW_InitExtensions -*/ -static void GLW_InitExtensions( void ) -{ - if ( !r_allowExtensions->integer ) - { - ri.Printf( PRINT_ALL, "*** IGNORING OPENGL EXTENSIONS ***\n" ); - return; - } - - ri.Printf( PRINT_ALL, "Initializing OpenGL extensions\n" ); - - // GL_S3_s3tc - if ( Q_stristr( glConfig.extensions_string, "GL_S3_s3tc" ) ) - { - if ( r_ext_compressed_textures->value ) - { - glConfig.textureCompression = TC_S3TC; - ri.Printf( PRINT_ALL, "...using GL_S3_s3tc\n" ); - } else - { - glConfig.textureCompression = TC_NONE; - ri.Printf( PRINT_ALL, "...ignoring GL_S3_s3tc\n" ); - } - } else - { - glConfig.textureCompression = TC_NONE; - ri.Printf( PRINT_ALL, "...GL_S3_s3tc not found\n" ); - } - - // GL_EXT_texture_env_add - glConfig.textureEnvAddAvailable = qfalse; - if ( Q_stristr( glConfig.extensions_string, "EXT_texture_env_add" ) ) - { - if ( r_ext_texture_env_add->integer ) - { - glConfig.textureEnvAddAvailable = qtrue; - ri.Printf( PRINT_ALL, "...using GL_EXT_texture_env_add\n" ); - } else - { - glConfig.textureEnvAddAvailable = qfalse; - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_env_add\n" ); - } - } else - { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_env_add not found\n" ); - } - - // GL_ARB_multitexture - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - if ( Q_stristr( glConfig.extensions_string, "GL_ARB_multitexture" ) ) - { - if ( r_ext_multitexture->value ) - { - qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) SDL_GL_GetProcAddress( "glMultiTexCoord2fARB" ); - qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glActiveTextureARB" ); - qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glClientActiveTextureARB" ); - - if ( qglActiveTextureARB ) - { - GLint glint = 0; - qglGetIntegerv( GL_MAX_ACTIVE_TEXTURES_ARB, &glint ); - glConfig.maxActiveTextures = (int) glint; - if ( glConfig.maxActiveTextures > 1 ) - { - ri.Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" ); - } else - { - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - ri.Printf( PRINT_ALL, "...not using GL_ARB_multitexture, < 2 texture units\n" ); - } - } - } else - { - ri.Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" ); - } - } else - { - ri.Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" ); - } - - // GL_EXT_compiled_vertex_array - if ( Q_stristr( glConfig.extensions_string, "GL_EXT_compiled_vertex_array" ) ) - { - if ( r_ext_compiled_vertex_array->value ) - { - ri.Printf( PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n" ); - qglLockArraysEXT = ( void ( APIENTRY * )( GLint, GLint ) ) SDL_GL_GetProcAddress( "glLockArraysEXT" ); - qglUnlockArraysEXT = ( void ( APIENTRY * )( void ) ) SDL_GL_GetProcAddress( "glUnlockArraysEXT" ); - if (!qglLockArraysEXT || !qglUnlockArraysEXT) - { - ri.Error (ERR_FATAL, "bad getprocaddress"); - } - } else - { - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_compiled_vertex_array\n" ); - } - } else - { - ri.Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" ); - } - - textureFilterAnisotropic = qfalse; - if ( strstr( glConfig.extensions_string, "GL_EXT_texture_filter_anisotropic" ) ) - { - if ( r_ext_texture_filter_anisotropic->integer ) { - qglGetIntegerv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, (GLint *)&maxAnisotropy ); - if ( maxAnisotropy <= 0 ) { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not properly supported!\n" ); - maxAnisotropy = 0; - } - else - { - ri.Printf( PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic (max: %i)\n", maxAnisotropy ); - textureFilterAnisotropic = qtrue; - } - } - else - { - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" ); - } -} - -static void GLW_InitGamma( void ) -{ - glConfig.deviceSupportsGamma = qtrue; -} - -/* -** GLW_LoadOpenGL -** -** GLimp_win.c internal function that that attempts to load and use -** a specific OpenGL DLL. -*/ -static qboolean GLW_LoadOpenGL( const char *name ) -{ - qboolean fullscreen; - - ri.Printf( PRINT_ALL, "...loading %s:\n", name ); - - // disable the 3Dfx splash screen and set gamma - // we do this all the time, but it shouldn't hurt anything - // on non-3Dfx stuff - putenv("FX_GLIDE_NO_SPLASH=0"); - - // Mesa VooDoo hacks - putenv("MESA_GLX_FX=fullscreen\n"); - - // load the QGL layer - if ( QGL_Init( name ) ) - { - fullscreen = r_fullscreen->integer; - - // create the window and set up the context - if ( !GLW_StartDriverAndSetMode( name, r_mode->integer, fullscreen ) ) - { - if (r_mode->integer != 3) - { - if ( !GLW_StartDriverAndSetMode( name, 3, fullscreen ) ) - { - goto fail; - } - } else - goto fail; - } - - return qtrue; - } else - { - ri.Printf( PRINT_ALL, "failed\n" ); - } - fail: - - QGL_Shutdown(); - - return qfalse; -} - - -/* -** GLimp_Init -** -** This routine is responsible for initializing the OS specific portions -** of OpenGL. -*/ -void GLimp_Init( void ) -{ - qboolean attemptedlibGL = qfalse; - qboolean attempted3Dfx = qfalse; - qboolean success = qfalse; - char buf[1024]; - cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE ); - - r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); - - r_previousglDriver = ri.Cvar_Get( "r_previousglDriver", "", CVAR_ROM ); - - InitSig(); - - IN_Init(); // rcg08312005 moved into glimp. - - // Hack here so that if the UI - if ( *r_previousglDriver->string ) - { - // The UI changed it on us, hack it back - // This means the renderer can't be changed on the fly - ri.Cvar_Set( "r_glDriver", r_previousglDriver->string ); - } - - // - // load and initialize the specific OpenGL driver - // - if ( !GLW_LoadOpenGL( r_glDriver->string ) ) - { - if ( !Q_stricmp( r_glDriver->string, OPENGL_DRIVER_NAME ) ) - { - attemptedlibGL = qtrue; - } else if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) ) - { - attempted3Dfx = qtrue; - } - - #if 0 - // TTimo - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=455 - // old legacy load code, was confusing people who had a bad OpenGL setup - if ( !attempted3Dfx && !success ) - { - attempted3Dfx = qtrue; - if ( GLW_LoadOpenGL( _3DFX_DRIVER_NAME ) ) - { - ri.Cvar_Set( "r_glDriver", _3DFX_DRIVER_NAME ); - r_glDriver->modified = qfalse; - success = qtrue; - } - } - #endif - - // try ICD before trying 3Dfx standalone driver - if ( !attemptedlibGL && !success ) - { - attemptedlibGL = qtrue; - if ( GLW_LoadOpenGL( OPENGL_DRIVER_NAME ) ) - { - ri.Cvar_Set( "r_glDriver", OPENGL_DRIVER_NAME ); - r_glDriver->modified = qfalse; - success = qtrue; - } - } - - if (!success) - ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" ); - - } - - // Save it in case the UI stomps it - ri.Cvar_Set( "r_previousglDriver", r_glDriver->string ); - - // This values force the UI to disable driver selection - glConfig.driverType = GLDRV_ICD; - glConfig.hardwareType = GLHW_GENERIC; - - // get our config strings - Q_strncpyz( glConfig.vendor_string, (char *) qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) ); - Q_strncpyz( glConfig.renderer_string, (char *) qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) ); - if (*glConfig.renderer_string && glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] == '\n') - glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] = 0; - Q_strncpyz( glConfig.version_string, (char *) qglGetString (GL_VERSION), sizeof( glConfig.version_string ) ); - Q_strncpyz( glConfig.extensions_string, (char *) qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); - - // - // chipset specific configuration - // - strcpy( buf, glConfig.renderer_string ); - strlwr( buf ); - - // - // NOTE: if changing cvars, do it within this block. This allows them - // to be overridden when testing driver fixes, etc. but only sets - // them to their default state when the hardware is first installed/run. - // - if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) - { - glConfig.hardwareType = GLHW_GENERIC; - - ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - - // VOODOO GRAPHICS w/ 2MB - if ( Q_stristr( buf, "voodoo graphics/1 tmu/2 mb" ) ) - { - ri.Cvar_Set( "r_picmip", "2" ); - ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); - } else - { - ri.Cvar_Set( "r_picmip", "1" ); - - if ( Q_stristr( buf, "rage 128" ) || Q_stristr( buf, "rage128" ) ) - { - ri.Cvar_Set( "r_finish", "0" ); - } - // Savage3D and Savage4 should always have trilinear enabled - else if ( Q_stristr( buf, "savage3d" ) || Q_stristr( buf, "s3 savage4" ) ) - { - ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); - } - } - } - - // - // this is where hardware specific workarounds that should be - // detected/initialized every startup should go. - // - if ( Q_stristr( buf, "banshee" ) || Q_stristr( buf, "Voodoo_Graphics" ) ) - { - glConfig.hardwareType = GLHW_3DFX_2D3D; - } else if ( Q_stristr( buf, "rage pro" ) || Q_stristr( buf, "RagePro" ) ) - { - glConfig.hardwareType = GLHW_RAGEPRO; - } else if ( Q_stristr( buf, "permedia2" ) ) - { - glConfig.hardwareType = GLHW_PERMEDIA2; - } else if ( Q_stristr( buf, "riva 128" ) ) - { - glConfig.hardwareType = GLHW_RIVA128; - } else if ( Q_stristr( buf, "riva tnt " ) ) - { - } - - ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); - - // initialize extensions - GLW_InitExtensions(); - GLW_InitGamma(); - - InitSig(); // not clear why this is at begin & end of function - - return; -} - - -/* -** GLimp_EndFrame -** -** Responsible for doing a swapbuffers and possibly for other stuff -** as yet to be determined. Probably better not to make this a GLimp -** function and instead do a call to GLimp_SwapBuffers. -*/ -void GLimp_EndFrame (void) -{ - // don't flip if drawing to front buffer - if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 ) - { - SDL_GL_SwapBuffers(); - } - - if( r_fullscreen->modified ) - { - qboolean fullscreen; - qboolean sdlToggled = qfalse; - SDL_Surface *s = SDL_GetVideoSurface( ); - - if( s ) - { - // Find out the current state - if( s->flags & SDL_FULLSCREEN ) - fullscreen = qtrue; - else - fullscreen = qfalse; - - // Is the state we want different from the current state? - if( !!r_fullscreen->integer != fullscreen ) - sdlToggled = SDL_WM_ToggleFullScreen( s ); - else - sdlToggled = qtrue; - } - - // SDL_WM_ToggleFullScreen didn't work, so do it the slow way - if( !sdlToggled ) - Cbuf_AddText( "vid_restart" ); - - r_fullscreen->modified = qfalse; - } - - // check logging - QGL_EnableLogging( (qboolean)r_logFile->integer ); // bk001205 - was ->value -} - - - -#ifdef SMP -/* -=========================================================== - -SMP acceleration - -=========================================================== -*/ - -/* - * I have no idea if this will even work...most platforms don't offer - * thread-safe OpenGL libraries, and it looks like the original Linux - * code counted on each thread claiming the GL context with glXMakeCurrent(), - * which you can't currently do in SDL. We'll just have to hope for the best. - */ - -static SDL_mutex *smpMutex = NULL; -static SDL_cond *renderCommandsEvent = NULL; -static SDL_cond *renderCompletedEvent = NULL; -static void (*glimpRenderThread)( void ) = NULL; -static SDL_Thread *renderThread = NULL; - -static void GLimp_ShutdownRenderThread(void) -{ - if (smpMutex != NULL) - { - SDL_DestroyMutex(smpMutex); - smpMutex = NULL; - } - - if (renderCommandsEvent != NULL) - { - SDL_DestroyCond(renderCommandsEvent); - renderCommandsEvent = NULL; - } - - if (renderCompletedEvent != NULL) - { - SDL_DestroyCond(renderCompletedEvent); - renderCompletedEvent = NULL; - } - - glimpRenderThread = NULL; -} - -static int GLimp_RenderThreadWrapper( void *arg ) -{ - Com_Printf( "Render thread starting\n" ); - - glimpRenderThread(); - - GLimp_SetCurrentContext(NULL); - - Com_Printf( "Render thread terminating\n" ); - - return 0; -} - -qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) -{ - static qboolean warned = qfalse; - if (!warned) - { - Com_Printf("WARNING: You enable r_smp at your own risk!\n"); - warned = qtrue; - } - -#ifndef MACOS_X - return qfalse; /* better safe than sorry for now. */ -#endif - - if (renderThread != NULL) /* hopefully just a zombie at this point... */ - { - Com_Printf("Already a render thread? Trying to clean it up...\n"); - SDL_WaitThread(renderThread, NULL); - renderThread = NULL; - GLimp_ShutdownRenderThread(); - } - - smpMutex = SDL_CreateMutex(); - if (smpMutex == NULL) - { - Com_Printf( "smpMutex creation failed: %s\n", SDL_GetError() ); - GLimp_ShutdownRenderThread(); - return qfalse; - } - - renderCommandsEvent = SDL_CreateCond(); - if (renderCommandsEvent == NULL) - { - Com_Printf( "renderCommandsEvent creation failed: %s\n", SDL_GetError() ); - GLimp_ShutdownRenderThread(); - return qfalse; - } - - renderCompletedEvent = SDL_CreateCond(); - if (renderCompletedEvent == NULL) - { - Com_Printf( "renderCompletedEvent creation failed: %s\n", SDL_GetError() ); - GLimp_ShutdownRenderThread(); - return qfalse; - } - - glimpRenderThread = function; - renderThread = SDL_CreateThread(GLimp_RenderThreadWrapper, NULL); - if ( renderThread == NULL ) { - ri.Printf( PRINT_ALL, "SDL_CreateThread() returned %s", SDL_GetError() ); - GLimp_ShutdownRenderThread(); - return qfalse; - } else { - // !!! FIXME: No detach API available in SDL! - //ret = pthread_detach( renderThread ); - //if ( ret ) { - //ri.Printf( PRINT_ALL, "pthread_detach returned %d: %s", ret, strerror( ret ) ); - //} - } - - return qtrue; -} - -static volatile void *smpData = NULL; -static volatile qboolean smpDataReady; - -void *GLimp_RendererSleep( void ) -{ - void *data = NULL; - - GLimp_SetCurrentContext(NULL); - - SDL_LockMutex(smpMutex); - { - smpData = NULL; - smpDataReady = qfalse; - - // after this, the front end can exit GLimp_FrontEndSleep - SDL_CondSignal(renderCompletedEvent); - - while ( !smpDataReady ) { - SDL_CondWait(renderCommandsEvent, smpMutex); - } - - data = (void *)smpData; - } - SDL_UnlockMutex(smpMutex); - - GLimp_SetCurrentContext(opengl_context); - - return data; -} - -void GLimp_FrontEndSleep( void ) -{ - SDL_LockMutex(smpMutex); - { - while ( smpData ) { - SDL_CondWait(renderCompletedEvent, smpMutex); - } - } - SDL_UnlockMutex(smpMutex); - - GLimp_SetCurrentContext(opengl_context); -} - -void GLimp_WakeRenderer( void *data ) -{ - GLimp_SetCurrentContext(NULL); - - SDL_LockMutex(smpMutex); - { - assert( smpData == NULL ); - smpData = data; - smpDataReady = qtrue; - - // after this, the renderer can continue through GLimp_RendererSleep - SDL_CondSignal(renderCommandsEvent); - } - SDL_UnlockMutex(smpMutex); -} - -#else - -void GLimp_RenderThreadWrapper( void *stub ) {} -qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) { - ri.Printf( PRINT_WARNING, "ERROR: SMP support was disabled at compile time\n"); - return qfalse; -} -void *GLimp_RendererSleep( void ) { - return NULL; -} -void GLimp_FrontEndSleep( void ) {} -void GLimp_WakeRenderer( void *data ) {} - -#endif - -/*****************************************************************************/ -/* MOUSE */ -/*****************************************************************************/ - -void IN_Init(void) { - Com_DPrintf ("\n------- Input Initialization -------\n"); - // mouse variables - in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE); - in_disablemacosxmouseaccel = Cvar_Get ("in_disablemacosxmouseaccel", "1", CVAR_ARCHIVE); - - // turn on-off sub-frame timing of X events - in_subframe = Cvar_Get ("in_subframe", "1", CVAR_ARCHIVE); - - // developer feature, allows to break without loosing mouse pointer - in_nograb = Cvar_Get ("in_nograb", "0", 0); - - // bk001130 - from cvs.17 (mkv), joystick variables - in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE|CVAR_LATCH); - // bk001130 - changed this to match win32 - in_joystickDebug = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP); - joy_threshold = Cvar_Get ("joy_threshold", "0.15", CVAR_ARCHIVE); // FIXME: in_joythreshold - -#ifdef MACOS_X - Cvar_Set( "cl_platformSensitivity", "1.0" ); -#else - Cvar_Set( "cl_platformSensitivity", "2.0" ); -#endif - - if (in_mouse->value) - mouse_avail = qtrue; - else - mouse_avail = qfalse; - - IN_StartupJoystick( ); // bk001130 - from cvs1.17 (mkv) - Com_DPrintf ("------------------------------------\n"); -} - -void IN_Shutdown(void) -{ - IN_DeactivateMouse(); - - mouse_avail = qfalse; - - if (stick) - { - SDL_JoystickClose(stick); - stick = NULL; - } - - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); -} - -void IN_Frame (void) { - - // bk001130 - from cvs 1.17 (mkv) - IN_JoyMove(); // FIXME: disable if on desktop? - - if ( cls.keyCatchers & KEYCATCH_CONSOLE ) - { - // temporarily deactivate if not in the game and - // running on the desktop - // voodoo always counts as full screen - if (Cvar_VariableValue ("r_fullscreen") == 0 - && strcmp( Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME ) ) - { - IN_DeactivateMouse (); - return; - } - } - - IN_ActivateMouse(); -} - -void IN_Activate(void) -{ -} - -// bk001130 - cvs1.17 joystick code (mkv) was here, no linux_joystick.c - -void Sys_SendKeyEvents (void) { - // XEvent event; // bk001204 - unused - - if (!screen) - return; - HandleEvents(); -} - - -// (moved this back in here from linux_joystick.c, so it's all in one place... -// --ryan. - -/* We translate axes movement into keypresses. */ -static int joy_keys[16] = { - K_LEFTARROW, K_RIGHTARROW, - K_UPARROW, K_DOWNARROW, - K_JOY16, K_JOY17, - K_JOY18, K_JOY19, - K_JOY20, K_JOY21, - K_JOY22, K_JOY23, - - K_JOY24, K_JOY25, - K_JOY26, K_JOY27 -}; - -// translate hat events into keypresses -// the 4 highest buttons are used for the first hat ... -static int hat_keys[16] = { - K_JOY29, K_JOY30, - K_JOY31, K_JOY32, - K_JOY25, K_JOY26, - K_JOY27, K_JOY28, - K_JOY21, K_JOY22, - K_JOY23, K_JOY24, - K_JOY17, K_JOY18, - K_JOY19, K_JOY20 -}; - - -// bk001130 - from linux_glimp.c -extern cvar_t * in_joystick; -extern cvar_t * in_joystickDebug; -extern cvar_t * joy_threshold; -cvar_t *in_joystickNo; - -#define ARRAYLEN(x) (sizeof (x) / sizeof (x[0])) -struct -{ - qboolean buttons[16]; // !!! FIXME: these might be too many. - unsigned int oldaxes; - unsigned int oldhats; -} stick_state; - - -/**********************************************/ -/* Joystick routines. */ -/**********************************************/ -// bk001130 - from cvs1.17 (mkv), removed from linux_glimp.c -void IN_StartupJoystick( void ) -{ - int i = 0; - int total = 0; - - if (stick != NULL) - SDL_JoystickClose(stick); - - stick = NULL; - memset(&stick_state, '\0', sizeof (stick_state)); - - if( !in_joystick->integer ) { - Com_DPrintf( "Joystick is not active.\n" ); - return; - } - - if (!SDL_WasInit(SDL_INIT_JOYSTICK)) - { - Com_DPrintf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n"); - if (SDL_Init(SDL_INIT_JOYSTICK) == -1) - { - Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError()); - return; - } - Com_DPrintf("SDL_Init(SDL_INIT_JOYSTICK) passed.\n"); - } - - total = SDL_NumJoysticks(); - Com_DPrintf("%d possible joysticks\n", total); - for (i = 0; i < total; i++) - Com_DPrintf("[%d] %s\n", i, SDL_JoystickName(i)); - - in_joystickNo = Cvar_Get( "in_joystickNo", "0", CVAR_ARCHIVE ); - if( in_joystickNo->integer < 0 || in_joystickNo->integer >= total ) - Cvar_Set( "in_joystickNo", "0" ); - - stick = SDL_JoystickOpen( in_joystickNo->integer ); - - if (stick == NULL) { - Com_DPrintf( "No joystick opened.\n" ); - return; - } - - Com_DPrintf( "Joystick %d opened\n", in_joystickNo->integer ); - Com_DPrintf( "Name: %s\n", SDL_JoystickName(in_joystickNo->integer) ); - Com_DPrintf( "Axes: %d\n", SDL_JoystickNumAxes(stick) ); - Com_DPrintf( "Hats: %d\n", SDL_JoystickNumHats(stick) ); - Com_DPrintf( "Buttons: %d\n", SDL_JoystickNumButtons(stick) ); - Com_DPrintf( "Balls: %d\n", SDL_JoystickNumBalls(stick) ); - - SDL_JoystickEventState(SDL_QUERY); - - /* Our work here is done. */ - return; -} - -void IN_JoyMove( void ) -{ - qboolean joy_pressed[ARRAYLEN(joy_keys)]; - unsigned int axes = 0; - unsigned int hats = 0; - int total = 0; - int i = 0; - - if (!stick) - return; - - SDL_JoystickUpdate(); - - memset(joy_pressed, '\0', sizeof (joy_pressed)); - - // update the ball state. - total = SDL_JoystickNumBalls(stick); - if (total > 0) - { - int balldx = 0; - int balldy = 0; - for (i = 0; i < total; i++) - { - int dx = 0; - int dy = 0; - SDL_JoystickGetBall(stick, i, &dx, &dy); - balldx += dx; - balldy += dy; - } - if (balldx || balldy) - { - // !!! FIXME: is this good for stick balls, or just mice? - // Scale like the mouse input... - if (abs(balldx) > 1) - balldx *= 2; - if (abs(balldy) > 1) - balldy *= 2; - Sys_QueEvent( 0, SE_MOUSE, balldx, balldy, 0, NULL ); - } - } - - // now query the stick buttons... - total = SDL_JoystickNumButtons(stick); - if (total > 0) - { - if (total > ARRAYLEN(stick_state.buttons)) - total = ARRAYLEN(stick_state.buttons); - for (i = 0; i < total; i++) - { - qboolean pressed = (SDL_JoystickGetButton(stick, i) != 0); - if (pressed != stick_state.buttons[i]) - { - Sys_QueEvent( 0, SE_KEY, K_JOY1 + i, pressed, 0, NULL ); - stick_state.buttons[i] = pressed; - } - } - } - - // look at the hats... - total = SDL_JoystickNumHats(stick); - if (total > 0) - { - if (total > 4) total = 4; - for (i = 0; i < total; i++) - { - ((Uint8 *)&hats)[i] = SDL_JoystickGetHat(stick, i); - } - } - - // update hat state - if (hats != stick_state.oldhats) - { - for( i = 0; i < 4; i++ ) { - if( ((Uint8 *)&hats)[i] != ((Uint8 *)&stick_state.oldhats)[i] ) { - // release event - switch( ((Uint8 *)&stick_state.oldhats)[i] ) { - case SDL_HAT_UP: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 0], qfalse, 0, NULL ); - break; - case SDL_HAT_RIGHT: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 1], qfalse, 0, NULL ); - break; - case SDL_HAT_DOWN: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 2], qfalse, 0, NULL ); - break; - case SDL_HAT_LEFT: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 3], qfalse, 0, NULL ); - break; - case SDL_HAT_RIGHTUP: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 0], qfalse, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 1], qfalse, 0, NULL ); - break; - case SDL_HAT_RIGHTDOWN: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 2], qfalse, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 1], qfalse, 0, NULL ); - break; - case SDL_HAT_LEFTUP: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 0], qfalse, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 3], qfalse, 0, NULL ); - break; - case SDL_HAT_LEFTDOWN: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 2], qfalse, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 3], qfalse, 0, NULL ); - break; - default: - break; - } - // press event - switch( ((Uint8 *)&hats)[i] ) { - case SDL_HAT_UP: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 0], qtrue, 0, NULL ); - break; - case SDL_HAT_RIGHT: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 1], qtrue, 0, NULL ); - break; - case SDL_HAT_DOWN: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 2], qtrue, 0, NULL ); - break; - case SDL_HAT_LEFT: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 3], qtrue, 0, NULL ); - break; - case SDL_HAT_RIGHTUP: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 0], qtrue, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 1], qtrue, 0, NULL ); - break; - case SDL_HAT_RIGHTDOWN: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 2], qtrue, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 1], qtrue, 0, NULL ); - break; - case SDL_HAT_LEFTUP: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 0], qtrue, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 3], qtrue, 0, NULL ); - break; - case SDL_HAT_LEFTDOWN: - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 2], qtrue, 0, NULL ); - Sys_QueEvent( 0, SE_KEY, hat_keys[4*i + 3], qtrue, 0, NULL ); - break; - default: - break; - } - } - } - } - - // save hat state - stick_state.oldhats = hats; - - // finally, look at the axes... - total = SDL_JoystickNumAxes(stick); - if (total > 0) - { - if (total > 16) total = 16; - for (i = 0; i < total; i++) - { - Sint16 axis = SDL_JoystickGetAxis(stick, i); - float f = ( (float) axis ) / 32767.0f; - if( f < -joy_threshold->value ) { - axes |= ( 1 << ( i * 2 ) ); - } else if( f > joy_threshold->value ) { - axes |= ( 1 << ( ( i * 2 ) + 1 ) ); - } - } - } - - /* Time to update axes state based on old vs. new. */ - if (axes != stick_state.oldaxes) - { - for( i = 0; i < 16; i++ ) { - if( ( axes & ( 1 << i ) ) && !( stick_state.oldaxes & ( 1 << i ) ) ) { - Sys_QueEvent( 0, SE_KEY, joy_keys[i], qtrue, 0, NULL ); - } - - if( !( axes & ( 1 << i ) ) && ( stick_state.oldaxes & ( 1 << i ) ) ) { - Sys_QueEvent( 0, SE_KEY, joy_keys[i], qfalse, 0, NULL ); - } - } - } - - /* Save for future generations. */ - stick_state.oldaxes = axes; -} - -#endif // USE_SDL_VIDEO - -// end sdl_glimp.c ... - diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c deleted file mode 100644 index d100a22e..00000000 --- a/code/unix/unix_main.c +++ /dev/null @@ -1,1493 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // dirname -#ifdef __linux__ // rb010123 - #include -#endif - -#if (defined(DEDICATED) && defined(USE_SDL_VIDEO)) -#undef USE_SDL_VIDEO -#endif - -#if USE_SDL_VIDEO -#include "SDL.h" -#include "SDL_loadso.h" -#else -#include -#endif - -#ifdef __linux__ - #include // bk001213 - force dumps on divide by zero -#endif - -#if defined(__sun) - #include -#endif - -// FIXME TTimo should we gard this? most *nix system should comply? -#include - -#include "../qcommon/q_shared.h" -#include "../qcommon/qcommon.h" -#include "../renderer/tr_public.h" - -#include "linux_local.h" // bk001204 - -#if idppc_altivec - #ifdef MACOS_X - #include - #endif -#endif - -unsigned sys_frame_time; - -qboolean stdin_active = qtrue; - -// ============================================================= -// tty console variables -// ============================================================= - -// enable/disabled tty input mode -// NOTE TTimo this is used during startup, cannot be changed during run -static cvar_t *ttycon = NULL; -// general flag to tell about tty console mode -static qboolean ttycon_on = qfalse; -// when printing general stuff to stdout stderr (Sys_Printf) -// we need to disable the tty console stuff -// this increments so we can recursively disable -static int ttycon_hide = 0; -// some key codes that the terminal may be using -// TTimo NOTE: I'm not sure how relevant this is -static int tty_erase; -static int tty_eof; - -static struct termios tty_tc; - -static field_t tty_con; - -static cvar_t *ttycon_ansicolor = NULL; -static qboolean ttycon_color_on = qfalse; - -// history -// NOTE TTimo this is a bit duplicate of the graphical console history -// but it's safer and faster to write our own here -#define TTY_HISTORY 32 -static field_t ttyEditLines[TTY_HISTORY]; -static int hist_current = -1, hist_count = 0; - -// ======================================================================= -// General routines -// ======================================================================= - -// bk001207 -#define MEM_THRESHOLD 96*1024*1024 - -/* -================== -Sys_LowPhysicalMemory() -================== -*/ -qboolean Sys_LowPhysicalMemory() { - //MEMORYSTATUS stat; - //GlobalMemoryStatus (&stat); - //return (stat.dwTotalPhys <= MEM_THRESHOLD) ? qtrue : qfalse; - return qfalse; // bk001207 - FIXME -} - -/* -================== -Sys_FunctionCmp -================== -*/ -int Sys_FunctionCmp(void *f1, void *f2) { - return qtrue; -} - -/* -================== -Sys_FunctionCheckSum -================== -*/ -int Sys_FunctionCheckSum(void *f1) { - return 0; -} - -/* -================== -Sys_MonkeyShouldBeSpanked -================== -*/ -int Sys_MonkeyShouldBeSpanked( void ) { - return 0; -} - -void Sys_BeginProfiling( void ) { -} - -/* -================= -Sys_In_Restart_f - -Restart the input subsystem -================= -*/ -void Sys_In_Restart_f( void ) -{ - IN_Shutdown(); - IN_Init(); -} - -// ============================================================= -// tty console routines -// NOTE: if the user is editing a line when something gets printed to the early console then it won't look good -// so we provide tty_Clear and tty_Show to be called before and after a stdout or stderr output -// ============================================================= - -// flush stdin, I suspect some terminals are sending a LOT of shit -// FIXME TTimo relevant? -void tty_FlushIn( void ) -{ - char key; - while (read(0, &key, 1)!=-1); -} - -// do a backspace -// TTimo NOTE: it seems on some terminals just sending '\b' is not enough -// so for now, in any case we send "\b \b" .. yeah well .. -// (there may be a way to find out if '\b' alone would work though) -void tty_Back( void ) -{ - char key; - key = '\b'; - write(1, &key, 1); - key = ' '; - write(1, &key, 1); - key = '\b'; - write(1, &key, 1); -} - -// clear the display of the line currently edited -// bring cursor back to beginning of line -void tty_Hide( void ) -{ - int i; - assert(ttycon_on); - if (ttycon_hide) - { - ttycon_hide++; - return; - } - if (tty_con.cursor>0) - { - for (i=0; i0); - ttycon_hide--; - if (ttycon_hide == 0) - { - if (tty_con.cursor) - { - for (i=0; i= 0); - assert(hist_current >= -1); - assert(hist_current <= hist_count); - // make some room - for (i=TTY_HISTORY-1; i>0; i--) - { - ttyEditLines[i] = ttyEditLines[i-1]; - } - ttyEditLines[0] = *field; - if (hist_count= 0); - assert(hist_current >= -1); - assert(hist_current <= hist_count); - hist_prev = hist_current + 1; - if (hist_prev >= hist_count) - { - return NULL; - } - hist_current++; - return &(ttyEditLines[hist_current]); -} - -field_t *Hist_Next( void ) -{ - assert(hist_count <= TTY_HISTORY); - assert(hist_count >= 0); - assert(hist_current >= -1); - assert(hist_current <= hist_count); - if (hist_current >= 0) - { - hist_current--; - } - if (hist_current == -1) - { - return NULL; - } - return &(ttyEditLines[hist_current]); -} - -// ============================================================= -// general sys routines -// ============================================================= - -#if 0 -// NOTE TTimo this is not used .. looks interesting though? protection against buffer overflow kind of stuff? -void Sys_Printf (char *fmt, ...) -{ - va_list argptr; - char text[1024]; - unsigned char *p; - - va_start (argptr,fmt); - vsprintf (text,fmt,argptr); - va_end (argptr); - - if (strlen(text) > sizeof(text)) - Sys_Error("memory overwrite in Sys_Printf"); - - for (p = (unsigned char *)text; *p; p++) - { - *p &= 0x7f; - if ((*p > 128 || *p < 32) && *p != 10 && *p != 13 && *p != 9) - printf("[%02x]", *p); - else - putc(*p, stdout); - } -} -#endif - -// single exit point (regular exit or in case of signal fault) -void Sys_Exit( int ex ) { - Sys_ConsoleInputShutdown(); - -#ifdef NDEBUG // regular behavior - - // We can't do this - // as long as GL DLL's keep installing with atexit... - //exit(ex); - _exit(ex); -#else - - // Give me a backtrace on error exits. - assert( ex == 0 ); - exit(ex); -#endif -} - - -void Sys_Quit (void) { - CL_Shutdown (); - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); - Sys_Exit(0); -} - - -#if idppc_altivec && !MACOS_X -/* This is the brute force way of detecting instruction sets... - the code is borrowed from SDL, which got the idea from the libmpeg2 - library - thanks! - */ -#include -#include -static jmp_buf jmpbuf; -static void illegal_instruction(int sig) -{ - longjmp(jmpbuf, 1); -} -#endif - -qboolean Sys_DetectAltivec( void ) -{ - qboolean altivec = qfalse; - -#if idppc_altivec - #ifdef MACOS_X - int selectors[2] = { CTL_HW, HW_VECTORUNIT }; - int hasVectorUnit = 0; - size_t length = sizeof(hasVectorUnit); - int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); - - if( 0 == error ) - altivec = (hasVectorUnit != 0); - #else - void (*handler)(int sig); - handler = signal(SIGILL, illegal_instruction); - if ( setjmp(jmpbuf) == 0 ) { - asm volatile ("mtspr 256, %0\n\t" - "vand %%v0, %%v0, %%v0" - : - : "r" (-1)); - altivec = qtrue; - } - signal(SIGILL, handler); - #endif -#endif - - return altivec; -} - -void Sys_Init(void) -{ - - Cmd_AddCommand ("in_restart", Sys_In_Restart_f); - - Cvar_Set( "arch", OS_STRING " " ARCH_STRING ); - - Cvar_Set( "username", Sys_GetCurrentUser() ); - - //IN_Init(); // rcg08312005 moved into glimp. - -} - -void Sys_Error( const char *error, ...) -{ - va_list argptr; - char string[1024]; - - // change stdin to non blocking - // NOTE TTimo not sure how well that goes with tty console mode - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); - - // don't bother do a show on this one heh - if (ttycon_on) - { - tty_Hide(); - } - - CL_Shutdown (); - - va_start (argptr,error); - Q_vsnprintf (string, sizeof(string), error, argptr); - va_end (argptr); - fprintf(stderr, "Sys_Error: %s\n", string); - - Sys_Exit( 1 ); // bk010104 - use single exit point. -} - -void Sys_Warn (char *warning, ...) -{ - va_list argptr; - char string[1024]; - - va_start (argptr,warning); - vsprintf (string,warning,argptr); - va_end (argptr); - - if (ttycon_on) - { - tty_Hide(); - } - - fprintf(stderr, "Warning: %s", string); - - if (ttycon_on) - { - tty_Show(); - } -} - -/* -============ -Sys_FileTime - -returns -1 if not present -============ -*/ -int Sys_FileTime (char *path) -{ - struct stat buf; - - if (stat (path,&buf) == -1) - return -1; - - return buf.st_mtime; -} - -void floating_point_exception_handler(int whatever) -{ - signal(SIGFPE, floating_point_exception_handler); -} - -// initialize the console input (tty mode if wanted and possible) -void Sys_ConsoleInputInit( void ) -{ - struct termios tc; - - // TTimo - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=390 - // ttycon 0 or 1, if the process is backgrounded (running non interactively) - // then SIGTTIN or SIGTOU is emitted, if not catched, turns into a SIGSTP - signal(SIGTTIN, SIG_IGN); - signal(SIGTTOU, SIG_IGN); - - // FIXME TTimo initialize this in Sys_Init or something? - ttycon = Cvar_Get("ttycon", "1", 0); - if (ttycon && ttycon->value) - { - if (isatty(STDIN_FILENO)!=1) - { - Com_Printf("stdin is not a tty, tty console mode failed\n"); - Cvar_Set("ttycon", "0"); - ttycon_on = qfalse; - return; - } - Com_Printf("Started tty console (use +set ttycon 0 to disable)\n"); - Field_Clear(&tty_con); - tcgetattr (0, &tty_tc); - tty_erase = tty_tc.c_cc[VERASE]; - tty_eof = tty_tc.c_cc[VEOF]; - tc = tty_tc; - /* - ECHO: don't echo input characters - ICANON: enable canonical mode. This enables the special - characters EOF, EOL, EOL2, ERASE, KILL, REPRINT, - STATUS, and WERASE, and buffers by lines. - ISIG: when any of the characters INTR, QUIT, SUSP, or - DSUSP are received, generate the corresponding sig­ - nal - */ - tc.c_lflag &= ~(ECHO | ICANON); - /* - ISTRIP strip off bit 8 - INPCK enable input parity checking - */ - tc.c_iflag &= ~(ISTRIP | INPCK); - tc.c_cc[VMIN] = 1; - tc.c_cc[VTIME] = 0; - tcsetattr (0, TCSADRAIN, &tc); - ttycon_on = qtrue; - - ttycon_ansicolor = Cvar_Get( "ttycon_ansicolor", "0", CVAR_ARCHIVE ); - if( ttycon_ansicolor && ttycon_ansicolor->value ) - { - ttycon_color_on = qtrue; - } - } else - ttycon_on = qfalse; -} - -char *Sys_ConsoleInput(void) -{ - // we use this when sending back commands - static char text[256]; - int avail; - char key; - field_t *history; - - if (ttycon && ttycon->value) - { - avail = read(0, &key, 1); - if (avail != -1) - { - // we have something - // backspace? - // NOTE TTimo testing a lot of values .. seems it's the only way to get it to work everywhere - if ((key == tty_erase) || (key == 127) || (key == 8)) - { - if (tty_con.cursor > 0) - { - tty_con.cursor--; - tty_con.buffer[tty_con.cursor] = '\0'; - tty_Back(); - } - return NULL; - } - // check if this is a control char - if ((key) && (key) < ' ') - { - if (key == '\n') - { - // push it in history - Hist_Add(&tty_con); - strcpy(text, tty_con.buffer); - Field_Clear(&tty_con); - key = '\n'; - write(1, &key, 1); - return text; - } - if (key == '\t') - { - tty_Hide(); - Field_AutoComplete( &tty_con ); - tty_Show(); - return NULL; - } - avail = read(0, &key, 1); - if (avail != -1) - { - // VT 100 keys - if (key == '[' || key == 'O') - { - avail = read(0, &key, 1); - if (avail != -1) - { - switch (key) - { - case 'A': - history = Hist_Prev(); - if (history) - { - tty_Hide(); - tty_con = *history; - tty_Show(); - } - tty_FlushIn(); - return NULL; - break; - case 'B': - history = Hist_Next(); - tty_Hide(); - if (history) - { - tty_con = *history; - } else - { - Field_Clear(&tty_con); - } - tty_Show(); - tty_FlushIn(); - return NULL; - break; - case 'C': - return NULL; - case 'D': - return NULL; - } - } - } - } - Com_DPrintf("droping ISCTL sequence: %d, tty_erase: %d\n", key, tty_erase); - tty_FlushIn(); - return NULL; - } - // push regular character - tty_con.buffer[tty_con.cursor] = key; - tty_con.cursor++; - // print the current line (this is differential) - write(1, &key, 1); - } - return NULL; - } else - { - int len; - fd_set fdset; - struct timeval timeout; - - if (!com_dedicated || !com_dedicated->value) - return NULL; - - if (!stdin_active) - return NULL; - - FD_ZERO(&fdset); - FD_SET(0, &fdset); // stdin - timeout.tv_sec = 0; - timeout.tv_usec = 0; - if (select (1, &fdset, NULL, NULL, &timeout) == -1 || !FD_ISSET(0, &fdset)) - { - return NULL; - } - - len = read (0, text, sizeof(text)); - if (len == 0) - { // eof! - stdin_active = qfalse; - return NULL; - } - - if (len < 1) - return NULL; - text[len-1] = 0; // rip off the /n and terminate - - return text; - } -} - -/*****************************************************************************/ - -char *do_dlerror(void) -{ -#if USE_SDL_VIDEO - return SDL_GetError(); -#else - return dlerror(); -#endif -} - - -/* -================= -Sys_UnloadDll - -================= -*/ -void Sys_UnloadDll( void *dllHandle ) { - // bk001206 - verbose error reporting - if ( !dllHandle ) - { - Com_Printf("Sys_UnloadDll(NULL)\n"); - return; - } - -#if USE_SDL_VIDEO - SDL_UnloadObject(dllHandle); -#else - dlclose( dllHandle ); - { - const char* err; // rb010123 - now const - err = dlerror(); - if ( err != NULL ) - Com_Printf ( "Sys_UnloadGame failed on dlclose: \"%s\"!\n", err ); - } -#endif -} - - -/* -================= -Sys_LoadDll - -Used to load a development dll instead of a virtual machine -TTimo: -changed the load procedure to match VFS logic, and allow developer use -#1 look down current path -#2 look in fs_homepath -#3 look in fs_basepath -================= -*/ - -static void* try_dlopen(const char* base, const char* gamedir, const char* fname, char* fqpath ) -{ - void* libHandle; - char* fn; - - *fqpath = 0; - -// bk001129 - was RTLD_LAZY -#define Q_RTLD RTLD_NOW - - fn = FS_BuildOSPath( base, gamedir, fname ); - Com_Printf( "Sys_LoadDll(%s)... \n", fn ); - -#if USE_SDL_VIDEO - libHandle = SDL_LoadObject(fn); -#else - libHandle = dlopen( fn, Q_RTLD ); -#endif - - if(!libHandle) { - Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, do_dlerror() ); - return NULL; - } - - Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn ); - Q_strncpyz ( fqpath , fn , MAX_QPATH ) ; // added 7/20/02 by T.Ray - - return libHandle; -} - -void *Sys_LoadDll( const char *name, char *fqpath , - intptr_t (**entryPoint)(int, ...), - intptr_t (*systemcalls)(intptr_t, ...) ) -{ - void *libHandle; - void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); - char curpath[MAX_OSPATH]; - char fname[MAX_OSPATH]; - char *basepath; - char *homepath; - char *pwdpath; - char *cdpath; - char *gamedir; - const char* err = NULL; - - // bk001206 - let's have some paranoia - assert( name ); - - getcwd(curpath, sizeof(curpath)); - snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name); - - // TODO: use fs_searchpaths from files.c - pwdpath = Sys_Cwd(); - basepath = Cvar_VariableString( "fs_basepath" ); - homepath = Cvar_VariableString( "fs_homepath" ); - cdpath = Cvar_VariableString( "fs_cdpath" ); - gamedir = Cvar_VariableString( "fs_game" ); - - libHandle = try_dlopen(pwdpath, gamedir, fname, fqpath); - - if(!libHandle && homepath) - libHandle = try_dlopen(homepath, gamedir, fname, fqpath); - - if(!libHandle && basepath) - libHandle = try_dlopen(basepath, gamedir, fname, fqpath); - - if(!libHandle && cdpath) - libHandle = try_dlopen(cdpath, gamedir, fname, fqpath); - - if(!libHandle) { -#if 0 // don't abort -- ln -//#ifndef NDEBUG // bk001206 - in debug abort on failure - Com_Error ( ERR_FATAL, "Sys_LoadDll(%s) failed dlopen() completely!\n", name ); -#else - Com_Printf ( "Sys_LoadDll(%s) failed dlopen() completely!\n", name ); -#endif - return NULL; - } - -#if USE_SDL_VIDEO - dllEntry = SDL_LoadFunction( libHandle, "dllEntry" ); - *entryPoint = SDL_LoadFunction( libHandle, "vmMain" ); -#else - dllEntry = dlsym( libHandle, "dllEntry" ); - *entryPoint = dlsym( libHandle, "vmMain" ); -#endif - - if ( !*entryPoint || !dllEntry ) - { - err = do_dlerror(); -#ifndef NDEBUG // bk001206 - in debug abort on failure - Com_Error ( ERR_FATAL, "Sys_LoadDll(%s) failed dlsym(vmMain):\n\"%s\" !\n", name, err ); -#else - Com_Printf ( "Sys_LoadDll(%s) failed dlsym(vmMain):\n\"%s\" !\n", name, err ); -#endif -#if USE_SDL_VIDEO - SDL_UnloadObject(libHandle); -#else - dlclose( libHandle ); - err = do_dlerror(); - if ( err != NULL ) { - Com_Printf ( "Sys_LoadDll(%s) failed dlcose:\n\"%s\"\n", name, err ); - } -#endif - - return NULL; - } - Com_Printf ( "Sys_LoadDll(%s) found **vmMain** at %p \n", name, *entryPoint ); // bk001212 - dllEntry( systemcalls ); - Com_Printf ( "Sys_LoadDll(%s) succeeded!\n", name ); - return libHandle; -} - -/* -======================================================================== - -BACKGROUND FILE STREAMING - -======================================================================== -*/ - -#if 1 - -void Sys_InitStreamThread( void ) { -} - -void Sys_ShutdownStreamThread( void ) { -} - -void Sys_BeginStreamedFile( fileHandle_t f, int readAhead ) { -} - -void Sys_EndStreamedFile( fileHandle_t f ) { -} - -int Sys_StreamedRead( void *buffer, int size, int count, fileHandle_t f ) { - return FS_Read( buffer, size * count, f ); -} - -void Sys_StreamSeek( fileHandle_t f, int offset, int origin ) { - FS_Seek( f, offset, origin ); -} - -#else - -typedef struct -{ - fileHandle_t file; - byte *buffer; - qboolean eof; - int bufferSize; - int streamPosition; // next byte to be returned by Sys_StreamRead - int threadPosition; // next byte to be read from file -} streamState_t; - -streamState_t stream; - -/* -=============== -Sys_StreamThread - -A thread will be sitting in this loop forever -================ -*/ -void Sys_StreamThread( void ) -{ - int buffer; - int count; - int readCount; - int bufferPoint; - int r; - - // if there is any space left in the buffer, fill it up - if ( !stream.eof ) - { - count = stream.bufferSize - (stream.threadPosition - stream.streamPosition); - if ( count ) - { - bufferPoint = stream.threadPosition % stream.bufferSize; - buffer = stream.bufferSize - bufferPoint; - readCount = buffer < count ? buffer : count; - r = FS_Read ( stream.buffer + bufferPoint, readCount, stream.file ); - stream.threadPosition += r; - - if ( r != readCount ) - stream.eof = qtrue; - } - } -} - -/* -=============== -Sys_InitStreamThread - -================ -*/ -void Sys_InitStreamThread( void ) -{ -} - -/* -=============== -Sys_ShutdownStreamThread - -================ -*/ -void Sys_ShutdownStreamThread( void ) -{ -} - - -/* -=============== -Sys_BeginStreamedFile - -================ -*/ -void Sys_BeginStreamedFile( fileHandle_t f, int readAhead ) -{ - if ( stream.file ) - { - Com_Error( ERR_FATAL, "Sys_BeginStreamedFile: unclosed stream"); - } - - stream.file = f; - stream.buffer = Z_Malloc( readAhead ); - stream.bufferSize = readAhead; - stream.streamPosition = 0; - stream.threadPosition = 0; - stream.eof = qfalse; -} - -/* -=============== -Sys_EndStreamedFile - -================ -*/ -void Sys_EndStreamedFile( fileHandle_t f ) -{ - if ( f != stream.file ) - { - Com_Error( ERR_FATAL, "Sys_EndStreamedFile: wrong file"); - } - - stream.file = 0; - Z_Free( stream.buffer ); -} - - -/* -=============== -Sys_StreamedRead - -================ -*/ -int Sys_StreamedRead( void *buffer, int size, int count, fileHandle_t f ) -{ - int available; - int remaining; - int sleepCount; - int copy; - int bufferCount; - int bufferPoint; - byte *dest; - - dest = (byte *)buffer; - remaining = size * count; - - if ( remaining <= 0 ) - { - Com_Error( ERR_FATAL, "Streamed read with non-positive size" ); - } - - sleepCount = 0; - while ( remaining > 0 ) - { - available = stream.threadPosition - stream.streamPosition; - if ( !available ) - { - if (stream.eof) - break; - Sys_StreamThread(); - continue; - } - - bufferPoint = stream.streamPosition % stream.bufferSize; - bufferCount = stream.bufferSize - bufferPoint; - - copy = available < bufferCount ? available : bufferCount; - if ( copy > remaining ) - { - copy = remaining; - } - memcpy( dest, stream.buffer + bufferPoint, copy ); - stream.streamPosition += copy; - dest += copy; - remaining -= copy; - } - - return(count * size - remaining) / size; -} - -/* -=============== -Sys_StreamSeek - -================ -*/ -void Sys_StreamSeek( fileHandle_t f, int offset, int origin ) { - // clear to that point - FS_Seek( f, offset, origin ); - stream.streamPosition = 0; - stream.threadPosition = 0; - stream.eof = qfalse; -} - -#endif - -/* -======================================================================== - -EVENT LOOP - -======================================================================== -*/ - -// bk000306: upped this from 64 -#define MAX_QUED_EVENTS 256 -#define MASK_QUED_EVENTS ( MAX_QUED_EVENTS - 1 ) - -sysEvent_t eventQue[MAX_QUED_EVENTS]; -// bk000306: initialize -int eventHead = 0; -int eventTail = 0; -byte sys_packetReceived[MAX_MSGLEN]; - -/* -================ -Sys_QueEvent - -A time of 0 will get the current time -Ptr should either be null, or point to a block of data that can -be freed by the game later. -================ -*/ -void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ) { - sysEvent_t *ev; - - ev = &eventQue[ eventHead & MASK_QUED_EVENTS ]; - - // bk000305 - was missing - if ( eventHead - eventTail >= MAX_QUED_EVENTS ) - { - Com_Printf("Sys_QueEvent: overflow\n"); - // we are discarding an event, but don't leak memory - if ( ev->evPtr ) - { - Z_Free( ev->evPtr ); - } - eventTail++; - } - - eventHead++; - - if ( time == 0 ) - { - time = Sys_Milliseconds(); - } - - ev->evTime = time; - ev->evType = type; - ev->evValue = value; - ev->evValue2 = value2; - ev->evPtrLength = ptrLength; - ev->evPtr = ptr; -} - -/* -================ -Sys_GetEvent - -================ -*/ -sysEvent_t Sys_GetEvent( void ) { - sysEvent_t ev; - char *s; - msg_t netmsg; - netadr_t adr; - - // return if we have data - if ( eventHead > eventTail ) - { - eventTail++; - return eventQue[ ( eventTail - 1 ) & MASK_QUED_EVENTS ]; - } - - // pump the message loop - // in vga this calls KBD_Update, under X, it calls GetEvent - Sys_SendKeyEvents (); - - // check for console commands - s = Sys_ConsoleInput(); - if ( s ) - { - char *b; - int len; - - len = strlen( s ) + 1; - b = Z_Malloc( len ); - strcpy( b, s ); - Sys_QueEvent( 0, SE_CONSOLE, 0, 0, len, b ); - } - - // check for other input devices - IN_Frame(); - - // check for network packets - MSG_Init( &netmsg, sys_packetReceived, sizeof( sys_packetReceived ) ); - if ( Sys_GetPacket ( &adr, &netmsg ) ) - { - netadr_t *buf; - int len; - - // copy out to a seperate buffer for qeueing - len = sizeof( netadr_t ) + netmsg.cursize; - buf = Z_Malloc( len ); - *buf = adr; - memcpy( buf+1, netmsg.data, netmsg.cursize ); - Sys_QueEvent( 0, SE_PACKET, 0, 0, len, buf ); - } - - // return if we have data - if ( eventHead > eventTail ) - { - eventTail++; - return eventQue[ ( eventTail - 1 ) & MASK_QUED_EVENTS ]; - } - - // create an empty event to return - - memset( &ev, 0, sizeof( ev ) ); - ev.evTime = Sys_Milliseconds(); - - return ev; -} - -/*****************************************************************************/ - -qboolean Sys_CheckCD( void ) { - return qtrue; -} - -void Sys_AppActivate (void) -{ -} - -char *Sys_GetClipboardData(void) -{ - return NULL; -} - -static struct Q3ToAnsiColorTable_s -{ - char Q3color; - char *ANSIcolor; -} tty_colorTable[ ] = -{ - { COLOR_BLACK, "30" }, - { COLOR_RED, "31" }, - { COLOR_GREEN, "32" }, - { COLOR_YELLOW, "33" }, - { COLOR_BLUE, "34" }, - { COLOR_CYAN, "36" }, - { COLOR_MAGENTA, "35" }, - { COLOR_WHITE, "0" } -}; - -static int tty_colorTableSize = - sizeof( tty_colorTable ) / sizeof( tty_colorTable[ 0 ] ); - -void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize ) -{ - int msgLength, pos; - int i, j; - char *escapeCode; - char tempBuffer[ 7 ]; - - if( !msg || !buffer ) - return; - - msgLength = strlen( msg ); - pos = 0; - i = 0; - buffer[ 0 ] = '\0'; - - while( i < msgLength ) - { - if( msg[ i ] == '\n' ) - { - Com_sprintf( tempBuffer, 7, "%c[0m\n", 0x1B ); - strncat( buffer, tempBuffer, bufferSize - 1); - i++; - } - else if( msg[ i ] == Q_COLOR_ESCAPE ) - { - i++; - - if( i < msgLength ) - { - escapeCode = NULL; - for( j = 0; j < tty_colorTableSize; j++ ) - { - if( msg[ i ] == tty_colorTable[ j ].Q3color ) - { - escapeCode = tty_colorTable[ j ].ANSIcolor; - break; - } - } - - if( escapeCode ) - { - Com_sprintf( tempBuffer, 7, "%c[%sm", 0x1B, escapeCode ); - strncat( buffer, tempBuffer, bufferSize - 1); - } - - i++; - } - } - else - { - Com_sprintf( tempBuffer, 7, "%c", msg[ i++ ] ); - strncat( buffer, tempBuffer, bufferSize - 1); - } - } -} - -void Sys_Print( const char *msg ) -{ - if (ttycon_on) - { - tty_Hide(); - } - - if( ttycon_on && ttycon_color_on ) - { - char ansiColorString[ MAXPRINTMSG ]; - Sys_ANSIColorify( msg, ansiColorString, MAXPRINTMSG ); - fputs( ansiColorString, stderr ); - } - else - fputs(msg, stderr); - - if (ttycon_on) - { - tty_Show(); - } -} - - -void Sys_ConfigureFPU( void ) { // bk001213 - divide by zero -#ifdef __linux__ -#ifdef __i386 -#ifndef NDEBUG - - // bk0101022 - enable FPE's in debug mode - static int fpu_word = _FPU_DEFAULT & ~(_FPU_MASK_ZM | _FPU_MASK_IM); - int current = 0; - _FPU_GETCW(current); - if ( current!=fpu_word) - { -#if 0 - Com_Printf("FPU Control 0x%x (was 0x%x)\n", fpu_word, current ); - _FPU_SETCW( fpu_word ); - _FPU_GETCW( current ); - assert(fpu_word==current); -#endif - } -#else // NDEBUG - static int fpu_word = _FPU_DEFAULT; - _FPU_SETCW( fpu_word ); -#endif // NDEBUG -#endif // __i386 -#endif // __linux -} - -void Sys_PrintBinVersion( const char* name ) { - char* date = __DATE__; - char* time = __TIME__; - char* sep = "=============================================================="; - fprintf( stdout, "\n\n%s\n", sep ); -#ifdef DEDICATED - fprintf( stdout, "Linux Quake3 Dedicated Server [%s %s]\n", date, time ); -#else - fprintf( stdout, "Linux Quake3 Full Executable [%s %s]\n", date, time ); -#endif - fprintf( stdout, " local install: %s\n", name ); - fprintf( stdout, "%s\n\n", sep ); -} - -/* -================= -Sys_BinName - -This resolves any symlinks to the binary. It's disabled for debug -builds because there are situations where you are likely to want -to symlink to binaries and /not/ have the links resolved. -================= -*/ -char *Sys_BinName( const char *arg0 ) -{ - static char dst[ PATH_MAX ]; - -#ifdef NDEBUG - -#ifdef __linux__ - int n = readlink( "/proc/self/exe", dst, PATH_MAX - 1 ); - - if( n >= 0 && n < PATH_MAX ) - dst[ n ] = '\0'; - else - Q_strncpyz( dst, arg0, PATH_MAX ); -#else -#warning Sys_BinName not implemented - Q_strncpyz( dst, arg0, PATH_MAX ); -#endif - -#else - Q_strncpyz( dst, arg0, PATH_MAX ); -#endif - - return dst; -} - -void Sys_ParseArgs( int argc, char* argv[] ) { - - if ( argc==2 ) - { - if ( (!strcmp( argv[1], "--version" )) - || ( !strcmp( argv[1], "-v" )) ) - { - Sys_PrintBinVersion( Sys_BinName( argv[0] ) ); - Sys_Exit(0); - } - } -} - -#ifdef MACOS_X -/* -================= -Sys_EscapeAppBundle - -Discovers if passed dir is suffixed with the directory structure of a -Mac OS X .app bundle. If it is, the .app directory structure is stripped off -the end and the result is returned. If not, dir is returned untouched. - -================= -*/ -char *Sys_StripAppBundle(char *dir) -{ - static char cwd[MAX_OSPATH]; - - Q_strncpyz(cwd, dir, sizeof(cwd)); - if(strcmp(basename(cwd), "MacOS")) - return dir; - Q_strncpyz(cwd, dirname(cwd), sizeof(cwd)); - if(strcmp(basename(cwd), "Contents")) - return dir; - Q_strncpyz(cwd, dirname(cwd), sizeof(cwd)); - if(!strstr(basename(cwd), ".app")) - return dir; - Q_strncpyz(cwd, dirname(cwd), sizeof(cwd)); - return cwd; -} -#endif /* MACOS_X */ - -#ifndef DEFAULT_BASEDIR - #ifdef MACOS_X - // if run from an .app bundle, we want to also search its containing dir - #define DEFAULT_BASEDIR Sys_StripAppBundle(Sys_DefaultCDPath()) - #else - #define DEFAULT_BASEDIR Sys_DefaultCDPath() - #endif -#endif - -#include "../client/client.h" -extern clientStatic_t cls; - -int main ( int argc, char* argv[] ) -{ - // int oldtime, newtime; // bk001204 - unused - int len, i; - char *cmdline; - char cdpath[PATH_MAX] = {0}; - void Sys_SetDefaultCDPath(const char *path); - - Sys_ParseArgs( argc, argv ); // bk010104 - added this for support - - strncat(cdpath, Sys_BinName( argv[0] ), sizeof(cdpath)-1); - Sys_SetDefaultCDPath(dirname(cdpath)); - - Sys_SetDefaultInstallPath(DEFAULT_BASEDIR); - - // merge the command line, this is kinda silly - for (len = 1, i = 1; i < argc; i++) - len += strlen(argv[i]) + 1; - cmdline = malloc(len); - *cmdline = 0; - for (i = 1; i < argc; i++) - { - if (i > 1) - strcat(cmdline, " "); - strcat(cmdline, argv[i]); - } - - // bk000306 - clear queues - memset( &eventQue[0], 0, MAX_QUED_EVENTS*sizeof(sysEvent_t) ); - memset( &sys_packetReceived[0], 0, MAX_MSGLEN*sizeof(byte) ); - - Com_Init(cmdline); - NET_Init(); - - Sys_ConsoleInputInit(); - - fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); - -#ifdef DEDICATED - // init here for dedicated, as we don't have GLimp_Init - InitSig(); -#endif - - while (1) - { -#if !defined( DEDICATED ) && USE_SDL_VIDEO - int appState = SDL_GetAppState( ); - - // If we have no input focus at all, sleep a bit - if( !( appState & ( SDL_APPMOUSEFOCUS | SDL_APPINPUTFOCUS ) ) ) - usleep( 16000 ); - - // If we're minimised, sleep a bit more - if( !( appState & SDL_APPACTIVE ) ) - usleep( 32000 ); -#endif - -#ifdef __linux__ - Sys_ConfigureFPU(); -#endif - Com_Frame (); - } - - return 0; -} - diff --git a/code/win32/background.bmp b/code/win32/background.bmp deleted file mode 100644 index 88b3dabf80d613a696eb13f67f029225ae91e187..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 197688 zcmd?S?ROhTb~lJjvK!ARt064D0piP;q$rOpIg%#w6Um-YqOm~Yg?Wbd3OhhUu?dTK zrU4p9V+9R1GFI0>1gL7X59OZXIks#fGgc%l*_&*{2EUl1**Ry=#9#Kq+WUpi$&=BD zG6{eUpc^1S03?t1!jt_gNQp1#uCDH1)vc;q_x|qfOCx{zCx2{ce!cW32E+5sKfYx! zpg%Gg{>bo5^V2t9&mJ-un&1Eb*DEi-Y8dRh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2ehxAF@BNB=;M%t(jmH=axriNimgW{~DBpa22$ zm_xpj3^p>9iF-#?h%1c@sl3z5^tWIty0gk zsoTK77Io#RTK$$IG$u8w7_8A`b8DR_d^-edkWRscs=j0+olCDo>D zMXagdQ4WP>?J(pQ0`rCCGGn0ZC}EZrQE%Cxur&aDD;WaJkuasdL5TUvBE;8C)28p3 z#m;;Rp71?QcV$YLlpRl5L?nIis~f4Q(a-8r-b`MDHOvT_I}XZ(D1N0DdGaIs$6)k- zfj(;n{^Cmv2xKr!;KJU`VtarbGKW4@!;|I2K8JteXMe9)o@6BV6r-m+Ug)hupRF!R zG!Q5(Js8LYQ0{lRVbs+TeJf3MX$x;gMS>3pYNuw$C%(hMx~ciNt@^zC&P|Feu-(w> zjj!OwFIgI$%u4#>`^^th1rYJmG`?ZK-^cf@AD{g7_OqSw|L}clPiXx5`}pGgoG+7I cd|&%*?S=mFE8JgSQu4$0*Wc$RPzmt-2NULF#Q*>R diff --git a/code/win32/icon2.ico b/code/win32/icon2.ico deleted file mode 100644 index 8ba93283ac13fe5c13eb12169e2ed5f4e0cfe74c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmeH_u@Qh!2t)Hd2e7iHbPPvhG{$iYe9_k4LIX)S(s4+GidbYEleFR+47kIg8I_Xk e8A(Wzc^k^8s=^)g)#~;HDX%O)K79dx;8mP?#g-NT diff --git a/code/win32/msvc/botlib.vcproj b/code/win32/msvc/botlib.vcproj deleted file mode 100644 index f5cd4ab9..00000000 --- a/code/win32/msvc/botlib.vcproj +++ /dev/null @@ -1,1559 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/msvc/cgame.def b/code/win32/msvc/cgame.def deleted file mode 100644 index 2ee748e7..00000000 --- a/code/win32/msvc/cgame.def +++ /dev/null @@ -1,3 +0,0 @@ -EXPORTS - vmMain - dllEntry diff --git a/code/win32/msvc/cgame.vcproj b/code/win32/msvc/cgame.vcproj deleted file mode 100644 index 514bf8cc..00000000 --- a/code/win32/msvc/cgame.vcproj +++ /dev/null @@ -1,1160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/msvc/game.def b/code/win32/msvc/game.def deleted file mode 100644 index 290f8916..00000000 --- a/code/win32/msvc/game.def +++ /dev/null @@ -1,3 +0,0 @@ -EXPORTS - dllEntry - vmMain diff --git a/code/win32/msvc/game.vcproj b/code/win32/msvc/game.vcproj deleted file mode 100644 index 27069af7..00000000 --- a/code/win32/msvc/game.vcproj +++ /dev/null @@ -1,2043 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/msvc/q3_ui.def b/code/win32/msvc/q3_ui.def deleted file mode 100644 index 2ee748e7..00000000 --- a/code/win32/msvc/q3_ui.def +++ /dev/null @@ -1,3 +0,0 @@ -EXPORTS - vmMain - dllEntry diff --git a/code/win32/msvc/q3_ui.vcproj b/code/win32/msvc/q3_ui.vcproj deleted file mode 100644 index 6be94d22..00000000 --- a/code/win32/msvc/q3_ui.vcproj +++ /dev/null @@ -1,1928 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/msvc/quake3.sln b/code/win32/msvc/quake3.sln deleted file mode 100644 index 1d557909..00000000 --- a/code/win32/msvc/quake3.sln +++ /dev/null @@ -1,97 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "botlib", "botlib.vcproj", "{A410161F-AE9F-485D-A01F-5294891430A6}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgame", "cgame.vcproj", "{C878E295-CB82-4B40-8ECF-5CE5525466FA}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "game.vcproj", "{F9EE10DA-2404-4154-B904-F93C936C040A}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3_ui", "q3_ui.vcproj", "{D454C4C7-7765-4149-ABAD-05FDEB9D94F8}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quake3", "quake3.vcproj", "{81CB51C4-B434-4E12-B69B-BAEE102F2852}" - ProjectSection(ProjectDependencies) = postProject - {A410161F-AE9F-485D-A01F-5294891430A6} = {A410161F-AE9F-485D-A01F-5294891430A6} - {AB424155-FBED-4D8D-B007-5B6CF93EA395} = {AB424155-FBED-4D8D-B007-5B6CF93EA395} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer.vcproj", "{AB424155-FBED-4D8D-B007-5B6CF93EA395}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ui", "ui.vcproj", "{A8EAC38E-C7DA-42F8-811D-77FD092B9D19}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Debug TA = Debug TA - Release = Release - Release TA = Release TA - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {A410161F-AE9F-485D-A01F-5294891430A6}.Debug.ActiveCfg = Debug|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Debug.Build.0 = Debug|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Debug TA.ActiveCfg = Debug TA|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Debug TA.Build.0 = Debug TA|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Release.ActiveCfg = Release|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Release.Build.0 = Release|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Release TA.ActiveCfg = Release TA|Win32 - {A410161F-AE9F-485D-A01F-5294891430A6}.Release TA.Build.0 = Release TA|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug.ActiveCfg = Debug|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug.Build.0 = Debug|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug TA.ActiveCfg = Debug TA|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Debug TA.Build.0 = Debug TA|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release.ActiveCfg = Release|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release.Build.0 = Release|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release TA.ActiveCfg = Release TA|Win32 - {C878E295-CB82-4B40-8ECF-5CE5525466FA}.Release TA.Build.0 = Release TA|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Debug.ActiveCfg = Debug|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Debug.Build.0 = Debug|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Debug TA.ActiveCfg = Debug TA|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Debug TA.Build.0 = Debug TA|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Release.ActiveCfg = Release|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Release.Build.0 = Release|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Release TA.ActiveCfg = Release TA|Win32 - {F9EE10DA-2404-4154-B904-F93C936C040A}.Release TA.Build.0 = Release TA|Win32 - {D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug.ActiveCfg = Debug|Win32 - {D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug.Build.0 = Debug|Win32 - {D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Debug TA.ActiveCfg = Debug TA|Win32 - {D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release.ActiveCfg = Release|Win32 - {D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release.Build.0 = Release|Win32 - {D454C4C7-7765-4149-ABAD-05FDEB9D94F8}.Release TA.ActiveCfg = Release TA|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug.ActiveCfg = Debug|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug.Build.0 = Debug|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug TA.ActiveCfg = Debug TA|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Debug TA.Build.0 = Debug TA|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release.ActiveCfg = Release|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release.Build.0 = Release|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release TA.ActiveCfg = Release TA|Win32 - {81CB51C4-B434-4E12-B69B-BAEE102F2852}.Release TA.Build.0 = Release TA|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Debug.ActiveCfg = Debug|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Debug.Build.0 = Debug|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Debug TA.ActiveCfg = Debug TA|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Debug TA.Build.0 = Debug TA|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Release.ActiveCfg = Release|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Release.Build.0 = Release|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Release TA.ActiveCfg = Release TA|Win32 - {AB424155-FBED-4D8D-B007-5B6CF93EA395}.Release TA.Build.0 = Release TA|Win32 - {A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug.ActiveCfg = Debug|Win32 - {A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug TA.ActiveCfg = Debug TA|Win32 - {A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Debug TA.Build.0 = Debug TA|Win32 - {A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release.ActiveCfg = Release|Win32 - {A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release TA.ActiveCfg = Release TA|Win32 - {A8EAC38E-C7DA-42F8-811D-77FD092B9D19}.Release TA.Build.0 = Release TA|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/code/win32/msvc/quake3.vcproj b/code/win32/msvc/quake3.vcproj deleted file mode 100644 index da92ff02..00000000 --- a/code/win32/msvc/quake3.vcproj +++ /dev/null @@ -1,3419 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/msvc/ref_trin.def b/code/win32/msvc/ref_trin.def deleted file mode 100644 index cfbb4713..00000000 --- a/code/win32/msvc/ref_trin.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - GetRefAPI diff --git a/code/win32/msvc/renderer.vcproj b/code/win32/msvc/renderer.vcproj deleted file mode 100644 index 638a1cf0..00000000 --- a/code/win32/msvc/renderer.vcproj +++ /dev/null @@ -1,6111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/msvc/ui.def b/code/win32/msvc/ui.def deleted file mode 100644 index 2ee748e7..00000000 --- a/code/win32/msvc/ui.def +++ /dev/null @@ -1,3 +0,0 @@ -EXPORTS - vmMain - dllEntry diff --git a/code/win32/msvc/ui.vcproj b/code/win32/msvc/ui.vcproj deleted file mode 100644 index 33a2ff59..00000000 --- a/code/win32/msvc/ui.vcproj +++ /dev/null @@ -1,879 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/win32/win_gamma.c b/code/win32/win_gamma.c deleted file mode 100644 index 85eab3f0..00000000 --- a/code/win32/win_gamma.c +++ /dev/null @@ -1,214 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** WIN_GAMMA.C -*/ -#include -#include "../renderer/tr_local.h" -#include "../qcommon/qcommon.h" -#include "glw_win.h" -#include "win_local.h" - -static unsigned short s_oldHardwareGamma[3][256]; - -/* -** WG_CheckHardwareGamma -** -** Determines if the underlying hardware supports the Win32 gamma correction API. -*/ -void WG_CheckHardwareGamma( void ) -{ - HDC hDC; - - glConfig.deviceSupportsGamma = qfalse; - - if ( qwglSetDeviceGammaRamp3DFX ) - { - glConfig.deviceSupportsGamma = qtrue; - - hDC = GetDC( GetDesktopWindow() ); - glConfig.deviceSupportsGamma = qwglGetDeviceGammaRamp3DFX( hDC, s_oldHardwareGamma ); - ReleaseDC( GetDesktopWindow(), hDC ); - - return; - } - - // non-3Dfx standalone drivers don't support gamma changes, period - if ( glConfig.driverType == GLDRV_STANDALONE ) - { - return; - } - - if ( !r_ignorehwgamma->integer ) - { - hDC = GetDC( GetDesktopWindow() ); - glConfig.deviceSupportsGamma = GetDeviceGammaRamp( hDC, s_oldHardwareGamma ); - ReleaseDC( GetDesktopWindow(), hDC ); - - if ( glConfig.deviceSupportsGamma ) - { - // - // do a sanity check on the gamma values - // - if ( ( HIBYTE( s_oldHardwareGamma[0][255] ) <= HIBYTE( s_oldHardwareGamma[0][0] ) ) || - ( HIBYTE( s_oldHardwareGamma[1][255] ) <= HIBYTE( s_oldHardwareGamma[1][0] ) ) || - ( HIBYTE( s_oldHardwareGamma[2][255] ) <= HIBYTE( s_oldHardwareGamma[2][0] ) ) ) - { - glConfig.deviceSupportsGamma = qfalse; - ri.Printf( PRINT_WARNING, "WARNING: device has broken gamma support, generated gamma.dat\n" ); - } - - // - // make sure that we didn't have a prior crash in the game, and if so we need to - // restore the gamma values to at least a linear value - // - if ( ( HIBYTE( s_oldHardwareGamma[0][181] ) == 255 ) ) - { - int g; - - ri.Printf( PRINT_WARNING, "WARNING: suspicious gamma tables, using linear ramp for restoration\n" ); - - for ( g = 0; g < 255; g++ ) - { - s_oldHardwareGamma[0][g] = g << 8; - s_oldHardwareGamma[1][g] = g << 8; - s_oldHardwareGamma[2][g] = g << 8; - } - } - } - } -} - -/* -void mapGammaMax( void ) { - int i, j; - unsigned short table[3][256]; - - // try to figure out what win2k will let us get away with setting - for ( i = 0 ; i < 256 ; i++ ) { - if ( i >= 128 ) { - table[0][i] = table[1][i] = table[2][i] = 0xffff; - } else { - table[0][i] = table[1][i] = table[2][i] = i<<9; - } - } - - for ( i = 0 ; i < 128 ; i++ ) { - for ( j = i*2 ; j < 255 ; j++ ) { - table[0][i] = table[1][i] = table[2][i] = j<<8; - if ( !SetDeviceGammaRamp( glw_state.hDC, table ) ) { - break; - } - } - table[0][i] = table[1][i] = table[2][i] = i<<9; - Com_Printf( "index %i max: %i\n", i, j-1 ); - } -} -*/ - -/* -** GLimp_SetGamma -** -** This routine should only be called if glConfig.deviceSupportsGamma is TRUE -*/ -void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned char blue[256] ) { - unsigned short table[3][256]; - int i, j; - int ret; - OSVERSIONINFO vinfo; - - if ( !glConfig.deviceSupportsGamma || r_ignorehwgamma->integer || !glw_state.hDC ) { - return; - } - -//mapGammaMax(); - - for ( i = 0; i < 256; i++ ) { - table[0][i] = ( ( ( unsigned short ) red[i] ) << 8 ) | red[i]; - table[1][i] = ( ( ( unsigned short ) green[i] ) << 8 ) | green[i]; - table[2][i] = ( ( ( unsigned short ) blue[i] ) << 8 ) | blue[i]; - } - - // Win2K and newer put this odd restriction on gamma ramps... - vinfo.dwOSVersionInfoSize = sizeof(vinfo); - GetVersionEx( &vinfo ); - if ( vinfo.dwMajorVersion >= 5 && vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) { - Com_DPrintf( "performing gamma clamp.\n" ); - for ( j = 0 ; j < 3 ; j++ ) { - for ( i = 0 ; i < 128 ; i++ ) { - if ( table[j][i] > ( (128+i) << 8 ) ) { - table[j][i] = (128+i) << 8; - } - } - if ( table[j][127] > 254<<8 ) { - table[j][127] = 254<<8; - } - } - } else { - Com_DPrintf( "skipping gamma clamp.\n" ); - } - - // enforce constantly increasing - for ( j = 0 ; j < 3 ; j++ ) { - for ( i = 1 ; i < 256 ; i++ ) { - if ( table[j][i] < table[j][i-1] ) { - table[j][i] = table[j][i-1]; - } - } - } - - - if ( qwglSetDeviceGammaRamp3DFX ) - { - qwglSetDeviceGammaRamp3DFX( glw_state.hDC, table ); - } - else - { - ret = SetDeviceGammaRamp( glw_state.hDC, table ); - if ( !ret ) { - Com_Printf( "SetDeviceGammaRamp failed.\n" ); - } - } -} - -/* -** WG_RestoreGamma -*/ -void WG_RestoreGamma( void ) -{ - if ( glConfig.deviceSupportsGamma ) - { - if ( qwglSetDeviceGammaRamp3DFX ) - { - qwglSetDeviceGammaRamp3DFX( glw_state.hDC, s_oldHardwareGamma ); - } - else - { - HDC hDC; - - hDC = GetDC( GetDesktopWindow() ); - SetDeviceGammaRamp( hDC, s_oldHardwareGamma ); - ReleaseDC( GetDesktopWindow(), hDC ); - } - } -} - diff --git a/code/win32/win_glimp.c b/code/win32/win_glimp.c deleted file mode 100644 index 54d32a91..00000000 --- a/code/win32/win_glimp.c +++ /dev/null @@ -1,1681 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** WIN_GLIMP.C -** -** This file contains ALL Win32 specific stuff having to do with the -** OpenGL refresh. When a port is being made the following functions -** must be implemented by the port: -** -** GLimp_EndFrame -** GLimp_Init -** GLimp_LogComment -** GLimp_Shutdown -** -** Note that the GLW_xxx functions are Windows specific GL-subsystem -** related functions that are relevant ONLY to win_glimp.c -*/ -#include -#include "../renderer/tr_local.h" -#include "../qcommon/qcommon.h" -#include "resource.h" -#include "glw_win.h" -#include "win_local.h" - -extern void WG_CheckHardwareGamma( void ); -extern void WG_RestoreGamma( void ); - -typedef enum { - RSERR_OK, - - RSERR_INVALID_FULLSCREEN, - RSERR_INVALID_MODE, - - RSERR_UNKNOWN -} rserr_t; - -#define TRY_PFD_SUCCESS 0 -#define TRY_PFD_FAIL_SOFT 1 -#define TRY_PFD_FAIL_HARD 2 - -static void GLW_InitExtensions( void ); -static rserr_t GLW_SetMode( const char *drivername, - int mode, - int colorbits, - qboolean cdsFullscreen ); - -static qboolean s_classRegistered = qfalse; - -// -// function declaration -// -void QGL_EnableLogging( qboolean enable ); -qboolean QGL_Init( const char *dllname ); -void QGL_Shutdown( void ); - -// -// variable declarations -// -glwstate_t glw_state; - -cvar_t *r_allowSoftwareGL; // don't abort out if the pixelformat claims software -cvar_t *r_maskMinidriver; // allow a different dll name to be treated as if it were opengl32.dll - - - -/* -** GLW_StartDriverAndSetMode -*/ -static qboolean GLW_StartDriverAndSetMode( const char *drivername, - int mode, - int colorbits, - qboolean cdsFullscreen ) -{ - rserr_t err; - - err = GLW_SetMode( drivername, r_mode->integer, colorbits, cdsFullscreen ); - - switch ( err ) - { - case RSERR_INVALID_FULLSCREEN: - ri.Printf( PRINT_ALL, "...WARNING: fullscreen unavailable in this mode\n" ); - return qfalse; - case RSERR_INVALID_MODE: - ri.Printf( PRINT_ALL, "...WARNING: could not set the given mode (%d)\n", mode ); - return qfalse; - default: - break; - } - return qtrue; -} - -/* -** ChoosePFD -** -** Helper function that replaces ChoosePixelFormat. -*/ -#define MAX_PFDS 256 - -static int GLW_ChoosePFD( HDC hDC, PIXELFORMATDESCRIPTOR *pPFD ) -{ - PIXELFORMATDESCRIPTOR pfds[MAX_PFDS+1]; - int maxPFD = 0; - int i; - int bestMatch = 0; - - ri.Printf( PRINT_ALL, "...GLW_ChoosePFD( %d, %d, %d )\n", ( int ) pPFD->cColorBits, ( int ) pPFD->cDepthBits, ( int ) pPFD->cStencilBits ); - - // count number of PFDs - if ( glConfig.driverType > GLDRV_ICD ) - { - maxPFD = qwglDescribePixelFormat( hDC, 1, sizeof( PIXELFORMATDESCRIPTOR ), &pfds[0] ); - } - else - { - maxPFD = DescribePixelFormat( hDC, 1, sizeof( PIXELFORMATDESCRIPTOR ), &pfds[0] ); - } - if ( maxPFD > MAX_PFDS ) - { - ri.Printf( PRINT_WARNING, "...numPFDs > MAX_PFDS (%d > %d)\n", maxPFD, MAX_PFDS ); - maxPFD = MAX_PFDS; - } - - ri.Printf( PRINT_ALL, "...%d PFDs found\n", maxPFD - 1 ); - - // grab information - for ( i = 1; i <= maxPFD; i++ ) - { - if ( glConfig.driverType > GLDRV_ICD ) - { - qwglDescribePixelFormat( hDC, i, sizeof( PIXELFORMATDESCRIPTOR ), &pfds[i] ); - } - else - { - DescribePixelFormat( hDC, i, sizeof( PIXELFORMATDESCRIPTOR ), &pfds[i] ); - } - } - - // look for a best match - for ( i = 1; i <= maxPFD; i++ ) - { - // - // make sure this has hardware acceleration - // - if ( ( pfds[i].dwFlags & PFD_GENERIC_FORMAT ) != 0 ) - { - if ( !r_allowSoftwareGL->integer ) - { - if ( r_verbose->integer ) - { - ri.Printf( PRINT_ALL, "...PFD %d rejected, software acceleration\n", i ); - } - continue; - } - } - - // verify pixel type - if ( pfds[i].iPixelType != PFD_TYPE_RGBA ) - { - if ( r_verbose->integer ) - { - ri.Printf( PRINT_ALL, "...PFD %d rejected, not RGBA\n", i ); - } - continue; - } - - // verify proper flags - if ( ( ( pfds[i].dwFlags & pPFD->dwFlags ) & pPFD->dwFlags ) != pPFD->dwFlags ) - { - if ( r_verbose->integer ) - { - ri.Printf( PRINT_ALL, "...PFD %d rejected, improper flags (%x instead of %x)\n", i, pfds[i].dwFlags, pPFD->dwFlags ); - } - continue; - } - - // verify enough bits - if ( pfds[i].cDepthBits < 15 ) - { - continue; - } - if ( ( pfds[i].cStencilBits < 4 ) && ( pPFD->cStencilBits > 0 ) ) - { - continue; - } - - // - // selection criteria (in order of priority): - // - // PFD_STEREO - // colorBits - // depthBits - // stencilBits - // - if ( bestMatch ) - { - // check stereo - if ( ( pfds[i].dwFlags & PFD_STEREO ) && ( !( pfds[bestMatch].dwFlags & PFD_STEREO ) ) && ( pPFD->dwFlags & PFD_STEREO ) ) - { - bestMatch = i; - continue; - } - - if ( !( pfds[i].dwFlags & PFD_STEREO ) && ( pfds[bestMatch].dwFlags & PFD_STEREO ) && ( pPFD->dwFlags & PFD_STEREO ) ) - { - bestMatch = i; - continue; - } - - // check color - if ( pfds[bestMatch].cColorBits != pPFD->cColorBits ) - { - // prefer perfect match - if ( pfds[i].cColorBits == pPFD->cColorBits ) - { - bestMatch = i; - continue; - } - // otherwise if this PFD has more bits than our best, use it - else if ( pfds[i].cColorBits > pfds[bestMatch].cColorBits ) - { - bestMatch = i; - continue; - } - } - - // check depth - if ( pfds[bestMatch].cDepthBits != pPFD->cDepthBits ) - { - // prefer perfect match - if ( pfds[i].cDepthBits == pPFD->cDepthBits ) - { - bestMatch = i; - continue; - } - // otherwise if this PFD has more bits than our best, use it - else if ( pfds[i].cDepthBits > pfds[bestMatch].cDepthBits ) - { - bestMatch = i; - continue; - } - } - - // check stencil - if ( pfds[bestMatch].cStencilBits != pPFD->cStencilBits ) - { - // prefer perfect match - if ( pfds[i].cStencilBits == pPFD->cStencilBits ) - { - bestMatch = i; - continue; - } - // otherwise if this PFD has more bits than our best, use it - else if ( ( pfds[i].cStencilBits > pfds[bestMatch].cStencilBits ) && - ( pPFD->cStencilBits > 0 ) ) - { - bestMatch = i; - continue; - } - } - } - else - { - bestMatch = i; - } - } - - if ( !bestMatch ) - return 0; - - if ( ( pfds[bestMatch].dwFlags & PFD_GENERIC_FORMAT ) != 0 ) - { - if ( !r_allowSoftwareGL->integer ) - { - ri.Printf( PRINT_ALL, "...no hardware acceleration found\n" ); - return 0; - } - else - { - ri.Printf( PRINT_ALL, "...using software emulation\n" ); - } - } - else if ( pfds[bestMatch].dwFlags & PFD_GENERIC_ACCELERATED ) - { - ri.Printf( PRINT_ALL, "...MCD acceleration found\n" ); - } - else - { - ri.Printf( PRINT_ALL, "...hardware acceleration found\n" ); - } - - *pPFD = pfds[bestMatch]; - - return bestMatch; -} - -/* -** void GLW_CreatePFD -** -** Helper function zeros out then fills in a PFD -*/ -static void GLW_CreatePFD( PIXELFORMATDESCRIPTOR *pPFD, int colorbits, int depthbits, int stencilbits, qboolean stereo ) -{ - PIXELFORMATDESCRIPTOR src = - { - sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd - 1, // version number - PFD_DRAW_TO_WINDOW | // support window - PFD_SUPPORT_OPENGL | // support OpenGL - PFD_DOUBLEBUFFER, // double buffered - PFD_TYPE_RGBA, // RGBA type - 24, // 24-bit color depth - 0, 0, 0, 0, 0, 0, // color bits ignored - 0, // no alpha buffer - 0, // shift bit ignored - 0, // no accumulation buffer - 0, 0, 0, 0, // accum bits ignored - 24, // 24-bit z-buffer - 8, // 8-bit stencil buffer - 0, // no auxiliary buffer - PFD_MAIN_PLANE, // main layer - 0, // reserved - 0, 0, 0 // layer masks ignored - }; - - src.cColorBits = colorbits; - src.cDepthBits = depthbits; - src.cStencilBits = stencilbits; - - if ( stereo ) - { - ri.Printf( PRINT_ALL, "...attempting to use stereo\n" ); - src.dwFlags |= PFD_STEREO; - glConfig.stereoEnabled = qtrue; - } - else - { - glConfig.stereoEnabled = qfalse; - } - - *pPFD = src; -} - -/* -** GLW_MakeContext -*/ -static int GLW_MakeContext( PIXELFORMATDESCRIPTOR *pPFD ) -{ - int pixelformat; - - // - // don't putz around with pixelformat if it's already set (e.g. this is a soft - // reset of the graphics system) - // - if ( !glw_state.pixelFormatSet ) - { - // - // choose, set, and describe our desired pixel format. If we're - // using a minidriver then we need to bypass the GDI functions, - // otherwise use the GDI functions. - // - if ( ( pixelformat = GLW_ChoosePFD( glw_state.hDC, pPFD ) ) == 0 ) - { - ri.Printf( PRINT_ALL, "...GLW_ChoosePFD failed\n"); - return TRY_PFD_FAIL_SOFT; - } - ri.Printf( PRINT_ALL, "...PIXELFORMAT %d selected\n", pixelformat ); - - if ( glConfig.driverType > GLDRV_ICD ) - { - qwglDescribePixelFormat( glw_state.hDC, pixelformat, sizeof( *pPFD ), pPFD ); - if ( qwglSetPixelFormat( glw_state.hDC, pixelformat, pPFD ) == FALSE ) - { - ri.Printf ( PRINT_ALL, "...qwglSetPixelFormat failed\n"); - return TRY_PFD_FAIL_SOFT; - } - } - else - { - DescribePixelFormat( glw_state.hDC, pixelformat, sizeof( *pPFD ), pPFD ); - - if ( SetPixelFormat( glw_state.hDC, pixelformat, pPFD ) == FALSE ) - { - ri.Printf (PRINT_ALL, "...SetPixelFormat failed\n", glw_state.hDC ); - return TRY_PFD_FAIL_SOFT; - } - } - - glw_state.pixelFormatSet = qtrue; - } - - // - // startup the OpenGL subsystem by creating a context and making it current - // - if ( !glw_state.hGLRC ) - { - ri.Printf( PRINT_ALL, "...creating GL context: " ); - if ( ( glw_state.hGLRC = qwglCreateContext( glw_state.hDC ) ) == 0 ) - { - ri.Printf (PRINT_ALL, "failed\n"); - - return TRY_PFD_FAIL_HARD; - } - ri.Printf( PRINT_ALL, "succeeded\n" ); - - ri.Printf( PRINT_ALL, "...making context current: " ); - if ( !qwglMakeCurrent( glw_state.hDC, glw_state.hGLRC ) ) - { - qwglDeleteContext( glw_state.hGLRC ); - glw_state.hGLRC = NULL; - ri.Printf (PRINT_ALL, "failed\n"); - return TRY_PFD_FAIL_HARD; - } - ri.Printf( PRINT_ALL, "succeeded\n" ); - } - - return TRY_PFD_SUCCESS; -} - - -/* -** GLW_InitDriver -** -** - get a DC if one doesn't exist -** - create an HGLRC if one doesn't exist -*/ -static qboolean GLW_InitDriver( const char *drivername, int colorbits ) -{ - int tpfd; - int depthbits, stencilbits; - static PIXELFORMATDESCRIPTOR pfd; // save between frames since 'tr' gets cleared - - ri.Printf( PRINT_ALL, "Initializing OpenGL driver\n" ); - - // - // get a DC for our window if we don't already have one allocated - // - if ( glw_state.hDC == NULL ) - { - ri.Printf( PRINT_ALL, "...getting DC: " ); - - if ( ( glw_state.hDC = GetDC( g_wv.hWnd ) ) == NULL ) - { - ri.Printf( PRINT_ALL, "failed\n" ); - return qfalse; - } - ri.Printf( PRINT_ALL, "succeeded\n" ); - } - - if ( colorbits == 0 ) - { - colorbits = glw_state.desktopBitsPixel; - } - - // - // implicitly assume Z-buffer depth == desktop color depth - // - if ( r_depthbits->integer == 0 ) { - if ( colorbits > 16 ) { - depthbits = 24; - } else { - depthbits = 16; - } - } else { - depthbits = r_depthbits->integer; - } - - // - // do not allow stencil if Z-buffer depth likely won't contain it - // - stencilbits = r_stencilbits->integer; - if ( depthbits < 24 ) - { - stencilbits = 0; - } - - // - // make two attempts to set the PIXELFORMAT - // - - // - // first attempt: r_colorbits, depthbits, and r_stencilbits - // - if ( !glw_state.pixelFormatSet ) - { - GLW_CreatePFD( &pfd, colorbits, depthbits, stencilbits, r_stereo->integer ); - if ( ( tpfd = GLW_MakeContext( &pfd ) ) != TRY_PFD_SUCCESS ) - { - if ( tpfd == TRY_PFD_FAIL_HARD ) - { - ri.Printf( PRINT_WARNING, "...failed hard\n" ); - return qfalse; - } - - // - // punt if we've already tried the desktop bit depth and no stencil bits - // - if ( ( r_colorbits->integer == glw_state.desktopBitsPixel ) && - ( stencilbits == 0 ) ) - { - ReleaseDC( g_wv.hWnd, glw_state.hDC ); - glw_state.hDC = NULL; - - ri.Printf( PRINT_ALL, "...failed to find an appropriate PIXELFORMAT\n" ); - - return qfalse; - } - - // - // second attempt: desktop's color bits and no stencil - // - if ( colorbits > glw_state.desktopBitsPixel ) - { - colorbits = glw_state.desktopBitsPixel; - } - GLW_CreatePFD( &pfd, colorbits, depthbits, 0, r_stereo->integer ); - if ( GLW_MakeContext( &pfd ) != TRY_PFD_SUCCESS ) - { - if ( glw_state.hDC ) - { - ReleaseDC( g_wv.hWnd, glw_state.hDC ); - glw_state.hDC = NULL; - } - - ri.Printf( PRINT_ALL, "...failed to find an appropriate PIXELFORMAT\n" ); - - return qfalse; - } - } - - /* - ** report if stereo is desired but unavailable - */ - if ( !( pfd.dwFlags & PFD_STEREO ) && ( r_stereo->integer != 0 ) ) - { - ri.Printf( PRINT_ALL, "...failed to select stereo pixel format\n" ); - glConfig.stereoEnabled = qfalse; - } - } - - /* - ** store PFD specifics - */ - glConfig.colorBits = ( int ) pfd.cColorBits; - glConfig.depthBits = ( int ) pfd.cDepthBits; - glConfig.stencilBits = ( int ) pfd.cStencilBits; - - return qtrue; -} - -/* -** GLW_CreateWindow -** -** Responsible for creating the Win32 window and initializing the OpenGL driver. -*/ -#define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE) -static qboolean GLW_CreateWindow( const char *drivername, int width, int height, int colorbits, qboolean cdsFullscreen ) -{ - RECT r; - cvar_t *vid_xpos, *vid_ypos; - int stylebits; - int x, y, w, h; - int exstyle; - - // - // register the window class if necessary - // - if ( !s_classRegistered ) - { - WNDCLASS wc; - - memset( &wc, 0, sizeof( wc ) ); - - wc.style = 0; - wc.lpfnWndProc = (WNDPROC) glw_state.wndproc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = g_wv.hInstance; - wc.hIcon = LoadIcon( g_wv.hInstance, MAKEINTRESOURCE(IDI_ICON1)); - wc.hCursor = LoadCursor (NULL,IDC_ARROW); - wc.hbrBackground = (void *)COLOR_GRAYTEXT; - wc.lpszMenuName = 0; - wc.lpszClassName = CLIENT_WINDOW_TITLE; - - if ( !RegisterClass( &wc ) ) - { - ri.Error( ERR_FATAL, "GLW_CreateWindow: could not register window class" ); - } - s_classRegistered = qtrue; - ri.Printf( PRINT_ALL, "...registered window class\n" ); - } - - // - // create the HWND if one does not already exist - // - if ( !g_wv.hWnd ) - { - // - // compute width and height - // - r.left = 0; - r.top = 0; - r.right = width; - r.bottom = height; - - if ( cdsFullscreen || !Q_stricmp( _3DFX_DRIVER_NAME, drivername ) ) - { - exstyle = WS_EX_TOPMOST; - stylebits = WS_POPUP|WS_VISIBLE|WS_SYSMENU; - } - else - { - exstyle = 0; - stylebits = WINDOW_STYLE|WS_SYSMENU; - AdjustWindowRect (&r, stylebits, FALSE); - } - - w = r.right - r.left; - h = r.bottom - r.top; - - if ( cdsFullscreen || !Q_stricmp( _3DFX_DRIVER_NAME, drivername ) ) - { - x = 0; - y = 0; - } - else - { - vid_xpos = ri.Cvar_Get ("vid_xpos", "", 0); - vid_ypos = ri.Cvar_Get ("vid_ypos", "", 0); - x = vid_xpos->integer; - y = vid_ypos->integer; - - // adjust window coordinates if necessary - // so that the window is completely on screen - if ( x < 0 ) - x = 0; - if ( y < 0 ) - y = 0; - - if ( w < glw_state.desktopWidth && - h < glw_state.desktopHeight ) - { - if ( x + w > glw_state.desktopWidth ) - x = ( glw_state.desktopWidth - w ); - if ( y + h > glw_state.desktopHeight ) - y = ( glw_state.desktopHeight - h ); - } - } - - g_wv.hWnd = CreateWindowEx ( - exstyle, - CLIENT_WINDOW_TITLE, - CLIENT_WINDOW_TITLE, - stylebits, - x, y, w, h, - NULL, - NULL, - g_wv.hInstance, - NULL); - - if ( !g_wv.hWnd ) - { - ri.Error (ERR_FATAL, "GLW_CreateWindow() - Couldn't create window"); - } - - ShowWindow( g_wv.hWnd, SW_SHOW ); - UpdateWindow( g_wv.hWnd ); - ri.Printf( PRINT_ALL, "...created window@%d,%d (%dx%d)\n", x, y, w, h ); - } - else - { - ri.Printf( PRINT_ALL, "...window already present, CreateWindowEx skipped\n" ); - } - - if ( !GLW_InitDriver( drivername, colorbits ) ) - { - ShowWindow( g_wv.hWnd, SW_HIDE ); - DestroyWindow( g_wv.hWnd ); - g_wv.hWnd = NULL; - - return qfalse; - } - - SetForegroundWindow( g_wv.hWnd ); - SetFocus( g_wv.hWnd ); - - return qtrue; -} - -static void PrintCDSError( int value ) -{ - switch ( value ) - { - case DISP_CHANGE_RESTART: - ri.Printf( PRINT_ALL, "restart required\n" ); - break; - case DISP_CHANGE_BADPARAM: - ri.Printf( PRINT_ALL, "bad param\n" ); - break; - case DISP_CHANGE_BADFLAGS: - ri.Printf( PRINT_ALL, "bad flags\n" ); - break; - case DISP_CHANGE_FAILED: - ri.Printf( PRINT_ALL, "DISP_CHANGE_FAILED\n" ); - break; - case DISP_CHANGE_BADMODE: - ri.Printf( PRINT_ALL, "bad mode\n" ); - break; - case DISP_CHANGE_NOTUPDATED: - ri.Printf( PRINT_ALL, "not updated\n" ); - break; - default: - ri.Printf( PRINT_ALL, "unknown error %d\n", value ); - break; - } -} - -/* -** GLW_SetMode -*/ -static rserr_t GLW_SetMode( const char *drivername, - int mode, - int colorbits, - qboolean cdsFullscreen ) -{ - HDC hDC; - const char *win_fs[] = { "W", "FS" }; - int cdsRet; - DEVMODE dm; - - // - // print out informational messages - // - ri.Printf( PRINT_ALL, "...setting mode %d:", mode ); - if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) ) - { - ri.Printf( PRINT_ALL, " invalid mode\n" ); - return RSERR_INVALID_MODE; - } - ri.Printf( PRINT_ALL, " %d %d %s\n", glConfig.vidWidth, glConfig.vidHeight, win_fs[cdsFullscreen] ); - - // - // check our desktop attributes - // - hDC = GetDC( GetDesktopWindow() ); - glw_state.desktopBitsPixel = GetDeviceCaps( hDC, BITSPIXEL ); - glw_state.desktopWidth = GetDeviceCaps( hDC, HORZRES ); - glw_state.desktopHeight = GetDeviceCaps( hDC, VERTRES ); - ReleaseDC( GetDesktopWindow(), hDC ); - - // - // verify desktop bit depth - // - if ( glConfig.driverType != GLDRV_VOODOO ) - { - if ( glw_state.desktopBitsPixel < 15 || glw_state.desktopBitsPixel == 24 ) - { - if ( colorbits == 0 || ( !cdsFullscreen && colorbits >= 15 ) ) - { - if ( MessageBox( NULL, - "It is highly unlikely that a correct\n" - "windowed display can be initialized with\n" - "the current desktop display depth. Select\n" - "'OK' to try anyway. Press 'Cancel' if you\n" - "have a 3Dfx Voodoo, Voodoo-2, or Voodoo Rush\n" - "3D accelerator installed, or if you otherwise\n" - "wish to quit.", - "Low Desktop Color Depth", - MB_OKCANCEL | MB_ICONEXCLAMATION ) != IDOK ) - { - return RSERR_INVALID_MODE; - } - } - } - } - - // do a CDS if needed - if ( cdsFullscreen ) - { - memset( &dm, 0, sizeof( dm ) ); - - dm.dmSize = sizeof( dm ); - - dm.dmPelsWidth = glConfig.vidWidth; - dm.dmPelsHeight = glConfig.vidHeight; - dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; - - if ( r_displayRefresh->integer != 0 ) - { - dm.dmDisplayFrequency = r_displayRefresh->integer; - dm.dmFields |= DM_DISPLAYFREQUENCY; - } - - // try to change color depth if possible - if ( colorbits != 0 ) - { - if ( glw_state.allowdisplaydepthchange ) - { - dm.dmBitsPerPel = colorbits; - dm.dmFields |= DM_BITSPERPEL; - ri.Printf( PRINT_ALL, "...using colorsbits of %d\n", colorbits ); - } - else - { - ri.Printf( PRINT_ALL, "WARNING:...changing depth not supported on Win95 < pre-OSR 2.x\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...using desktop display depth of %d\n", glw_state.desktopBitsPixel ); - } - - // - // if we're already in fullscreen then just create the window - // - if ( glw_state.cdsFullscreen ) - { - ri.Printf( PRINT_ALL, "...already fullscreen, avoiding redundant CDS\n" ); - - if ( !GLW_CreateWindow ( drivername, glConfig.vidWidth, glConfig.vidHeight, colorbits, qtrue ) ) - { - ri.Printf( PRINT_ALL, "...restoring display settings\n" ); - ChangeDisplaySettings( 0, 0 ); - return RSERR_INVALID_MODE; - } - } - // - // need to call CDS - // - else - { - ri.Printf( PRINT_ALL, "...calling CDS: " ); - - // try setting the exact mode requested, because some drivers don't report - // the low res modes in EnumDisplaySettings, but still work - if ( ( cdsRet = ChangeDisplaySettings( &dm, CDS_FULLSCREEN ) ) == DISP_CHANGE_SUCCESSFUL ) - { - ri.Printf( PRINT_ALL, "ok\n" ); - - if ( !GLW_CreateWindow ( drivername, glConfig.vidWidth, glConfig.vidHeight, colorbits, qtrue) ) - { - ri.Printf( PRINT_ALL, "...restoring display settings\n" ); - ChangeDisplaySettings( 0, 0 ); - return RSERR_INVALID_MODE; - } - - glw_state.cdsFullscreen = qtrue; - } - else - { - // - // the exact mode failed, so scan EnumDisplaySettings for the next largest mode - // - DEVMODE devmode; - int modeNum; - - ri.Printf( PRINT_ALL, "failed, " ); - - PrintCDSError( cdsRet ); - - ri.Printf( PRINT_ALL, "...trying next higher resolution:" ); - - // we could do a better matching job here... - for ( modeNum = 0 ; ; modeNum++ ) { - if ( !EnumDisplaySettings( NULL, modeNum, &devmode ) ) { - modeNum = -1; - break; - } - if ( devmode.dmPelsWidth >= glConfig.vidWidth - && devmode.dmPelsHeight >= glConfig.vidHeight - && devmode.dmBitsPerPel >= 15 ) { - break; - } - } - - if ( modeNum != -1 && ( cdsRet = ChangeDisplaySettings( &devmode, CDS_FULLSCREEN ) ) == DISP_CHANGE_SUCCESSFUL ) - { - ri.Printf( PRINT_ALL, " ok\n" ); - if ( !GLW_CreateWindow( drivername, glConfig.vidWidth, glConfig.vidHeight, colorbits, qtrue) ) - { - ri.Printf( PRINT_ALL, "...restoring display settings\n" ); - ChangeDisplaySettings( 0, 0 ); - return RSERR_INVALID_MODE; - } - - glw_state.cdsFullscreen = qtrue; - } - else - { - ri.Printf( PRINT_ALL, " failed, " ); - - PrintCDSError( cdsRet ); - - ri.Printf( PRINT_ALL, "...restoring display settings\n" ); - ChangeDisplaySettings( 0, 0 ); - - glw_state.cdsFullscreen = qfalse; - glConfig.isFullscreen = qfalse; - if ( !GLW_CreateWindow( drivername, glConfig.vidWidth, glConfig.vidHeight, colorbits, qfalse) ) - { - return RSERR_INVALID_MODE; - } - return RSERR_INVALID_FULLSCREEN; - } - } - } - } - else - { - if ( glw_state.cdsFullscreen ) - { - ChangeDisplaySettings( 0, 0 ); - } - - glw_state.cdsFullscreen = qfalse; - if ( !GLW_CreateWindow( drivername, glConfig.vidWidth, glConfig.vidHeight, colorbits, qfalse ) ) - { - return RSERR_INVALID_MODE; - } - } - - // - // success, now check display frequency, although this won't be valid on Voodoo(2) - // - memset( &dm, 0, sizeof( dm ) ); - dm.dmSize = sizeof( dm ); - if ( EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &dm ) ) - { - glConfig.displayFrequency = dm.dmDisplayFrequency; - } - - // NOTE: this is overridden later on standalone 3Dfx drivers - glConfig.isFullscreen = cdsFullscreen; - - return RSERR_OK; -} - -/* -** GLW_InitExtensions -*/ -static void GLW_InitExtensions( void ) -{ - if ( !r_allowExtensions->integer ) - { - ri.Printf( PRINT_ALL, "*** IGNORING OPENGL EXTENSIONS ***\n" ); - return; - } - - ri.Printf( PRINT_ALL, "Initializing OpenGL extensions\n" ); - - // GL_S3_s3tc - glConfig.textureCompression = TC_NONE; - if ( strstr( glConfig.extensions_string, "GL_S3_s3tc" ) ) - { - if ( r_ext_compressed_textures->integer ) - { - glConfig.textureCompression = TC_S3TC; - ri.Printf( PRINT_ALL, "...using GL_S3_s3tc\n" ); - } - else - { - glConfig.textureCompression = TC_NONE; - ri.Printf( PRINT_ALL, "...ignoring GL_S3_s3tc\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_S3_s3tc not found\n" ); - } - - // GL_EXT_texture_env_add - glConfig.textureEnvAddAvailable = qfalse; - if ( strstr( glConfig.extensions_string, "EXT_texture_env_add" ) ) - { - if ( r_ext_texture_env_add->integer ) - { - glConfig.textureEnvAddAvailable = qtrue; - ri.Printf( PRINT_ALL, "...using GL_EXT_texture_env_add\n" ); - } - else - { - glConfig.textureEnvAddAvailable = qfalse; - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_env_add\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_env_add not found\n" ); - } - - // WGL_EXT_swap_control - qwglSwapIntervalEXT = ( BOOL (WINAPI *)(int)) qwglGetProcAddress( "wglSwapIntervalEXT" ); - if ( qwglSwapIntervalEXT ) - { - ri.Printf( PRINT_ALL, "...using WGL_EXT_swap_control\n" ); - r_swapInterval->modified = qtrue; // force a set next frame - } - else - { - ri.Printf( PRINT_ALL, "...WGL_EXT_swap_control not found\n" ); - } - - // GL_ARB_multitexture - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - if ( strstr( glConfig.extensions_string, "GL_ARB_multitexture" ) ) - { - if ( r_ext_multitexture->integer ) - { - qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) qwglGetProcAddress( "glMultiTexCoord2fARB" ); - qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) qwglGetProcAddress( "glActiveTextureARB" ); - qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) qwglGetProcAddress( "glClientActiveTextureARB" ); - - if ( qglActiveTextureARB ) - { - qglGetIntegerv( GL_MAX_ACTIVE_TEXTURES_ARB, &glConfig.maxActiveTextures ); - - if ( glConfig.maxActiveTextures > 1 ) - { - ri.Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" ); - } - else - { - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; - ri.Printf( PRINT_ALL, "...not using GL_ARB_multitexture, < 2 texture units\n" ); - } - } - } - else - { - ri.Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" ); - } - - // GL_EXT_compiled_vertex_array - qglLockArraysEXT = NULL; - qglUnlockArraysEXT = NULL; - if ( strstr( glConfig.extensions_string, "GL_EXT_compiled_vertex_array" ) && ( glConfig.hardwareType != GLHW_RIVA128 ) ) - { - if ( r_ext_compiled_vertex_array->integer ) - { - ri.Printf( PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n" ); - qglLockArraysEXT = ( void ( APIENTRY * )( int, int ) ) qwglGetProcAddress( "glLockArraysEXT" ); - qglUnlockArraysEXT = ( void ( APIENTRY * )( void ) ) qwglGetProcAddress( "glUnlockArraysEXT" ); - if (!qglLockArraysEXT || !qglUnlockArraysEXT) { - ri.Error (ERR_FATAL, "bad getprocaddress"); - } - } - else - { - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_compiled_vertex_array\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" ); - } - - // WGL_3DFX_gamma_control - qwglGetDeviceGammaRamp3DFX = NULL; - qwglSetDeviceGammaRamp3DFX = NULL; - - if ( strstr( glConfig.extensions_string, "WGL_3DFX_gamma_control" ) ) - { - if ( !r_ignorehwgamma->integer && r_ext_gamma_control->integer ) - { - qwglGetDeviceGammaRamp3DFX = ( BOOL ( WINAPI * )( HDC, LPVOID ) ) qwglGetProcAddress( "wglGetDeviceGammaRamp3DFX" ); - qwglSetDeviceGammaRamp3DFX = ( BOOL ( WINAPI * )( HDC, LPVOID ) ) qwglGetProcAddress( "wglSetDeviceGammaRamp3DFX" ); - - if ( qwglGetDeviceGammaRamp3DFX && qwglSetDeviceGammaRamp3DFX ) - { - ri.Printf( PRINT_ALL, "...using WGL_3DFX_gamma_control\n" ); - } - else - { - qwglGetDeviceGammaRamp3DFX = NULL; - qwglSetDeviceGammaRamp3DFX = NULL; - } - } - else - { - ri.Printf( PRINT_ALL, "...ignoring WGL_3DFX_gamma_control\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...WGL_3DFX_gamma_control not found\n" ); - } - - textureFilterAnisotropic = qfalse; - if ( strstr( glConfig.extensions_string, "GL_EXT_texture_filter_anisotropic" ) ) - { - if ( r_ext_texture_filter_anisotropic->integer ) { - qglGetIntegerv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy ); - if ( maxAnisotropy <= 0 ) { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not properly supported!\n" ); - maxAnisotropy = 0; - } - else - { - ri.Printf( PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic (max: %i)\n", maxAnisotropy ); - textureFilterAnisotropic = qtrue; - } - } - else - { - ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n" ); - } - } - else - { - ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" ); - } -} - -/* -** GLW_CheckOSVersion -*/ -static qboolean GLW_CheckOSVersion( void ) -{ -#define OSR2_BUILD_NUMBER 1111 - - OSVERSIONINFO vinfo; - - vinfo.dwOSVersionInfoSize = sizeof(vinfo); - - glw_state.allowdisplaydepthchange = qfalse; - - if ( GetVersionEx( &vinfo) ) - { - if ( vinfo.dwMajorVersion > 4 ) - { - glw_state.allowdisplaydepthchange = qtrue; - } - else if ( vinfo.dwMajorVersion == 4 ) - { - if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) - { - glw_state.allowdisplaydepthchange = qtrue; - } - else if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ) - { - if ( LOWORD( vinfo.dwBuildNumber ) >= OSR2_BUILD_NUMBER ) - { - glw_state.allowdisplaydepthchange = qtrue; - } - } - } - } - else - { - ri.Printf( PRINT_ALL, "GLW_CheckOSVersion() - GetVersionEx failed\n" ); - return qfalse; - } - - return qtrue; -} - -/* -** GLW_LoadOpenGL -** -** GLimp_win.c internal function that attempts to load and use -** a specific OpenGL DLL. -*/ -static qboolean GLW_LoadOpenGL( const char *drivername ) -{ - char buffer[1024]; - qboolean cdsFullscreen; - - Q_strncpyz( buffer, drivername, sizeof(buffer) ); - Q_strlwr(buffer); - - // - // determine if we're on a standalone driver - // - if ( strstr( buffer, "opengl32" ) != 0 || r_maskMinidriver->integer ) - { - glConfig.driverType = GLDRV_ICD; - } - else - { - glConfig.driverType = GLDRV_STANDALONE; - - ri.Printf( PRINT_ALL, "...assuming '%s' is a standalone driver\n", drivername ); - - if ( strstr( buffer, _3DFX_DRIVER_NAME ) ) - { - glConfig.driverType = GLDRV_VOODOO; - } - } - - // disable the 3Dfx splash screen - _putenv("FX_GLIDE_NO_SPLASH=0"); - - // - // load the driver and bind our function pointers to it - // - if ( QGL_Init( buffer ) ) - { - cdsFullscreen = r_fullscreen->integer; - - // create the window and set up the context - if ( !GLW_StartDriverAndSetMode( drivername, r_mode->integer, r_colorbits->integer, cdsFullscreen ) ) - { - // if we're on a 24/32-bit desktop and we're going fullscreen on an ICD, - // try it again but with a 16-bit desktop - if ( glConfig.driverType == GLDRV_ICD ) - { - if ( r_colorbits->integer != 16 || - cdsFullscreen != qtrue || - r_mode->integer != 3 ) - { - if ( !GLW_StartDriverAndSetMode( drivername, 3, 16, qtrue ) ) - { - goto fail; - } - } - } - else - { - goto fail; - } - } - - if ( glConfig.driverType == GLDRV_VOODOO ) - { - glConfig.isFullscreen = qtrue; - } - - return qtrue; - } -fail: - - QGL_Shutdown(); - - return qfalse; -} - -/* -** GLimp_EndFrame -*/ -void GLimp_EndFrame (void) -{ - // - // swapinterval stuff - // - if ( r_swapInterval->modified ) { - r_swapInterval->modified = qfalse; - - if ( !glConfig.stereoEnabled ) { // why? - if ( qwglSwapIntervalEXT ) { - qwglSwapIntervalEXT( r_swapInterval->integer ); - } - } - } - - - // don't flip if drawing to front buffer - if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 ) - { - if ( glConfig.driverType > GLDRV_ICD ) - { - if ( !qwglSwapBuffers( glw_state.hDC ) ) - { - ri.Error( ERR_FATAL, "GLimp_EndFrame() - SwapBuffers() failed!\n" ); - } - } - else - { - SwapBuffers( glw_state.hDC ); - } - } - - // check logging - QGL_EnableLogging( r_logFile->integer ); -} - -static void GLW_StartOpenGL( void ) -{ - qboolean attemptedOpenGL32 = qfalse; - qboolean attempted3Dfx = qfalse; - - // - // load and initialize the specific OpenGL driver - // - if ( !GLW_LoadOpenGL( r_glDriver->string ) ) - { - if ( !Q_stricmp( r_glDriver->string, OPENGL_DRIVER_NAME ) ) - { - attemptedOpenGL32 = qtrue; - } - else if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) ) - { - attempted3Dfx = qtrue; - } - - if ( !attempted3Dfx ) - { - attempted3Dfx = qtrue; - if ( GLW_LoadOpenGL( _3DFX_DRIVER_NAME ) ) - { - ri.Cvar_Set( "r_glDriver", _3DFX_DRIVER_NAME ); - r_glDriver->modified = qfalse; - } - else - { - if ( !attemptedOpenGL32 ) - { - if ( !GLW_LoadOpenGL( OPENGL_DRIVER_NAME ) ) - { - ri.Error( ERR_FATAL, "GLW_StartOpenGL() - could not load OpenGL subsystem\n" ); - } - ri.Cvar_Set( "r_glDriver", OPENGL_DRIVER_NAME ); - r_glDriver->modified = qfalse; - } - else - { - ri.Error( ERR_FATAL, "GLW_StartOpenGL() - could not load OpenGL subsystem\n" ); - } - } - } - else if ( !attemptedOpenGL32 ) - { - attemptedOpenGL32 = qtrue; - if ( GLW_LoadOpenGL( OPENGL_DRIVER_NAME ) ) - { - ri.Cvar_Set( "r_glDriver", OPENGL_DRIVER_NAME ); - r_glDriver->modified = qfalse; - } - else - { - ri.Error( ERR_FATAL, "GLW_StartOpenGL() - could not load OpenGL subsystem\n" ); - } - } - } -} - -/* -** GLimp_Init -** -** This is the platform specific OpenGL initialization function. It -** is responsible for loading OpenGL, initializing it, setting -** extensions, creating a window of the appropriate size, doing -** fullscreen manipulations, etc. Its overall responsibility is -** to make sure that a functional OpenGL subsystem is operating -** when it returns to the ref. -*/ -void GLimp_Init( void ) -{ - char buf[1024]; - cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE ); - cvar_t *cv; - - ri.Printf( PRINT_ALL, "Initializing OpenGL subsystem\n" ); - - // - // check OS version to see if we can do fullscreen display changes - // - if ( !GLW_CheckOSVersion() ) - { - ri.Error( ERR_FATAL, "GLimp_Init() - incorrect operating system\n" ); - } - - // save off hInstance and wndproc - cv = ri.Cvar_Get( "win_hinstance", "", 0 ); - sscanf( cv->string, "%i", (int *)&g_wv.hInstance ); - - cv = ri.Cvar_Get( "win_wndproc", "", 0 ); - sscanf( cv->string, "%i", (int *)&glw_state.wndproc ); - - r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); - r_maskMinidriver = ri.Cvar_Get( "r_maskMinidriver", "0", CVAR_LATCH ); - - // load appropriate DLL and initialize subsystem - GLW_StartOpenGL(); - - // get our config strings - Q_strncpyz( glConfig.vendor_string, qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) ); - Q_strncpyz( glConfig.renderer_string, qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) ); - Q_strncpyz( glConfig.version_string, qglGetString (GL_VERSION), sizeof( glConfig.version_string ) ); - Q_strncpyz( glConfig.extensions_string, qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); - - // - // chipset specific configuration - // - Q_strncpyz( buf, glConfig.renderer_string, sizeof(buf) ); - Q_strlwr( buf ); - - // - // NOTE: if changing cvars, do it within this block. This allows them - // to be overridden when testing driver fixes, etc. but only sets - // them to their default state when the hardware is first installed/run. - // - if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) - { - glConfig.hardwareType = GLHW_GENERIC; - - ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - - // VOODOO GRAPHICS w/ 2MB - if ( strstr( buf, "voodoo graphics/1 tmu/2 mb" ) ) - { - ri.Cvar_Set( "r_picmip", "2" ); - ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); - } - else - { - ri.Cvar_Set( "r_picmip", "1" ); - - if ( strstr( buf, "rage 128" ) || strstr( buf, "rage128" ) ) - { - ri.Cvar_Set( "r_finish", "0" ); - } - // Savage3D and Savage4 should always have trilinear enabled - else if ( strstr( buf, "savage3d" ) || strstr( buf, "s3 savage4" ) ) - { - ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); - } - } - } - - // - // this is where hardware specific workarounds that should be - // detected/initialized every startup should go. - // - if ( strstr( buf, "banshee" ) || strstr( buf, "voodoo3" ) ) - { - glConfig.hardwareType = GLHW_3DFX_2D3D; - } - // VOODOO GRAPHICS w/ 2MB - else if ( strstr( buf, "voodoo graphics/1 tmu/2 mb" ) ) - { - } - else if ( strstr( buf, "glzicd" ) ) - { - } - else if ( strstr( buf, "rage pro" ) || strstr( buf, "Rage Pro" ) || strstr( buf, "ragepro" ) ) - { - glConfig.hardwareType = GLHW_RAGEPRO; - } - else if ( strstr( buf, "rage 128" ) ) - { - } - else if ( strstr( buf, "permedia2" ) ) - { - glConfig.hardwareType = GLHW_PERMEDIA2; - } - else if ( strstr( buf, "riva 128" ) ) - { - glConfig.hardwareType = GLHW_RIVA128; - } - else if ( strstr( buf, "riva tnt " ) ) - { - } - - ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); - - GLW_InitExtensions(); - WG_CheckHardwareGamma(); -} - -/* -** GLimp_Shutdown -** -** This routine does all OS specific shutdown procedures for the OpenGL -** subsystem. -*/ -void GLimp_Shutdown( void ) -{ -// const char *strings[] = { "soft", "hard" }; - const char *success[] = { "failed", "success" }; - int retVal; - - // FIXME: Brian, we need better fallbacks from partially initialized failures - if ( !qwglMakeCurrent ) { - return; - } - - ri.Printf( PRINT_ALL, "Shutting down OpenGL subsystem\n" ); - - // restore gamma. We do this first because 3Dfx's extension needs a valid OGL subsystem - WG_RestoreGamma(); - - // set current context to NULL - if ( qwglMakeCurrent ) - { - retVal = qwglMakeCurrent( NULL, NULL ) != 0; - - ri.Printf( PRINT_ALL, "...wglMakeCurrent( NULL, NULL ): %s\n", success[retVal] ); - } - - // delete HGLRC - if ( glw_state.hGLRC ) - { - retVal = qwglDeleteContext( glw_state.hGLRC ) != 0; - ri.Printf( PRINT_ALL, "...deleting GL context: %s\n", success[retVal] ); - glw_state.hGLRC = NULL; - } - - // release DC - if ( glw_state.hDC ) - { - retVal = ReleaseDC( g_wv.hWnd, glw_state.hDC ) != 0; - ri.Printf( PRINT_ALL, "...releasing DC: %s\n", success[retVal] ); - glw_state.hDC = NULL; - } - - // destroy window - if ( g_wv.hWnd ) - { - ri.Printf( PRINT_ALL, "...destroying window\n" ); - ShowWindow( g_wv.hWnd, SW_HIDE ); - DestroyWindow( g_wv.hWnd ); - g_wv.hWnd = NULL; - glw_state.pixelFormatSet = qfalse; - } - - // close the r_logFile - if ( glw_state.log_fp ) - { - fclose( glw_state.log_fp ); - glw_state.log_fp = 0; - } - - // reset display settings - if ( glw_state.cdsFullscreen ) - { - ri.Printf( PRINT_ALL, "...resetting display\n" ); - ChangeDisplaySettings( 0, 0 ); - glw_state.cdsFullscreen = qfalse; - } - - // shutdown QGL subsystem - QGL_Shutdown(); - - memset( &glConfig, 0, sizeof( glConfig ) ); - memset( &glState, 0, sizeof( glState ) ); -} - -/* -** GLimp_LogComment -*/ -void GLimp_LogComment( char *comment ) -{ - if ( glw_state.log_fp ) { - fprintf( glw_state.log_fp, "%s", comment ); - } -} - - -/* -=========================================================== - -SMP acceleration - -=========================================================== -*/ - -HANDLE renderCommandsEvent; -HANDLE renderCompletedEvent; -HANDLE renderActiveEvent; - -void (*glimpRenderThread)( void ); - -void GLimp_RenderThreadWrapper( void ) { - glimpRenderThread(); - - // unbind the context before we die - qwglMakeCurrent( glw_state.hDC, NULL ); -} - -/* -======================= -GLimp_SpawnRenderThread -======================= -*/ -HANDLE renderThreadHandle; -int renderThreadId; -qboolean GLimp_SpawnRenderThread( void (*function)( void ) ) { - - renderCommandsEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - renderCompletedEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - renderActiveEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - - glimpRenderThread = function; - - renderThreadHandle = CreateThread( - NULL, // LPSECURITY_ATTRIBUTES lpsa, - 0, // DWORD cbStack, - (LPTHREAD_START_ROUTINE)GLimp_RenderThreadWrapper, // LPTHREAD_START_ROUTINE lpStartAddr, - 0, // LPVOID lpvThreadParm, - 0, // DWORD fdwCreate, - (long *)&renderThreadId ); - - if ( !renderThreadHandle ) { - return qfalse; - } - - return qtrue; -} - -static void *smpData; -static int wglErrors; - -void *GLimp_RendererSleep( void ) { - void *data; - - if ( !qwglMakeCurrent( glw_state.hDC, NULL ) ) { - wglErrors++; - } - - // after this, the front end can exit GLimp_FrontEndSleep - SetEvent( renderCompletedEvent ); - - WaitForSingleObject( renderCommandsEvent, INFINITE ); - - ResetEvent( renderActiveEvent ); - - if ( !qwglMakeCurrent( glw_state.hDC, glw_state.hGLRC ) ) { - wglErrors++; - } - - ResetEvent( renderCompletedEvent ); - ResetEvent( renderCommandsEvent ); - - data = smpData; - - // after this, the main thread can exit GLimp_WakeRenderer - SetEvent( renderActiveEvent ); - - return data; -} - - -void GLimp_FrontEndSleep( void ) { - WaitForSingleObject( renderCompletedEvent, INFINITE ); - - if ( !qwglMakeCurrent( glw_state.hDC, glw_state.hGLRC ) ) { - wglErrors++; - } -} - - -void GLimp_WakeRenderer( void *data ) { - smpData = data; - - if ( !qwglMakeCurrent( glw_state.hDC, NULL ) ) { - wglErrors++; - } - - // after this, the renderer can continue through GLimp_RendererSleep - SetEvent( renderCommandsEvent ); - - WaitForSingleObject( renderActiveEvent, INFINITE ); -} - diff --git a/code/win32/win_input.c b/code/win32/win_input.c deleted file mode 100644 index 635ab0cf..00000000 --- a/code/win32/win_input.c +++ /dev/null @@ -1,1149 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// win_input.c -- win32 mouse and joystick code -// 02/21/97 JCB Added extended DirectInput code to support external controllers. - -#include "../client/client.h" -#include "win_local.h" - - -typedef struct { - int oldButtonState; - - qboolean mouseActive; - qboolean mouseInitialized; - qboolean mouseStartupDelayed; // delay mouse init to try DI again when we have a window -} WinMouseVars_t; - -static WinMouseVars_t s_wmv; - -static int window_center_x, window_center_y; - -// -// MIDI definitions -// -static void IN_StartupMIDI( void ); -static void IN_ShutdownMIDI( void ); - -#define MAX_MIDIIN_DEVICES 8 - -typedef struct { - int numDevices; - MIDIINCAPS caps[MAX_MIDIIN_DEVICES]; - - HMIDIIN hMidiIn; -} MidiInfo_t; - -static MidiInfo_t s_midiInfo; - -// -// Joystick definitions -// -#define JOY_MAX_AXES 6 // X, Y, Z, R, U, V - -typedef struct { - qboolean avail; - int id; // joystick number - JOYCAPS jc; - - int oldbuttonstate; - int oldpovstate; - - JOYINFOEX ji; -} joystickInfo_t; - -static joystickInfo_t joy; - - - -cvar_t *in_midi; -cvar_t *in_midiport; -cvar_t *in_midichannel; -cvar_t *in_mididevice; - -cvar_t *in_mouse; -cvar_t *in_logitechbug; -cvar_t *in_joystick; -cvar_t *in_joyBallScale; -cvar_t *in_debugJoystick; -cvar_t *joy_threshold; - -qboolean in_appactive; - -// forward-referenced functions -void IN_StartupJoystick (void); -void IN_JoyMove(void); - -static void MidiInfo_f( void ); - -/* -============================================================ - -WIN32 MOUSE CONTROL - -============================================================ -*/ - -/* -================ -IN_InitWin32Mouse -================ -*/ -void IN_InitWin32Mouse( void ) -{ -} - -/* -================ -IN_ShutdownWin32Mouse -================ -*/ -void IN_ShutdownWin32Mouse( void ) { -} - -/* -================ -IN_ActivateWin32Mouse -================ -*/ -void IN_ActivateWin32Mouse( void ) { - int width, height; - RECT window_rect; - - width = GetSystemMetrics (SM_CXSCREEN); - height = GetSystemMetrics (SM_CYSCREEN); - - GetWindowRect ( g_wv.hWnd, &window_rect); - if (window_rect.left < 0) - window_rect.left = 0; - if (window_rect.top < 0) - window_rect.top = 0; - if (window_rect.right >= width) - window_rect.right = width-1; - if (window_rect.bottom >= height-1) - window_rect.bottom = height-1; - window_center_x = (window_rect.right + window_rect.left)/2; - window_center_y = (window_rect.top + window_rect.bottom)/2; - - SetCursorPos (window_center_x, window_center_y); - - SetCapture ( g_wv.hWnd ); - ClipCursor (&window_rect); - while (ShowCursor (FALSE) >= 0) - ; -} - -/* -================ -IN_DeactivateWin32Mouse -================ -*/ -void IN_DeactivateWin32Mouse( void ) -{ - ClipCursor (NULL); - ReleaseCapture (); - while (ShowCursor (TRUE) < 0) - ; -} - -/* -================ -IN_Win32Mouse -================ -*/ -void IN_Win32Mouse( int *mx, int *my ) { - POINT current_pos; - - // find mouse movement - GetCursorPos (¤t_pos); - - // force the mouse to the center, so there's room to move - SetCursorPos (window_center_x, window_center_y); - - *mx = current_pos.x - window_center_x; - *my = current_pos.y - window_center_y; -} - - -/* -============================================================ - -DIRECT INPUT MOUSE CONTROL - -============================================================ -*/ - -#undef DEFINE_GUID - -#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - const GUID name \ - = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } - -DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); -DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); -DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); -DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); - - -#define DINPUT_BUFFERSIZE 16 -#define iDirectInputCreate(a,b,c,d) pDirectInputCreate(a,b,c,d) - -HRESULT (WINAPI *pDirectInputCreate)(HINSTANCE hinst, DWORD dwVersion, - LPDIRECTINPUT * lplpDirectInput, LPUNKNOWN punkOuter); - -static HINSTANCE hInstDI; - -typedef struct MYDATA { - LONG lX; // X axis goes here - LONG lY; // Y axis goes here - LONG lZ; // Z axis goes here - BYTE bButtonA; // One button goes here - BYTE bButtonB; // Another button goes here - BYTE bButtonC; // Another button goes here - BYTE bButtonD; // Another button goes here -} MYDATA; - -static DIOBJECTDATAFORMAT rgodf[] = { - { &GUID_XAxis, FIELD_OFFSET(MYDATA, lX), DIDFT_AXIS | DIDFT_ANYINSTANCE, 0,}, - { &GUID_YAxis, FIELD_OFFSET(MYDATA, lY), DIDFT_AXIS | DIDFT_ANYINSTANCE, 0,}, - { &GUID_ZAxis, FIELD_OFFSET(MYDATA, lZ), 0x80000000 | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0,}, - { 0, FIELD_OFFSET(MYDATA, bButtonA), DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0,}, - { 0, FIELD_OFFSET(MYDATA, bButtonB), DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0,}, - { 0, FIELD_OFFSET(MYDATA, bButtonC), 0x80000000 | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0,}, - { 0, FIELD_OFFSET(MYDATA, bButtonD), 0x80000000 | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0,}, -}; - -#define NUM_OBJECTS (sizeof(rgodf) / sizeof(rgodf[0])) - -// NOTE TTimo: would be easier using c_dfDIMouse or c_dfDIMouse2 -static DIDATAFORMAT df = { - sizeof(DIDATAFORMAT), // this structure - sizeof(DIOBJECTDATAFORMAT), // size of object data format - DIDF_RELAXIS, // absolute axis coordinates - sizeof(MYDATA), // device data size - NUM_OBJECTS, // number of objects - rgodf, // and here they are -}; - -static LPDIRECTINPUT g_pdi; -static LPDIRECTINPUTDEVICE g_pMouse; - -void IN_DIMouse( int *mx, int *my ); - -/* -======================== -IN_InitDIMouse -======================== -*/ -qboolean IN_InitDIMouse( void ) { - HRESULT hr; - int x, y; - DIPROPDWORD dipdw = { - { - sizeof(DIPROPDWORD), // diph.dwSize - sizeof(DIPROPHEADER), // diph.dwHeaderSize - 0, // diph.dwObj - DIPH_DEVICE, // diph.dwHow - }, - DINPUT_BUFFERSIZE, // dwData - }; - - Com_DPrintf( "Initializing DirectInput...\n"); - - if (!hInstDI) { - hInstDI = LoadLibrary("dinput.dll"); - - if (hInstDI == NULL) { - Com_DPrintf ("Couldn't load dinput.dll\n"); - return qfalse; - } - } - - if (!pDirectInputCreate) { - pDirectInputCreate = (HRESULT (WINAPI *)(HINSTANCE, DWORD, LPDIRECTINPUT *, LPUNKNOWN)) - GetProcAddress(hInstDI,"DirectInputCreateA"); - - if (!pDirectInputCreate) { - Com_DPrintf ("Couldn't get DI proc addr\n"); - return qfalse; - } - } - - // register with DirectInput and get an IDirectInput to play with. - hr = iDirectInputCreate( g_wv.hInstance, DIRECTINPUT_VERSION, &g_pdi, NULL); - - if (FAILED(hr)) { - Com_DPrintf ("iDirectInputCreate failed\n"); - return qfalse; - } - - // obtain an interface to the system mouse device. - hr = IDirectInput_CreateDevice(g_pdi, &GUID_SysMouse, &g_pMouse, NULL); - - if (FAILED(hr)) { - Com_DPrintf ("Couldn't open DI mouse device\n"); - return qfalse; - } - - // set the data format to "mouse format". - hr = IDirectInputDevice_SetDataFormat(g_pMouse, &df); - - if (FAILED(hr)) { - Com_DPrintf ("Couldn't set DI mouse format\n"); - return qfalse; - } - - // set the cooperativity level. - hr = IDirectInputDevice_SetCooperativeLevel(g_pMouse, g_wv.hWnd, - DISCL_EXCLUSIVE | DISCL_FOREGROUND); - - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=50 - if (FAILED(hr)) { - Com_DPrintf ("Couldn't set DI coop level\n"); - return qfalse; - } - - - // set the buffer size to DINPUT_BUFFERSIZE elements. - // the buffer size is a DWORD property associated with the device - hr = IDirectInputDevice_SetProperty(g_pMouse, DIPROP_BUFFERSIZE, &dipdw.diph); - - if (FAILED(hr)) { - Com_DPrintf ("Couldn't set DI buffersize\n"); - return qfalse; - } - - // clear any pending samples - IN_DIMouse( &x, &y ); - IN_DIMouse( &x, &y ); - - Com_DPrintf( "DirectInput initialized.\n"); - return qtrue; -} - -/* -========================== -IN_ShutdownDIMouse -========================== -*/ -void IN_ShutdownDIMouse( void ) { - if (g_pMouse) { - IDirectInputDevice_Release(g_pMouse); - g_pMouse = NULL; - } - - if (g_pdi) { - IDirectInput_Release(g_pdi); - g_pdi = NULL; - } -} - -/* -========================== -IN_ActivateDIMouse -========================== -*/ -void IN_ActivateDIMouse( void ) { - HRESULT hr; - - if (!g_pMouse) { - return; - } - - // we may fail to reacquire if the window has been recreated - hr = IDirectInputDevice_Acquire( g_pMouse ); - if (FAILED(hr)) { - if ( !IN_InitDIMouse() ) { - Com_Printf ("Falling back to Win32 mouse support...\n"); - Cvar_Set( "in_mouse", "-1" ); - } - } -} - -/* -========================== -IN_DeactivateDIMouse -========================== -*/ -void IN_DeactivateDIMouse( void ) { - if (!g_pMouse) { - return; - } - IDirectInputDevice_Unacquire( g_pMouse ); -} - - -/* -=================== -IN_DIMouse -=================== -*/ -void IN_DIMouse( int *mx, int *my ) { - DIDEVICEOBJECTDATA od; - DIMOUSESTATE state; - DWORD dwElements; - HRESULT hr; - int value; - - if ( !g_pMouse ) { - return; - } - - // fetch new events - for (;;) - { - dwElements = 1; - - hr = IDirectInputDevice_GetDeviceData(g_pMouse, - sizeof(DIDEVICEOBJECTDATA), &od, &dwElements, 0); - if ((hr == DIERR_INPUTLOST) || (hr == DIERR_NOTACQUIRED)) { - IDirectInputDevice_Acquire(g_pMouse); - return; - } - - /* Unable to read data or no data available */ - if ( FAILED(hr) ) { - break; - } - - if ( dwElements == 0 ) { - break; - } - - switch (od.dwOfs) { - case DIMOFS_BUTTON0: - if (od.dwData & 0x80) - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE1, qtrue, 0, NULL ); - else - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE1, qfalse, 0, NULL ); - break; - - case DIMOFS_BUTTON1: - if (od.dwData & 0x80) - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE2, qtrue, 0, NULL ); - else - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE2, qfalse, 0, NULL ); - break; - - case DIMOFS_BUTTON2: - if (od.dwData & 0x80) - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE3, qtrue, 0, NULL ); - else - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE3, qfalse, 0, NULL ); - break; - - case DIMOFS_BUTTON3: - if (od.dwData & 0x80) - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE4, qtrue, 0, NULL ); - else - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MOUSE4, qfalse, 0, NULL ); - break; - // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=50 - case DIMOFS_Z: - value = od.dwData; - if (value == 0) { - - } else if (value < 0) { - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); - } else { - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); - Sys_QueEvent( od.dwTimeStamp, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); - } - break; - } - } - - // read the raw delta counter and ignore - // the individual sample time / values - hr = IDirectInputDevice_GetDeviceState(g_pMouse, - sizeof(DIDEVICEOBJECTDATA), &state); - if ( FAILED(hr) ) { - *mx = *my = 0; - return; - } - *mx = state.lX; - *my = state.lY; -} - -/* -============================================================ - - MOUSE CONTROL - -============================================================ -*/ - -/* -=========== -IN_ActivateMouse - -Called when the window gains focus or changes in some way -=========== -*/ -void IN_ActivateMouse( void ) -{ - if (!s_wmv.mouseInitialized ) { - return; - } - if ( !in_mouse->integer ) - { - s_wmv.mouseActive = qfalse; - return; - } - if ( s_wmv.mouseActive ) - { - return; - } - - s_wmv.mouseActive = qtrue; - - if ( in_mouse->integer != -1 ) { - IN_ActivateDIMouse(); - } - IN_ActivateWin32Mouse(); -} - - -/* -=========== -IN_DeactivateMouse - -Called when the window loses focus -=========== -*/ -void IN_DeactivateMouse( void ) { - if (!s_wmv.mouseInitialized ) { - return; - } - if (!s_wmv.mouseActive ) { - return; - } - s_wmv.mouseActive = qfalse; - - IN_DeactivateDIMouse(); - IN_DeactivateWin32Mouse(); -} - - - -/* -=========== -IN_StartupMouse -=========== -*/ -void IN_StartupMouse( void ) -{ - s_wmv.mouseInitialized = qfalse; - s_wmv.mouseStartupDelayed = qfalse; - - if ( in_mouse->integer == 0 ) { - Com_DPrintf ("Mouse control not active.\n"); - return; - } - - // nt4.0 direct input is screwed up - if ( ( g_wv.osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ) && - ( g_wv.osversion.dwMajorVersion == 4 ) ) - { - Com_DPrintf ("Disallowing DirectInput on NT 4.0\n"); - Cvar_Set( "in_mouse", "-1" ); - } - - if ( in_mouse->integer == -1 ) { - Com_DPrintf ("Skipping check for DirectInput\n"); - } else { - if (!g_wv.hWnd) - { - Com_DPrintf ("No window for DirectInput mouse init, delaying\n"); - s_wmv.mouseStartupDelayed = qtrue; - return; - } - if ( IN_InitDIMouse() ) { - s_wmv.mouseInitialized = qtrue; - return; - } - Com_DPrintf ("Falling back to Win32 mouse support...\n"); - } - s_wmv.mouseInitialized = qtrue; - IN_InitWin32Mouse(); -} - -/* -=========== -IN_MouseEvent -=========== -*/ -void IN_MouseEvent (int mstate) -{ - int i; - - if ( !s_wmv.mouseInitialized ) - return; - -// perform button actions - for (i = 0 ; i < 3 ; i++ ) - { - if ( (mstate & (1<modified = qfalse; - in_joystick->modified = qfalse; -} - -/* -=========== -IN_Shutdown -=========== -*/ -void IN_Shutdown( void ) { - IN_DeactivateMouse(); - IN_ShutdownDIMouse(); - IN_ShutdownMIDI(); - Cmd_RemoveCommand("midiinfo" ); -} - - -/* -=========== -IN_Init -=========== -*/ -void IN_Init( void ) { - // MIDI input controler variables - in_midi = Cvar_Get ("in_midi", "0", CVAR_ARCHIVE); - in_midiport = Cvar_Get ("in_midiport", "1", CVAR_ARCHIVE); - in_midichannel = Cvar_Get ("in_midichannel", "1", CVAR_ARCHIVE); - in_mididevice = Cvar_Get ("in_mididevice", "0", CVAR_ARCHIVE); - - Cmd_AddCommand( "midiinfo", MidiInfo_f ); - - // mouse variables - in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE|CVAR_LATCH); - in_logitechbug = Cvar_Get ("in_logitechbug", "0", CVAR_ARCHIVE); - - // joystick variables - in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE|CVAR_LATCH); - in_joyBallScale = Cvar_Get ("in_joyBallScale", "0.02", CVAR_ARCHIVE); - in_debugJoystick = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP); - - joy_threshold = Cvar_Get ("joy_threshold", "0.15", CVAR_ARCHIVE); - - IN_Startup(); -} - - -/* -=========== -IN_Activate - -Called when the main window gains or loses focus. -The window may have been destroyed and recreated -between a deactivate and an activate. -=========== -*/ -void IN_Activate (qboolean active) { - in_appactive = active; - - if ( !active ) - { - IN_DeactivateMouse(); - } -} - - -/* -================== -IN_Frame - -Called every frame, even if not generating commands -================== -*/ -void IN_Frame (void) { - // post joystick events - IN_JoyMove(); - - if ( !s_wmv.mouseInitialized ) { - if (s_wmv.mouseStartupDelayed && g_wv.hWnd) - { - Com_Printf("Proceeding with delayed mouse init\n"); - IN_StartupMouse(); - s_wmv.mouseStartupDelayed = qfalse; - } - return; - } - - if ( cls.keyCatchers & KEYCATCH_CONSOLE ) { - // temporarily deactivate if not in the game and - // running on the desktop - // voodoo always counts as full screen - if (Cvar_VariableValue ("r_fullscreen") == 0 - && strcmp( Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME) ) { - IN_DeactivateMouse (); - return; - } - } - - if ( !in_appactive ) { - IN_DeactivateMouse (); - return; - } - - IN_ActivateMouse(); - - // post events to the system que - IN_MouseMove(); - -} - - -/* -=================== -IN_ClearStates -=================== -*/ -void IN_ClearStates (void) -{ - s_wmv.oldButtonState = 0; -} - - -/* -========================================================================= - -JOYSTICK - -========================================================================= -*/ - -/* -=============== -IN_StartupJoystick -=============== -*/ -void IN_StartupJoystick (void) { - int numdevs; - MMRESULT mmr; - - // assume no joystick - joy.avail = qfalse; - - if (! in_joystick->integer ) { - Com_DPrintf ("Joystick is not active.\n"); - return; - } - - // verify joystick driver is present - if ((numdevs = joyGetNumDevs ()) == 0) - { - Com_DPrintf ("joystick not found -- driver not present\n"); - return; - } - - // cycle through the joystick ids for the first valid one - mmr = 0; - for (joy.id=0 ; joy.id 1 ) { - fValue = 1; - } - return fValue; -} - -int JoyToI( int value ) { - // move centerpoint to zero - value -= 32768; - - return value; -} - -int joyDirectionKeys[16] = { - K_LEFTARROW, K_RIGHTARROW, - K_UPARROW, K_DOWNARROW, - K_JOY16, K_JOY17, - K_JOY18, K_JOY19, - K_JOY20, K_JOY21, - K_JOY22, K_JOY23, - - K_JOY24, K_JOY25, - K_JOY26, K_JOY27 -}; - -/* -=========== -IN_JoyMove -=========== -*/ -void IN_JoyMove( void ) { - float fAxisValue; - int i; - DWORD buttonstate, povstate; - int x, y; - - // verify joystick is available and that the user wants to use it - if ( !joy.avail ) { - return; - } - - // collect the joystick data, if possible - Com_Memset (&joy.ji, 0, sizeof(joy.ji)); - joy.ji.dwSize = sizeof(joy.ji); - joy.ji.dwFlags = JOY_RETURNALL; - - if ( joyGetPosEx (joy.id, &joy.ji) != JOYERR_NOERROR ) { - // read error occurred - // turning off the joystick seems too harsh for 1 read error, - // but what should be done? - // Com_Printf ("IN_ReadJoystick: no response\n"); - // joy.avail = false; - return; - } - - if ( in_debugJoystick->integer ) { - Com_Printf( "%8x %5i %5.2f %5.2f %5.2f %5.2f %6i %6i\n", - JoyToI( joy.ji.dwButtons ), - JoyToI( joy.ji.dwPOV ), - JoyToF( joy.ji.dwXpos ), JoyToF( joy.ji.dwYpos ), - JoyToF( joy.ji.dwZpos ), JoyToF( joy.ji.dwRpos ), - JoyToI( joy.ji.dwUpos ), JoyToI( joy.ji.dwVpos ) ); - } - - // loop through the joystick buttons - // key a joystick event or auxillary event for higher number buttons for each state change - buttonstate = joy.ji.dwButtons; - for ( i=0 ; i < joy.jc.wNumButtons ; i++ ) { - if ( (buttonstate & (1<value ) { - povstate |= (1<<(i*2)); - } else if ( fAxisValue > joy_threshold->value ) { - povstate |= (1<<(i*2+1)); - } - } - - // convert POV information from a direction into 4 button bits - if ( joy.jc.wCaps & JOYCAPS_HASPOV ) { - if ( joy.ji.dwPOV != JOY_POVCENTERED ) { - if (joy.ji.dwPOV == JOY_POVFORWARD) - povstate |= 1<<12; - if (joy.ji.dwPOV == JOY_POVBACKWARD) - povstate |= 1<<13; - if (joy.ji.dwPOV == JOY_POVRIGHT) - povstate |= 1<<14; - if (joy.ji.dwPOV == JOY_POVLEFT) - povstate |= 1<<15; - } - } - - // determine which bits have changed and key an auxillary event for each change - for (i=0 ; i < 16 ; i++) { - if ( (povstate & (1<= 6 ) { - x = JoyToI( joy.ji.dwUpos ) * in_joyBallScale->value; - y = JoyToI( joy.ji.dwVpos ) * in_joyBallScale->value; - if ( x || y ) { - Sys_QueEvent( g_wv.sysMsgTime, SE_MOUSE, x, y, 0, NULL ); - } - } -} - -/* -========================================================================= - -MIDI - -========================================================================= -*/ - -static void MIDI_NoteOff( int note ) -{ - int qkey; - - qkey = note - 60 + K_AUX1; - - if ( qkey > 255 || qkey < K_AUX1 ) - return; - - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, qkey, qfalse, 0, NULL ); -} - -static void MIDI_NoteOn( int note, int velocity ) -{ - int qkey; - - if ( velocity == 0 ) - MIDI_NoteOff( note ); - - qkey = note - 60 + K_AUX1; - - if ( qkey > 255 || qkey < K_AUX1 ) - return; - - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, qkey, qtrue, 0, NULL ); -} - -static void CALLBACK MidiInProc( HMIDIIN hMidiIn, UINT uMsg, DWORD dwInstance, - DWORD dwParam1, DWORD dwParam2 ) -{ - int message; - - switch ( uMsg ) - { - case MIM_OPEN: - break; - case MIM_CLOSE: - break; - case MIM_DATA: - message = dwParam1 & 0xff; - - // note on - if ( ( message & 0xf0 ) == 0x90 ) - { - if ( ( ( message & 0x0f ) + 1 ) == in_midichannel->integer ) - MIDI_NoteOn( ( dwParam1 & 0xff00 ) >> 8, ( dwParam1 & 0xff0000 ) >> 16 ); - } - else if ( ( message & 0xf0 ) == 0x80 ) - { - if ( ( ( message & 0x0f ) + 1 ) == in_midichannel->integer ) - MIDI_NoteOff( ( dwParam1 & 0xff00 ) >> 8 ); - } - break; - case MIM_LONGDATA: - break; - case MIM_ERROR: - break; - case MIM_LONGERROR: - break; - } - -// Sys_QueEvent( sys_msg_time, SE_KEY, wMsg, qtrue, 0, NULL ); -} - -static void MidiInfo_f( void ) -{ - int i; - - const char *enableStrings[] = { "disabled", "enabled" }; - - Com_Printf( "\nMIDI control: %s\n", enableStrings[in_midi->integer != 0] ); - Com_Printf( "port: %d\n", in_midiport->integer ); - Com_Printf( "channel: %d\n", in_midichannel->integer ); - Com_Printf( "current device: %d\n", in_mididevice->integer ); - Com_Printf( "number of devices: %d\n", s_midiInfo.numDevices ); - for ( i = 0; i < s_midiInfo.numDevices; i++ ) - { - if ( i == Cvar_VariableValue( "in_mididevice" ) ) - Com_Printf( "***" ); - else - Com_Printf( "..." ); - Com_Printf( "device %2d: %s\n", i, s_midiInfo.caps[i].szPname ); - Com_Printf( "...manufacturer ID: 0x%hx\n", s_midiInfo.caps[i].wMid ); - Com_Printf( "...product ID: 0x%hx\n", s_midiInfo.caps[i].wPid ); - - Com_Printf( "\n" ); - } -} - -static void IN_StartupMIDI( void ) -{ - int i; - - if ( !Cvar_VariableValue( "in_midi" ) ) - return; - - // - // enumerate MIDI IN devices - // - s_midiInfo.numDevices = midiInGetNumDevs(); - - for ( i = 0; i < s_midiInfo.numDevices; i++ ) - { - midiInGetDevCaps( i, &s_midiInfo.caps[i], sizeof( s_midiInfo.caps[i] ) ); - } - - // - // open the MIDI IN port - // - if ( midiInOpen( &s_midiInfo.hMidiIn, - in_mididevice->integer, - ( unsigned long ) MidiInProc, - ( unsigned long ) NULL, - CALLBACK_FUNCTION ) != MMSYSERR_NOERROR ) - { - Com_DPrintf( "WARNING: could not open MIDI device %d: '%s'\n", - in_mididevice->integer , s_midiInfo.caps[( int ) in_mididevice->value].szPname ); - return; - } - - midiInStart( s_midiInfo.hMidiIn ); -} - -static void IN_ShutdownMIDI( void ) -{ - if ( s_midiInfo.hMidiIn ) - { - midiInClose( s_midiInfo.hMidiIn ); - } - Com_Memset( &s_midiInfo, 0, sizeof( s_midiInfo ) ); -} - diff --git a/code/win32/win_local.h b/code/win32/win_local.h deleted file mode 100644 index e4414b4b..00000000 --- a/code/win32/win_local.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// win_local.h: Win32-specific Quake3 header file - -#if defined (_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning(disable : 4201) -#pragma warning( push ) -#endif -#include -#if defined (_MSC_VER) && (_MSC_VER >= 1200) -#pragma warning( pop ) -#endif - -#define DIRECTSOUND_VERSION 0x0300 -#define DIRECTINPUT_VERSION 0x0300 - -#include -#include -#include - -void IN_MouseEvent (int mstate); - -void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ); - -void Sys_CreateConsole( void ); -void Sys_DestroyConsole( void ); - -char *Sys_ConsoleInput (void); - -qboolean Sys_GetPacket ( netadr_t *net_from, msg_t *net_message ); - -// Input subsystem - -void IN_Init (void); -void IN_Shutdown (void); -void IN_JoystickCommands (void); - -void IN_Move (usercmd_t *cmd); -// add additional non keyboard / non mouse movement on top of the keyboard move cmd - -void IN_DeactivateWin32Mouse( void); - -void IN_Activate (qboolean active); -void IN_Frame (void); - -// window procedure -LONG WINAPI MainWndProc ( - HWND hWnd, - UINT uMsg, - WPARAM wParam, - LPARAM lParam); - -void Conbuf_AppendText( const char *msg ); - -void SNDDMA_Activate( void ); -int SNDDMA_InitDS (void); - -typedef struct -{ - - HINSTANCE reflib_library; // Handle to refresh DLL - qboolean reflib_active; - - HWND hWnd; - HINSTANCE hInstance; - qboolean activeApp; - qboolean isMinimized; - OSVERSIONINFO osversion; - - // when we get a windows message, we store the time off so keyboard processing - // can know the exact time of an event - unsigned sysMsgTime; -} WinVars_t; - -extern WinVars_t g_wv; diff --git a/code/win32/win_main.c b/code/win32/win_main.c deleted file mode 100644 index 51d68b08..00000000 --- a/code/win32/win_main.c +++ /dev/null @@ -1,1264 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// win_main.c - -#include "../client/client.h" -#include "../qcommon/qcommon.h" -#include "win_local.h" -#include "resource.h" -#include -#include -#include -#include -#include -#include -#include - -#define CD_BASEDIR "quake3" -#define CD_EXE "quake3.exe" -#define CD_BASEDIR_LINUX "bin\\x86\\glibc-2.1" -#define CD_EXE_LINUX "quake3" -#define MEM_THRESHOLD 96*1024*1024 - -static char sys_cmdline[MAX_STRING_CHARS]; - -// define this to use alternate spanking method -// I found out that the regular way doesn't work on my box for some reason -// see the associated spank.sh script -#define ALT_SPANK -#ifdef ALT_SPANK -#include -#include - -int fh = 0; - -void Spk_Open(char *name) -{ - fh = open( name, O_TRUNC | O_CREAT | O_WRONLY, S_IREAD | S_IWRITE ); -}; - -void Spk_Close(void) -{ - if (!fh) - return; - - close( fh ); - fh = 0; -} - -void Spk_Printf (const char *text, ...) -{ - va_list argptr; - char buf[32768]; - - if (!fh) - return; - - va_start (argptr,text); - vsprintf (buf, text, argptr); - write(fh, buf, strlen(buf)); - _commit(fh); - va_end (argptr); - -}; -#endif - -/* -================== -Sys_LowPhysicalMemory() -================== -*/ - -qboolean Sys_LowPhysicalMemory() { - MEMORYSTATUS stat; - GlobalMemoryStatus (&stat); - return (stat.dwTotalPhys <= MEM_THRESHOLD) ? qtrue : qfalse; -} - -/* -================== -Sys_BeginProfiling -================== -*/ -void Sys_BeginProfiling( void ) { - // this is just used on the mac build -} - -/* -============= -Sys_Error - -Show the early console as an error dialog -============= -*/ -void QDECL Sys_Error( const char *error, ... ) { - va_list argptr; - char text[4096]; - MSG msg; - - va_start (argptr, error); - vsprintf (text, error, argptr); - va_end (argptr); - - Conbuf_AppendText( text ); - Conbuf_AppendText( "\n" ); - - Sys_SetErrorText( text ); - Sys_ShowConsole( 1, qtrue ); - - timeEndPeriod( 1 ); - - IN_Shutdown(); - - // wait for the user to quit - while ( 1 ) { - if (!GetMessage (&msg, NULL, 0, 0)) - Com_Quit_f (); - TranslateMessage (&msg); - DispatchMessage (&msg); - } - - Sys_DestroyConsole(); - - exit (1); -} - -/* -============== -Sys_Quit -============== -*/ -void Sys_Quit( void ) { - timeEndPeriod( 1 ); - IN_Shutdown(); - Sys_DestroyConsole(); - - exit (0); -} - -/* -============== -Sys_Print -============== -*/ -void Sys_Print( const char *msg ) { - Conbuf_AppendText( msg ); -} - - -/* -============== -Sys_Mkdir -============== -*/ -void Sys_Mkdir( const char *path ) { - _mkdir (path); -} - -/* -============== -Sys_Cwd -============== -*/ -char *Sys_Cwd( void ) { - static char cwd[MAX_OSPATH]; - - _getcwd( cwd, sizeof( cwd ) - 1 ); - cwd[MAX_OSPATH-1] = 0; - - return cwd; -} - -/* -============== -Sys_DefaultCDPath -============== -*/ -char *Sys_DefaultCDPath( void ) { - return ""; -} - -/* -============== -Sys_DefaultBasePath -============== -*/ -char *Sys_DefaultBasePath( void ) { - return Sys_Cwd(); -} - -/* -============================================================== - -DIRECTORY SCANNING - -============================================================== -*/ - -#define MAX_FOUND_FILES 0x1000 - -void Sys_ListFilteredFiles( const char *basedir, char *subdirs, char *filter, char **list, int *numfiles ) { - char search[MAX_OSPATH], newsubdirs[MAX_OSPATH]; - char filename[MAX_OSPATH]; - int findhandle; - struct _finddata_t findinfo; - - if ( *numfiles >= MAX_FOUND_FILES - 1 ) { - return; - } - - if (strlen(subdirs)) { - Com_sprintf( search, sizeof(search), "%s\\%s\\*", basedir, subdirs ); - } - else { - Com_sprintf( search, sizeof(search), "%s\\*", basedir ); - } - - findhandle = _findfirst (search, &findinfo); - if (findhandle == -1) { - return; - } - - do { - if (findinfo.attrib & _A_SUBDIR) { - if (Q_stricmp(findinfo.name, ".") && Q_stricmp(findinfo.name, "..")) { - if (strlen(subdirs)) { - Com_sprintf( newsubdirs, sizeof(newsubdirs), "%s\\%s", subdirs, findinfo.name); - } - else { - Com_sprintf( newsubdirs, sizeof(newsubdirs), "%s", findinfo.name); - } - Sys_ListFilteredFiles( basedir, newsubdirs, filter, list, numfiles ); - } - } - if ( *numfiles >= MAX_FOUND_FILES - 1 ) { - break; - } - Com_sprintf( filename, sizeof(filename), "%s\\%s", subdirs, findinfo.name ); - if (!Com_FilterPath( filter, filename, qfalse )) - continue; - list[ *numfiles ] = CopyString( filename ); - (*numfiles)++; - } while ( _findnext (findhandle, &findinfo) != -1 ); - - _findclose (findhandle); -} - -static qboolean strgtr(const char *s0, const char *s1) { - int l0, l1, i; - - l0 = strlen(s0); - l1 = strlen(s1); - - if (l1 s0[i]) { - return qtrue; - } - if (s1[i] < s0[i]) { - return qfalse; - } - } - return qfalse; -} - -char **Sys_ListFiles( const char *directory, const char *extension, char *filter, int *numfiles, qboolean wantsubs ) { - char search[MAX_OSPATH]; - int nfiles; - char **listCopy; - char *list[MAX_FOUND_FILES]; - struct _finddata_t findinfo; - int findhandle; - int flag; - int i; - - if (filter) { - - nfiles = 0; - Sys_ListFilteredFiles( directory, "", filter, list, &nfiles ); - - list[ nfiles ] = 0; - *numfiles = nfiles; - - if (!nfiles) - return NULL; - - listCopy = Z_Malloc( ( nfiles + 1 ) * sizeof( *listCopy ) ); - for ( i = 0 ; i < nfiles ; i++ ) { - listCopy[i] = list[i]; - } - listCopy[i] = NULL; - - return listCopy; - } - - if ( !extension) { - extension = ""; - } - - // passing a slash as extension will find directories - if ( extension[0] == '/' && extension[1] == 0 ) { - extension = ""; - flag = 0; - } else { - flag = _A_SUBDIR; - } - - Com_sprintf( search, sizeof(search), "%s\\*%s", directory, extension ); - - // search - nfiles = 0; - - findhandle = _findfirst (search, &findinfo); - if (findhandle == -1) { - *numfiles = 0; - return NULL; - } - - do { - if ( (!wantsubs && flag ^ ( findinfo.attrib & _A_SUBDIR )) || (wantsubs && findinfo.attrib & _A_SUBDIR) ) { - if ( nfiles == MAX_FOUND_FILES - 1 ) { - break; - } - list[ nfiles ] = CopyString( findinfo.name ); - nfiles++; - } - } while ( _findnext (findhandle, &findinfo) != -1 ); - - list[ nfiles ] = 0; - - _findclose (findhandle); - - // return a copy of the list - *numfiles = nfiles; - - if ( !nfiles ) { - return NULL; - } - - listCopy = Z_Malloc( ( nfiles + 1 ) * sizeof( *listCopy ) ); - for ( i = 0 ; i < nfiles ; i++ ) { - listCopy[i] = list[i]; - } - listCopy[i] = NULL; - - do { - flag = 0; - for(i=1; i (5 * 60000)) && !Cvar_VariableIntegerValue( "dedicated" ) - && !Cvar_VariableIntegerValue( "com_blindlyLoadDLLs" ) ) { - if (FS_FileExists(filename)) { - lastWarning = timestamp; - ret = MessageBoxEx( NULL, "You are about to load a .DLL executable that\n" - "has not been verified for use with Quake III Arena.\n" - "This type of file can compromise the security of\n" - "your computer.\n\n" - "Select 'OK' if you choose to load it anyway.", - "Security Warning", MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2 | MB_TOPMOST | MB_SETFOREGROUND, - MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ) ); - if( ret != IDOK ) { - return NULL; - } - } - } -#endif - -#ifndef NDEBUG - libHandle = LoadLibrary( filename ); - if (libHandle) - Com_Printf("LoadLibrary '%s' ok\n", filename); - else - Com_Printf("LoadLibrary '%s' failed\n", filename); - if ( !libHandle ) { -#endif - basepath = Cvar_VariableString( "fs_basepath" ); - cdpath = Cvar_VariableString( "fs_cdpath" ); - gamedir = Cvar_VariableString( "fs_game" ); - - fn = FS_BuildOSPath( basepath, gamedir, filename ); - libHandle = LoadLibrary( fn ); -#ifndef NDEBUG - if (libHandle) - Com_Printf("LoadLibrary '%s' ok\n", fn); - else - Com_Printf("LoadLibrary '%s' failed\n", fn); -#endif - - if ( !libHandle ) { - if( cdpath[0] ) { - fn = FS_BuildOSPath( cdpath, gamedir, filename ); - libHandle = LoadLibrary( fn ); -#ifndef NDEBUG - if (libHandle) - Com_Printf("LoadLibrary '%s' ok\n", fn); - else - Com_Printf("LoadLibrary '%s' failed\n", fn); -#endif - } - - if ( !libHandle ) { - return NULL; - } - } -#ifndef NDEBUG - } -#endif - - dllEntry = ( void (QDECL *)(intptr_t (QDECL *)( intptr_t, ... ) ) )GetProcAddress( libHandle, "dllEntry" ); - *entryPoint = (intptr_t (QDECL *)(intptr_t,...))GetProcAddress( libHandle, "vmMain" ); - if ( !*entryPoint || !dllEntry ) { - FreeLibrary( libHandle ); - return NULL; - } - dllEntry( systemcalls ); - - if ( libHandle ) Q_strncpyz ( fqpath , filename , MAX_QPATH ) ; // added 7/20/02 by T.Ray - return libHandle; -} - - -/* -======================================================================== - -BACKGROUND FILE STREAMING - -======================================================================== -*/ - -#if 1 - -void Sys_InitStreamThread( void ) { -} - -void Sys_ShutdownStreamThread( void ) { -} - -void Sys_BeginStreamedFile( fileHandle_t f, int readAhead ) { -} - -void Sys_EndStreamedFile( fileHandle_t f ) { -} - -int Sys_StreamedRead( void *buffer, int size, int count, fileHandle_t f ) { - return FS_Read( buffer, size * count, f ); -} - -void Sys_StreamSeek( fileHandle_t f, int offset, int origin ) { - FS_Seek( f, offset, origin ); -} - - -#else - -typedef struct { - fileHandle_t file; - byte *buffer; - qboolean eof; - qboolean active; - int bufferSize; - int streamPosition; // next byte to be returned by Sys_StreamRead - int threadPosition; // next byte to be read from file -} streamsIO_t; - -typedef struct { - HANDLE threadHandle; - int threadId; - CRITICAL_SECTION crit; - streamsIO_t sIO[MAX_FILE_HANDLES]; -} streamState_t; - -streamState_t stream; - -/* -=============== -Sys_StreamThread - -A thread will be sitting in this loop forever -================ -*/ -void Sys_StreamThread( void ) { - int buffer; - int count; - int readCount; - int bufferPoint; - int r, i; - - while (1) { - Sleep( 10 ); -// EnterCriticalSection (&stream.crit); - - for (i=1;i 0 ) { - available = stream.sIO[f].threadPosition - stream.sIO[f].streamPosition; - if ( !available ) { - if ( stream.sIO[f].eof ) { - break; - } - if ( sleepCount == 1 ) { - Com_DPrintf( "Sys_StreamedRead: waiting\n" ); - } - if ( ++sleepCount > 100 ) { - Com_Error( ERR_FATAL, "Sys_StreamedRead: thread has died"); - } - Sleep( 10 ); - continue; - } - - EnterCriticalSection( &stream.crit ); - - bufferPoint = stream.sIO[f].streamPosition % stream.sIO[f].bufferSize; - bufferCount = stream.sIO[f].bufferSize - bufferPoint; - - copy = available < bufferCount ? available : bufferCount; - if ( copy > remaining ) { - copy = remaining; - } - memcpy( dest, stream.sIO[f].buffer + bufferPoint, copy ); - stream.sIO[f].streamPosition += copy; - dest += copy; - remaining -= copy; - - LeaveCriticalSection( &stream.crit ); - } - - return (count * size - remaining) / size; -} - -/* -=============== -Sys_StreamSeek - -================ -*/ -void Sys_StreamSeek( fileHandle_t f, int offset, int origin ) { - - // halt the thread - EnterCriticalSection( &stream.crit ); - - // clear to that point - FS_Seek( f, offset, origin ); - stream.sIO[f].streamPosition = 0; - stream.sIO[f].threadPosition = 0; - stream.sIO[f].eof = qfalse; - - // let the thread start running at the new position - LeaveCriticalSection( &stream.crit ); -} - -#endif - -/* -======================================================================== - -EVENT LOOP - -======================================================================== -*/ - -#define MAX_QUED_EVENTS 256 -#define MASK_QUED_EVENTS ( MAX_QUED_EVENTS - 1 ) - -sysEvent_t eventQue[MAX_QUED_EVENTS]; -int eventHead, eventTail; -byte sys_packetReceived[MAX_MSGLEN]; - -/* -================ -Sys_QueEvent - -A time of 0 will get the current time -Ptr should either be null, or point to a block of data that can -be freed by the game later. -================ -*/ -void Sys_QueEvent( int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr ) { - sysEvent_t *ev; - - ev = &eventQue[ eventHead & MASK_QUED_EVENTS ]; - if ( eventHead - eventTail >= MAX_QUED_EVENTS ) { - Com_Printf("Sys_QueEvent: overflow\n"); - // we are discarding an event, but don't leak memory - if ( ev->evPtr ) { - Z_Free( ev->evPtr ); - } - eventTail++; - } - - eventHead++; - - if ( time == 0 ) { - time = Sys_Milliseconds(); - } - - ev->evTime = time; - ev->evType = type; - ev->evValue = value; - ev->evValue2 = value2; - ev->evPtrLength = ptrLength; - ev->evPtr = ptr; -} - -/* -================ -Sys_GetEvent - -================ -*/ -sysEvent_t Sys_GetEvent( void ) { - MSG msg; - sysEvent_t ev; - char *s; - msg_t netmsg; - netadr_t adr; - - // return if we have data - if ( eventHead > eventTail ) { - eventTail++; - return eventQue[ ( eventTail - 1 ) & MASK_QUED_EVENTS ]; - } - - // pump the message loop - while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { - if ( !GetMessage (&msg, NULL, 0, 0) ) { - Com_Quit_f(); - } - - // save the msg time, because wndprocs don't have access to the timestamp - g_wv.sysMsgTime = msg.time; - - TranslateMessage (&msg); - DispatchMessage (&msg); - } - - // check for console commands - s = Sys_ConsoleInput(); - if ( s ) { - char *b; - int len; - - len = strlen( s ) + 1; - b = Z_Malloc( len ); - Q_strncpyz( b, s, len-1 ); - Sys_QueEvent( 0, SE_CONSOLE, 0, 0, len, b ); - } - - // check for network packets - MSG_Init( &netmsg, sys_packetReceived, sizeof( sys_packetReceived ) ); - if ( Sys_GetPacket ( &adr, &netmsg ) ) { - netadr_t *buf; - int len; - - // copy out to a seperate buffer for qeueing - // the readcount stepahead is for SOCKS support - len = sizeof( netadr_t ) + netmsg.cursize - netmsg.readcount; - buf = Z_Malloc( len ); - *buf = adr; - memcpy( buf+1, &netmsg.data[netmsg.readcount], netmsg.cursize - netmsg.readcount ); - Sys_QueEvent( 0, SE_PACKET, 0, 0, len, buf ); - } - - // return if we have data - if ( eventHead > eventTail ) { - eventTail++; - return eventQue[ ( eventTail - 1 ) & MASK_QUED_EVENTS ]; - } - - // create an empty event to return - - memset( &ev, 0, sizeof( ev ) ); - ev.evTime = timeGetTime(); - - return ev; -} - -//================================================================ - -/* -================= -Sys_In_Restart_f - -Restart the input subsystem -================= -*/ -void Sys_In_Restart_f( void ) { - IN_Shutdown(); - IN_Init(); -} - - -/* -================= -Sys_Net_Restart_f - -Restart the network subsystem -================= -*/ -void Sys_Net_Restart_f( void ) { - NET_Restart(); -} - - -/* -================ -Sys_Init - -Called after the common systems (cvars, files, etc) -are initialized -================ -*/ -#define OSR2_BUILD_NUMBER 1111 -#define WIN98_BUILD_NUMBER 1998 - -void Sys_Init( void ) { - int cpuid; - - // make sure the timer is high precision, otherwise - // NT gets 18ms resolution - timeBeginPeriod( 1 ); - - Cmd_AddCommand ("in_restart", Sys_In_Restart_f); - Cmd_AddCommand ("net_restart", Sys_Net_Restart_f); - - g_wv.osversion.dwOSVersionInfoSize = sizeof( g_wv.osversion ); - - if (!GetVersionEx (&g_wv.osversion)) - Sys_Error ("Couldn't get OS info"); - - if (g_wv.osversion.dwMajorVersion < 4) - Sys_Error ("Quake3 requires Windows version 4 or greater"); - if (g_wv.osversion.dwPlatformId == VER_PLATFORM_WIN32s) - Sys_Error ("Quake3 doesn't run on Win32s"); - - if ( g_wv.osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ) - { - Cvar_Set( "arch", "winnt" ); - } - else if ( g_wv.osversion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ) - { - if ( LOWORD( g_wv.osversion.dwBuildNumber ) >= WIN98_BUILD_NUMBER ) - { - Cvar_Set( "arch", "win98" ); - } - else if ( LOWORD( g_wv.osversion.dwBuildNumber ) >= OSR2_BUILD_NUMBER ) - { - Cvar_Set( "arch", "win95 osr2.x" ); - } - else - { - Cvar_Set( "arch", "win95" ); - } - } - else - { - Cvar_Set( "arch", "unknown Windows variant" ); - } - - // save out a couple things in rom cvars for the renderer to access - Cvar_Get( "win_hinstance", va("%i", (int)g_wv.hInstance), CVAR_ROM ); - Cvar_Get( "win_wndproc", va("%i", (int)MainWndProc), CVAR_ROM ); - - // - // figure out our CPU - // - Cvar_Get( "sys_cpustring", "detect", 0 ); - if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring"), "detect" ) ) - { - Com_Printf( "...detecting CPU, found " ); - -#ifndef __MINGW32__ - cpuid = Sys_GetProcessorId(); -#else // See comments in win_shared.c - cpuid = CPUID_GENERIC; -#endif - - switch ( cpuid ) - { - case CPUID_GENERIC: - Cvar_Set( "sys_cpustring", "generic" ); - break; - case CPUID_INTEL_UNSUPPORTED: - Cvar_Set( "sys_cpustring", "x86 (pre-Pentium)" ); - break; - case CPUID_INTEL_PENTIUM: - Cvar_Set( "sys_cpustring", "x86 (P5/PPro, non-MMX)" ); - break; - case CPUID_INTEL_MMX: - Cvar_Set( "sys_cpustring", "x86 (P5/Pentium2, MMX)" ); - break; - case CPUID_INTEL_KATMAI: - Cvar_Set( "sys_cpustring", "Intel Pentium III" ); - break; - case CPUID_AMD_3DNOW: - Cvar_Set( "sys_cpustring", "AMD w/ 3DNow!" ); - break; - case CPUID_AXP: - Cvar_Set( "sys_cpustring", "Alpha AXP" ); - break; - default: - Com_Error( ERR_FATAL, "Unknown cpu type %d\n", cpuid ); - break; - } - } - else - { - Com_Printf( "...forcing CPU type to " ); - if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring" ), "generic" ) ) - { - cpuid = CPUID_GENERIC; - } - else if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring" ), "x87" ) ) - { - cpuid = CPUID_INTEL_PENTIUM; - } - else if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring" ), "mmx" ) ) - { - cpuid = CPUID_INTEL_MMX; - } - else if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring" ), "3dnow" ) ) - { - cpuid = CPUID_AMD_3DNOW; - } - else if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring" ), "PentiumIII" ) ) - { - cpuid = CPUID_INTEL_KATMAI; - } - else if ( !Q_stricmp( Cvar_VariableString( "sys_cpustring" ), "axp" ) ) - { - cpuid = CPUID_AXP; - } - else - { - Com_Printf( "WARNING: unknown sys_cpustring '%s'\n", Cvar_VariableString( "sys_cpustring" ) ); - cpuid = CPUID_GENERIC; - } - } - Cvar_SetValue( "sys_cpuid", cpuid ); - Com_Printf( "%s\n", Cvar_VariableString( "sys_cpustring" ) ); - - Cvar_Set( "username", Sys_GetCurrentUser() ); - - IN_Init(); // FIXME: not in dedicated? -} - - -qboolean Sys_DetectAltivec( void ) -{ - return qfalse; // never altivec on Windows...at least for now. :) -} - - - -//======================================================================= - -int totalMsec, countMsec; - -/* -================== -WinMain - -================== -*/ -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { - char cwd[MAX_OSPATH]; - int startTime, endTime; - - // should never get a previous instance in Win32 - if ( hPrevInstance ) { - return 0; - } - - g_wv.hInstance = hInstance; - Q_strncpyz( sys_cmdline, lpCmdLine, sizeof( sys_cmdline ) ); - - // done before Com/Sys_Init since we need this for error output - Sys_CreateConsole(); - - // no abort/retry/fail errors - SetErrorMode( SEM_FAILCRITICALERRORS ); - - // get the initial time base - Sys_Milliseconds(); -#if 0 - // if we find the CD, add a +set cddir xxx command line - Sys_ScanForCD(); -#endif - - Sys_InitStreamThread(); - - Com_Init( sys_cmdline ); - NET_Init(); - - _getcwd (cwd, sizeof(cwd)); - Com_Printf("Working directory: %s\n", cwd); - - // hide the early console since we've reached the point where we - // have a working graphics subsystems - if ( !com_dedicated->integer && !com_viewlog->integer ) { - Sys_ShowConsole( 0, qfalse ); - } - - // main game loop - while( 1 ) { - // if not running as a game client, sleep a bit - if ( g_wv.isMinimized || ( com_dedicated && com_dedicated->integer ) ) { - Sleep( 5 ); - } - - // set low precision every frame, because some system calls - // reset it arbitrarily -// _controlfp( _PC_24, _MCW_PC ); -// _controlfp( -1, _MCW_EM ); // no exceptions, even if some crappy - // syscall turns them back on! - - startTime = Sys_Milliseconds(); - - // make sure mouse and joystick are only called once a frame - IN_Frame(); - - // run the game - Com_Frame(); - - endTime = Sys_Milliseconds(); - totalMsec += endTime - startTime; - countMsec++; - } - - // never gets here -} - - diff --git a/code/win32/win_qgl.c b/code/win32/win_qgl.c deleted file mode 100644 index 68049c45..00000000 --- a/code/win32/win_qgl.c +++ /dev/null @@ -1,4386 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -/* -** QGL_WIN.C -** -** This file implements the operating system binding of GL to QGL function -** pointers. When doing a port of Quake3 you must implement the following -** two functions: -** -** QGL_Init() - loads libraries, assigns function pointers, etc. -** QGL_Shutdown() - unloads libraries, NULLs function pointers -*/ -#include -#include "../renderer/tr_local.h" -#include "glw_win.h" - -void QGL_EnableLogging( qboolean enable ); - -int ( WINAPI * qwglSwapIntervalEXT)( int interval ); -BOOL ( WINAPI * qwglGetDeviceGammaRamp3DFX)( HDC, LPVOID ); -BOOL ( WINAPI * qwglSetDeviceGammaRamp3DFX)( HDC, LPVOID ); - -int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *); -int ( WINAPI * qwglDescribePixelFormat) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); -int ( WINAPI * qwglGetPixelFormat)(HDC); -BOOL ( WINAPI * qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *); -BOOL ( WINAPI * qwglSwapBuffers)(HDC); - -BOOL ( WINAPI * qwglCopyContext)(HGLRC, HGLRC, UINT); -HGLRC ( WINAPI * qwglCreateContext)(HDC); -HGLRC ( WINAPI * qwglCreateLayerContext)(HDC, int); -BOOL ( WINAPI * qwglDeleteContext)(HGLRC); -HGLRC ( WINAPI * qwglGetCurrentContext)(VOID); -HDC ( WINAPI * qwglGetCurrentDC)(VOID); -PROC ( WINAPI * qwglGetProcAddress)(LPCSTR); -BOOL ( WINAPI * qwglMakeCurrent)(HDC, HGLRC); -BOOL ( WINAPI * qwglShareLists)(HGLRC, HGLRC); -BOOL ( WINAPI * qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD); - -BOOL ( WINAPI * qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT, - FLOAT, int, LPGLYPHMETRICSFLOAT); - -BOOL ( WINAPI * qwglDescribeLayerPlane)(HDC, int, int, UINT, - LPLAYERPLANEDESCRIPTOR); -int ( WINAPI * qwglSetLayerPaletteEntries)(HDC, int, int, int, - CONST COLORREF *); -int ( WINAPI * qwglGetLayerPaletteEntries)(HDC, int, int, int, - COLORREF *); -BOOL ( WINAPI * qwglRealizeLayerPalette)(HDC, int, BOOL); -BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT); - -void ( APIENTRY * qglAccum )(GLenum op, GLfloat value); -void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref); -GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences); -void ( APIENTRY * qglArrayElement )(GLint i); -void ( APIENTRY * qglBegin )(GLenum mode); -void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture); -void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor); -void ( APIENTRY * qglCallList )(GLuint list); -void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists); -void ( APIENTRY * qglClear )(GLbitfield mask); -void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -void ( APIENTRY * qglClearDepth )(GLclampd depth); -void ( APIENTRY * qglClearIndex )(GLfloat c); -void ( APIENTRY * qglClearStencil )(GLint s); -void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation); -void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue); -void ( APIENTRY * qglColor3bv )(const GLbyte *v); -void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue); -void ( APIENTRY * qglColor3dv )(const GLdouble *v); -void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue); -void ( APIENTRY * qglColor3fv )(const GLfloat *v); -void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue); -void ( APIENTRY * qglColor3iv )(const GLint *v); -void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue); -void ( APIENTRY * qglColor3sv )(const GLshort *v); -void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue); -void ( APIENTRY * qglColor3ubv )(const GLubyte *v); -void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue); -void ( APIENTRY * qglColor3uiv )(const GLuint *v); -void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue); -void ( APIENTRY * qglColor3usv )(const GLushort *v); -void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -void ( APIENTRY * qglColor4bv )(const GLbyte *v); -void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -void ( APIENTRY * qglColor4dv )(const GLdouble *v); -void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -void ( APIENTRY * qglColor4fv )(const GLfloat *v); -void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha); -void ( APIENTRY * qglColor4iv )(const GLint *v); -void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha); -void ( APIENTRY * qglColor4sv )(const GLshort *v); -void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -void ( APIENTRY * qglColor4ubv )(const GLubyte *v); -void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha); -void ( APIENTRY * qglColor4uiv )(const GLuint *v); -void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha); -void ( APIENTRY * qglColor4usv )(const GLushort *v); -void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode); -void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -void ( APIENTRY * qglCullFace )(GLenum mode); -void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range); -void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures); -void ( APIENTRY * qglDepthFunc )(GLenum func); -void ( APIENTRY * qglDepthMask )(GLboolean flag); -void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar); -void ( APIENTRY * qglDisable )(GLenum cap); -void ( APIENTRY * qglDisableClientState )(GLenum array); -void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count); -void ( APIENTRY * qglDrawBuffer )(GLenum mode); -void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglEdgeFlag )(GLboolean flag); -void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag); -void ( APIENTRY * qglEnable )(GLenum cap); -void ( APIENTRY * qglEnableClientState )(GLenum array); -void ( APIENTRY * qglEnd )(void); -void ( APIENTRY * qglEndList )(void); -void ( APIENTRY * qglEvalCoord1d )(GLdouble u); -void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u); -void ( APIENTRY * qglEvalCoord1f )(GLfloat u); -void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u); -void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v); -void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u); -void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v); -void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u); -void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2); -void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -void ( APIENTRY * qglEvalPoint1 )(GLint i); -void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j); -void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer); -void ( APIENTRY * qglFinish )(void); -void ( APIENTRY * qglFlush )(void); -void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param); -void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params); -void ( APIENTRY * qglFogi )(GLenum pname, GLint param); -void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params); -void ( APIENTRY * qglFrontFace )(GLenum mode); -void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLuint ( APIENTRY * qglGenLists )(GLsizei range); -void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures); -void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params); -void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation); -void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params); -GLenum ( APIENTRY * qglGetError )(void); -void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params); -void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params); -void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v); -void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v); -void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v); -void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params); -void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values); -void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values); -void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values); -void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params); -void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask); -const GLubyte * ( APIENTRY * qglGetString )(GLenum name); -void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params); -void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params); -void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params); -void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params); -void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params); -void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params); -void ( APIENTRY * qglHint )(GLenum target, GLenum mode); -void ( APIENTRY * qglIndexMask )(GLuint mask); -void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglIndexd )(GLdouble c); -void ( APIENTRY * qglIndexdv )(const GLdouble *c); -void ( APIENTRY * qglIndexf )(GLfloat c); -void ( APIENTRY * qglIndexfv )(const GLfloat *c); -void ( APIENTRY * qglIndexi )(GLint c); -void ( APIENTRY * qglIndexiv )(const GLint *c); -void ( APIENTRY * qglIndexs )(GLshort c); -void ( APIENTRY * qglIndexsv )(const GLshort *c); -void ( APIENTRY * qglIndexub )(GLubyte c); -void ( APIENTRY * qglIndexubv )(const GLubyte *c); -void ( APIENTRY * qglInitNames )(void); -void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer); -GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap); -GLboolean ( APIENTRY * qglIsList )(GLuint list); -GLboolean ( APIENTRY * qglIsTexture )(GLuint texture); -void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param); -void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params); -void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param); -void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params); -void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param); -void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param); -void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params); -void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern); -void ( APIENTRY * qglLineWidth )(GLfloat width); -void ( APIENTRY * qglListBase )(GLuint base); -void ( APIENTRY * qglLoadIdentity )(void); -void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m); -void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m); -void ( APIENTRY * qglLoadName )(GLuint name); -void ( APIENTRY * qglLogicOp )(GLenum opcode); -void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2); -void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2); -void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param); -void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param); -void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params); -void ( APIENTRY * qglMatrixMode )(GLenum mode); -void ( APIENTRY * qglMultMatrixd )(const GLdouble *m); -void ( APIENTRY * qglMultMatrixf )(const GLfloat *m); -void ( APIENTRY * qglNewList )(GLuint list, GLenum mode); -void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz); -void ( APIENTRY * qglNormal3bv )(const GLbyte *v); -void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz); -void ( APIENTRY * qglNormal3dv )(const GLdouble *v); -void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz); -void ( APIENTRY * qglNormal3fv )(const GLfloat *v); -void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz); -void ( APIENTRY * qglNormal3iv )(const GLint *v); -void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz); -void ( APIENTRY * qglNormal3sv )(const GLshort *v); -void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -void ( APIENTRY * qglPassThrough )(GLfloat token); -void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values); -void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values); -void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values); -void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param); -void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param); -void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param); -void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param); -void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor); -void ( APIENTRY * qglPointSize )(GLfloat size); -void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode); -void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units); -void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask); -void ( APIENTRY * qglPopAttrib )(void); -void ( APIENTRY * qglPopClientAttrib )(void); -void ( APIENTRY * qglPopMatrix )(void); -void ( APIENTRY * qglPopName )(void); -void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities); -void ( APIENTRY * qglPushAttrib )(GLbitfield mask); -void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask); -void ( APIENTRY * qglPushMatrix )(void); -void ( APIENTRY * qglPushName )(GLuint name); -void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y); -void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v); -void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y); -void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v); -void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y); -void ( APIENTRY * qglRasterPos2iv )(const GLint *v); -void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y); -void ( APIENTRY * qglRasterPos2sv )(const GLshort *v); -void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v); -void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v); -void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z); -void ( APIENTRY * qglRasterPos3iv )(const GLint *v); -void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z); -void ( APIENTRY * qglRasterPos3sv )(const GLshort *v); -void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v); -void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v); -void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w); -void ( APIENTRY * qglRasterPos4iv )(const GLint *v); -void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w); -void ( APIENTRY * qglRasterPos4sv )(const GLshort *v); -void ( APIENTRY * qglReadBuffer )(GLenum mode); -void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2); -void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2); -void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2); -void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2); -void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2); -GLint ( APIENTRY * qglRenderMode )(GLenum mode); -void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height); -void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer); -void ( APIENTRY * qglShadeModel )(GLenum mode); -void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask); -void ( APIENTRY * qglStencilMask )(GLuint mask); -void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass); -void ( APIENTRY * qglTexCoord1d )(GLdouble s); -void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord1f )(GLfloat s); -void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord1i )(GLint s); -void ( APIENTRY * qglTexCoord1iv )(const GLint *v); -void ( APIENTRY * qglTexCoord1s )(GLshort s); -void ( APIENTRY * qglTexCoord1sv )(const GLshort *v); -void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t); -void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t); -void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t); -void ( APIENTRY * qglTexCoord2iv )(const GLint *v); -void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t); -void ( APIENTRY * qglTexCoord2sv )(const GLshort *v); -void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r); -void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r); -void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r); -void ( APIENTRY * qglTexCoord3iv )(const GLint *v); -void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r); -void ( APIENTRY * qglTexCoord3sv )(const GLshort *v); -void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v); -void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v); -void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q); -void ( APIENTRY * qglTexCoord4iv )(const GLint *v); -void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q); -void ( APIENTRY * qglTexCoord4sv )(const GLshort *v); -void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param); -void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param); -void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params); -void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param); -void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params); -void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param); -void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param); -void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params); -void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param); -void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params); -void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param); -void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params); -void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y); -void ( APIENTRY * qglVertex2dv )(const GLdouble *v); -void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y); -void ( APIENTRY * qglVertex2fv )(const GLfloat *v); -void ( APIENTRY * qglVertex2i )(GLint x, GLint y); -void ( APIENTRY * qglVertex2iv )(const GLint *v); -void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y); -void ( APIENTRY * qglVertex2sv )(const GLshort *v); -void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z); -void ( APIENTRY * qglVertex3dv )(const GLdouble *v); -void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z); -void ( APIENTRY * qglVertex3fv )(const GLfloat *v); -void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z); -void ( APIENTRY * qglVertex3iv )(const GLint *v); -void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z); -void ( APIENTRY * qglVertex3sv )(const GLshort *v); -void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -void ( APIENTRY * qglVertex4dv )(const GLdouble *v); -void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -void ( APIENTRY * qglVertex4fv )(const GLfloat *v); -void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w); -void ( APIENTRY * qglVertex4iv )(const GLint *v); -void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w); -void ( APIENTRY * qglVertex4sv )(const GLshort *v); -void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height); - -void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t ); -void ( APIENTRY * qglActiveTextureARB )( GLenum texture ); -void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture ); - -void ( APIENTRY * qglLockArraysEXT)( GLint, GLint); -void ( APIENTRY * qglUnlockArraysEXT) ( void ); - - -static void ( APIENTRY * dllAccum )(GLenum op, GLfloat value); -static void ( APIENTRY * dllAlphaFunc )(GLenum func, GLclampf ref); -GLboolean ( APIENTRY * dllAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences); -static void ( APIENTRY * dllArrayElement )(GLint i); -static void ( APIENTRY * dllBegin )(GLenum mode); -static void ( APIENTRY * dllBindTexture )(GLenum target, GLuint texture); -static void ( APIENTRY * dllBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -static void ( APIENTRY * dllBlendFunc )(GLenum sfactor, GLenum dfactor); -static void ( APIENTRY * dllCallList )(GLuint list); -static void ( APIENTRY * dllCallLists )(GLsizei n, GLenum type, const GLvoid *lists); -static void ( APIENTRY * dllClear )(GLbitfield mask); -static void ( APIENTRY * dllClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -static void ( APIENTRY * dllClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -static void ( APIENTRY * dllClearDepth )(GLclampd depth); -static void ( APIENTRY * dllClearIndex )(GLfloat c); -static void ( APIENTRY * dllClearStencil )(GLint s); -static void ( APIENTRY * dllClipPlane )(GLenum plane, const GLdouble *equation); -static void ( APIENTRY * dllColor3b )(GLbyte red, GLbyte green, GLbyte blue); -static void ( APIENTRY * dllColor3bv )(const GLbyte *v); -static void ( APIENTRY * dllColor3d )(GLdouble red, GLdouble green, GLdouble blue); -static void ( APIENTRY * dllColor3dv )(const GLdouble *v); -static void ( APIENTRY * dllColor3f )(GLfloat red, GLfloat green, GLfloat blue); -static void ( APIENTRY * dllColor3fv )(const GLfloat *v); -static void ( APIENTRY * dllColor3i )(GLint red, GLint green, GLint blue); -static void ( APIENTRY * dllColor3iv )(const GLint *v); -static void ( APIENTRY * dllColor3s )(GLshort red, GLshort green, GLshort blue); -static void ( APIENTRY * dllColor3sv )(const GLshort *v); -static void ( APIENTRY * dllColor3ub )(GLubyte red, GLubyte green, GLubyte blue); -static void ( APIENTRY * dllColor3ubv )(const GLubyte *v); -static void ( APIENTRY * dllColor3ui )(GLuint red, GLuint green, GLuint blue); -static void ( APIENTRY * dllColor3uiv )(const GLuint *v); -static void ( APIENTRY * dllColor3us )(GLushort red, GLushort green, GLushort blue); -static void ( APIENTRY * dllColor3usv )(const GLushort *v); -static void ( APIENTRY * dllColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -static void ( APIENTRY * dllColor4bv )(const GLbyte *v); -static void ( APIENTRY * dllColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -static void ( APIENTRY * dllColor4dv )(const GLdouble *v); -static void ( APIENTRY * dllColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -static void ( APIENTRY * dllColor4fv )(const GLfloat *v); -static void ( APIENTRY * dllColor4i )(GLint red, GLint green, GLint blue, GLint alpha); -static void ( APIENTRY * dllColor4iv )(const GLint *v); -static void ( APIENTRY * dllColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha); -static void ( APIENTRY * dllColor4sv )(const GLshort *v); -static void ( APIENTRY * dllColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -static void ( APIENTRY * dllColor4ubv )(const GLubyte *v); -static void ( APIENTRY * dllColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha); -static void ( APIENTRY * dllColor4uiv )(const GLuint *v); -static void ( APIENTRY * dllColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha); -static void ( APIENTRY * dllColor4usv )(const GLushort *v); -static void ( APIENTRY * dllColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -static void ( APIENTRY * dllColorMaterial )(GLenum face, GLenum mode); -static void ( APIENTRY * dllColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -static void ( APIENTRY * dllCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); -static void ( APIENTRY * dllCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -static void ( APIENTRY * dllCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -static void ( APIENTRY * dllCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -static void ( APIENTRY * dllCullFace )(GLenum mode); -static void ( APIENTRY * dllDeleteLists )(GLuint list, GLsizei range); -static void ( APIENTRY * dllDeleteTextures )(GLsizei n, const GLuint *textures); -static void ( APIENTRY * dllDepthFunc )(GLenum func); -static void ( APIENTRY * dllDepthMask )(GLboolean flag); -static void ( APIENTRY * dllDepthRange )(GLclampd zNear, GLclampd zFar); -static void ( APIENTRY * dllDisable )(GLenum cap); -static void ( APIENTRY * dllDisableClientState )(GLenum array); -static void ( APIENTRY * dllDrawArrays )(GLenum mode, GLint first, GLsizei count); -static void ( APIENTRY * dllDrawBuffer )(GLenum mode); -static void ( APIENTRY * dllDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -static void ( APIENTRY * dllDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllEdgeFlag )(GLboolean flag); -static void ( APIENTRY * dllEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllEdgeFlagv )(const GLboolean *flag); -static void ( APIENTRY * dllEnable )(GLenum cap); -static void ( APIENTRY * dllEnableClientState )(GLenum array); -static void ( APIENTRY * dllEnd )(void); -static void ( APIENTRY * dllEndList )(void); -static void ( APIENTRY * dllEvalCoord1d )(GLdouble u); -static void ( APIENTRY * dllEvalCoord1dv )(const GLdouble *u); -static void ( APIENTRY * dllEvalCoord1f )(GLfloat u); -static void ( APIENTRY * dllEvalCoord1fv )(const GLfloat *u); -static void ( APIENTRY * dllEvalCoord2d )(GLdouble u, GLdouble v); -static void ( APIENTRY * dllEvalCoord2dv )(const GLdouble *u); -static void ( APIENTRY * dllEvalCoord2f )(GLfloat u, GLfloat v); -static void ( APIENTRY * dllEvalCoord2fv )(const GLfloat *u); -static void ( APIENTRY * dllEvalMesh1 )(GLenum mode, GLint i1, GLint i2); -static void ( APIENTRY * dllEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -static void ( APIENTRY * dllEvalPoint1 )(GLint i); -static void ( APIENTRY * dllEvalPoint2 )(GLint i, GLint j); -static void ( APIENTRY * dllFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer); -static void ( APIENTRY * dllFinish )(void); -static void ( APIENTRY * dllFlush )(void); -static void ( APIENTRY * dllFogf )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllFogfv )(GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllFogi )(GLenum pname, GLint param); -static void ( APIENTRY * dllFogiv )(GLenum pname, const GLint *params); -static void ( APIENTRY * dllFrontFace )(GLenum mode); -static void ( APIENTRY * dllFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLuint ( APIENTRY * dllGenLists )(GLsizei range); -static void ( APIENTRY * dllGenTextures )(GLsizei n, GLuint *textures); -static void ( APIENTRY * dllGetBooleanv )(GLenum pname, GLboolean *params); -static void ( APIENTRY * dllGetClipPlane )(GLenum plane, GLdouble *equation); -static void ( APIENTRY * dllGetDoublev )(GLenum pname, GLdouble *params); -GLenum ( APIENTRY * dllGetError )(void); -static void ( APIENTRY * dllGetFloatv )(GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetIntegerv )(GLenum pname, GLint *params); -static void ( APIENTRY * dllGetLightfv )(GLenum light, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetLightiv )(GLenum light, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetMapdv )(GLenum target, GLenum query, GLdouble *v); -static void ( APIENTRY * dllGetMapfv )(GLenum target, GLenum query, GLfloat *v); -static void ( APIENTRY * dllGetMapiv )(GLenum target, GLenum query, GLint *v); -static void ( APIENTRY * dllGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetMaterialiv )(GLenum face, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetPixelMapfv )(GLenum map, GLfloat *values); -static void ( APIENTRY * dllGetPixelMapuiv )(GLenum map, GLuint *values); -static void ( APIENTRY * dllGetPixelMapusv )(GLenum map, GLushort *values); -static void ( APIENTRY * dllGetPointerv )(GLenum pname, GLvoid* *params); -static void ( APIENTRY * dllGetPolygonStipple )(GLubyte *mask); -const GLubyte * ( APIENTRY * dllGetString )(GLenum name); -static void ( APIENTRY * dllGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexEnviv )(GLenum target, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params); -static void ( APIENTRY * dllGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexGeniv )(GLenum coord, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -static void ( APIENTRY * dllGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params); -static void ( APIENTRY * dllGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params); -static void ( APIENTRY * dllGetTexParameteriv )(GLenum target, GLenum pname, GLint *params); -static void ( APIENTRY * dllHint )(GLenum target, GLenum mode); -static void ( APIENTRY * dllIndexMask )(GLuint mask); -static void ( APIENTRY * dllIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllIndexd )(GLdouble c); -static void ( APIENTRY * dllIndexdv )(const GLdouble *c); -static void ( APIENTRY * dllIndexf )(GLfloat c); -static void ( APIENTRY * dllIndexfv )(const GLfloat *c); -static void ( APIENTRY * dllIndexi )(GLint c); -static void ( APIENTRY * dllIndexiv )(const GLint *c); -static void ( APIENTRY * dllIndexs )(GLshort c); -static void ( APIENTRY * dllIndexsv )(const GLshort *c); -static void ( APIENTRY * dllIndexub )(GLubyte c); -static void ( APIENTRY * dllIndexubv )(const GLubyte *c); -static void ( APIENTRY * dllInitNames )(void); -static void ( APIENTRY * dllInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer); -GLboolean ( APIENTRY * dllIsEnabled )(GLenum cap); -GLboolean ( APIENTRY * dllIsList )(GLuint list); -GLboolean ( APIENTRY * dllIsTexture )(GLuint texture); -static void ( APIENTRY * dllLightModelf )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllLightModelfv )(GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllLightModeli )(GLenum pname, GLint param); -static void ( APIENTRY * dllLightModeliv )(GLenum pname, const GLint *params); -static void ( APIENTRY * dllLightf )(GLenum light, GLenum pname, GLfloat param); -static void ( APIENTRY * dllLightfv )(GLenum light, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllLighti )(GLenum light, GLenum pname, GLint param); -static void ( APIENTRY * dllLightiv )(GLenum light, GLenum pname, const GLint *params); -static void ( APIENTRY * dllLineStipple )(GLint factor, GLushort pattern); -static void ( APIENTRY * dllLineWidth )(GLfloat width); -static void ( APIENTRY * dllListBase )(GLuint base); -static void ( APIENTRY * dllLoadIdentity )(void); -static void ( APIENTRY * dllLoadMatrixd )(const GLdouble *m); -static void ( APIENTRY * dllLoadMatrixf )(const GLfloat *m); -static void ( APIENTRY * dllLoadName )(GLuint name); -static void ( APIENTRY * dllLogicOp )(GLenum opcode); -static void ( APIENTRY * dllMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -static void ( APIENTRY * dllMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -static void ( APIENTRY * dllMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -static void ( APIENTRY * dllMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -static void ( APIENTRY * dllMapGrid1d )(GLint un, GLdouble u1, GLdouble u2); -static void ( APIENTRY * dllMapGrid1f )(GLint un, GLfloat u1, GLfloat u2); -static void ( APIENTRY * dllMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -static void ( APIENTRY * dllMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -static void ( APIENTRY * dllMaterialf )(GLenum face, GLenum pname, GLfloat param); -static void ( APIENTRY * dllMaterialfv )(GLenum face, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllMateriali )(GLenum face, GLenum pname, GLint param); -static void ( APIENTRY * dllMaterialiv )(GLenum face, GLenum pname, const GLint *params); -static void ( APIENTRY * dllMatrixMode )(GLenum mode); -static void ( APIENTRY * dllMultMatrixd )(const GLdouble *m); -static void ( APIENTRY * dllMultMatrixf )(const GLfloat *m); -static void ( APIENTRY * dllNewList )(GLuint list, GLenum mode); -static void ( APIENTRY * dllNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz); -static void ( APIENTRY * dllNormal3bv )(const GLbyte *v); -static void ( APIENTRY * dllNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz); -static void ( APIENTRY * dllNormal3dv )(const GLdouble *v); -static void ( APIENTRY * dllNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz); -static void ( APIENTRY * dllNormal3fv )(const GLfloat *v); -static void ( APIENTRY * dllNormal3i )(GLint nx, GLint ny, GLint nz); -static void ( APIENTRY * dllNormal3iv )(const GLint *v); -static void ( APIENTRY * dllNormal3s )(GLshort nx, GLshort ny, GLshort nz); -static void ( APIENTRY * dllNormal3sv )(const GLshort *v); -static void ( APIENTRY * dllNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -static void ( APIENTRY * dllPassThrough )(GLfloat token); -static void ( APIENTRY * dllPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values); -static void ( APIENTRY * dllPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values); -static void ( APIENTRY * dllPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values); -static void ( APIENTRY * dllPixelStoref )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllPixelStorei )(GLenum pname, GLint param); -static void ( APIENTRY * dllPixelTransferf )(GLenum pname, GLfloat param); -static void ( APIENTRY * dllPixelTransferi )(GLenum pname, GLint param); -static void ( APIENTRY * dllPixelZoom )(GLfloat xfactor, GLfloat yfactor); -static void ( APIENTRY * dllPointSize )(GLfloat size); -static void ( APIENTRY * dllPolygonMode )(GLenum face, GLenum mode); -static void ( APIENTRY * dllPolygonOffset )(GLfloat factor, GLfloat units); -static void ( APIENTRY * dllPolygonStipple )(const GLubyte *mask); -static void ( APIENTRY * dllPopAttrib )(void); -static void ( APIENTRY * dllPopClientAttrib )(void); -static void ( APIENTRY * dllPopMatrix )(void); -static void ( APIENTRY * dllPopName )(void); -static void ( APIENTRY * dllPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities); -static void ( APIENTRY * dllPushAttrib )(GLbitfield mask); -static void ( APIENTRY * dllPushClientAttrib )(GLbitfield mask); -static void ( APIENTRY * dllPushMatrix )(void); -static void ( APIENTRY * dllPushName )(GLuint name); -static void ( APIENTRY * dllRasterPos2d )(GLdouble x, GLdouble y); -static void ( APIENTRY * dllRasterPos2dv )(const GLdouble *v); -static void ( APIENTRY * dllRasterPos2f )(GLfloat x, GLfloat y); -static void ( APIENTRY * dllRasterPos2fv )(const GLfloat *v); -static void ( APIENTRY * dllRasterPos2i )(GLint x, GLint y); -static void ( APIENTRY * dllRasterPos2iv )(const GLint *v); -static void ( APIENTRY * dllRasterPos2s )(GLshort x, GLshort y); -static void ( APIENTRY * dllRasterPos2sv )(const GLshort *v); -static void ( APIENTRY * dllRasterPos3d )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllRasterPos3dv )(const GLdouble *v); -static void ( APIENTRY * dllRasterPos3f )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllRasterPos3fv )(const GLfloat *v); -static void ( APIENTRY * dllRasterPos3i )(GLint x, GLint y, GLint z); -static void ( APIENTRY * dllRasterPos3iv )(const GLint *v); -static void ( APIENTRY * dllRasterPos3s )(GLshort x, GLshort y, GLshort z); -static void ( APIENTRY * dllRasterPos3sv )(const GLshort *v); -static void ( APIENTRY * dllRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -static void ( APIENTRY * dllRasterPos4dv )(const GLdouble *v); -static void ( APIENTRY * dllRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -static void ( APIENTRY * dllRasterPos4fv )(const GLfloat *v); -static void ( APIENTRY * dllRasterPos4i )(GLint x, GLint y, GLint z, GLint w); -static void ( APIENTRY * dllRasterPos4iv )(const GLint *v); -static void ( APIENTRY * dllRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w); -static void ( APIENTRY * dllRasterPos4sv )(const GLshort *v); -static void ( APIENTRY * dllReadBuffer )(GLenum mode); -static void ( APIENTRY * dllReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -static void ( APIENTRY * dllRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -static void ( APIENTRY * dllRectdv )(const GLdouble *v1, const GLdouble *v2); -static void ( APIENTRY * dllRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -static void ( APIENTRY * dllRectfv )(const GLfloat *v1, const GLfloat *v2); -static void ( APIENTRY * dllRecti )(GLint x1, GLint y1, GLint x2, GLint y2); -static void ( APIENTRY * dllRectiv )(const GLint *v1, const GLint *v2); -static void ( APIENTRY * dllRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -static void ( APIENTRY * dllRectsv )(const GLshort *v1, const GLshort *v2); -GLint ( APIENTRY * dllRenderMode )(GLenum mode); -static void ( APIENTRY * dllRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllScaled )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllScalef )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllScissor )(GLint x, GLint y, GLsizei width, GLsizei height); -static void ( APIENTRY * dllSelectBuffer )(GLsizei size, GLuint *buffer); -static void ( APIENTRY * dllShadeModel )(GLenum mode); -static void ( APIENTRY * dllStencilFunc )(GLenum func, GLint ref, GLuint mask); -static void ( APIENTRY * dllStencilMask )(GLuint mask); -static void ( APIENTRY * dllStencilOp )(GLenum fail, GLenum zfail, GLenum zpass); -static void ( APIENTRY * dllTexCoord1d )(GLdouble s); -static void ( APIENTRY * dllTexCoord1dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord1f )(GLfloat s); -static void ( APIENTRY * dllTexCoord1fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord1i )(GLint s); -static void ( APIENTRY * dllTexCoord1iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord1s )(GLshort s); -static void ( APIENTRY * dllTexCoord1sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoord2d )(GLdouble s, GLdouble t); -static void ( APIENTRY * dllTexCoord2dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord2f )(GLfloat s, GLfloat t); -static void ( APIENTRY * dllTexCoord2fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord2i )(GLint s, GLint t); -static void ( APIENTRY * dllTexCoord2iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord2s )(GLshort s, GLshort t); -static void ( APIENTRY * dllTexCoord2sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoord3d )(GLdouble s, GLdouble t, GLdouble r); -static void ( APIENTRY * dllTexCoord3dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord3f )(GLfloat s, GLfloat t, GLfloat r); -static void ( APIENTRY * dllTexCoord3fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord3i )(GLint s, GLint t, GLint r); -static void ( APIENTRY * dllTexCoord3iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord3s )(GLshort s, GLshort t, GLshort r); -static void ( APIENTRY * dllTexCoord3sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -static void ( APIENTRY * dllTexCoord4dv )(const GLdouble *v); -static void ( APIENTRY * dllTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -static void ( APIENTRY * dllTexCoord4fv )(const GLfloat *v); -static void ( APIENTRY * dllTexCoord4i )(GLint s, GLint t, GLint r, GLint q); -static void ( APIENTRY * dllTexCoord4iv )(const GLint *v); -static void ( APIENTRY * dllTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q); -static void ( APIENTRY * dllTexCoord4sv )(const GLshort *v); -static void ( APIENTRY * dllTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllTexEnvf )(GLenum target, GLenum pname, GLfloat param); -static void ( APIENTRY * dllTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllTexEnvi )(GLenum target, GLenum pname, GLint param); -static void ( APIENTRY * dllTexEnviv )(GLenum target, GLenum pname, const GLint *params); -static void ( APIENTRY * dllTexGend )(GLenum coord, GLenum pname, GLdouble param); -static void ( APIENTRY * dllTexGendv )(GLenum coord, GLenum pname, const GLdouble *params); -static void ( APIENTRY * dllTexGenf )(GLenum coord, GLenum pname, GLfloat param); -static void ( APIENTRY * dllTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllTexGeni )(GLenum coord, GLenum pname, GLint param); -static void ( APIENTRY * dllTexGeniv )(GLenum coord, GLenum pname, const GLint *params); -static void ( APIENTRY * dllTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTexParameterf )(GLenum target, GLenum pname, GLfloat param); -static void ( APIENTRY * dllTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params); -static void ( APIENTRY * dllTexParameteri )(GLenum target, GLenum pname, GLint param); -static void ( APIENTRY * dllTexParameteriv )(GLenum target, GLenum pname, const GLint *params); -static void ( APIENTRY * dllTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -static void ( APIENTRY * dllTranslated )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllTranslatef )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllVertex2d )(GLdouble x, GLdouble y); -static void ( APIENTRY * dllVertex2dv )(const GLdouble *v); -static void ( APIENTRY * dllVertex2f )(GLfloat x, GLfloat y); -static void ( APIENTRY * dllVertex2fv )(const GLfloat *v); -static void ( APIENTRY * dllVertex2i )(GLint x, GLint y); -static void ( APIENTRY * dllVertex2iv )(const GLint *v); -static void ( APIENTRY * dllVertex2s )(GLshort x, GLshort y); -static void ( APIENTRY * dllVertex2sv )(const GLshort *v); -static void ( APIENTRY * dllVertex3d )(GLdouble x, GLdouble y, GLdouble z); -static void ( APIENTRY * dllVertex3dv )(const GLdouble *v); -static void ( APIENTRY * dllVertex3f )(GLfloat x, GLfloat y, GLfloat z); -static void ( APIENTRY * dllVertex3fv )(const GLfloat *v); -static void ( APIENTRY * dllVertex3i )(GLint x, GLint y, GLint z); -static void ( APIENTRY * dllVertex3iv )(const GLint *v); -static void ( APIENTRY * dllVertex3s )(GLshort x, GLshort y, GLshort z); -static void ( APIENTRY * dllVertex3sv )(const GLshort *v); -static void ( APIENTRY * dllVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -static void ( APIENTRY * dllVertex4dv )(const GLdouble *v); -static void ( APIENTRY * dllVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -static void ( APIENTRY * dllVertex4fv )(const GLfloat *v); -static void ( APIENTRY * dllVertex4i )(GLint x, GLint y, GLint z, GLint w); -static void ( APIENTRY * dllVertex4iv )(const GLint *v); -static void ( APIENTRY * dllVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w); -static void ( APIENTRY * dllVertex4sv )(const GLshort *v); -static void ( APIENTRY * dllVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -static void ( APIENTRY * dllViewport )(GLint x, GLint y, GLsizei width, GLsizei height); - -static const char * BooleanToString( GLboolean b ) -{ - if ( b == GL_FALSE ) - return "GL_FALSE"; - else if ( b == GL_TRUE ) - return "GL_TRUE"; - else - return "OUT OF RANGE FOR BOOLEAN"; -} - -static const char * FuncToString( GLenum f ) -{ - switch ( f ) - { - case GL_ALWAYS: - return "GL_ALWAYS"; - case GL_NEVER: - return "GL_NEVER"; - case GL_LEQUAL: - return "GL_LEQUAL"; - case GL_LESS: - return "GL_LESS"; - case GL_EQUAL: - return "GL_EQUAL"; - case GL_GREATER: - return "GL_GREATER"; - case GL_GEQUAL: - return "GL_GEQUAL"; - case GL_NOTEQUAL: - return "GL_NOTEQUAL"; - default: - return "!!! UNKNOWN !!!"; - } -} - -static const char * PrimToString( GLenum mode ) -{ - static char prim[1024]; - - if ( mode == GL_TRIANGLES ) - strcpy( prim, "GL_TRIANGLES" ); - else if ( mode == GL_TRIANGLE_STRIP ) - strcpy( prim, "GL_TRIANGLE_STRIP" ); - else if ( mode == GL_TRIANGLE_FAN ) - strcpy( prim, "GL_TRIANGLE_FAN" ); - else if ( mode == GL_QUADS ) - strcpy( prim, "GL_QUADS" ); - else if ( mode == GL_QUAD_STRIP ) - strcpy( prim, "GL_QUAD_STRIP" ); - else if ( mode == GL_POLYGON ) - strcpy( prim, "GL_POLYGON" ); - else if ( mode == GL_POINTS ) - strcpy( prim, "GL_POINTS" ); - else if ( mode == GL_LINES ) - strcpy( prim, "GL_LINES" ); - else if ( mode == GL_LINE_STRIP ) - strcpy( prim, "GL_LINE_STRIP" ); - else if ( mode == GL_LINE_LOOP ) - strcpy( prim, "GL_LINE_LOOP" ); - else - sprintf( prim, "0x%x", mode ); - - return prim; -} - -static const char * CapToString( GLenum cap ) -{ - static char buffer[1024]; - - switch ( cap ) - { - case GL_TEXTURE_2D: - return "GL_TEXTURE_2D"; - case GL_BLEND: - return "GL_BLEND"; - case GL_DEPTH_TEST: - return "GL_DEPTH_TEST"; - case GL_CULL_FACE: - return "GL_CULL_FACE"; - case GL_CLIP_PLANE0: - return "GL_CLIP_PLANE0"; - case GL_COLOR_ARRAY: - return "GL_COLOR_ARRAY"; - case GL_TEXTURE_COORD_ARRAY: - return "GL_TEXTURE_COORD_ARRAY"; - case GL_VERTEX_ARRAY: - return "GL_VERTEX_ARRAY"; - case GL_ALPHA_TEST: - return "GL_ALPHA_TEST"; - case GL_STENCIL_TEST: - return "GL_STENCIL_TEST"; - default: - sprintf( buffer, "0x%x", cap ); - } - - return buffer; -} - -static const char * TypeToString( GLenum t ) -{ - switch ( t ) - { - case GL_BYTE: - return "GL_BYTE"; - case GL_UNSIGNED_BYTE: - return "GL_UNSIGNED_BYTE"; - case GL_SHORT: - return "GL_SHORT"; - case GL_UNSIGNED_SHORT: - return "GL_UNSIGNED_SHORT"; - case GL_INT: - return "GL_INT"; - case GL_UNSIGNED_INT: - return "GL_UNSIGNED_INT"; - case GL_FLOAT: - return "GL_FLOAT"; - case GL_DOUBLE: - return "GL_DOUBLE"; - default: - return "!!! UNKNOWN !!!"; - } -} - -static void APIENTRY logAccum(GLenum op, GLfloat value) -{ - fprintf( glw_state.log_fp, "glAccum\n" ); - dllAccum( op, value ); -} - -static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref) -{ - fprintf( glw_state.log_fp, "glAlphaFunc( 0x%x, %f )\n", func, ref ); - dllAlphaFunc( func, ref ); -} - -static GLboolean APIENTRY logAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) -{ - fprintf( glw_state.log_fp, "glAreTexturesResident\n" ); - return dllAreTexturesResident( n, textures, residences ); -} - -static void APIENTRY logArrayElement(GLint i) -{ - fprintf( glw_state.log_fp, "glArrayElement\n" ); - dllArrayElement( i ); -} - -static void APIENTRY logBegin(GLenum mode) -{ - fprintf( glw_state.log_fp, "glBegin( %s )\n", PrimToString( mode )); - dllBegin( mode ); -} - -static void APIENTRY logBindTexture(GLenum target, GLuint texture) -{ - fprintf( glw_state.log_fp, "glBindTexture( 0x%x, %u )\n", target, texture ); - dllBindTexture( target, texture ); -} - -static void APIENTRY logBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) -{ - fprintf( glw_state.log_fp, "glBitmap\n" ); - dllBitmap( width, height, xorig, yorig, xmove, ymove, bitmap ); -} - -static void BlendToName( char *n, GLenum f ) -{ - switch ( f ) - { - case GL_ONE: - strcpy( n, "GL_ONE" ); - break; - case GL_ZERO: - strcpy( n, "GL_ZERO" ); - break; - case GL_SRC_ALPHA: - strcpy( n, "GL_SRC_ALPHA" ); - break; - case GL_ONE_MINUS_SRC_ALPHA: - strcpy( n, "GL_ONE_MINUS_SRC_ALPHA" ); - break; - case GL_DST_COLOR: - strcpy( n, "GL_DST_COLOR" ); - break; - case GL_ONE_MINUS_DST_COLOR: - strcpy( n, "GL_ONE_MINUS_DST_COLOR" ); - break; - case GL_DST_ALPHA: - strcpy( n, "GL_DST_ALPHA" ); - break; - default: - sprintf( n, "0x%x", f ); - } -} -static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor) -{ - char sf[128], df[128]; - - BlendToName( sf, sfactor ); - BlendToName( df, dfactor ); - - fprintf( glw_state.log_fp, "glBlendFunc( %s, %s )\n", sf, df ); - dllBlendFunc( sfactor, dfactor ); -} - -static void APIENTRY logCallList(GLuint list) -{ - fprintf( glw_state.log_fp, "glCallList( %u )\n", list ); - dllCallList( list ); -} - -static void APIENTRY logCallLists(GLsizei n, GLenum type, const void *lists) -{ - fprintf( glw_state.log_fp, "glCallLists\n" ); - dllCallLists( n, type, lists ); -} - -static void APIENTRY logClear(GLbitfield mask) -{ - fprintf( glw_state.log_fp, "glClear( 0x%x = ", mask ); - - if ( mask & GL_COLOR_BUFFER_BIT ) - fprintf( glw_state.log_fp, "GL_COLOR_BUFFER_BIT " ); - if ( mask & GL_DEPTH_BUFFER_BIT ) - fprintf( glw_state.log_fp, "GL_DEPTH_BUFFER_BIT " ); - if ( mask & GL_STENCIL_BUFFER_BIT ) - fprintf( glw_state.log_fp, "GL_STENCIL_BUFFER_BIT " ); - if ( mask & GL_ACCUM_BUFFER_BIT ) - fprintf( glw_state.log_fp, "GL_ACCUM_BUFFER_BIT " ); - - fprintf( glw_state.log_fp, ")\n" ); - dllClear( mask ); -} - -static void APIENTRY logClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - fprintf( glw_state.log_fp, "glClearAccum\n" ); - dllClearAccum( red, green, blue, alpha ); -} - -static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - fprintf( glw_state.log_fp, "glClearColor\n" ); - dllClearColor( red, green, blue, alpha ); -} - -static void APIENTRY logClearDepth(GLclampd depth) -{ - fprintf( glw_state.log_fp, "glClearDepth( %f )\n", ( float ) depth ); - dllClearDepth( depth ); -} - -static void APIENTRY logClearIndex(GLfloat c) -{ - fprintf( glw_state.log_fp, "glClearIndex\n" ); - dllClearIndex( c ); -} - -static void APIENTRY logClearStencil(GLint s) -{ - fprintf( glw_state.log_fp, "glClearStencil( %d )\n", s ); - dllClearStencil( s ); -} - -static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation) -{ - fprintf( glw_state.log_fp, "glClipPlane\n" ); - dllClipPlane( plane, equation ); -} - -static void APIENTRY logColor3b(GLbyte red, GLbyte green, GLbyte blue) -{ - fprintf( glw_state.log_fp, "glColor3b\n" ); - dllColor3b( red, green, blue ); -} - -static void APIENTRY logColor3bv(const GLbyte *v) -{ - fprintf( glw_state.log_fp, "glColor3bv\n" ); - dllColor3bv( v ); -} - -static void APIENTRY logColor3d(GLdouble red, GLdouble green, GLdouble blue) -{ - fprintf( glw_state.log_fp, "glColor3d\n" ); - dllColor3d( red, green, blue ); -} - -static void APIENTRY logColor3dv(const GLdouble *v) -{ - fprintf( glw_state.log_fp, "glColor3dv\n" ); - dllColor3dv( v ); -} - -static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue) -{ - fprintf( glw_state.log_fp, "glColor3f\n" ); - dllColor3f( red, green, blue ); -} - -static void APIENTRY logColor3fv(const GLfloat *v) -{ - fprintf( glw_state.log_fp, "glColor3fv\n" ); - dllColor3fv( v ); -} - -static void APIENTRY logColor3i(GLint red, GLint green, GLint blue) -{ - fprintf( glw_state.log_fp, "glColor3i\n" ); - dllColor3i( red, green, blue ); -} - -static void APIENTRY logColor3iv(const GLint *v) -{ - fprintf( glw_state.log_fp, "glColor3iv\n" ); - dllColor3iv( v ); -} - -static void APIENTRY logColor3s(GLshort red, GLshort green, GLshort blue) -{ - fprintf( glw_state.log_fp, "glColor3s\n" ); - dllColor3s( red, green, blue ); -} - -static void APIENTRY logColor3sv(const GLshort *v) -{ - fprintf( glw_state.log_fp, "glColor3sv\n" ); - dllColor3sv( v ); -} - -static void APIENTRY logColor3ub(GLubyte red, GLubyte green, GLubyte blue) -{ - fprintf( glw_state.log_fp, "glColor3ub\n" ); - dllColor3ub( red, green, blue ); -} - -static void APIENTRY logColor3ubv(const GLubyte *v) -{ - fprintf( glw_state.log_fp, "glColor3ubv\n" ); - dllColor3ubv( v ); -} - -#define SIG( x ) fprintf( glw_state.log_fp, x "\n" ) - -static void APIENTRY logColor3ui(GLuint red, GLuint green, GLuint blue) -{ - SIG( "glColor3ui" ); - dllColor3ui( red, green, blue ); -} - -static void APIENTRY logColor3uiv(const GLuint *v) -{ - SIG( "glColor3uiv" ); - dllColor3uiv( v ); -} - -static void APIENTRY logColor3us(GLushort red, GLushort green, GLushort blue) -{ - SIG( "glColor3us" ); - dllColor3us( red, green, blue ); -} - -static void APIENTRY logColor3usv(const GLushort *v) -{ - SIG( "glColor3usv" ); - dllColor3usv( v ); -} - -static void APIENTRY logColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - SIG( "glColor4b" ); - dllColor4b( red, green, blue, alpha ); -} - -static void APIENTRY logColor4bv(const GLbyte *v) -{ - SIG( "glColor4bv" ); - dllColor4bv( v ); -} - -static void APIENTRY logColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - SIG( "glColor4d" ); - dllColor4d( red, green, blue, alpha ); -} -static void APIENTRY logColor4dv(const GLdouble *v) -{ - SIG( "glColor4dv" ); - dllColor4dv( v ); -} -static void APIENTRY logColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - fprintf( glw_state.log_fp, "glColor4f( %f,%f,%f,%f )\n", red, green, blue, alpha ); - dllColor4f( red, green, blue, alpha ); -} -static void APIENTRY logColor4fv(const GLfloat *v) -{ - fprintf( glw_state.log_fp, "glColor4fv( %f,%f,%f,%f )\n", v[0], v[1], v[2], v[3] ); - dllColor4fv( v ); -} -static void APIENTRY logColor4i(GLint red, GLint green, GLint blue, GLint alpha) -{ - SIG( "glColor4i" ); - dllColor4i( red, green, blue, alpha ); -} -static void APIENTRY logColor4iv(const GLint *v) -{ - SIG( "glColor4iv" ); - dllColor4iv( v ); -} -static void APIENTRY logColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - SIG( "glColor4s" ); - dllColor4s( red, green, blue, alpha ); -} -static void APIENTRY logColor4sv(const GLshort *v) -{ - SIG( "glColor4sv" ); - dllColor4sv( v ); -} -static void APIENTRY logColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - SIG( "glColor4b" ); - dllColor4b( red, green, blue, alpha ); -} -static void APIENTRY logColor4ubv(const GLubyte *v) -{ - SIG( "glColor4ubv" ); - dllColor4ubv( v ); -} -static void APIENTRY logColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - SIG( "glColor4ui" ); - dllColor4ui( red, green, blue, alpha ); -} -static void APIENTRY logColor4uiv(const GLuint *v) -{ - SIG( "glColor4uiv" ); - dllColor4uiv( v ); -} -static void APIENTRY logColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - SIG( "glColor4us" ); - dllColor4us( red, green, blue, alpha ); -} -static void APIENTRY logColor4usv(const GLushort *v) -{ - SIG( "glColor4usv" ); - dllColor4usv( v ); -} -static void APIENTRY logColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - SIG( "glColorMask" ); - dllColorMask( red, green, blue, alpha ); -} -static void APIENTRY logColorMaterial(GLenum face, GLenum mode) -{ - SIG( "glColorMaterial" ); - dllColorMaterial( face, mode ); -} - -static void APIENTRY logColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) -{ - fprintf( glw_state.log_fp, "glColorPointer( %d, %s, %d, MEM )\n", size, TypeToString( type ), stride ); - dllColorPointer( size, type, stride, pointer ); -} - -static void APIENTRY logCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) -{ - SIG( "glCopyPixels" ); - dllCopyPixels( x, y, width, height, type ); -} - -static void APIENTRY logCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border) -{ - SIG( "glCopyTexImage1D" ); - dllCopyTexImage1D( target, level, internalFormat, x, y, width, border ); -} - -static void APIENTRY logCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - SIG( "glCopyTexImage2D" ); - dllCopyTexImage2D( target, level, internalFormat, x, y, width, height, border ); -} - -static void APIENTRY logCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - SIG( "glCopyTexSubImage1D" ); - dllCopyTexSubImage1D( target, level, xoffset, x, y, width ); -} - -static void APIENTRY logCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - SIG( "glCopyTexSubImage2D" ); - dllCopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height ); -} - -static void APIENTRY logCullFace(GLenum mode) -{ - fprintf( glw_state.log_fp, "glCullFace( %s )\n", ( mode == GL_FRONT ) ? "GL_FRONT" : "GL_BACK" ); - dllCullFace( mode ); -} - -static void APIENTRY logDeleteLists(GLuint list, GLsizei range) -{ - SIG( "glDeleteLists" ); - dllDeleteLists( list, range ); -} - -static void APIENTRY logDeleteTextures(GLsizei n, const GLuint *textures) -{ - SIG( "glDeleteTextures" ); - dllDeleteTextures( n, textures ); -} - -static void APIENTRY logDepthFunc(GLenum func) -{ - fprintf( glw_state.log_fp, "glDepthFunc( %s )\n", FuncToString( func ) ); - dllDepthFunc( func ); -} - -static void APIENTRY logDepthMask(GLboolean flag) -{ - fprintf( glw_state.log_fp, "glDepthMask( %s )\n", BooleanToString( flag ) ); - dllDepthMask( flag ); -} - -static void APIENTRY logDepthRange(GLclampd zNear, GLclampd zFar) -{ - fprintf( glw_state.log_fp, "glDepthRange( %f, %f )\n", ( float ) zNear, ( float ) zFar ); - dllDepthRange( zNear, zFar ); -} - -static void APIENTRY logDisable(GLenum cap) -{ - fprintf( glw_state.log_fp, "glDisable( %s )\n", CapToString( cap ) ); - dllDisable( cap ); -} - -static void APIENTRY logDisableClientState(GLenum array) -{ - fprintf( glw_state.log_fp, "glDisableClientState( %s )\n", CapToString( array ) ); - dllDisableClientState( array ); -} - -static void APIENTRY logDrawArrays(GLenum mode, GLint first, GLsizei count) -{ - SIG( "glDrawArrays" ); - dllDrawArrays( mode, first, count ); -} - -static void APIENTRY logDrawBuffer(GLenum mode) -{ - SIG( "glDrawBuffer" ); - dllDrawBuffer( mode ); -} - -static void APIENTRY logDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) -{ - fprintf( glw_state.log_fp, "glDrawElements( %s, %d, %s, MEM )\n", PrimToString( mode ), count, TypeToString( type ) ); - dllDrawElements( mode, count, type, indices ); -} - -static void APIENTRY logDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glDrawPixels" ); - dllDrawPixels( width, height, format, type, pixels ); -} - -static void APIENTRY logEdgeFlag(GLboolean flag) -{ - SIG( "glEdgeFlag" ); - dllEdgeFlag( flag ); -} - -static void APIENTRY logEdgeFlagPointer(GLsizei stride, const void *pointer) -{ - SIG( "glEdgeFlagPointer" ); - dllEdgeFlagPointer( stride, pointer ); -} - -static void APIENTRY logEdgeFlagv(const GLboolean *flag) -{ - SIG( "glEdgeFlagv" ); - dllEdgeFlagv( flag ); -} - -static void APIENTRY logEnable(GLenum cap) -{ - fprintf( glw_state.log_fp, "glEnable( %s )\n", CapToString( cap ) ); - dllEnable( cap ); -} - -static void APIENTRY logEnableClientState(GLenum array) -{ - fprintf( glw_state.log_fp, "glEnableClientState( %s )\n", CapToString( array ) ); - dllEnableClientState( array ); -} - -static void APIENTRY logEnd(void) -{ - SIG( "glEnd" ); - dllEnd(); -} - -static void APIENTRY logEndList(void) -{ - SIG( "glEndList" ); - dllEndList(); -} - -static void APIENTRY logEvalCoord1d(GLdouble u) -{ - SIG( "glEvalCoord1d" ); - dllEvalCoord1d( u ); -} - -static void APIENTRY logEvalCoord1dv(const GLdouble *u) -{ - SIG( "glEvalCoord1dv" ); - dllEvalCoord1dv( u ); -} - -static void APIENTRY logEvalCoord1f(GLfloat u) -{ - SIG( "glEvalCoord1f" ); - dllEvalCoord1f( u ); -} - -static void APIENTRY logEvalCoord1fv(const GLfloat *u) -{ - SIG( "glEvalCoord1fv" ); - dllEvalCoord1fv( u ); -} -static void APIENTRY logEvalCoord2d(GLdouble u, GLdouble v) -{ - SIG( "glEvalCoord2d" ); - dllEvalCoord2d( u, v ); -} -static void APIENTRY logEvalCoord2dv(const GLdouble *u) -{ - SIG( "glEvalCoord2dv" ); - dllEvalCoord2dv( u ); -} -static void APIENTRY logEvalCoord2f(GLfloat u, GLfloat v) -{ - SIG( "glEvalCoord2f" ); - dllEvalCoord2f( u, v ); -} -static void APIENTRY logEvalCoord2fv(const GLfloat *u) -{ - SIG( "glEvalCoord2fv" ); - dllEvalCoord2fv( u ); -} - -static void APIENTRY logEvalMesh1(GLenum mode, GLint i1, GLint i2) -{ - SIG( "glEvalMesh1" ); - dllEvalMesh1( mode, i1, i2 ); -} -static void APIENTRY logEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ - SIG( "glEvalMesh2" ); - dllEvalMesh2( mode, i1, i2, j1, j2 ); -} -static void APIENTRY logEvalPoint1(GLint i) -{ - SIG( "glEvalPoint1" ); - dllEvalPoint1( i ); -} -static void APIENTRY logEvalPoint2(GLint i, GLint j) -{ - SIG( "glEvalPoint2" ); - dllEvalPoint2( i, j ); -} - -static void APIENTRY logFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) -{ - SIG( "glFeedbackBuffer" ); - dllFeedbackBuffer( size, type, buffer ); -} - -static void APIENTRY logFinish(void) -{ - SIG( "glFinish" ); - dllFinish(); -} - -static void APIENTRY logFlush(void) -{ - SIG( "glFlush" ); - dllFlush(); -} - -static void APIENTRY logFogf(GLenum pname, GLfloat param) -{ - SIG( "glFogf" ); - dllFogf( pname, param ); -} - -static void APIENTRY logFogfv(GLenum pname, const GLfloat *params) -{ - SIG( "glFogfv" ); - dllFogfv( pname, params ); -} - -static void APIENTRY logFogi(GLenum pname, GLint param) -{ - SIG( "glFogi" ); - dllFogi( pname, param ); -} - -static void APIENTRY logFogiv(GLenum pname, const GLint *params) -{ - SIG( "glFogiv" ); - dllFogiv( pname, params ); -} - -static void APIENTRY logFrontFace(GLenum mode) -{ - SIG( "glFrontFace" ); - dllFrontFace( mode ); -} - -static void APIENTRY logFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - SIG( "glFrustum" ); - dllFrustum( left, right, bottom, top, zNear, zFar ); -} - -static GLuint APIENTRY logGenLists(GLsizei range) -{ - SIG( "glGenLists" ); - return dllGenLists( range ); -} - -static void APIENTRY logGenTextures(GLsizei n, GLuint *textures) -{ - SIG( "glGenTextures" ); - dllGenTextures( n, textures ); -} - -static void APIENTRY logGetBooleanv(GLenum pname, GLboolean *params) -{ - SIG( "glGetBooleanv" ); - dllGetBooleanv( pname, params ); -} - -static void APIENTRY logGetClipPlane(GLenum plane, GLdouble *equation) -{ - SIG( "glGetClipPlane" ); - dllGetClipPlane( plane, equation ); -} - -static void APIENTRY logGetDoublev(GLenum pname, GLdouble *params) -{ - SIG( "glGetDoublev" ); - dllGetDoublev( pname, params ); -} - -static GLenum APIENTRY logGetError(void) -{ - SIG( "glGetError" ); - return dllGetError(); -} - -static void APIENTRY logGetFloatv(GLenum pname, GLfloat *params) -{ - SIG( "glGetFloatv" ); - dllGetFloatv( pname, params ); -} - -static void APIENTRY logGetIntegerv(GLenum pname, GLint *params) -{ - SIG( "glGetIntegerv" ); - dllGetIntegerv( pname, params ); -} - -static void APIENTRY logGetLightfv(GLenum light, GLenum pname, GLfloat *params) -{ - SIG( "glGetLightfv" ); - dllGetLightfv( light, pname, params ); -} - -static void APIENTRY logGetLightiv(GLenum light, GLenum pname, GLint *params) -{ - SIG( "glGetLightiv" ); - dllGetLightiv( light, pname, params ); -} - -static void APIENTRY logGetMapdv(GLenum target, GLenum query, GLdouble *v) -{ - SIG( "glGetMapdv" ); - dllGetMapdv( target, query, v ); -} - -static void APIENTRY logGetMapfv(GLenum target, GLenum query, GLfloat *v) -{ - SIG( "glGetMapfv" ); - dllGetMapfv( target, query, v ); -} - -static void APIENTRY logGetMapiv(GLenum target, GLenum query, GLint *v) -{ - SIG( "glGetMapiv" ); - dllGetMapiv( target, query, v ); -} - -static void APIENTRY logGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) -{ - SIG( "glGetMaterialfv" ); - dllGetMaterialfv( face, pname, params ); -} - -static void APIENTRY logGetMaterialiv(GLenum face, GLenum pname, GLint *params) -{ - SIG( "glGetMaterialiv" ); - dllGetMaterialiv( face, pname, params ); -} - -static void APIENTRY logGetPixelMapfv(GLenum map, GLfloat *values) -{ - SIG( "glGetPixelMapfv" ); - dllGetPixelMapfv( map, values ); -} - -static void APIENTRY logGetPixelMapuiv(GLenum map, GLuint *values) -{ - SIG( "glGetPixelMapuiv" ); - dllGetPixelMapuiv( map, values ); -} - -static void APIENTRY logGetPixelMapusv(GLenum map, GLushort *values) -{ - SIG( "glGetPixelMapusv" ); - dllGetPixelMapusv( map, values ); -} - -static void APIENTRY logGetPointerv(GLenum pname, GLvoid* *params) -{ - SIG( "glGetPointerv" ); - dllGetPointerv( pname, params ); -} - -static void APIENTRY logGetPolygonStipple(GLubyte *mask) -{ - SIG( "glGetPolygonStipple" ); - dllGetPolygonStipple( mask ); -} - -static const GLubyte * APIENTRY logGetString(GLenum name) -{ - SIG( "glGetString" ); - return dllGetString( name ); -} - -static void APIENTRY logGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) -{ - SIG( "glGetTexEnvfv" ); - dllGetTexEnvfv( target, pname, params ); -} - -static void APIENTRY logGetTexEnviv(GLenum target, GLenum pname, GLint *params) -{ - SIG( "glGetTexEnviv" ); - dllGetTexEnviv( target, pname, params ); -} - -static void APIENTRY logGetTexGendv(GLenum coord, GLenum pname, GLdouble *params) -{ - SIG( "glGetTexGendv" ); - dllGetTexGendv( coord, pname, params ); -} - -static void APIENTRY logGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params) -{ - SIG( "glGetTexGenfv" ); - dllGetTexGenfv( coord, pname, params ); -} - -static void APIENTRY logGetTexGeniv(GLenum coord, GLenum pname, GLint *params) -{ - SIG( "glGetTexGeniv" ); - dllGetTexGeniv( coord, pname, params ); -} - -static void APIENTRY logGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels) -{ - SIG( "glGetTexImage" ); - dllGetTexImage( target, level, format, type, pixels ); -} -static void APIENTRY logGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params ) -{ - SIG( "glGetTexLevelParameterfv" ); - dllGetTexLevelParameterfv( target, level, pname, params ); -} - -static void APIENTRY logGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) -{ - SIG( "glGetTexLevelParameteriv" ); - dllGetTexLevelParameteriv( target, level, pname, params ); -} - -static void APIENTRY logGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ - SIG( "glGetTexParameterfv" ); - dllGetTexParameterfv( target, pname, params ); -} - -static void APIENTRY logGetTexParameteriv(GLenum target, GLenum pname, GLint *params) -{ - SIG( "glGetTexParameteriv" ); - dllGetTexParameteriv( target, pname, params ); -} - -static void APIENTRY logHint(GLenum target, GLenum mode) -{ - fprintf( glw_state.log_fp, "glHint( 0x%x, 0x%x )\n", target, mode ); - dllHint( target, mode ); -} - -static void APIENTRY logIndexMask(GLuint mask) -{ - SIG( "glIndexMask" ); - dllIndexMask( mask ); -} - -static void APIENTRY logIndexPointer(GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glIndexPointer" ); - dllIndexPointer( type, stride, pointer ); -} - -static void APIENTRY logIndexd(GLdouble c) -{ - SIG( "glIndexd" ); - dllIndexd( c ); -} - -static void APIENTRY logIndexdv(const GLdouble *c) -{ - SIG( "glIndexdv" ); - dllIndexdv( c ); -} - -static void APIENTRY logIndexf(GLfloat c) -{ - SIG( "glIndexf" ); - dllIndexf( c ); -} - -static void APIENTRY logIndexfv(const GLfloat *c) -{ - SIG( "glIndexfv" ); - dllIndexfv( c ); -} - -static void APIENTRY logIndexi(GLint c) -{ - SIG( "glIndexi" ); - dllIndexi( c ); -} - -static void APIENTRY logIndexiv(const GLint *c) -{ - SIG( "glIndexiv" ); - dllIndexiv( c ); -} - -static void APIENTRY logIndexs(GLshort c) -{ - SIG( "glIndexs" ); - dllIndexs( c ); -} - -static void APIENTRY logIndexsv(const GLshort *c) -{ - SIG( "glIndexsv" ); - dllIndexsv( c ); -} - -static void APIENTRY logIndexub(GLubyte c) -{ - SIG( "glIndexub" ); - dllIndexub( c ); -} - -static void APIENTRY logIndexubv(const GLubyte *c) -{ - SIG( "glIndexubv" ); - dllIndexubv( c ); -} - -static void APIENTRY logInitNames(void) -{ - SIG( "glInitNames" ); - dllInitNames(); -} - -static void APIENTRY logInterleavedArrays(GLenum format, GLsizei stride, const void *pointer) -{ - SIG( "glInterleavedArrays" ); - dllInterleavedArrays( format, stride, pointer ); -} - -static GLboolean APIENTRY logIsEnabled(GLenum cap) -{ - SIG( "glIsEnabled" ); - return dllIsEnabled( cap ); -} -static GLboolean APIENTRY logIsList(GLuint list) -{ - SIG( "glIsList" ); - return dllIsList( list ); -} -static GLboolean APIENTRY logIsTexture(GLuint texture) -{ - SIG( "glIsTexture" ); - return dllIsTexture( texture ); -} - -static void APIENTRY logLightModelf(GLenum pname, GLfloat param) -{ - SIG( "glLightModelf" ); - dllLightModelf( pname, param ); -} - -static void APIENTRY logLightModelfv(GLenum pname, const GLfloat *params) -{ - SIG( "glLightModelfv" ); - dllLightModelfv( pname, params ); -} - -static void APIENTRY logLightModeli(GLenum pname, GLint param) -{ - SIG( "glLightModeli" ); - dllLightModeli( pname, param ); - -} - -static void APIENTRY logLightModeliv(GLenum pname, const GLint *params) -{ - SIG( "glLightModeliv" ); - dllLightModeliv( pname, params ); -} - -static void APIENTRY logLightf(GLenum light, GLenum pname, GLfloat param) -{ - SIG( "glLightf" ); - dllLightf( light, pname, param ); -} - -static void APIENTRY logLightfv(GLenum light, GLenum pname, const GLfloat *params) -{ - SIG( "glLightfv" ); - dllLightfv( light, pname, params ); -} - -static void APIENTRY logLighti(GLenum light, GLenum pname, GLint param) -{ - SIG( "glLighti" ); - dllLighti( light, pname, param ); -} - -static void APIENTRY logLightiv(GLenum light, GLenum pname, const GLint *params) -{ - SIG( "glLightiv" ); - dllLightiv( light, pname, params ); -} - -static void APIENTRY logLineStipple(GLint factor, GLushort pattern) -{ - SIG( "glLineStipple" ); - dllLineStipple( factor, pattern ); -} - -static void APIENTRY logLineWidth(GLfloat width) -{ - SIG( "glLineWidth" ); - dllLineWidth( width ); -} - -static void APIENTRY logListBase(GLuint base) -{ - SIG( "glListBase" ); - dllListBase( base ); -} - -static void APIENTRY logLoadIdentity(void) -{ - SIG( "glLoadIdentity" ); - dllLoadIdentity(); -} - -static void APIENTRY logLoadMatrixd(const GLdouble *m) -{ - SIG( "glLoadMatrixd" ); - dllLoadMatrixd( m ); -} - -static void APIENTRY logLoadMatrixf(const GLfloat *m) -{ - SIG( "glLoadMatrixf" ); - dllLoadMatrixf( m ); -} - -static void APIENTRY logLoadName(GLuint name) -{ - SIG( "glLoadName" ); - dllLoadName( name ); -} - -static void APIENTRY logLogicOp(GLenum opcode) -{ - SIG( "glLogicOp" ); - dllLogicOp( opcode ); -} - -static void APIENTRY logMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) -{ - SIG( "glMap1d" ); - dllMap1d( target, u1, u2, stride, order, points ); -} - -static void APIENTRY logMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) -{ - SIG( "glMap1f" ); - dllMap1f( target, u1, u2, stride, order, points ); -} - -static void APIENTRY logMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) -{ - SIG( "glMap2d" ); - dllMap2d( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); -} - -static void APIENTRY logMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) -{ - SIG( "glMap2f" ); - dllMap2f( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); -} - -static void APIENTRY logMapGrid1d(GLint un, GLdouble u1, GLdouble u2) -{ - SIG( "glMapGrid1d" ); - dllMapGrid1d( un, u1, u2 ); -} - -static void APIENTRY logMapGrid1f(GLint un, GLfloat u1, GLfloat u2) -{ - SIG( "glMapGrid1f" ); - dllMapGrid1f( un, u1, u2 ); -} - -static void APIENTRY logMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - SIG( "glMapGrid2d" ); - dllMapGrid2d( un, u1, u2, vn, v1, v2 ); -} -static void APIENTRY logMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - SIG( "glMapGrid2f" ); - dllMapGrid2f( un, u1, u2, vn, v1, v2 ); -} -static void APIENTRY logMaterialf(GLenum face, GLenum pname, GLfloat param) -{ - SIG( "glMaterialf" ); - dllMaterialf( face, pname, param ); -} -static void APIENTRY logMaterialfv(GLenum face, GLenum pname, const GLfloat *params) -{ - SIG( "glMaterialfv" ); - dllMaterialfv( face, pname, params ); -} - -static void APIENTRY logMateriali(GLenum face, GLenum pname, GLint param) -{ - SIG( "glMateriali" ); - dllMateriali( face, pname, param ); -} - -static void APIENTRY logMaterialiv(GLenum face, GLenum pname, const GLint *params) -{ - SIG( "glMaterialiv" ); - dllMaterialiv( face, pname, params ); -} - -static void APIENTRY logMatrixMode(GLenum mode) -{ - SIG( "glMatrixMode" ); - dllMatrixMode( mode ); -} - -static void APIENTRY logMultMatrixd(const GLdouble *m) -{ - SIG( "glMultMatrixd" ); - dllMultMatrixd( m ); -} - -static void APIENTRY logMultMatrixf(const GLfloat *m) -{ - SIG( "glMultMatrixf" ); - dllMultMatrixf( m ); -} - -static void APIENTRY logNewList(GLuint list, GLenum mode) -{ - SIG( "glNewList" ); - dllNewList( list, mode ); -} - -static void APIENTRY logNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) -{ - SIG ("glNormal3b" ); - dllNormal3b( nx, ny, nz ); -} - -static void APIENTRY logNormal3bv(const GLbyte *v) -{ - SIG( "glNormal3bv" ); - dllNormal3bv( v ); -} - -static void APIENTRY logNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) -{ - SIG( "glNormal3d" ); - dllNormal3d( nx, ny, nz ); -} - -static void APIENTRY logNormal3dv(const GLdouble *v) -{ - SIG( "glNormal3dv" ); - dllNormal3dv( v ); -} - -static void APIENTRY logNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) -{ - SIG( "glNormal3f" ); - dllNormal3f( nx, ny, nz ); -} - -static void APIENTRY logNormal3fv(const GLfloat *v) -{ - SIG( "glNormal3fv" ); - dllNormal3fv( v ); -} -static void APIENTRY logNormal3i(GLint nx, GLint ny, GLint nz) -{ - SIG( "glNormal3i" ); - dllNormal3i( nx, ny, nz ); -} -static void APIENTRY logNormal3iv(const GLint *v) -{ - SIG( "glNormal3iv" ); - dllNormal3iv( v ); -} -static void APIENTRY logNormal3s(GLshort nx, GLshort ny, GLshort nz) -{ - SIG( "glNormal3s" ); - dllNormal3s( nx, ny, nz ); -} -static void APIENTRY logNormal3sv(const GLshort *v) -{ - SIG( "glNormal3sv" ); - dllNormal3sv( v ); -} -static void APIENTRY logNormalPointer(GLenum type, GLsizei stride, const void *pointer) -{ - SIG( "glNormalPointer" ); - dllNormalPointer( type, stride, pointer ); -} -static void APIENTRY logOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - SIG( "glOrtho" ); - dllOrtho( left, right, bottom, top, zNear, zFar ); -} - -static void APIENTRY logPassThrough(GLfloat token) -{ - SIG( "glPassThrough" ); - dllPassThrough( token ); -} - -static void APIENTRY logPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values) -{ - SIG( "glPixelMapfv" ); - dllPixelMapfv( map, mapsize, values ); -} - -static void APIENTRY logPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values) -{ - SIG( "glPixelMapuiv" ); - dllPixelMapuiv( map, mapsize, values ); -} - -static void APIENTRY logPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values) -{ - SIG( "glPixelMapusv" ); - dllPixelMapusv( map, mapsize, values ); -} -static void APIENTRY logPixelStoref(GLenum pname, GLfloat param) -{ - SIG( "glPixelStoref" ); - dllPixelStoref( pname, param ); -} -static void APIENTRY logPixelStorei(GLenum pname, GLint param) -{ - SIG( "glPixelStorei" ); - dllPixelStorei( pname, param ); -} -static void APIENTRY logPixelTransferf(GLenum pname, GLfloat param) -{ - SIG( "glPixelTransferf" ); - dllPixelTransferf( pname, param ); -} - -static void APIENTRY logPixelTransferi(GLenum pname, GLint param) -{ - SIG( "glPixelTransferi" ); - dllPixelTransferi( pname, param ); -} - -static void APIENTRY logPixelZoom(GLfloat xfactor, GLfloat yfactor) -{ - SIG( "glPixelZoom" ); - dllPixelZoom( xfactor, yfactor ); -} - -static void APIENTRY logPointSize(GLfloat size) -{ - SIG( "glPointSize" ); - dllPointSize( size ); -} - -static void APIENTRY logPolygonMode(GLenum face, GLenum mode) -{ - fprintf( glw_state.log_fp, "glPolygonMode( 0x%x, 0x%x )\n", face, mode ); - dllPolygonMode( face, mode ); -} - -static void APIENTRY logPolygonOffset(GLfloat factor, GLfloat units) -{ - SIG( "glPolygonOffset" ); - dllPolygonOffset( factor, units ); -} -static void APIENTRY logPolygonStipple(const GLubyte *mask ) -{ - SIG( "glPolygonStipple" ); - dllPolygonStipple( mask ); -} -static void APIENTRY logPopAttrib(void) -{ - SIG( "glPopAttrib" ); - dllPopAttrib(); -} - -static void APIENTRY logPopClientAttrib(void) -{ - SIG( "glPopClientAttrib" ); - dllPopClientAttrib(); -} - -static void APIENTRY logPopMatrix(void) -{ - SIG( "glPopMatrix" ); - dllPopMatrix(); -} - -static void APIENTRY logPopName(void) -{ - SIG( "glPopName" ); - dllPopName(); -} - -static void APIENTRY logPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) -{ - SIG( "glPrioritizeTextures" ); - dllPrioritizeTextures( n, textures, priorities ); -} - -static void APIENTRY logPushAttrib(GLbitfield mask) -{ - SIG( "glPushAttrib" ); - dllPushAttrib( mask ); -} - -static void APIENTRY logPushClientAttrib(GLbitfield mask) -{ - SIG( "glPushClientAttrib" ); - dllPushClientAttrib( mask ); -} - -static void APIENTRY logPushMatrix(void) -{ - SIG( "glPushMatrix" ); - dllPushMatrix(); -} - -static void APIENTRY logPushName(GLuint name) -{ - SIG( "glPushName" ); - dllPushName( name ); -} - -static void APIENTRY logRasterPos2d(GLdouble x, GLdouble y) -{ - SIG ("glRasterPot2d" ); - dllRasterPos2d( x, y ); -} - -static void APIENTRY logRasterPos2dv(const GLdouble *v) -{ - SIG( "glRasterPos2dv" ); - dllRasterPos2dv( v ); -} - -static void APIENTRY logRasterPos2f(GLfloat x, GLfloat y) -{ - SIG( "glRasterPos2f" ); - dllRasterPos2f( x, y ); -} -static void APIENTRY logRasterPos2fv(const GLfloat *v) -{ - SIG( "glRasterPos2dv" ); - dllRasterPos2fv( v ); -} -static void APIENTRY logRasterPos2i(GLint x, GLint y) -{ - SIG( "glRasterPos2if" ); - dllRasterPos2i( x, y ); -} -static void APIENTRY logRasterPos2iv(const GLint *v) -{ - SIG( "glRasterPos2iv" ); - dllRasterPos2iv( v ); -} -static void APIENTRY logRasterPos2s(GLshort x, GLshort y) -{ - SIG( "glRasterPos2s" ); - dllRasterPos2s( x, y ); -} -static void APIENTRY logRasterPos2sv(const GLshort *v) -{ - SIG( "glRasterPos2sv" ); - dllRasterPos2sv( v ); -} -static void APIENTRY logRasterPos3d(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glRasterPos3d" ); - dllRasterPos3d( x, y, z ); -} -static void APIENTRY logRasterPos3dv(const GLdouble *v) -{ - SIG( "glRasterPos3dv" ); - dllRasterPos3dv( v ); -} -static void APIENTRY logRasterPos3f(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glRasterPos3f" ); - dllRasterPos3f( x, y, z ); -} -static void APIENTRY logRasterPos3fv(const GLfloat *v) -{ - SIG( "glRasterPos3fv" ); - dllRasterPos3fv( v ); -} -static void APIENTRY logRasterPos3i(GLint x, GLint y, GLint z) -{ - SIG( "glRasterPos3i" ); - dllRasterPos3i( x, y, z ); -} -static void APIENTRY logRasterPos3iv(const GLint *v) -{ - SIG( "glRasterPos3iv" ); - dllRasterPos3iv( v ); -} -static void APIENTRY logRasterPos3s(GLshort x, GLshort y, GLshort z) -{ - SIG( "glRasterPos3s" ); - dllRasterPos3s( x, y, z ); -} -static void APIENTRY logRasterPos3sv(const GLshort *v) -{ - SIG( "glRasterPos3sv" ); - dllRasterPos3sv( v ); -} -static void APIENTRY logRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - SIG( "glRasterPos4d" ); - dllRasterPos4d( x, y, z, w ); -} -static void APIENTRY logRasterPos4dv(const GLdouble *v) -{ - SIG( "glRasterPos4dv" ); - dllRasterPos4dv( v ); -} -static void APIENTRY logRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - SIG( "glRasterPos4f" ); - dllRasterPos4f( x, y, z, w ); -} -static void APIENTRY logRasterPos4fv(const GLfloat *v) -{ - SIG( "glRasterPos4fv" ); - dllRasterPos4fv( v ); -} -static void APIENTRY logRasterPos4i(GLint x, GLint y, GLint z, GLint w) -{ - SIG( "glRasterPos4i" ); - dllRasterPos4i( x, y, z, w ); -} -static void APIENTRY logRasterPos4iv(const GLint *v) -{ - SIG( "glRasterPos4iv" ); - dllRasterPos4iv( v ); -} -static void APIENTRY logRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - SIG( "glRasterPos4s" ); - dllRasterPos4s( x, y, z, w ); -} -static void APIENTRY logRasterPos4sv(const GLshort *v) -{ - SIG( "glRasterPos4sv" ); - dllRasterPos4sv( v ); -} -static void APIENTRY logReadBuffer(GLenum mode) -{ - SIG( "glReadBuffer" ); - dllReadBuffer( mode ); -} -static void APIENTRY logReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels) -{ - SIG( "glReadPixels" ); - dllReadPixels( x, y, width, height, format, type, pixels ); -} - -static void APIENTRY logRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - SIG( "glRectd" ); - dllRectd( x1, y1, x2, y2 ); -} - -static void APIENTRY logRectdv(const GLdouble *v1, const GLdouble *v2) -{ - SIG( "glRectdv" ); - dllRectdv( v1, v2 ); -} - -static void APIENTRY logRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - SIG( "glRectf" ); - dllRectf( x1, y1, x2, y2 ); -} - -static void APIENTRY logRectfv(const GLfloat *v1, const GLfloat *v2) -{ - SIG( "glRectfv" ); - dllRectfv( v1, v2 ); -} -static void APIENTRY logRecti(GLint x1, GLint y1, GLint x2, GLint y2) -{ - SIG( "glRecti" ); - dllRecti( x1, y1, x2, y2 ); -} -static void APIENTRY logRectiv(const GLint *v1, const GLint *v2) -{ - SIG( "glRectiv" ); - dllRectiv( v1, v2 ); -} -static void APIENTRY logRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - SIG( "glRects" ); - dllRects( x1, y1, x2, y2 ); -} -static void APIENTRY logRectsv(const GLshort *v1, const GLshort *v2) -{ - SIG( "glRectsv" ); - dllRectsv( v1, v2 ); -} -static GLint APIENTRY logRenderMode(GLenum mode) -{ - SIG( "glRenderMode" ); - return dllRenderMode( mode ); -} -static void APIENTRY logRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glRotated" ); - dllRotated( angle, x, y, z ); -} - -static void APIENTRY logRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glRotatef" ); - dllRotatef( angle, x, y, z ); -} - -static void APIENTRY logScaled(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glScaled" ); - dllScaled( x, y, z ); -} - -static void APIENTRY logScalef(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glScalef" ); - dllScalef( x, y, z ); -} - -static void APIENTRY logScissor(GLint x, GLint y, GLsizei width, GLsizei height) -{ - fprintf( glw_state.log_fp, "glScissor( %d, %d, %d, %d )\n", x, y, width, height ); - dllScissor( x, y, width, height ); -} - -static void APIENTRY logSelectBuffer(GLsizei size, GLuint *buffer) -{ - SIG( "glSelectBuffer" ); - dllSelectBuffer( size, buffer ); -} - -static void APIENTRY logShadeModel(GLenum mode) -{ - SIG( "glShadeModel" ); - dllShadeModel( mode ); -} - -static void APIENTRY logStencilFunc(GLenum func, GLint ref, GLuint mask) -{ - SIG( "glStencilFunc" ); - dllStencilFunc( func, ref, mask ); -} - -static void APIENTRY logStencilMask(GLuint mask) -{ - SIG( "glStencilMask" ); - dllStencilMask( mask ); -} - -static void APIENTRY logStencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ - SIG( "glStencilOp" ); - dllStencilOp( fail, zfail, zpass ); -} - -static void APIENTRY logTexCoord1d(GLdouble s) -{ - SIG( "glTexCoord1d" ); - dllTexCoord1d( s ); -} - -static void APIENTRY logTexCoord1dv(const GLdouble *v) -{ - SIG( "glTexCoord1dv" ); - dllTexCoord1dv( v ); -} - -static void APIENTRY logTexCoord1f(GLfloat s) -{ - SIG( "glTexCoord1f" ); - dllTexCoord1f( s ); -} -static void APIENTRY logTexCoord1fv(const GLfloat *v) -{ - SIG( "glTexCoord1fv" ); - dllTexCoord1fv( v ); -} -static void APIENTRY logTexCoord1i(GLint s) -{ - SIG( "glTexCoord1i" ); - dllTexCoord1i( s ); -} -static void APIENTRY logTexCoord1iv(const GLint *v) -{ - SIG( "glTexCoord1iv" ); - dllTexCoord1iv( v ); -} -static void APIENTRY logTexCoord1s(GLshort s) -{ - SIG( "glTexCoord1s" ); - dllTexCoord1s( s ); -} -static void APIENTRY logTexCoord1sv(const GLshort *v) -{ - SIG( "glTexCoord1sv" ); - dllTexCoord1sv( v ); -} -static void APIENTRY logTexCoord2d(GLdouble s, GLdouble t) -{ - SIG( "glTexCoord2d" ); - dllTexCoord2d( s, t ); -} - -static void APIENTRY logTexCoord2dv(const GLdouble *v) -{ - SIG( "glTexCoord2dv" ); - dllTexCoord2dv( v ); -} -static void APIENTRY logTexCoord2f(GLfloat s, GLfloat t) -{ - SIG( "glTexCoord2f" ); - dllTexCoord2f( s, t ); -} -static void APIENTRY logTexCoord2fv(const GLfloat *v) -{ - SIG( "glTexCoord2fv" ); - dllTexCoord2fv( v ); -} -static void APIENTRY logTexCoord2i(GLint s, GLint t) -{ - SIG( "glTexCoord2i" ); - dllTexCoord2i( s, t ); -} -static void APIENTRY logTexCoord2iv(const GLint *v) -{ - SIG( "glTexCoord2iv" ); - dllTexCoord2iv( v ); -} -static void APIENTRY logTexCoord2s(GLshort s, GLshort t) -{ - SIG( "glTexCoord2s" ); - dllTexCoord2s( s, t ); -} -static void APIENTRY logTexCoord2sv(const GLshort *v) -{ - SIG( "glTexCoord2sv" ); - dllTexCoord2sv( v ); -} -static void APIENTRY logTexCoord3d(GLdouble s, GLdouble t, GLdouble r) -{ - SIG( "glTexCoord3d" ); - dllTexCoord3d( s, t, r ); -} -static void APIENTRY logTexCoord3dv(const GLdouble *v) -{ - SIG( "glTexCoord3dv" ); - dllTexCoord3dv( v ); -} -static void APIENTRY logTexCoord3f(GLfloat s, GLfloat t, GLfloat r) -{ - SIG( "glTexCoord3f" ); - dllTexCoord3f( s, t, r ); -} -static void APIENTRY logTexCoord3fv(const GLfloat *v) -{ - SIG( "glTexCoord3fv" ); - dllTexCoord3fv( v ); -} -static void APIENTRY logTexCoord3i(GLint s, GLint t, GLint r) -{ - SIG( "glTexCoord3i" ); - dllTexCoord3i( s, t, r ); -} -static void APIENTRY logTexCoord3iv(const GLint *v) -{ - SIG( "glTexCoord3iv" ); - dllTexCoord3iv( v ); -} -static void APIENTRY logTexCoord3s(GLshort s, GLshort t, GLshort r) -{ - SIG( "glTexCoord3s" ); - dllTexCoord3s( s, t, r ); -} -static void APIENTRY logTexCoord3sv(const GLshort *v) -{ - SIG( "glTexCoord3sv" ); - dllTexCoord3sv( v ); -} -static void APIENTRY logTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - SIG( "glTexCoord4d" ); - dllTexCoord4d( s, t, r, q ); -} -static void APIENTRY logTexCoord4dv(const GLdouble *v) -{ - SIG( "glTexCoord4dv" ); - dllTexCoord4dv( v ); -} -static void APIENTRY logTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - SIG( "glTexCoord4f" ); - dllTexCoord4f( s, t, r, q ); -} -static void APIENTRY logTexCoord4fv(const GLfloat *v) -{ - SIG( "glTexCoord4fv" ); - dllTexCoord4fv( v ); -} -static void APIENTRY logTexCoord4i(GLint s, GLint t, GLint r, GLint q) -{ - SIG( "glTexCoord4i" ); - dllTexCoord4i( s, t, r, q ); -} -static void APIENTRY logTexCoord4iv(const GLint *v) -{ - SIG( "glTexCoord4iv" ); - dllTexCoord4iv( v ); -} -static void APIENTRY logTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) -{ - SIG( "glTexCoord4s" ); - dllTexCoord4s( s, t, r, q ); -} -static void APIENTRY logTexCoord4sv(const GLshort *v) -{ - SIG( "glTexCoord4sv" ); - dllTexCoord4sv( v ); -} -static void APIENTRY logTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) -{ - fprintf( glw_state.log_fp, "glTexCoordPointer( %d, %s, %d, MEM )\n", size, TypeToString( type ), stride ); - dllTexCoordPointer( size, type, stride, pointer ); -} - -static void APIENTRY logTexEnvf(GLenum target, GLenum pname, GLfloat param) -{ - fprintf( glw_state.log_fp, "glTexEnvf( 0x%x, 0x%x, %f )\n", target, pname, param ); - dllTexEnvf( target, pname, param ); -} - -static void APIENTRY logTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) -{ - SIG( "glTexEnvfv" ); - dllTexEnvfv( target, pname, params ); -} - -static void APIENTRY logTexEnvi(GLenum target, GLenum pname, GLint param) -{ - fprintf( glw_state.log_fp, "glTexEnvi( 0x%x, 0x%x, 0x%x )\n", target, pname, param ); - dllTexEnvi( target, pname, param ); -} -static void APIENTRY logTexEnviv(GLenum target, GLenum pname, const GLint *params) -{ - SIG( "glTexEnviv" ); - dllTexEnviv( target, pname, params ); -} - -static void APIENTRY logTexGend(GLenum coord, GLenum pname, GLdouble param) -{ - SIG( "glTexGend" ); - dllTexGend( coord, pname, param ); -} - -static void APIENTRY logTexGendv(GLenum coord, GLenum pname, const GLdouble *params) -{ - SIG( "glTexGendv" ); - dllTexGendv( coord, pname, params ); -} - -static void APIENTRY logTexGenf(GLenum coord, GLenum pname, GLfloat param) -{ - SIG( "glTexGenf" ); - dllTexGenf( coord, pname, param ); -} -static void APIENTRY logTexGenfv(GLenum coord, GLenum pname, const GLfloat *params) -{ - SIG( "glTexGenfv" ); - dllTexGenfv( coord, pname, params ); -} -static void APIENTRY logTexGeni(GLenum coord, GLenum pname, GLint param) -{ - SIG( "glTexGeni" ); - dllTexGeni( coord, pname, param ); -} -static void APIENTRY logTexGeniv(GLenum coord, GLenum pname, const GLint *params) -{ - SIG( "glTexGeniv" ); - dllTexGeniv( coord, pname, params ); -} -static void APIENTRY logTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexImage1D" ); - dllTexImage1D( target, level, internalformat, width, border, format, type, pixels ); -} -static void APIENTRY logTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexImage2D" ); - dllTexImage2D( target, level, internalformat, width, height, border, format, type, pixels ); -} - -static void APIENTRY logTexParameterf(GLenum target, GLenum pname, GLfloat param) -{ - fprintf( glw_state.log_fp, "glTexParameterf( 0x%x, 0x%x, %f )\n", target, pname, param ); - dllTexParameterf( target, pname, param ); -} - -static void APIENTRY logTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - SIG( "glTexParameterfv" ); - dllTexParameterfv( target, pname, params ); -} -static void APIENTRY logTexParameteri(GLenum target, GLenum pname, GLint param) -{ - fprintf( glw_state.log_fp, "glTexParameteri( 0x%x, 0x%x, 0x%x )\n", target, pname, param ); - dllTexParameteri( target, pname, param ); -} -static void APIENTRY logTexParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - SIG( "glTexParameteriv" ); - dllTexParameteriv( target, pname, params ); -} -static void APIENTRY logTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexSubImage1D" ); - dllTexSubImage1D( target, level, xoffset, width, format, type, pixels ); -} -static void APIENTRY logTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels) -{ - SIG( "glTexSubImage2D" ); - dllTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels ); -} -static void APIENTRY logTranslated(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glTranslated" ); - dllTranslated( x, y, z ); -} - -static void APIENTRY logTranslatef(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glTranslatef" ); - dllTranslatef( x, y, z ); -} - -static void APIENTRY logVertex2d(GLdouble x, GLdouble y) -{ - SIG( "glVertex2d" ); - dllVertex2d( x, y ); -} - -static void APIENTRY logVertex2dv(const GLdouble *v) -{ - SIG( "glVertex2dv" ); - dllVertex2dv( v ); -} -static void APIENTRY logVertex2f(GLfloat x, GLfloat y) -{ - SIG( "glVertex2f" ); - dllVertex2f( x, y ); -} -static void APIENTRY logVertex2fv(const GLfloat *v) -{ - SIG( "glVertex2fv" ); - dllVertex2fv( v ); -} -static void APIENTRY logVertex2i(GLint x, GLint y) -{ - SIG( "glVertex2i" ); - dllVertex2i( x, y ); -} -static void APIENTRY logVertex2iv(const GLint *v) -{ - SIG( "glVertex2iv" ); - dllVertex2iv( v ); -} -static void APIENTRY logVertex2s(GLshort x, GLshort y) -{ - SIG( "glVertex2s" ); - dllVertex2s( x, y ); -} -static void APIENTRY logVertex2sv(const GLshort *v) -{ - SIG( "glVertex2sv" ); - dllVertex2sv( v ); -} -static void APIENTRY logVertex3d(GLdouble x, GLdouble y, GLdouble z) -{ - SIG( "glVertex3d" ); - dllVertex3d( x, y, z ); -} -static void APIENTRY logVertex3dv(const GLdouble *v) -{ - SIG( "glVertex3dv" ); - dllVertex3dv( v ); -} -static void APIENTRY logVertex3f(GLfloat x, GLfloat y, GLfloat z) -{ - SIG( "glVertex3f" ); - dllVertex3f( x, y, z ); -} -static void APIENTRY logVertex3fv(const GLfloat *v) -{ - SIG( "glVertex3fv" ); - dllVertex3fv( v ); -} -static void APIENTRY logVertex3i(GLint x, GLint y, GLint z) -{ - SIG( "glVertex3i" ); - dllVertex3i( x, y, z ); -} -static void APIENTRY logVertex3iv(const GLint *v) -{ - SIG( "glVertex3iv" ); - dllVertex3iv( v ); -} -static void APIENTRY logVertex3s(GLshort x, GLshort y, GLshort z) -{ - SIG( "glVertex3s" ); - dllVertex3s( x, y, z ); -} -static void APIENTRY logVertex3sv(const GLshort *v) -{ - SIG( "glVertex3sv" ); - dllVertex3sv( v ); -} -static void APIENTRY logVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - SIG( "glVertex4d" ); - dllVertex4d( x, y, z, w ); -} -static void APIENTRY logVertex4dv(const GLdouble *v) -{ - SIG( "glVertex4dv" ); - dllVertex4dv( v ); -} -static void APIENTRY logVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - SIG( "glVertex4f" ); - dllVertex4f( x, y, z, w ); -} -static void APIENTRY logVertex4fv(const GLfloat *v) -{ - SIG( "glVertex4fv" ); - dllVertex4fv( v ); -} -static void APIENTRY logVertex4i(GLint x, GLint y, GLint z, GLint w) -{ - SIG( "glVertex4i" ); - dllVertex4i( x, y, z, w ); -} -static void APIENTRY logVertex4iv(const GLint *v) -{ - SIG( "glVertex4iv" ); - dllVertex4iv( v ); -} -static void APIENTRY logVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - SIG( "glVertex4s" ); - dllVertex4s( x, y, z, w ); -} -static void APIENTRY logVertex4sv(const GLshort *v) -{ - SIG( "glVertex4sv" ); - dllVertex4sv( v ); -} -static void APIENTRY logVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) -{ - fprintf( glw_state.log_fp, "glVertexPointer( %d, %s, %d, MEM )\n", size, TypeToString( type ), stride ); - dllVertexPointer( size, type, stride, pointer ); -} -static void APIENTRY logViewport(GLint x, GLint y, GLsizei width, GLsizei height) -{ - fprintf( glw_state.log_fp, "glViewport( %d, %d, %d, %d )\n", x, y, width, height ); - dllViewport( x, y, width, height ); -} - -/* -** QGL_Shutdown -** -** Unloads the specified DLL then nulls out all the proc pointers. This -** is only called during a hard shutdown of the OGL subsystem (e.g. vid_restart). -*/ -void QGL_Shutdown( void ) -{ - ri.Printf( PRINT_ALL, "...shutting down QGL\n" ); - - if ( glw_state.hinstOpenGL ) - { - ri.Printf( PRINT_ALL, "...unloading OpenGL DLL\n" ); - FreeLibrary( glw_state.hinstOpenGL ); - } - - glw_state.hinstOpenGL = NULL; - - qglAccum = NULL; - qglAlphaFunc = NULL; - qglAreTexturesResident = NULL; - qglArrayElement = NULL; - qglBegin = NULL; - qglBindTexture = NULL; - qglBitmap = NULL; - qglBlendFunc = NULL; - qglCallList = NULL; - qglCallLists = NULL; - qglClear = NULL; - qglClearAccum = NULL; - qglClearColor = NULL; - qglClearDepth = NULL; - qglClearIndex = NULL; - qglClearStencil = NULL; - qglClipPlane = NULL; - qglColor3b = NULL; - qglColor3bv = NULL; - qglColor3d = NULL; - qglColor3dv = NULL; - qglColor3f = NULL; - qglColor3fv = NULL; - qglColor3i = NULL; - qglColor3iv = NULL; - qglColor3s = NULL; - qglColor3sv = NULL; - qglColor3ub = NULL; - qglColor3ubv = NULL; - qglColor3ui = NULL; - qglColor3uiv = NULL; - qglColor3us = NULL; - qglColor3usv = NULL; - qglColor4b = NULL; - qglColor4bv = NULL; - qglColor4d = NULL; - qglColor4dv = NULL; - qglColor4f = NULL; - qglColor4fv = NULL; - qglColor4i = NULL; - qglColor4iv = NULL; - qglColor4s = NULL; - qglColor4sv = NULL; - qglColor4ub = NULL; - qglColor4ubv = NULL; - qglColor4ui = NULL; - qglColor4uiv = NULL; - qglColor4us = NULL; - qglColor4usv = NULL; - qglColorMask = NULL; - qglColorMaterial = NULL; - qglColorPointer = NULL; - qglCopyPixels = NULL; - qglCopyTexImage1D = NULL; - qglCopyTexImage2D = NULL; - qglCopyTexSubImage1D = NULL; - qglCopyTexSubImage2D = NULL; - qglCullFace = NULL; - qglDeleteLists = NULL; - qglDeleteTextures = NULL; - qglDepthFunc = NULL; - qglDepthMask = NULL; - qglDepthRange = NULL; - qglDisable = NULL; - qglDisableClientState = NULL; - qglDrawArrays = NULL; - qglDrawBuffer = NULL; - qglDrawElements = NULL; - qglDrawPixels = NULL; - qglEdgeFlag = NULL; - qglEdgeFlagPointer = NULL; - qglEdgeFlagv = NULL; - qglEnable = NULL; - qglEnableClientState = NULL; - qglEnd = NULL; - qglEndList = NULL; - qglEvalCoord1d = NULL; - qglEvalCoord1dv = NULL; - qglEvalCoord1f = NULL; - qglEvalCoord1fv = NULL; - qglEvalCoord2d = NULL; - qglEvalCoord2dv = NULL; - qglEvalCoord2f = NULL; - qglEvalCoord2fv = NULL; - qglEvalMesh1 = NULL; - qglEvalMesh2 = NULL; - qglEvalPoint1 = NULL; - qglEvalPoint2 = NULL; - qglFeedbackBuffer = NULL; - qglFinish = NULL; - qglFlush = NULL; - qglFogf = NULL; - qglFogfv = NULL; - qglFogi = NULL; - qglFogiv = NULL; - qglFrontFace = NULL; - qglFrustum = NULL; - qglGenLists = NULL; - qglGenTextures = NULL; - qglGetBooleanv = NULL; - qglGetClipPlane = NULL; - qglGetDoublev = NULL; - qglGetError = NULL; - qglGetFloatv = NULL; - qglGetIntegerv = NULL; - qglGetLightfv = NULL; - qglGetLightiv = NULL; - qglGetMapdv = NULL; - qglGetMapfv = NULL; - qglGetMapiv = NULL; - qglGetMaterialfv = NULL; - qglGetMaterialiv = NULL; - qglGetPixelMapfv = NULL; - qglGetPixelMapuiv = NULL; - qglGetPixelMapusv = NULL; - qglGetPointerv = NULL; - qglGetPolygonStipple = NULL; - qglGetString = NULL; - qglGetTexEnvfv = NULL; - qglGetTexEnviv = NULL; - qglGetTexGendv = NULL; - qglGetTexGenfv = NULL; - qglGetTexGeniv = NULL; - qglGetTexImage = NULL; - qglGetTexLevelParameterfv = NULL; - qglGetTexLevelParameteriv = NULL; - qglGetTexParameterfv = NULL; - qglGetTexParameteriv = NULL; - qglHint = NULL; - qglIndexMask = NULL; - qglIndexPointer = NULL; - qglIndexd = NULL; - qglIndexdv = NULL; - qglIndexf = NULL; - qglIndexfv = NULL; - qglIndexi = NULL; - qglIndexiv = NULL; - qglIndexs = NULL; - qglIndexsv = NULL; - qglIndexub = NULL; - qglIndexubv = NULL; - qglInitNames = NULL; - qglInterleavedArrays = NULL; - qglIsEnabled = NULL; - qglIsList = NULL; - qglIsTexture = NULL; - qglLightModelf = NULL; - qglLightModelfv = NULL; - qglLightModeli = NULL; - qglLightModeliv = NULL; - qglLightf = NULL; - qglLightfv = NULL; - qglLighti = NULL; - qglLightiv = NULL; - qglLineStipple = NULL; - qglLineWidth = NULL; - qglListBase = NULL; - qglLoadIdentity = NULL; - qglLoadMatrixd = NULL; - qglLoadMatrixf = NULL; - qglLoadName = NULL; - qglLogicOp = NULL; - qglMap1d = NULL; - qglMap1f = NULL; - qglMap2d = NULL; - qglMap2f = NULL; - qglMapGrid1d = NULL; - qglMapGrid1f = NULL; - qglMapGrid2d = NULL; - qglMapGrid2f = NULL; - qglMaterialf = NULL; - qglMaterialfv = NULL; - qglMateriali = NULL; - qglMaterialiv = NULL; - qglMatrixMode = NULL; - qglMultMatrixd = NULL; - qglMultMatrixf = NULL; - qglNewList = NULL; - qglNormal3b = NULL; - qglNormal3bv = NULL; - qglNormal3d = NULL; - qglNormal3dv = NULL; - qglNormal3f = NULL; - qglNormal3fv = NULL; - qglNormal3i = NULL; - qglNormal3iv = NULL; - qglNormal3s = NULL; - qglNormal3sv = NULL; - qglNormalPointer = NULL; - qglOrtho = NULL; - qglPassThrough = NULL; - qglPixelMapfv = NULL; - qglPixelMapuiv = NULL; - qglPixelMapusv = NULL; - qglPixelStoref = NULL; - qglPixelStorei = NULL; - qglPixelTransferf = NULL; - qglPixelTransferi = NULL; - qglPixelZoom = NULL; - qglPointSize = NULL; - qglPolygonMode = NULL; - qglPolygonOffset = NULL; - qglPolygonStipple = NULL; - qglPopAttrib = NULL; - qglPopClientAttrib = NULL; - qglPopMatrix = NULL; - qglPopName = NULL; - qglPrioritizeTextures = NULL; - qglPushAttrib = NULL; - qglPushClientAttrib = NULL; - qglPushMatrix = NULL; - qglPushName = NULL; - qglRasterPos2d = NULL; - qglRasterPos2dv = NULL; - qglRasterPos2f = NULL; - qglRasterPos2fv = NULL; - qglRasterPos2i = NULL; - qglRasterPos2iv = NULL; - qglRasterPos2s = NULL; - qglRasterPos2sv = NULL; - qglRasterPos3d = NULL; - qglRasterPos3dv = NULL; - qglRasterPos3f = NULL; - qglRasterPos3fv = NULL; - qglRasterPos3i = NULL; - qglRasterPos3iv = NULL; - qglRasterPos3s = NULL; - qglRasterPos3sv = NULL; - qglRasterPos4d = NULL; - qglRasterPos4dv = NULL; - qglRasterPos4f = NULL; - qglRasterPos4fv = NULL; - qglRasterPos4i = NULL; - qglRasterPos4iv = NULL; - qglRasterPos4s = NULL; - qglRasterPos4sv = NULL; - qglReadBuffer = NULL; - qglReadPixels = NULL; - qglRectd = NULL; - qglRectdv = NULL; - qglRectf = NULL; - qglRectfv = NULL; - qglRecti = NULL; - qglRectiv = NULL; - qglRects = NULL; - qglRectsv = NULL; - qglRenderMode = NULL; - qglRotated = NULL; - qglRotatef = NULL; - qglScaled = NULL; - qglScalef = NULL; - qglScissor = NULL; - qglSelectBuffer = NULL; - qglShadeModel = NULL; - qglStencilFunc = NULL; - qglStencilMask = NULL; - qglStencilOp = NULL; - qglTexCoord1d = NULL; - qglTexCoord1dv = NULL; - qglTexCoord1f = NULL; - qglTexCoord1fv = NULL; - qglTexCoord1i = NULL; - qglTexCoord1iv = NULL; - qglTexCoord1s = NULL; - qglTexCoord1sv = NULL; - qglTexCoord2d = NULL; - qglTexCoord2dv = NULL; - qglTexCoord2f = NULL; - qglTexCoord2fv = NULL; - qglTexCoord2i = NULL; - qglTexCoord2iv = NULL; - qglTexCoord2s = NULL; - qglTexCoord2sv = NULL; - qglTexCoord3d = NULL; - qglTexCoord3dv = NULL; - qglTexCoord3f = NULL; - qglTexCoord3fv = NULL; - qglTexCoord3i = NULL; - qglTexCoord3iv = NULL; - qglTexCoord3s = NULL; - qglTexCoord3sv = NULL; - qglTexCoord4d = NULL; - qglTexCoord4dv = NULL; - qglTexCoord4f = NULL; - qglTexCoord4fv = NULL; - qglTexCoord4i = NULL; - qglTexCoord4iv = NULL; - qglTexCoord4s = NULL; - qglTexCoord4sv = NULL; - qglTexCoordPointer = NULL; - qglTexEnvf = NULL; - qglTexEnvfv = NULL; - qglTexEnvi = NULL; - qglTexEnviv = NULL; - qglTexGend = NULL; - qglTexGendv = NULL; - qglTexGenf = NULL; - qglTexGenfv = NULL; - qglTexGeni = NULL; - qglTexGeniv = NULL; - qglTexImage1D = NULL; - qglTexImage2D = NULL; - qglTexParameterf = NULL; - qglTexParameterfv = NULL; - qglTexParameteri = NULL; - qglTexParameteriv = NULL; - qglTexSubImage1D = NULL; - qglTexSubImage2D = NULL; - qglTranslated = NULL; - qglTranslatef = NULL; - qglVertex2d = NULL; - qglVertex2dv = NULL; - qglVertex2f = NULL; - qglVertex2fv = NULL; - qglVertex2i = NULL; - qglVertex2iv = NULL; - qglVertex2s = NULL; - qglVertex2sv = NULL; - qglVertex3d = NULL; - qglVertex3dv = NULL; - qglVertex3f = NULL; - qglVertex3fv = NULL; - qglVertex3i = NULL; - qglVertex3iv = NULL; - qglVertex3s = NULL; - qglVertex3sv = NULL; - qglVertex4d = NULL; - qglVertex4dv = NULL; - qglVertex4f = NULL; - qglVertex4fv = NULL; - qglVertex4i = NULL; - qglVertex4iv = NULL; - qglVertex4s = NULL; - qglVertex4sv = NULL; - qglVertexPointer = NULL; - qglViewport = NULL; - - qwglCopyContext = NULL; - qwglCreateContext = NULL; - qwglCreateLayerContext = NULL; - qwglDeleteContext = NULL; - qwglDescribeLayerPlane = NULL; - qwglGetCurrentContext = NULL; - qwglGetCurrentDC = NULL; - qwglGetLayerPaletteEntries = NULL; - qwglGetProcAddress = NULL; - qwglMakeCurrent = NULL; - qwglRealizeLayerPalette = NULL; - qwglSetLayerPaletteEntries = NULL; - qwglShareLists = NULL; - qwglSwapLayerBuffers = NULL; - qwglUseFontBitmaps = NULL; - qwglUseFontOutlines = NULL; - - qwglChoosePixelFormat = NULL; - qwglDescribePixelFormat = NULL; - qwglGetPixelFormat = NULL; - qwglSetPixelFormat = NULL; - qwglSwapBuffers = NULL; -} - -#define GR_NUM_BOARDS 0x0f - -static qboolean GlideIsValid( void ) -{ - HMODULE hGlide; -// int numBoards; -// void (__stdcall *grGet)(unsigned int, unsigned int, int*); - - if ( ( hGlide = LoadLibrary("Glide3X") ) != 0 ) - { - // FIXME: 3Dfx needs to fix this shit - return qtrue; - -#if 0 - grGet = (void *)GetProcAddress( hGlide, "_grGet@12"); - - if ( grGet ) - { - grGet( GR_NUM_BOARDS, sizeof(int), &numBoards); - } - else - { - // if we've reached this point, something is seriously wrong - ri.Printf( PRINT_WARNING, "WARNING: could not find grGet in GLIDE3X.DLL\n" ); - numBoards = 0; - } - - FreeLibrary( hGlide ); - hGlide = NULL; - - if ( numBoards > 0 ) - { - return qtrue; - } - - ri.Printf( PRINT_WARNING, "WARNING: invalid Glide installation!\n" ); -#endif - } - - return qfalse; -} - -#ifdef _MSC_VER -# pragma warning (disable : 4113 4133 4047 ) -# define GPA( a ) GetProcAddress( glw_state.hinstOpenGL, a ) -#else -# define GPA( a ) (void *)GetProcAddress( glw_state.hinstOpenGL, a ) -#endif - -/* -** QGL_Init -** -** This is responsible for binding our qgl function pointers to -** the appropriate GL stuff. In Windows this means doing a -** LoadLibrary and a bunch of calls to GetProcAddress. On other -** operating systems we need to do the right thing, whatever that -** might be. -*/ -qboolean QGL_Init( const char *dllname ) -{ - char systemDir[1024]; - char libName[1024]; - - GetSystemDirectory( systemDir, sizeof( systemDir ) ); - - assert( glw_state.hinstOpenGL == 0 ); - - ri.Printf( PRINT_ALL, "...initializing QGL\n" ); - - // NOTE: this assumes that 'dllname' is lower case (and it should be)! - if ( strstr( dllname, _3DFX_DRIVER_NAME ) ) - { - if ( !GlideIsValid() ) - { - ri.Printf( PRINT_ALL, "...WARNING: missing Glide installation, assuming no 3Dfx available\n" ); - return qfalse; - } - } - - if ( dllname[0] != '!' ) - { - Com_sprintf( libName, sizeof( libName ), "%s\\%s", systemDir, dllname ); - } - else - { - Q_strncpyz( libName, dllname, sizeof( libName ) ); - } - - ri.Printf( PRINT_ALL, "...calling LoadLibrary( '%s.dll' ): ", libName ); - - if ( ( glw_state.hinstOpenGL = LoadLibrary( dllname ) ) == 0 ) - { - ri.Printf( PRINT_ALL, "failed\n" ); - return qfalse; - } - ri.Printf( PRINT_ALL, "succeeded\n" ); - - qglAccum = dllAccum = GPA( "glAccum" ); - qglAlphaFunc = dllAlphaFunc = GPA( "glAlphaFunc" ); - qglAreTexturesResident = dllAreTexturesResident = GPA( "glAreTexturesResident" ); - qglArrayElement = dllArrayElement = GPA( "glArrayElement" ); - qglBegin = dllBegin = GPA( "glBegin" ); - qglBindTexture = dllBindTexture = GPA( "glBindTexture" ); - qglBitmap = dllBitmap = GPA( "glBitmap" ); - qglBlendFunc = dllBlendFunc = GPA( "glBlendFunc" ); - qglCallList = dllCallList = GPA( "glCallList" ); - qglCallLists = dllCallLists = GPA( "glCallLists" ); - qglClear = dllClear = GPA( "glClear" ); - qglClearAccum = dllClearAccum = GPA( "glClearAccum" ); - qglClearColor = dllClearColor = GPA( "glClearColor" ); - qglClearDepth = dllClearDepth = GPA( "glClearDepth" ); - qglClearIndex = dllClearIndex = GPA( "glClearIndex" ); - qglClearStencil = dllClearStencil = GPA( "glClearStencil" ); - qglClipPlane = dllClipPlane = GPA( "glClipPlane" ); - qglColor3b = dllColor3b = GPA( "glColor3b" ); - qglColor3bv = dllColor3bv = GPA( "glColor3bv" ); - qglColor3d = dllColor3d = GPA( "glColor3d" ); - qglColor3dv = dllColor3dv = GPA( "glColor3dv" ); - qglColor3f = dllColor3f = GPA( "glColor3f" ); - qglColor3fv = dllColor3fv = GPA( "glColor3fv" ); - qglColor3i = dllColor3i = GPA( "glColor3i" ); - qglColor3iv = dllColor3iv = GPA( "glColor3iv" ); - qglColor3s = dllColor3s = GPA( "glColor3s" ); - qglColor3sv = dllColor3sv = GPA( "glColor3sv" ); - qglColor3ub = dllColor3ub = GPA( "glColor3ub" ); - qglColor3ubv = dllColor3ubv = GPA( "glColor3ubv" ); - qglColor3ui = dllColor3ui = GPA( "glColor3ui" ); - qglColor3uiv = dllColor3uiv = GPA( "glColor3uiv" ); - qglColor3us = dllColor3us = GPA( "glColor3us" ); - qglColor3usv = dllColor3usv = GPA( "glColor3usv" ); - qglColor4b = dllColor4b = GPA( "glColor4b" ); - qglColor4bv = dllColor4bv = GPA( "glColor4bv" ); - qglColor4d = dllColor4d = GPA( "glColor4d" ); - qglColor4dv = dllColor4dv = GPA( "glColor4dv" ); - qglColor4f = dllColor4f = GPA( "glColor4f" ); - qglColor4fv = dllColor4fv = GPA( "glColor4fv" ); - qglColor4i = dllColor4i = GPA( "glColor4i" ); - qglColor4iv = dllColor4iv = GPA( "glColor4iv" ); - qglColor4s = dllColor4s = GPA( "glColor4s" ); - qglColor4sv = dllColor4sv = GPA( "glColor4sv" ); - qglColor4ub = dllColor4ub = GPA( "glColor4ub" ); - qglColor4ubv = dllColor4ubv = GPA( "glColor4ubv" ); - qglColor4ui = dllColor4ui = GPA( "glColor4ui" ); - qglColor4uiv = dllColor4uiv = GPA( "glColor4uiv" ); - qglColor4us = dllColor4us = GPA( "glColor4us" ); - qglColor4usv = dllColor4usv = GPA( "glColor4usv" ); - qglColorMask = dllColorMask = GPA( "glColorMask" ); - qglColorMaterial = dllColorMaterial = GPA( "glColorMaterial" ); - qglColorPointer = dllColorPointer = GPA( "glColorPointer" ); - qglCopyPixels = dllCopyPixels = GPA( "glCopyPixels" ); - qglCopyTexImage1D = dllCopyTexImage1D = GPA( "glCopyTexImage1D" ); - qglCopyTexImage2D = dllCopyTexImage2D = GPA( "glCopyTexImage2D" ); - qglCopyTexSubImage1D = dllCopyTexSubImage1D = GPA( "glCopyTexSubImage1D" ); - qglCopyTexSubImage2D = dllCopyTexSubImage2D = GPA( "glCopyTexSubImage2D" ); - qglCullFace = dllCullFace = GPA( "glCullFace" ); - qglDeleteLists = dllDeleteLists = GPA( "glDeleteLists" ); - qglDeleteTextures = dllDeleteTextures = GPA( "glDeleteTextures" ); - qglDepthFunc = dllDepthFunc = GPA( "glDepthFunc" ); - qglDepthMask = dllDepthMask = GPA( "glDepthMask" ); - qglDepthRange = dllDepthRange = GPA( "glDepthRange" ); - qglDisable = dllDisable = GPA( "glDisable" ); - qglDisableClientState = dllDisableClientState = GPA( "glDisableClientState" ); - qglDrawArrays = dllDrawArrays = GPA( "glDrawArrays" ); - qglDrawBuffer = dllDrawBuffer = GPA( "glDrawBuffer" ); - qglDrawElements = dllDrawElements = GPA( "glDrawElements" ); - qglDrawPixels = dllDrawPixels = GPA( "glDrawPixels" ); - qglEdgeFlag = dllEdgeFlag = GPA( "glEdgeFlag" ); - qglEdgeFlagPointer = dllEdgeFlagPointer = GPA( "glEdgeFlagPointer" ); - qglEdgeFlagv = dllEdgeFlagv = GPA( "glEdgeFlagv" ); - qglEnable = dllEnable = GPA( "glEnable" ); - qglEnableClientState = dllEnableClientState = GPA( "glEnableClientState" ); - qglEnd = dllEnd = GPA( "glEnd" ); - qglEndList = dllEndList = GPA( "glEndList" ); - qglEvalCoord1d = dllEvalCoord1d = GPA( "glEvalCoord1d" ); - qglEvalCoord1dv = dllEvalCoord1dv = GPA( "glEvalCoord1dv" ); - qglEvalCoord1f = dllEvalCoord1f = GPA( "glEvalCoord1f" ); - qglEvalCoord1fv = dllEvalCoord1fv = GPA( "glEvalCoord1fv" ); - qglEvalCoord2d = dllEvalCoord2d = GPA( "glEvalCoord2d" ); - qglEvalCoord2dv = dllEvalCoord2dv = GPA( "glEvalCoord2dv" ); - qglEvalCoord2f = dllEvalCoord2f = GPA( "glEvalCoord2f" ); - qglEvalCoord2fv = dllEvalCoord2fv = GPA( "glEvalCoord2fv" ); - qglEvalMesh1 = dllEvalMesh1 = GPA( "glEvalMesh1" ); - qglEvalMesh2 = dllEvalMesh2 = GPA( "glEvalMesh2" ); - qglEvalPoint1 = dllEvalPoint1 = GPA( "glEvalPoint1" ); - qglEvalPoint2 = dllEvalPoint2 = GPA( "glEvalPoint2" ); - qglFeedbackBuffer = dllFeedbackBuffer = GPA( "glFeedbackBuffer" ); - qglFinish = dllFinish = GPA( "glFinish" ); - qglFlush = dllFlush = GPA( "glFlush" ); - qglFogf = dllFogf = GPA( "glFogf" ); - qglFogfv = dllFogfv = GPA( "glFogfv" ); - qglFogi = dllFogi = GPA( "glFogi" ); - qglFogiv = dllFogiv = GPA( "glFogiv" ); - qglFrontFace = dllFrontFace = GPA( "glFrontFace" ); - qglFrustum = dllFrustum = GPA( "glFrustum" ); - qglGenLists = dllGenLists = ( GLuint (__stdcall * )(int) ) GPA( "glGenLists" ); - qglGenTextures = dllGenTextures = GPA( "glGenTextures" ); - qglGetBooleanv = dllGetBooleanv = GPA( "glGetBooleanv" ); - qglGetClipPlane = dllGetClipPlane = GPA( "glGetClipPlane" ); - qglGetDoublev = dllGetDoublev = GPA( "glGetDoublev" ); - qglGetError = dllGetError = ( GLenum (__stdcall * )(void) ) GPA( "glGetError" ); - qglGetFloatv = dllGetFloatv = GPA( "glGetFloatv" ); - qglGetIntegerv = dllGetIntegerv = GPA( "glGetIntegerv" ); - qglGetLightfv = dllGetLightfv = GPA( "glGetLightfv" ); - qglGetLightiv = dllGetLightiv = GPA( "glGetLightiv" ); - qglGetMapdv = dllGetMapdv = GPA( "glGetMapdv" ); - qglGetMapfv = dllGetMapfv = GPA( "glGetMapfv" ); - qglGetMapiv = dllGetMapiv = GPA( "glGetMapiv" ); - qglGetMaterialfv = dllGetMaterialfv = GPA( "glGetMaterialfv" ); - qglGetMaterialiv = dllGetMaterialiv = GPA( "glGetMaterialiv" ); - qglGetPixelMapfv = dllGetPixelMapfv = GPA( "glGetPixelMapfv" ); - qglGetPixelMapuiv = dllGetPixelMapuiv = GPA( "glGetPixelMapuiv" ); - qglGetPixelMapusv = dllGetPixelMapusv = GPA( "glGetPixelMapusv" ); - qglGetPointerv = dllGetPointerv = GPA( "glGetPointerv" ); - qglGetPolygonStipple = dllGetPolygonStipple = GPA( "glGetPolygonStipple" ); - qglGetString = dllGetString = GPA( "glGetString" ); - qglGetTexEnvfv = dllGetTexEnvfv = GPA( "glGetTexEnvfv" ); - qglGetTexEnviv = dllGetTexEnviv = GPA( "glGetTexEnviv" ); - qglGetTexGendv = dllGetTexGendv = GPA( "glGetTexGendv" ); - qglGetTexGenfv = dllGetTexGenfv = GPA( "glGetTexGenfv" ); - qglGetTexGeniv = dllGetTexGeniv = GPA( "glGetTexGeniv" ); - qglGetTexImage = dllGetTexImage = GPA( "glGetTexImage" ); - qglGetTexParameterfv = dllGetTexParameterfv = GPA( "glGetTexParameterfv" ); - qglGetTexParameteriv = dllGetTexParameteriv = GPA( "glGetTexParameteriv" ); - qglHint = dllHint = GPA( "glHint" ); - qglIndexMask = dllIndexMask = GPA( "glIndexMask" ); - qglIndexPointer = dllIndexPointer = GPA( "glIndexPointer" ); - qglIndexd = dllIndexd = GPA( "glIndexd" ); - qglIndexdv = dllIndexdv = GPA( "glIndexdv" ); - qglIndexf = dllIndexf = GPA( "glIndexf" ); - qglIndexfv = dllIndexfv = GPA( "glIndexfv" ); - qglIndexi = dllIndexi = GPA( "glIndexi" ); - qglIndexiv = dllIndexiv = GPA( "glIndexiv" ); - qglIndexs = dllIndexs = GPA( "glIndexs" ); - qglIndexsv = dllIndexsv = GPA( "glIndexsv" ); - qglIndexub = dllIndexub = GPA( "glIndexub" ); - qglIndexubv = dllIndexubv = GPA( "glIndexubv" ); - qglInitNames = dllInitNames = GPA( "glInitNames" ); - qglInterleavedArrays = dllInterleavedArrays = GPA( "glInterleavedArrays" ); - qglIsEnabled = dllIsEnabled = GPA( "glIsEnabled" ); - qglIsList = dllIsList = GPA( "glIsList" ); - qglIsTexture = dllIsTexture = GPA( "glIsTexture" ); - qglLightModelf = dllLightModelf = GPA( "glLightModelf" ); - qglLightModelfv = dllLightModelfv = GPA( "glLightModelfv" ); - qglLightModeli = dllLightModeli = GPA( "glLightModeli" ); - qglLightModeliv = dllLightModeliv = GPA( "glLightModeliv" ); - qglLightf = dllLightf = GPA( "glLightf" ); - qglLightfv = dllLightfv = GPA( "glLightfv" ); - qglLighti = dllLighti = GPA( "glLighti" ); - qglLightiv = dllLightiv = GPA( "glLightiv" ); - qglLineStipple = dllLineStipple = GPA( "glLineStipple" ); - qglLineWidth = dllLineWidth = GPA( "glLineWidth" ); - qglListBase = dllListBase = GPA( "glListBase" ); - qglLoadIdentity = dllLoadIdentity = GPA( "glLoadIdentity" ); - qglLoadMatrixd = dllLoadMatrixd = GPA( "glLoadMatrixd" ); - qglLoadMatrixf = dllLoadMatrixf = GPA( "glLoadMatrixf" ); - qglLoadName = dllLoadName = GPA( "glLoadName" ); - qglLogicOp = dllLogicOp = GPA( "glLogicOp" ); - qglMap1d = dllMap1d = GPA( "glMap1d" ); - qglMap1f = dllMap1f = GPA( "glMap1f" ); - qglMap2d = dllMap2d = GPA( "glMap2d" ); - qglMap2f = dllMap2f = GPA( "glMap2f" ); - qglMapGrid1d = dllMapGrid1d = GPA( "glMapGrid1d" ); - qglMapGrid1f = dllMapGrid1f = GPA( "glMapGrid1f" ); - qglMapGrid2d = dllMapGrid2d = GPA( "glMapGrid2d" ); - qglMapGrid2f = dllMapGrid2f = GPA( "glMapGrid2f" ); - qglMaterialf = dllMaterialf = GPA( "glMaterialf" ); - qglMaterialfv = dllMaterialfv = GPA( "glMaterialfv" ); - qglMateriali = dllMateriali = GPA( "glMateriali" ); - qglMaterialiv = dllMaterialiv = GPA( "glMaterialiv" ); - qglMatrixMode = dllMatrixMode = GPA( "glMatrixMode" ); - qglMultMatrixd = dllMultMatrixd = GPA( "glMultMatrixd" ); - qglMultMatrixf = dllMultMatrixf = GPA( "glMultMatrixf" ); - qglNewList = dllNewList = GPA( "glNewList" ); - qglNormal3b = dllNormal3b = GPA( "glNormal3b" ); - qglNormal3bv = dllNormal3bv = GPA( "glNormal3bv" ); - qglNormal3d = dllNormal3d = GPA( "glNormal3d" ); - qglNormal3dv = dllNormal3dv = GPA( "glNormal3dv" ); - qglNormal3f = dllNormal3f = GPA( "glNormal3f" ); - qglNormal3fv = dllNormal3fv = GPA( "glNormal3fv" ); - qglNormal3i = dllNormal3i = GPA( "glNormal3i" ); - qglNormal3iv = dllNormal3iv = GPA( "glNormal3iv" ); - qglNormal3s = dllNormal3s = GPA( "glNormal3s" ); - qglNormal3sv = dllNormal3sv = GPA( "glNormal3sv" ); - qglNormalPointer = dllNormalPointer = GPA( "glNormalPointer" ); - qglOrtho = dllOrtho = GPA( "glOrtho" ); - qglPassThrough = dllPassThrough = GPA( "glPassThrough" ); - qglPixelMapfv = dllPixelMapfv = GPA( "glPixelMapfv" ); - qglPixelMapuiv = dllPixelMapuiv = GPA( "glPixelMapuiv" ); - qglPixelMapusv = dllPixelMapusv = GPA( "glPixelMapusv" ); - qglPixelStoref = dllPixelStoref = GPA( "glPixelStoref" ); - qglPixelStorei = dllPixelStorei = GPA( "glPixelStorei" ); - qglPixelTransferf = dllPixelTransferf = GPA( "glPixelTransferf" ); - qglPixelTransferi = dllPixelTransferi = GPA( "glPixelTransferi" ); - qglPixelZoom = dllPixelZoom = GPA( "glPixelZoom" ); - qglPointSize = dllPointSize = GPA( "glPointSize" ); - qglPolygonMode = dllPolygonMode = GPA( "glPolygonMode" ); - qglPolygonOffset = dllPolygonOffset = GPA( "glPolygonOffset" ); - qglPolygonStipple = dllPolygonStipple = GPA( "glPolygonStipple" ); - qglPopAttrib = dllPopAttrib = GPA( "glPopAttrib" ); - qglPopClientAttrib = dllPopClientAttrib = GPA( "glPopClientAttrib" ); - qglPopMatrix = dllPopMatrix = GPA( "glPopMatrix" ); - qglPopName = dllPopName = GPA( "glPopName" ); - qglPrioritizeTextures = dllPrioritizeTextures = GPA( "glPrioritizeTextures" ); - qglPushAttrib = dllPushAttrib = GPA( "glPushAttrib" ); - qglPushClientAttrib = dllPushClientAttrib = GPA( "glPushClientAttrib" ); - qglPushMatrix = dllPushMatrix = GPA( "glPushMatrix" ); - qglPushName = dllPushName = GPA( "glPushName" ); - qglRasterPos2d = dllRasterPos2d = GPA( "glRasterPos2d" ); - qglRasterPos2dv = dllRasterPos2dv = GPA( "glRasterPos2dv" ); - qglRasterPos2f = dllRasterPos2f = GPA( "glRasterPos2f" ); - qglRasterPos2fv = dllRasterPos2fv = GPA( "glRasterPos2fv" ); - qglRasterPos2i = dllRasterPos2i = GPA( "glRasterPos2i" ); - qglRasterPos2iv = dllRasterPos2iv = GPA( "glRasterPos2iv" ); - qglRasterPos2s = dllRasterPos2s = GPA( "glRasterPos2s" ); - qglRasterPos2sv = dllRasterPos2sv = GPA( "glRasterPos2sv" ); - qglRasterPos3d = dllRasterPos3d = GPA( "glRasterPos3d" ); - qglRasterPos3dv = dllRasterPos3dv = GPA( "glRasterPos3dv" ); - qglRasterPos3f = dllRasterPos3f = GPA( "glRasterPos3f" ); - qglRasterPos3fv = dllRasterPos3fv = GPA( "glRasterPos3fv" ); - qglRasterPos3i = dllRasterPos3i = GPA( "glRasterPos3i" ); - qglRasterPos3iv = dllRasterPos3iv = GPA( "glRasterPos3iv" ); - qglRasterPos3s = dllRasterPos3s = GPA( "glRasterPos3s" ); - qglRasterPos3sv = dllRasterPos3sv = GPA( "glRasterPos3sv" ); - qglRasterPos4d = dllRasterPos4d = GPA( "glRasterPos4d" ); - qglRasterPos4dv = dllRasterPos4dv = GPA( "glRasterPos4dv" ); - qglRasterPos4f = dllRasterPos4f = GPA( "glRasterPos4f" ); - qglRasterPos4fv = dllRasterPos4fv = GPA( "glRasterPos4fv" ); - qglRasterPos4i = dllRasterPos4i = GPA( "glRasterPos4i" ); - qglRasterPos4iv = dllRasterPos4iv = GPA( "glRasterPos4iv" ); - qglRasterPos4s = dllRasterPos4s = GPA( "glRasterPos4s" ); - qglRasterPos4sv = dllRasterPos4sv = GPA( "glRasterPos4sv" ); - qglReadBuffer = dllReadBuffer = GPA( "glReadBuffer" ); - qglReadPixels = dllReadPixels = GPA( "glReadPixels" ); - qglRectd = dllRectd = GPA( "glRectd" ); - qglRectdv = dllRectdv = GPA( "glRectdv" ); - qglRectf = dllRectf = GPA( "glRectf" ); - qglRectfv = dllRectfv = GPA( "glRectfv" ); - qglRecti = dllRecti = GPA( "glRecti" ); - qglRectiv = dllRectiv = GPA( "glRectiv" ); - qglRects = dllRects = GPA( "glRects" ); - qglRectsv = dllRectsv = GPA( "glRectsv" ); - qglRenderMode = dllRenderMode = GPA( "glRenderMode" ); - qglRotated = dllRotated = GPA( "glRotated" ); - qglRotatef = dllRotatef = GPA( "glRotatef" ); - qglScaled = dllScaled = GPA( "glScaled" ); - qglScalef = dllScalef = GPA( "glScalef" ); - qglScissor = dllScissor = GPA( "glScissor" ); - qglSelectBuffer = dllSelectBuffer = GPA( "glSelectBuffer" ); - qglShadeModel = dllShadeModel = GPA( "glShadeModel" ); - qglStencilFunc = dllStencilFunc = GPA( "glStencilFunc" ); - qglStencilMask = dllStencilMask = GPA( "glStencilMask" ); - qglStencilOp = dllStencilOp = GPA( "glStencilOp" ); - qglTexCoord1d = dllTexCoord1d = GPA( "glTexCoord1d" ); - qglTexCoord1dv = dllTexCoord1dv = GPA( "glTexCoord1dv" ); - qglTexCoord1f = dllTexCoord1f = GPA( "glTexCoord1f" ); - qglTexCoord1fv = dllTexCoord1fv = GPA( "glTexCoord1fv" ); - qglTexCoord1i = dllTexCoord1i = GPA( "glTexCoord1i" ); - qglTexCoord1iv = dllTexCoord1iv = GPA( "glTexCoord1iv" ); - qglTexCoord1s = dllTexCoord1s = GPA( "glTexCoord1s" ); - qglTexCoord1sv = dllTexCoord1sv = GPA( "glTexCoord1sv" ); - qglTexCoord2d = dllTexCoord2d = GPA( "glTexCoord2d" ); - qglTexCoord2dv = dllTexCoord2dv = GPA( "glTexCoord2dv" ); - qglTexCoord2f = dllTexCoord2f = GPA( "glTexCoord2f" ); - qglTexCoord2fv = dllTexCoord2fv = GPA( "glTexCoord2fv" ); - qglTexCoord2i = dllTexCoord2i = GPA( "glTexCoord2i" ); - qglTexCoord2iv = dllTexCoord2iv = GPA( "glTexCoord2iv" ); - qglTexCoord2s = dllTexCoord2s = GPA( "glTexCoord2s" ); - qglTexCoord2sv = dllTexCoord2sv = GPA( "glTexCoord2sv" ); - qglTexCoord3d = dllTexCoord3d = GPA( "glTexCoord3d" ); - qglTexCoord3dv = dllTexCoord3dv = GPA( "glTexCoord3dv" ); - qglTexCoord3f = dllTexCoord3f = GPA( "glTexCoord3f" ); - qglTexCoord3fv = dllTexCoord3fv = GPA( "glTexCoord3fv" ); - qglTexCoord3i = dllTexCoord3i = GPA( "glTexCoord3i" ); - qglTexCoord3iv = dllTexCoord3iv = GPA( "glTexCoord3iv" ); - qglTexCoord3s = dllTexCoord3s = GPA( "glTexCoord3s" ); - qglTexCoord3sv = dllTexCoord3sv = GPA( "glTexCoord3sv" ); - qglTexCoord4d = dllTexCoord4d = GPA( "glTexCoord4d" ); - qglTexCoord4dv = dllTexCoord4dv = GPA( "glTexCoord4dv" ); - qglTexCoord4f = dllTexCoord4f = GPA( "glTexCoord4f" ); - qglTexCoord4fv = dllTexCoord4fv = GPA( "glTexCoord4fv" ); - qglTexCoord4i = dllTexCoord4i = GPA( "glTexCoord4i" ); - qglTexCoord4iv = dllTexCoord4iv = GPA( "glTexCoord4iv" ); - qglTexCoord4s = dllTexCoord4s = GPA( "glTexCoord4s" ); - qglTexCoord4sv = dllTexCoord4sv = GPA( "glTexCoord4sv" ); - qglTexCoordPointer = dllTexCoordPointer = GPA( "glTexCoordPointer" ); - qglTexEnvf = dllTexEnvf = GPA( "glTexEnvf" ); - qglTexEnvfv = dllTexEnvfv = GPA( "glTexEnvfv" ); - qglTexEnvi = dllTexEnvi = GPA( "glTexEnvi" ); - qglTexEnviv = dllTexEnviv = GPA( "glTexEnviv" ); - qglTexGend = dllTexGend = GPA( "glTexGend" ); - qglTexGendv = dllTexGendv = GPA( "glTexGendv" ); - qglTexGenf = dllTexGenf = GPA( "glTexGenf" ); - qglTexGenfv = dllTexGenfv = GPA( "glTexGenfv" ); - qglTexGeni = dllTexGeni = GPA( "glTexGeni" ); - qglTexGeniv = dllTexGeniv = GPA( "glTexGeniv" ); - qglTexImage1D = dllTexImage1D = GPA( "glTexImage1D" ); - qglTexImage2D = dllTexImage2D = GPA( "glTexImage2D" ); - qglTexParameterf = dllTexParameterf = GPA( "glTexParameterf" ); - qglTexParameterfv = dllTexParameterfv = GPA( "glTexParameterfv" ); - qglTexParameteri = dllTexParameteri = GPA( "glTexParameteri" ); - qglTexParameteriv = dllTexParameteriv = GPA( "glTexParameteriv" ); - qglTexSubImage1D = dllTexSubImage1D = GPA( "glTexSubImage1D" ); - qglTexSubImage2D = dllTexSubImage2D = GPA( "glTexSubImage2D" ); - qglTranslated = dllTranslated = GPA( "glTranslated" ); - qglTranslatef = dllTranslatef = GPA( "glTranslatef" ); - qglVertex2d = dllVertex2d = GPA( "glVertex2d" ); - qglVertex2dv = dllVertex2dv = GPA( "glVertex2dv" ); - qglVertex2f = dllVertex2f = GPA( "glVertex2f" ); - qglVertex2fv = dllVertex2fv = GPA( "glVertex2fv" ); - qglVertex2i = dllVertex2i = GPA( "glVertex2i" ); - qglVertex2iv = dllVertex2iv = GPA( "glVertex2iv" ); - qglVertex2s = dllVertex2s = GPA( "glVertex2s" ); - qglVertex2sv = dllVertex2sv = GPA( "glVertex2sv" ); - qglVertex3d = dllVertex3d = GPA( "glVertex3d" ); - qglVertex3dv = dllVertex3dv = GPA( "glVertex3dv" ); - qglVertex3f = dllVertex3f = GPA( "glVertex3f" ); - qglVertex3fv = dllVertex3fv = GPA( "glVertex3fv" ); - qglVertex3i = dllVertex3i = GPA( "glVertex3i" ); - qglVertex3iv = dllVertex3iv = GPA( "glVertex3iv" ); - qglVertex3s = dllVertex3s = GPA( "glVertex3s" ); - qglVertex3sv = dllVertex3sv = GPA( "glVertex3sv" ); - qglVertex4d = dllVertex4d = GPA( "glVertex4d" ); - qglVertex4dv = dllVertex4dv = GPA( "glVertex4dv" ); - qglVertex4f = dllVertex4f = GPA( "glVertex4f" ); - qglVertex4fv = dllVertex4fv = GPA( "glVertex4fv" ); - qglVertex4i = dllVertex4i = GPA( "glVertex4i" ); - qglVertex4iv = dllVertex4iv = GPA( "glVertex4iv" ); - qglVertex4s = dllVertex4s = GPA( "glVertex4s" ); - qglVertex4sv = dllVertex4sv = GPA( "glVertex4sv" ); - qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" ); - qglViewport = dllViewport = GPA( "glViewport" ); - - qwglCopyContext = GPA( "wglCopyContext" ); - qwglCreateContext = GPA( "wglCreateContext" ); - qwglCreateLayerContext = GPA( "wglCreateLayerContext" ); - qwglDeleteContext = GPA( "wglDeleteContext" ); - qwglDescribeLayerPlane = GPA( "wglDescribeLayerPlane" ); - qwglGetCurrentContext = GPA( "wglGetCurrentContext" ); - qwglGetCurrentDC = GPA( "wglGetCurrentDC" ); - qwglGetLayerPaletteEntries = GPA( "wglGetLayerPaletteEntries" ); - qwglGetProcAddress = GPA( "wglGetProcAddress" ); - qwglMakeCurrent = GPA( "wglMakeCurrent" ); - qwglRealizeLayerPalette = GPA( "wglRealizeLayerPalette" ); - qwglSetLayerPaletteEntries = GPA( "wglSetLayerPaletteEntries" ); - qwglShareLists = GPA( "wglShareLists" ); - qwglSwapLayerBuffers = GPA( "wglSwapLayerBuffers" ); - qwglUseFontBitmaps = GPA( "wglUseFontBitmapsA" ); - qwglUseFontOutlines = GPA( "wglUseFontOutlinesA" ); - - qwglChoosePixelFormat = GPA( "wglChoosePixelFormat" ); - qwglDescribePixelFormat = GPA( "wglDescribePixelFormat" ); - qwglGetPixelFormat = GPA( "wglGetPixelFormat" ); - qwglSetPixelFormat = GPA( "wglSetPixelFormat" ); - qwglSwapBuffers = GPA( "wglSwapBuffers" ); - - qwglSwapIntervalEXT = 0; - qglActiveTextureARB = 0; - qglClientActiveTextureARB = 0; - qglMultiTexCoord2fARB = 0; - qglLockArraysEXT = 0; - qglUnlockArraysEXT = 0; - qwglGetDeviceGammaRamp3DFX = NULL; - qwglSetDeviceGammaRamp3DFX = NULL; - - // check logging - QGL_EnableLogging( r_logFile->integer ); - - return qtrue; -} - -void QGL_EnableLogging( qboolean enable ) -{ - static qboolean isEnabled; - - // return if we're already active - if ( isEnabled && enable ) { - // decrement log counter and stop if it has reached 0 - ri.Cvar_Set( "r_logFile", va("%d", r_logFile->integer - 1 ) ); - if ( r_logFile->integer ) { - return; - } - enable = qfalse; - } - - // return if we're already disabled - if ( !enable && !isEnabled ) - return; - - isEnabled = enable; - - if ( enable ) - { - if ( !glw_state.log_fp ) - { - struct tm *newtime; - time_t aclock; - char buffer[1024]; - cvar_t *basedir; - - time( &aclock ); - newtime = localtime( &aclock ); - - asctime( newtime ); - - basedir = ri.Cvar_Get( "fs_basepath", "", 0 ); - Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", basedir->string ); - glw_state.log_fp = fopen( buffer, "wt" ); - - fprintf( glw_state.log_fp, "%s\n", asctime( newtime ) ); - } - - qglAccum = logAccum; - qglAlphaFunc = logAlphaFunc; - qglAreTexturesResident = logAreTexturesResident; - qglArrayElement = logArrayElement; - qglBegin = logBegin; - qglBindTexture = logBindTexture; - qglBitmap = logBitmap; - qglBlendFunc = logBlendFunc; - qglCallList = logCallList; - qglCallLists = logCallLists; - qglClear = logClear; - qglClearAccum = logClearAccum; - qglClearColor = logClearColor; - qglClearDepth = logClearDepth; - qglClearIndex = logClearIndex; - qglClearStencil = logClearStencil; - qglClipPlane = logClipPlane; - qglColor3b = logColor3b; - qglColor3bv = logColor3bv; - qglColor3d = logColor3d; - qglColor3dv = logColor3dv; - qglColor3f = logColor3f; - qglColor3fv = logColor3fv; - qglColor3i = logColor3i; - qglColor3iv = logColor3iv; - qglColor3s = logColor3s; - qglColor3sv = logColor3sv; - qglColor3ub = logColor3ub; - qglColor3ubv = logColor3ubv; - qglColor3ui = logColor3ui; - qglColor3uiv = logColor3uiv; - qglColor3us = logColor3us; - qglColor3usv = logColor3usv; - qglColor4b = logColor4b; - qglColor4bv = logColor4bv; - qglColor4d = logColor4d; - qglColor4dv = logColor4dv; - qglColor4f = logColor4f; - qglColor4fv = logColor4fv; - qglColor4i = logColor4i; - qglColor4iv = logColor4iv; - qglColor4s = logColor4s; - qglColor4sv = logColor4sv; - qglColor4ub = logColor4ub; - qglColor4ubv = logColor4ubv; - qglColor4ui = logColor4ui; - qglColor4uiv = logColor4uiv; - qglColor4us = logColor4us; - qglColor4usv = logColor4usv; - qglColorMask = logColorMask; - qglColorMaterial = logColorMaterial; - qglColorPointer = logColorPointer; - qglCopyPixels = logCopyPixels; - qglCopyTexImage1D = logCopyTexImage1D; - qglCopyTexImage2D = logCopyTexImage2D; - qglCopyTexSubImage1D = logCopyTexSubImage1D; - qglCopyTexSubImage2D = logCopyTexSubImage2D; - qglCullFace = logCullFace; - qglDeleteLists = logDeleteLists ; - qglDeleteTextures = logDeleteTextures ; - qglDepthFunc = logDepthFunc ; - qglDepthMask = logDepthMask ; - qglDepthRange = logDepthRange ; - qglDisable = logDisable ; - qglDisableClientState = logDisableClientState ; - qglDrawArrays = logDrawArrays ; - qglDrawBuffer = logDrawBuffer ; - qglDrawElements = logDrawElements ; - qglDrawPixels = logDrawPixels ; - qglEdgeFlag = logEdgeFlag ; - qglEdgeFlagPointer = logEdgeFlagPointer ; - qglEdgeFlagv = logEdgeFlagv ; - qglEnable = logEnable ; - qglEnableClientState = logEnableClientState ; - qglEnd = logEnd ; - qglEndList = logEndList ; - qglEvalCoord1d = logEvalCoord1d ; - qglEvalCoord1dv = logEvalCoord1dv ; - qglEvalCoord1f = logEvalCoord1f ; - qglEvalCoord1fv = logEvalCoord1fv ; - qglEvalCoord2d = logEvalCoord2d ; - qglEvalCoord2dv = logEvalCoord2dv ; - qglEvalCoord2f = logEvalCoord2f ; - qglEvalCoord2fv = logEvalCoord2fv ; - qglEvalMesh1 = logEvalMesh1 ; - qglEvalMesh2 = logEvalMesh2 ; - qglEvalPoint1 = logEvalPoint1 ; - qglEvalPoint2 = logEvalPoint2 ; - qglFeedbackBuffer = logFeedbackBuffer ; - qglFinish = logFinish ; - qglFlush = logFlush ; - qglFogf = logFogf ; - qglFogfv = logFogfv ; - qglFogi = logFogi ; - qglFogiv = logFogiv ; - qglFrontFace = logFrontFace ; - qglFrustum = logFrustum ; - qglGenLists = logGenLists ; - qglGenTextures = logGenTextures ; - qglGetBooleanv = logGetBooleanv ; - qglGetClipPlane = logGetClipPlane ; - qglGetDoublev = logGetDoublev ; - qglGetError = logGetError ; - qglGetFloatv = logGetFloatv ; - qglGetIntegerv = logGetIntegerv ; - qglGetLightfv = logGetLightfv ; - qglGetLightiv = logGetLightiv ; - qglGetMapdv = logGetMapdv ; - qglGetMapfv = logGetMapfv ; - qglGetMapiv = logGetMapiv ; - qglGetMaterialfv = logGetMaterialfv ; - qglGetMaterialiv = logGetMaterialiv ; - qglGetPixelMapfv = logGetPixelMapfv ; - qglGetPixelMapuiv = logGetPixelMapuiv ; - qglGetPixelMapusv = logGetPixelMapusv ; - qglGetPointerv = logGetPointerv ; - qglGetPolygonStipple = logGetPolygonStipple ; - qglGetString = logGetString ; - qglGetTexEnvfv = logGetTexEnvfv ; - qglGetTexEnviv = logGetTexEnviv ; - qglGetTexGendv = logGetTexGendv ; - qglGetTexGenfv = logGetTexGenfv ; - qglGetTexGeniv = logGetTexGeniv ; - qglGetTexImage = logGetTexImage ; - qglGetTexLevelParameterfv = logGetTexLevelParameterfv ; - qglGetTexLevelParameteriv = logGetTexLevelParameteriv ; - qglGetTexParameterfv = logGetTexParameterfv ; - qglGetTexParameteriv = logGetTexParameteriv ; - qglHint = logHint ; - qglIndexMask = logIndexMask ; - qglIndexPointer = logIndexPointer ; - qglIndexd = logIndexd ; - qglIndexdv = logIndexdv ; - qglIndexf = logIndexf ; - qglIndexfv = logIndexfv ; - qglIndexi = logIndexi ; - qglIndexiv = logIndexiv ; - qglIndexs = logIndexs ; - qglIndexsv = logIndexsv ; - qglIndexub = logIndexub ; - qglIndexubv = logIndexubv ; - qglInitNames = logInitNames ; - qglInterleavedArrays = logInterleavedArrays ; - qglIsEnabled = logIsEnabled ; - qglIsList = logIsList ; - qglIsTexture = logIsTexture ; - qglLightModelf = logLightModelf ; - qglLightModelfv = logLightModelfv ; - qglLightModeli = logLightModeli ; - qglLightModeliv = logLightModeliv ; - qglLightf = logLightf ; - qglLightfv = logLightfv ; - qglLighti = logLighti ; - qglLightiv = logLightiv ; - qglLineStipple = logLineStipple ; - qglLineWidth = logLineWidth ; - qglListBase = logListBase ; - qglLoadIdentity = logLoadIdentity ; - qglLoadMatrixd = logLoadMatrixd ; - qglLoadMatrixf = logLoadMatrixf ; - qglLoadName = logLoadName ; - qglLogicOp = logLogicOp ; - qglMap1d = logMap1d ; - qglMap1f = logMap1f ; - qglMap2d = logMap2d ; - qglMap2f = logMap2f ; - qglMapGrid1d = logMapGrid1d ; - qglMapGrid1f = logMapGrid1f ; - qglMapGrid2d = logMapGrid2d ; - qglMapGrid2f = logMapGrid2f ; - qglMaterialf = logMaterialf ; - qglMaterialfv = logMaterialfv ; - qglMateriali = logMateriali ; - qglMaterialiv = logMaterialiv ; - qglMatrixMode = logMatrixMode ; - qglMultMatrixd = logMultMatrixd ; - qglMultMatrixf = logMultMatrixf ; - qglNewList = logNewList ; - qglNormal3b = logNormal3b ; - qglNormal3bv = logNormal3bv ; - qglNormal3d = logNormal3d ; - qglNormal3dv = logNormal3dv ; - qglNormal3f = logNormal3f ; - qglNormal3fv = logNormal3fv ; - qglNormal3i = logNormal3i ; - qglNormal3iv = logNormal3iv ; - qglNormal3s = logNormal3s ; - qglNormal3sv = logNormal3sv ; - qglNormalPointer = logNormalPointer ; - qglOrtho = logOrtho ; - qglPassThrough = logPassThrough ; - qglPixelMapfv = logPixelMapfv ; - qglPixelMapuiv = logPixelMapuiv ; - qglPixelMapusv = logPixelMapusv ; - qglPixelStoref = logPixelStoref ; - qglPixelStorei = logPixelStorei ; - qglPixelTransferf = logPixelTransferf ; - qglPixelTransferi = logPixelTransferi ; - qglPixelZoom = logPixelZoom ; - qglPointSize = logPointSize ; - qglPolygonMode = logPolygonMode ; - qglPolygonOffset = logPolygonOffset ; - qglPolygonStipple = logPolygonStipple ; - qglPopAttrib = logPopAttrib ; - qglPopClientAttrib = logPopClientAttrib ; - qglPopMatrix = logPopMatrix ; - qglPopName = logPopName ; - qglPrioritizeTextures = logPrioritizeTextures ; - qglPushAttrib = logPushAttrib ; - qglPushClientAttrib = logPushClientAttrib ; - qglPushMatrix = logPushMatrix ; - qglPushName = logPushName ; - qglRasterPos2d = logRasterPos2d ; - qglRasterPos2dv = logRasterPos2dv ; - qglRasterPos2f = logRasterPos2f ; - qglRasterPos2fv = logRasterPos2fv ; - qglRasterPos2i = logRasterPos2i ; - qglRasterPos2iv = logRasterPos2iv ; - qglRasterPos2s = logRasterPos2s ; - qglRasterPos2sv = logRasterPos2sv ; - qglRasterPos3d = logRasterPos3d ; - qglRasterPos3dv = logRasterPos3dv ; - qglRasterPos3f = logRasterPos3f ; - qglRasterPos3fv = logRasterPos3fv ; - qglRasterPos3i = logRasterPos3i ; - qglRasterPos3iv = logRasterPos3iv ; - qglRasterPos3s = logRasterPos3s ; - qglRasterPos3sv = logRasterPos3sv ; - qglRasterPos4d = logRasterPos4d ; - qglRasterPos4dv = logRasterPos4dv ; - qglRasterPos4f = logRasterPos4f ; - qglRasterPos4fv = logRasterPos4fv ; - qglRasterPos4i = logRasterPos4i ; - qglRasterPos4iv = logRasterPos4iv ; - qglRasterPos4s = logRasterPos4s ; - qglRasterPos4sv = logRasterPos4sv ; - qglReadBuffer = logReadBuffer ; - qglReadPixels = logReadPixels ; - qglRectd = logRectd ; - qglRectdv = logRectdv ; - qglRectf = logRectf ; - qglRectfv = logRectfv ; - qglRecti = logRecti ; - qglRectiv = logRectiv ; - qglRects = logRects ; - qglRectsv = logRectsv ; - qglRenderMode = logRenderMode ; - qglRotated = logRotated ; - qglRotatef = logRotatef ; - qglScaled = logScaled ; - qglScalef = logScalef ; - qglScissor = logScissor ; - qglSelectBuffer = logSelectBuffer ; - qglShadeModel = logShadeModel ; - qglStencilFunc = logStencilFunc ; - qglStencilMask = logStencilMask ; - qglStencilOp = logStencilOp ; - qglTexCoord1d = logTexCoord1d ; - qglTexCoord1dv = logTexCoord1dv ; - qglTexCoord1f = logTexCoord1f ; - qglTexCoord1fv = logTexCoord1fv ; - qglTexCoord1i = logTexCoord1i ; - qglTexCoord1iv = logTexCoord1iv ; - qglTexCoord1s = logTexCoord1s ; - qglTexCoord1sv = logTexCoord1sv ; - qglTexCoord2d = logTexCoord2d ; - qglTexCoord2dv = logTexCoord2dv ; - qglTexCoord2f = logTexCoord2f ; - qglTexCoord2fv = logTexCoord2fv ; - qglTexCoord2i = logTexCoord2i ; - qglTexCoord2iv = logTexCoord2iv ; - qglTexCoord2s = logTexCoord2s ; - qglTexCoord2sv = logTexCoord2sv ; - qglTexCoord3d = logTexCoord3d ; - qglTexCoord3dv = logTexCoord3dv ; - qglTexCoord3f = logTexCoord3f ; - qglTexCoord3fv = logTexCoord3fv ; - qglTexCoord3i = logTexCoord3i ; - qglTexCoord3iv = logTexCoord3iv ; - qglTexCoord3s = logTexCoord3s ; - qglTexCoord3sv = logTexCoord3sv ; - qglTexCoord4d = logTexCoord4d ; - qglTexCoord4dv = logTexCoord4dv ; - qglTexCoord4f = logTexCoord4f ; - qglTexCoord4fv = logTexCoord4fv ; - qglTexCoord4i = logTexCoord4i ; - qglTexCoord4iv = logTexCoord4iv ; - qglTexCoord4s = logTexCoord4s ; - qglTexCoord4sv = logTexCoord4sv ; - qglTexCoordPointer = logTexCoordPointer ; - qglTexEnvf = logTexEnvf ; - qglTexEnvfv = logTexEnvfv ; - qglTexEnvi = logTexEnvi ; - qglTexEnviv = logTexEnviv ; - qglTexGend = logTexGend ; - qglTexGendv = logTexGendv ; - qglTexGenf = logTexGenf ; - qglTexGenfv = logTexGenfv ; - qglTexGeni = logTexGeni ; - qglTexGeniv = logTexGeniv ; - qglTexImage1D = logTexImage1D ; - qglTexImage2D = logTexImage2D ; - qglTexParameterf = logTexParameterf ; - qglTexParameterfv = logTexParameterfv ; - qglTexParameteri = logTexParameteri ; - qglTexParameteriv = logTexParameteriv ; - qglTexSubImage1D = logTexSubImage1D ; - qglTexSubImage2D = logTexSubImage2D ; - qglTranslated = logTranslated ; - qglTranslatef = logTranslatef ; - qglVertex2d = logVertex2d ; - qglVertex2dv = logVertex2dv ; - qglVertex2f = logVertex2f ; - qglVertex2fv = logVertex2fv ; - qglVertex2i = logVertex2i ; - qglVertex2iv = logVertex2iv ; - qglVertex2s = logVertex2s ; - qglVertex2sv = logVertex2sv ; - qglVertex3d = logVertex3d ; - qglVertex3dv = logVertex3dv ; - qglVertex3f = logVertex3f ; - qglVertex3fv = logVertex3fv ; - qglVertex3i = logVertex3i ; - qglVertex3iv = logVertex3iv ; - qglVertex3s = logVertex3s ; - qglVertex3sv = logVertex3sv ; - qglVertex4d = logVertex4d ; - qglVertex4dv = logVertex4dv ; - qglVertex4f = logVertex4f ; - qglVertex4fv = logVertex4fv ; - qglVertex4i = logVertex4i ; - qglVertex4iv = logVertex4iv ; - qglVertex4s = logVertex4s ; - qglVertex4sv = logVertex4sv ; - qglVertexPointer = logVertexPointer ; - qglViewport = logViewport ; - } - else - { - if ( glw_state.log_fp ) { - fprintf( glw_state.log_fp, "*** CLOSING LOG ***\n" ); - fclose( glw_state.log_fp ); - glw_state.log_fp = NULL; - } - qglAccum = dllAccum; - qglAlphaFunc = dllAlphaFunc; - qglAreTexturesResident = dllAreTexturesResident; - qglArrayElement = dllArrayElement; - qglBegin = dllBegin; - qglBindTexture = dllBindTexture; - qglBitmap = dllBitmap; - qglBlendFunc = dllBlendFunc; - qglCallList = dllCallList; - qglCallLists = dllCallLists; - qglClear = dllClear; - qglClearAccum = dllClearAccum; - qglClearColor = dllClearColor; - qglClearDepth = dllClearDepth; - qglClearIndex = dllClearIndex; - qglClearStencil = dllClearStencil; - qglClipPlane = dllClipPlane; - qglColor3b = dllColor3b; - qglColor3bv = dllColor3bv; - qglColor3d = dllColor3d; - qglColor3dv = dllColor3dv; - qglColor3f = dllColor3f; - qglColor3fv = dllColor3fv; - qglColor3i = dllColor3i; - qglColor3iv = dllColor3iv; - qglColor3s = dllColor3s; - qglColor3sv = dllColor3sv; - qglColor3ub = dllColor3ub; - qglColor3ubv = dllColor3ubv; - qglColor3ui = dllColor3ui; - qglColor3uiv = dllColor3uiv; - qglColor3us = dllColor3us; - qglColor3usv = dllColor3usv; - qglColor4b = dllColor4b; - qglColor4bv = dllColor4bv; - qglColor4d = dllColor4d; - qglColor4dv = dllColor4dv; - qglColor4f = dllColor4f; - qglColor4fv = dllColor4fv; - qglColor4i = dllColor4i; - qglColor4iv = dllColor4iv; - qglColor4s = dllColor4s; - qglColor4sv = dllColor4sv; - qglColor4ub = dllColor4ub; - qglColor4ubv = dllColor4ubv; - qglColor4ui = dllColor4ui; - qglColor4uiv = dllColor4uiv; - qglColor4us = dllColor4us; - qglColor4usv = dllColor4usv; - qglColorMask = dllColorMask; - qglColorMaterial = dllColorMaterial; - qglColorPointer = dllColorPointer; - qglCopyPixels = dllCopyPixels; - qglCopyTexImage1D = dllCopyTexImage1D; - qglCopyTexImage2D = dllCopyTexImage2D; - qglCopyTexSubImage1D = dllCopyTexSubImage1D; - qglCopyTexSubImage2D = dllCopyTexSubImage2D; - qglCullFace = dllCullFace; - qglDeleteLists = dllDeleteLists ; - qglDeleteTextures = dllDeleteTextures ; - qglDepthFunc = dllDepthFunc ; - qglDepthMask = dllDepthMask ; - qglDepthRange = dllDepthRange ; - qglDisable = dllDisable ; - qglDisableClientState = dllDisableClientState ; - qglDrawArrays = dllDrawArrays ; - qglDrawBuffer = dllDrawBuffer ; - qglDrawElements = dllDrawElements ; - qglDrawPixels = dllDrawPixels ; - qglEdgeFlag = dllEdgeFlag ; - qglEdgeFlagPointer = dllEdgeFlagPointer ; - qglEdgeFlagv = dllEdgeFlagv ; - qglEnable = dllEnable ; - qglEnableClientState = dllEnableClientState ; - qglEnd = dllEnd ; - qglEndList = dllEndList ; - qglEvalCoord1d = dllEvalCoord1d ; - qglEvalCoord1dv = dllEvalCoord1dv ; - qglEvalCoord1f = dllEvalCoord1f ; - qglEvalCoord1fv = dllEvalCoord1fv ; - qglEvalCoord2d = dllEvalCoord2d ; - qglEvalCoord2dv = dllEvalCoord2dv ; - qglEvalCoord2f = dllEvalCoord2f ; - qglEvalCoord2fv = dllEvalCoord2fv ; - qglEvalMesh1 = dllEvalMesh1 ; - qglEvalMesh2 = dllEvalMesh2 ; - qglEvalPoint1 = dllEvalPoint1 ; - qglEvalPoint2 = dllEvalPoint2 ; - qglFeedbackBuffer = dllFeedbackBuffer ; - qglFinish = dllFinish ; - qglFlush = dllFlush ; - qglFogf = dllFogf ; - qglFogfv = dllFogfv ; - qglFogi = dllFogi ; - qglFogiv = dllFogiv ; - qglFrontFace = dllFrontFace ; - qglFrustum = dllFrustum ; - qglGenLists = dllGenLists ; - qglGenTextures = dllGenTextures ; - qglGetBooleanv = dllGetBooleanv ; - qglGetClipPlane = dllGetClipPlane ; - qglGetDoublev = dllGetDoublev ; - qglGetError = dllGetError ; - qglGetFloatv = dllGetFloatv ; - qglGetIntegerv = dllGetIntegerv ; - qglGetLightfv = dllGetLightfv ; - qglGetLightiv = dllGetLightiv ; - qglGetMapdv = dllGetMapdv ; - qglGetMapfv = dllGetMapfv ; - qglGetMapiv = dllGetMapiv ; - qglGetMaterialfv = dllGetMaterialfv ; - qglGetMaterialiv = dllGetMaterialiv ; - qglGetPixelMapfv = dllGetPixelMapfv ; - qglGetPixelMapuiv = dllGetPixelMapuiv ; - qglGetPixelMapusv = dllGetPixelMapusv ; - qglGetPointerv = dllGetPointerv ; - qglGetPolygonStipple = dllGetPolygonStipple ; - qglGetString = dllGetString ; - qglGetTexEnvfv = dllGetTexEnvfv ; - qglGetTexEnviv = dllGetTexEnviv ; - qglGetTexGendv = dllGetTexGendv ; - qglGetTexGenfv = dllGetTexGenfv ; - qglGetTexGeniv = dllGetTexGeniv ; - qglGetTexImage = dllGetTexImage ; - qglGetTexLevelParameterfv = dllGetTexLevelParameterfv ; - qglGetTexLevelParameteriv = dllGetTexLevelParameteriv ; - qglGetTexParameterfv = dllGetTexParameterfv ; - qglGetTexParameteriv = dllGetTexParameteriv ; - qglHint = dllHint ; - qglIndexMask = dllIndexMask ; - qglIndexPointer = dllIndexPointer ; - qglIndexd = dllIndexd ; - qglIndexdv = dllIndexdv ; - qglIndexf = dllIndexf ; - qglIndexfv = dllIndexfv ; - qglIndexi = dllIndexi ; - qglIndexiv = dllIndexiv ; - qglIndexs = dllIndexs ; - qglIndexsv = dllIndexsv ; - qglIndexub = dllIndexub ; - qglIndexubv = dllIndexubv ; - qglInitNames = dllInitNames ; - qglInterleavedArrays = dllInterleavedArrays ; - qglIsEnabled = dllIsEnabled ; - qglIsList = dllIsList ; - qglIsTexture = dllIsTexture ; - qglLightModelf = dllLightModelf ; - qglLightModelfv = dllLightModelfv ; - qglLightModeli = dllLightModeli ; - qglLightModeliv = dllLightModeliv ; - qglLightf = dllLightf ; - qglLightfv = dllLightfv ; - qglLighti = dllLighti ; - qglLightiv = dllLightiv ; - qglLineStipple = dllLineStipple ; - qglLineWidth = dllLineWidth ; - qglListBase = dllListBase ; - qglLoadIdentity = dllLoadIdentity ; - qglLoadMatrixd = dllLoadMatrixd ; - qglLoadMatrixf = dllLoadMatrixf ; - qglLoadName = dllLoadName ; - qglLogicOp = dllLogicOp ; - qglMap1d = dllMap1d ; - qglMap1f = dllMap1f ; - qglMap2d = dllMap2d ; - qglMap2f = dllMap2f ; - qglMapGrid1d = dllMapGrid1d ; - qglMapGrid1f = dllMapGrid1f ; - qglMapGrid2d = dllMapGrid2d ; - qglMapGrid2f = dllMapGrid2f ; - qglMaterialf = dllMaterialf ; - qglMaterialfv = dllMaterialfv ; - qglMateriali = dllMateriali ; - qglMaterialiv = dllMaterialiv ; - qglMatrixMode = dllMatrixMode ; - qglMultMatrixd = dllMultMatrixd ; - qglMultMatrixf = dllMultMatrixf ; - qglNewList = dllNewList ; - qglNormal3b = dllNormal3b ; - qglNormal3bv = dllNormal3bv ; - qglNormal3d = dllNormal3d ; - qglNormal3dv = dllNormal3dv ; - qglNormal3f = dllNormal3f ; - qglNormal3fv = dllNormal3fv ; - qglNormal3i = dllNormal3i ; - qglNormal3iv = dllNormal3iv ; - qglNormal3s = dllNormal3s ; - qglNormal3sv = dllNormal3sv ; - qglNormalPointer = dllNormalPointer ; - qglOrtho = dllOrtho ; - qglPassThrough = dllPassThrough ; - qglPixelMapfv = dllPixelMapfv ; - qglPixelMapuiv = dllPixelMapuiv ; - qglPixelMapusv = dllPixelMapusv ; - qglPixelStoref = dllPixelStoref ; - qglPixelStorei = dllPixelStorei ; - qglPixelTransferf = dllPixelTransferf ; - qglPixelTransferi = dllPixelTransferi ; - qglPixelZoom = dllPixelZoom ; - qglPointSize = dllPointSize ; - qglPolygonMode = dllPolygonMode ; - qglPolygonOffset = dllPolygonOffset ; - qglPolygonStipple = dllPolygonStipple ; - qglPopAttrib = dllPopAttrib ; - qglPopClientAttrib = dllPopClientAttrib ; - qglPopMatrix = dllPopMatrix ; - qglPopName = dllPopName ; - qglPrioritizeTextures = dllPrioritizeTextures ; - qglPushAttrib = dllPushAttrib ; - qglPushClientAttrib = dllPushClientAttrib ; - qglPushMatrix = dllPushMatrix ; - qglPushName = dllPushName ; - qglRasterPos2d = dllRasterPos2d ; - qglRasterPos2dv = dllRasterPos2dv ; - qglRasterPos2f = dllRasterPos2f ; - qglRasterPos2fv = dllRasterPos2fv ; - qglRasterPos2i = dllRasterPos2i ; - qglRasterPos2iv = dllRasterPos2iv ; - qglRasterPos2s = dllRasterPos2s ; - qglRasterPos2sv = dllRasterPos2sv ; - qglRasterPos3d = dllRasterPos3d ; - qglRasterPos3dv = dllRasterPos3dv ; - qglRasterPos3f = dllRasterPos3f ; - qglRasterPos3fv = dllRasterPos3fv ; - qglRasterPos3i = dllRasterPos3i ; - qglRasterPos3iv = dllRasterPos3iv ; - qglRasterPos3s = dllRasterPos3s ; - qglRasterPos3sv = dllRasterPos3sv ; - qglRasterPos4d = dllRasterPos4d ; - qglRasterPos4dv = dllRasterPos4dv ; - qglRasterPos4f = dllRasterPos4f ; - qglRasterPos4fv = dllRasterPos4fv ; - qglRasterPos4i = dllRasterPos4i ; - qglRasterPos4iv = dllRasterPos4iv ; - qglRasterPos4s = dllRasterPos4s ; - qglRasterPos4sv = dllRasterPos4sv ; - qglReadBuffer = dllReadBuffer ; - qglReadPixels = dllReadPixels ; - qglRectd = dllRectd ; - qglRectdv = dllRectdv ; - qglRectf = dllRectf ; - qglRectfv = dllRectfv ; - qglRecti = dllRecti ; - qglRectiv = dllRectiv ; - qglRects = dllRects ; - qglRectsv = dllRectsv ; - qglRenderMode = dllRenderMode ; - qglRotated = dllRotated ; - qglRotatef = dllRotatef ; - qglScaled = dllScaled ; - qglScalef = dllScalef ; - qglScissor = dllScissor ; - qglSelectBuffer = dllSelectBuffer ; - qglShadeModel = dllShadeModel ; - qglStencilFunc = dllStencilFunc ; - qglStencilMask = dllStencilMask ; - qglStencilOp = dllStencilOp ; - qglTexCoord1d = dllTexCoord1d ; - qglTexCoord1dv = dllTexCoord1dv ; - qglTexCoord1f = dllTexCoord1f ; - qglTexCoord1fv = dllTexCoord1fv ; - qglTexCoord1i = dllTexCoord1i ; - qglTexCoord1iv = dllTexCoord1iv ; - qglTexCoord1s = dllTexCoord1s ; - qglTexCoord1sv = dllTexCoord1sv ; - qglTexCoord2d = dllTexCoord2d ; - qglTexCoord2dv = dllTexCoord2dv ; - qglTexCoord2f = dllTexCoord2f ; - qglTexCoord2fv = dllTexCoord2fv ; - qglTexCoord2i = dllTexCoord2i ; - qglTexCoord2iv = dllTexCoord2iv ; - qglTexCoord2s = dllTexCoord2s ; - qglTexCoord2sv = dllTexCoord2sv ; - qglTexCoord3d = dllTexCoord3d ; - qglTexCoord3dv = dllTexCoord3dv ; - qglTexCoord3f = dllTexCoord3f ; - qglTexCoord3fv = dllTexCoord3fv ; - qglTexCoord3i = dllTexCoord3i ; - qglTexCoord3iv = dllTexCoord3iv ; - qglTexCoord3s = dllTexCoord3s ; - qglTexCoord3sv = dllTexCoord3sv ; - qglTexCoord4d = dllTexCoord4d ; - qglTexCoord4dv = dllTexCoord4dv ; - qglTexCoord4f = dllTexCoord4f ; - qglTexCoord4fv = dllTexCoord4fv ; - qglTexCoord4i = dllTexCoord4i ; - qglTexCoord4iv = dllTexCoord4iv ; - qglTexCoord4s = dllTexCoord4s ; - qglTexCoord4sv = dllTexCoord4sv ; - qglTexCoordPointer = dllTexCoordPointer ; - qglTexEnvf = dllTexEnvf ; - qglTexEnvfv = dllTexEnvfv ; - qglTexEnvi = dllTexEnvi ; - qglTexEnviv = dllTexEnviv ; - qglTexGend = dllTexGend ; - qglTexGendv = dllTexGendv ; - qglTexGenf = dllTexGenf ; - qglTexGenfv = dllTexGenfv ; - qglTexGeni = dllTexGeni ; - qglTexGeniv = dllTexGeniv ; - qglTexImage1D = dllTexImage1D ; - qglTexImage2D = dllTexImage2D ; - qglTexParameterf = dllTexParameterf ; - qglTexParameterfv = dllTexParameterfv ; - qglTexParameteri = dllTexParameteri ; - qglTexParameteriv = dllTexParameteriv ; - qglTexSubImage1D = dllTexSubImage1D ; - qglTexSubImage2D = dllTexSubImage2D ; - qglTranslated = dllTranslated ; - qglTranslatef = dllTranslatef ; - qglVertex2d = dllVertex2d ; - qglVertex2dv = dllVertex2dv ; - qglVertex2f = dllVertex2f ; - qglVertex2fv = dllVertex2fv ; - qglVertex2i = dllVertex2i ; - qglVertex2iv = dllVertex2iv ; - qglVertex2s = dllVertex2s ; - qglVertex2sv = dllVertex2sv ; - qglVertex3d = dllVertex3d ; - qglVertex3dv = dllVertex3dv ; - qglVertex3f = dllVertex3f ; - qglVertex3fv = dllVertex3fv ; - qglVertex3i = dllVertex3i ; - qglVertex3iv = dllVertex3iv ; - qglVertex3s = dllVertex3s ; - qglVertex3sv = dllVertex3sv ; - qglVertex4d = dllVertex4d ; - qglVertex4dv = dllVertex4dv ; - qglVertex4f = dllVertex4f ; - qglVertex4fv = dllVertex4fv ; - qglVertex4i = dllVertex4i ; - qglVertex4iv = dllVertex4iv ; - qglVertex4s = dllVertex4s ; - qglVertex4sv = dllVertex4sv ; - qglVertexPointer = dllVertexPointer ; - qglViewport = dllViewport ; - } -} - -#ifdef _MSC_VER -#pragma warning (default : 4113 4133 4047 ) -#endif - - - diff --git a/code/win32/win_shared.c b/code/win32/win_shared.c deleted file mode 100644 index 24e3079d..00000000 --- a/code/win32/win_shared.c +++ /dev/null @@ -1,350 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ - -#include "../qcommon/q_shared.h" -#include "../qcommon/qcommon.h" -#include "win_local.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* -================ -Sys_Milliseconds -================ -*/ -int sys_timeBase; -int Sys_Milliseconds (void) -{ - int sys_curtime; - static qboolean initialized = qfalse; - - if (!initialized) { - sys_timeBase = timeGetTime(); - initialized = qtrue; - } - sys_curtime = timeGetTime() - sys_timeBase; - - return sys_curtime; -} - -#ifndef __GNUC__ //see snapvectora.s -/* -================ -Sys_SnapVector -================ -*/ -void Sys_SnapVector( float *v ) -{ - int i; - float f; - - f = *v; - __asm fld f; - __asm fistp i; - *v = i; - v++; - f = *v; - __asm fld f; - __asm fistp i; - *v = i; - v++; - f = *v; - __asm fld f; - __asm fistp i; - *v = i; -} -#endif - -qboolean Sys_RandomBytes( byte *string, int len ) -{ - HCRYPTPROV prov; - - if( !CryptAcquireContext( &prov, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) ) { - - return qfalse; - } - - if( !CryptGenRandom( prov, len, (BYTE *)string ) ) { - CryptReleaseContext( prov, 0 ); - return qfalse; - } - CryptReleaseContext( prov, 0 ); - return qtrue; -} - - -/* -** -** Disable all optimizations temporarily so this code works correctly! -** -*/ -#ifdef _MSC_VER -#pragma optimize( "", off ) -#endif - -// If you fancy porting this stuff to AT&T then feel free... :) -// It's not actually used functionally though, so it may be a waste of effort -#ifndef __MINGW32__ -/* -** -------------------------------------------------------------------------------- -** -** PROCESSOR STUFF -** -** -------------------------------------------------------------------------------- -*/ -static void CPUID( int func, unsigned regs[4] ) -{ - unsigned regEAX, regEBX, regECX, regEDX; - - __asm mov eax, func - __asm __emit 00fh - __asm __emit 0a2h - __asm mov regEAX, eax - __asm mov regEBX, ebx - __asm mov regECX, ecx - __asm mov regEDX, edx - - regs[0] = regEAX; - regs[1] = regEBX; - regs[2] = regECX; - regs[3] = regEDX; -} - -static int IsPentium( void ) -{ - __asm - { - pushfd // save eflags - pop eax - test eax, 0x00200000 // check ID bit - jz set21 // bit 21 is not set, so jump to set_21 - and eax, 0xffdfffff // clear bit 21 - push eax // save new value in register - popfd // store new value in flags - pushfd - pop eax - test eax, 0x00200000 // check ID bit - jz good - jmp err // cpuid not supported -set21: - or eax, 0x00200000 // set ID bit - push eax // store new value - popfd // store new value in EFLAGS - pushfd - pop eax - test eax, 0x00200000 // if bit 21 is on - jnz good - jmp err - } - -err: - return qfalse; -good: - return qtrue; -} - -static int Is3DNOW( void ) -{ - unsigned regs[4]; - char pstring[16]; - char processorString[13]; - - // get name of processor - CPUID( 0, ( unsigned int * ) pstring ); - processorString[0] = pstring[4]; - processorString[1] = pstring[5]; - processorString[2] = pstring[6]; - processorString[3] = pstring[7]; - processorString[4] = pstring[12]; - processorString[5] = pstring[13]; - processorString[6] = pstring[14]; - processorString[7] = pstring[15]; - processorString[8] = pstring[8]; - processorString[9] = pstring[9]; - processorString[10] = pstring[10]; - processorString[11] = pstring[11]; - processorString[12] = 0; - -// REMOVED because you can have 3DNow! on non-AMD systems -// if ( strcmp( processorString, "AuthenticAMD" ) ) -// return qfalse; - - // check AMD-specific functions - CPUID( 0x80000000, regs ); - if ( regs[0] < 0x80000000 ) - return qfalse; - - // bit 31 of EDX denotes 3DNOW! support - CPUID( 0x80000001, regs ); - if ( regs[3] & ( 1 << 31 ) ) - return qtrue; - - return qfalse; -} - -static int IsKNI( void ) -{ - unsigned regs[4]; - - // get CPU feature bits - CPUID( 1, regs ); - - // bit 25 of EDX denotes KNI existence - if ( regs[3] & ( 1 << 25 ) ) - return qtrue; - - return qfalse; -} - -static int IsMMX( void ) -{ - unsigned regs[4]; - - // get CPU feature bits - CPUID( 1, regs ); - - // bit 23 of EDX denotes MMX existence - if ( regs[3] & ( 1 << 23 ) ) - return qtrue; - return qfalse; -} - -int Sys_GetProcessorId( void ) -{ -#if defined _M_ALPHA - return CPUID_AXP; -#elif !defined _M_IX86 - return CPUID_GENERIC; -#else - - // verify we're at least a Pentium or 486 w/ CPUID support - if ( !IsPentium() ) - return CPUID_INTEL_UNSUPPORTED; - - // check for MMX - if ( !IsMMX() ) - { - // Pentium or PPro - return CPUID_INTEL_PENTIUM; - } - - // see if we're an AMD 3DNOW! processor - if ( Is3DNOW() ) - { - return CPUID_AMD_3DNOW; - } - - // see if we're an Intel Katmai - if ( IsKNI() ) - { - return CPUID_INTEL_KATMAI; - } - - // by default we're functionally a vanilla Pentium/MMX or P2/MMX - return CPUID_INTEL_MMX; - -#endif -} -#endif - -/* -** -** Re-enable optimizations back to what they were -** -*/ -#ifdef _MSC_VER -#pragma optimize( "", on ) -#endif - -//============================================ - -char *Sys_GetCurrentUser( void ) -{ - static char s_userName[1024]; - unsigned long size = sizeof( s_userName ); - - - if ( !GetUserName( s_userName, &size ) ) - strcpy( s_userName, "player" ); - - if ( !s_userName[0] ) - { - strcpy( s_userName, "player" ); - } - - return s_userName; -} - -char *Sys_DefaultHomePath(void) { - TCHAR szPath[MAX_PATH]; - static char path[MAX_OSPATH]; - FARPROC qSHGetFolderPath; - HMODULE shfolder = LoadLibrary("shfolder.dll"); - - if(shfolder == NULL) { - Com_Printf("Unable to load SHFolder.dll\n"); - return NULL; - } - - qSHGetFolderPath = GetProcAddress(shfolder, "SHGetFolderPathA"); - if(qSHGetFolderPath == NULL) - { - Com_Printf("Unable to find SHGetFolderPath in SHFolder.dll\n"); - FreeLibrary(shfolder); - return NULL; - } - - if( !SUCCEEDED( qSHGetFolderPath( NULL, CSIDL_APPDATA, - NULL, 0, szPath ) ) ) - { - Com_Printf("Unable to detect CSIDL_APPDATA\n"); - FreeLibrary(shfolder); - return NULL; - } - Q_strncpyz( path, szPath, sizeof(path) ); - Q_strcat( path, sizeof(path), "\\Quake3" ); - FreeLibrary(shfolder); - if( !CreateDirectory( path, NULL ) ) - { - if( GetLastError() != ERROR_ALREADY_EXISTS ) - { - Com_Printf("Unable to create directory \"%s\"\n", path); - return NULL; - } - } - return path; -} - -char *Sys_DefaultInstallPath(void) -{ - return Sys_Cwd(); -} - diff --git a/code/win32/win_snd.c b/code/win32/win_snd.c deleted file mode 100644 index 28c4318f..00000000 --- a/code/win32/win_snd.c +++ /dev/null @@ -1,388 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -#include - -#include "../client/snd_local.h" -#include "win_local.h" - -HRESULT (WINAPI *pDirectSoundCreate)(GUID FAR *lpGUID, LPDIRECTSOUND FAR *lplpDS, IUnknown FAR *pUnkOuter); -#define iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c) - -#define SECONDARY_BUFFER_SIZE 0x10000 - - -static qboolean dsound_init; -static int sample16; -static DWORD gSndBufSize; -static DWORD locksize; -static LPDIRECTSOUND pDS; -static LPDIRECTSOUNDBUFFER pDSBuf, pDSPBuf; -static HINSTANCE hInstDS; - - -static const char *DSoundError( int error ) { - switch ( error ) { - case DSERR_BUFFERLOST: - return "DSERR_BUFFERLOST"; - case DSERR_INVALIDCALL: - return "DSERR_INVALIDCALLS"; - case DSERR_INVALIDPARAM: - return "DSERR_INVALIDPARAM"; - case DSERR_PRIOLEVELNEEDED: - return "DSERR_PRIOLEVELNEEDED"; - } - - return "unknown"; -} - -/* -================== -SNDDMA_Shutdown -================== -*/ -void SNDDMA_Shutdown( void ) { - Com_DPrintf( "Shutting down sound system\n" ); - - if ( pDS ) { - Com_DPrintf( "Destroying DS buffers\n" ); - if ( pDS ) - { - Com_DPrintf( "...setting NORMAL coop level\n" ); - pDS->lpVtbl->SetCooperativeLevel( pDS, g_wv.hWnd, DSSCL_PRIORITY ); - } - - if ( pDSBuf ) - { - Com_DPrintf( "...stopping and releasing sound buffer\n" ); - pDSBuf->lpVtbl->Stop( pDSBuf ); - pDSBuf->lpVtbl->Release( pDSBuf ); - } - - // only release primary buffer if it's not also the mixing buffer we just released - if ( pDSPBuf && ( pDSBuf != pDSPBuf ) ) - { - Com_DPrintf( "...releasing primary buffer\n" ); - pDSPBuf->lpVtbl->Release( pDSPBuf ); - } - pDSBuf = NULL; - pDSPBuf = NULL; - - dma.buffer = NULL; - - Com_DPrintf( "...releasing DS object\n" ); - pDS->lpVtbl->Release( pDS ); - } - - if ( hInstDS ) { - Com_DPrintf( "...freeing DSOUND.DLL\n" ); - FreeLibrary( hInstDS ); - hInstDS = NULL; - } - - pDS = NULL; - pDSBuf = NULL; - pDSPBuf = NULL; - dsound_init = qfalse; - memset ((void *)&dma, 0, sizeof (dma)); - CoUninitialize( ); -} - -/* -================== -SNDDMA_Init - -Initialize direct sound -Returns false if failed -================== -*/ -qboolean SNDDMA_Init(void) { - - memset ((void *)&dma, 0, sizeof (dma)); - dsound_init = 0; - - CoInitialize(NULL); - - if ( !SNDDMA_InitDS () ) { - return qfalse; - } - - dsound_init = qtrue; - - Com_DPrintf("Completed successfully\n" ); - - return qtrue; -} - -#undef DEFINE_GUID - -#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - const GUID name \ - = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } - -// DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000} -DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); - -// DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B} -DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b); - -DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93, 0xF395, 0x4834, 0x9E, 0xF6, 0x7F, 0xA9, 0x9D, 0xE5, 0x09, 0x66); -DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); - - -int SNDDMA_InitDS () -{ - HRESULT hresult; - DSBUFFERDESC dsbuf; - DSBCAPS dsbcaps; - WAVEFORMATEX format; - int use8; - - Com_Printf( "Initializing DirectSound\n"); - - use8 = 1; - // Create IDirectSound using the primary sound device - if( FAILED( hresult = CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound8, (void **)&pDS))) { - use8 = 0; - if( FAILED( hresult = CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSound, (void **)&pDS))) { - Com_Printf ("failed\n"); - SNDDMA_Shutdown (); - return qfalse; - } - } - - hresult = pDS->lpVtbl->Initialize( pDS, NULL); - - Com_DPrintf( "ok\n" ); - - Com_DPrintf("...setting DSSCL_PRIORITY coop level: " ); - - if ( DS_OK != pDS->lpVtbl->SetCooperativeLevel( pDS, g_wv.hWnd, DSSCL_PRIORITY ) ) { - Com_Printf ("failed\n"); - SNDDMA_Shutdown (); - return qfalse; - } - Com_DPrintf("ok\n" ); - - - // create the secondary buffer we'll actually work with - dma.channels = 2; - dma.samplebits = 16; - -// if (s_khz->integer == 44) -// dma.speed = 44100; -// else if (s_khz->integer == 22) -// dma.speed = 22050; -// else -// dma.speed = 11025; - - dma.speed = 22050; - memset (&format, 0, sizeof(format)); - format.wFormatTag = WAVE_FORMAT_PCM; - format.nChannels = dma.channels; - format.wBitsPerSample = dma.samplebits; - format.nSamplesPerSec = dma.speed; - format.nBlockAlign = format.nChannels * format.wBitsPerSample / 8; - format.cbSize = 0; - format.nAvgBytesPerSec = format.nSamplesPerSec*format.nBlockAlign; - - memset (&dsbuf, 0, sizeof(dsbuf)); - dsbuf.dwSize = sizeof(DSBUFFERDESC); - - // Micah: take advantage of 2D hardware.if available. - dsbuf.dwFlags = DSBCAPS_LOCHARDWARE; - if (use8) { - dsbuf.dwFlags |= DSBCAPS_GETCURRENTPOSITION2; - } - dsbuf.dwBufferBytes = SECONDARY_BUFFER_SIZE; - dsbuf.lpwfxFormat = &format; - - memset(&dsbcaps, 0, sizeof(dsbcaps)); - dsbcaps.dwSize = sizeof(dsbcaps); - - Com_DPrintf( "...creating secondary buffer: " ); - if (DS_OK == pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSBuf, NULL)) { - Com_Printf( "locked hardware. ok\n" ); - } - else { - // Couldn't get hardware, fallback to software. - dsbuf.dwFlags = DSBCAPS_LOCSOFTWARE; - if (use8) { - dsbuf.dwFlags |= DSBCAPS_GETCURRENTPOSITION2; - } - if (DS_OK != pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSBuf, NULL)) { - Com_Printf( "failed\n" ); - SNDDMA_Shutdown (); - return qfalse; - } - Com_DPrintf( "forced to software. ok\n" ); - } - - // Make sure mixer is active - if ( DS_OK != pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING) ) { - Com_Printf ("*** Looped sound play failed ***\n"); - SNDDMA_Shutdown (); - return qfalse; - } - - // get the returned buffer size - if ( DS_OK != pDSBuf->lpVtbl->GetCaps (pDSBuf, &dsbcaps) ) { - Com_Printf ("*** GetCaps failed ***\n"); - SNDDMA_Shutdown (); - return qfalse; - } - - gSndBufSize = dsbcaps.dwBufferBytes; - - dma.channels = format.nChannels; - dma.samplebits = format.wBitsPerSample; - dma.speed = format.nSamplesPerSec; - dma.samples = gSndBufSize/(dma.samplebits/8); - dma.submission_chunk = 1; - dma.buffer = NULL; // must be locked first - - sample16 = (dma.samplebits/8) - 1; - - SNDDMA_BeginPainting (); - if (dma.buffer) - memset(dma.buffer, 0, dma.samples * dma.samplebits/8); - SNDDMA_Submit (); - return 1; -} -/* -============== -SNDDMA_GetDMAPos - -return the current sample position (in mono samples read) -inside the recirculating dma buffer, so the mixing code will know -how many sample are required to fill it up. -=============== -*/ -int SNDDMA_GetDMAPos( void ) { - MMTIME mmtime; - int s; - DWORD dwWrite; - - if ( !dsound_init ) { - return 0; - } - - mmtime.wType = TIME_SAMPLES; - pDSBuf->lpVtbl->GetCurrentPosition(pDSBuf, &mmtime.u.sample, &dwWrite); - - s = mmtime.u.sample; - - s >>= sample16; - - s &= (dma.samples-1); - - return s; -} - -/* -============== -SNDDMA_BeginPainting - -Makes sure dma.buffer is valid -=============== -*/ -void SNDDMA_BeginPainting( void ) { - int reps; - DWORD dwSize2; - DWORD *pbuf, *pbuf2; - HRESULT hresult; - DWORD dwStatus; - - if ( !pDSBuf ) { - return; - } - - // if the buffer was lost or stopped, restore it and/or restart it - if ( pDSBuf->lpVtbl->GetStatus (pDSBuf, &dwStatus) != DS_OK ) { - Com_Printf ("Couldn't get sound buffer status\n"); - } - - if (dwStatus & DSBSTATUS_BUFFERLOST) - pDSBuf->lpVtbl->Restore (pDSBuf); - - if (!(dwStatus & DSBSTATUS_PLAYING)) - pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING); - - // lock the dsound buffer - - reps = 0; - dma.buffer = NULL; - - while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, (LPVOID)&pbuf, &locksize, - (LPVOID)&pbuf2, &dwSize2, 0)) != DS_OK) - { - if (hresult != DSERR_BUFFERLOST) - { - Com_Printf( "SNDDMA_BeginPainting: Lock failed with error '%s'\n", DSoundError( hresult ) ); - S_Shutdown (); - return; - } - else - { - pDSBuf->lpVtbl->Restore( pDSBuf ); - } - - if (++reps > 2) - return; - } - dma.buffer = (unsigned char *)pbuf; -} - -/* -============== -SNDDMA_Submit - -Send sound to device if buffer isn't really the dma buffer -Also unlocks the dsound buffer -=============== -*/ -void SNDDMA_Submit( void ) { - // unlock the dsound buffer - if ( pDSBuf ) { - pDSBuf->lpVtbl->Unlock(pDSBuf, dma.buffer, locksize, NULL, 0); - } -} - - -/* -================= -SNDDMA_Activate - -When we change windows we need to do this -================= -*/ -void SNDDMA_Activate( void ) { - if ( !pDS ) { - return; - } - - if ( DS_OK != pDS->lpVtbl->SetCooperativeLevel( pDS, g_wv.hWnd, DSSCL_PRIORITY ) ) { - Com_Printf ("sound SetCooperativeLevel failed\n"); - SNDDMA_Shutdown (); - } -} - - diff --git a/code/win32/win_syscon.c b/code/win32/win_syscon.c deleted file mode 100644 index 3e148404..00000000 --- a/code/win32/win_syscon.c +++ /dev/null @@ -1,596 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ -// win_syscon.h -#include "../client/client.h" -#include "win_local.h" -#include "resource.h" -#include -#include -#include -#include -#include -#include -#include - -#define COPY_ID 1 -#define QUIT_ID 2 -#define CLEAR_ID 3 - -#define ERRORBOX_ID 10 -#define ERRORTEXT_ID 11 - -#define EDIT_ID 100 -#define INPUT_ID 101 - -typedef struct -{ - HWND hWnd; - HWND hwndBuffer; - - HWND hwndButtonClear; - HWND hwndButtonCopy; - HWND hwndButtonQuit; - - HWND hwndErrorBox; - HWND hwndErrorText; - - HBITMAP hbmLogo; - HBITMAP hbmClearBitmap; - - HBRUSH hbrEditBackground; - HBRUSH hbrErrorBackground; - - HFONT hfBufferFont; - HFONT hfButtonFont; - - HWND hwndInputLine; - - char errorString[80]; - - char consoleText[512], returnedText[512]; - int visLevel; - qboolean quitOnClose; - int windowWidth, windowHeight; - - WNDPROC SysInputLineWndProc; - -} WinConData; - -static WinConData s_wcd; - -static LONG WINAPI ConWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - char *cmdString; - static qboolean s_timePolarity; - - switch (uMsg) - { - case WM_ACTIVATE: - if ( LOWORD( wParam ) != WA_INACTIVE ) - { - SetFocus( s_wcd.hwndInputLine ); - } - - if ( com_viewlog && ( com_dedicated && !com_dedicated->integer ) ) - { - // if the viewlog is open, check to see if it's being minimized - if ( com_viewlog->integer == 1 ) - { - if ( HIWORD( wParam ) ) // minimized flag - { - Cvar_Set( "viewlog", "2" ); - } - } - else if ( com_viewlog->integer == 2 ) - { - if ( !HIWORD( wParam ) ) // minimized flag - { - Cvar_Set( "viewlog", "1" ); - } - } - } - break; - - case WM_CLOSE: - if ( ( com_dedicated && com_dedicated->integer ) ) - { - cmdString = CopyString( "quit" ); - Sys_QueEvent( 0, SE_CONSOLE, 0, 0, strlen( cmdString ) + 1, cmdString ); - } - else if ( s_wcd.quitOnClose ) - { - PostQuitMessage( 0 ); - } - else - { - Sys_ShowConsole( 0, qfalse ); - Cvar_Set( "viewlog", "0" ); - } - return 0; - case WM_CTLCOLORSTATIC: - if ( ( HWND ) lParam == s_wcd.hwndBuffer ) - { - SetBkColor( ( HDC ) wParam, RGB( 0x00, 0x00, 0xB0 ) ); - SetTextColor( ( HDC ) wParam, RGB( 0xff, 0xff, 0x00 ) ); - -#if 0 // this draws a background in the edit box, but there are issues with this - if ( ( hdcScaled = CreateCompatibleDC( ( HDC ) wParam ) ) != 0 ) - { - if ( SelectObject( ( HDC ) hdcScaled, s_wcd.hbmLogo ) ) - { - StretchBlt( ( HDC ) wParam, 0, 0, 512, 384, - hdcScaled, 0, 0, 512, 384, - SRCCOPY ); - } - DeleteDC( hdcScaled ); - } -#endif - return ( long ) s_wcd.hbrEditBackground; - } - else if ( ( HWND ) lParam == s_wcd.hwndErrorBox ) - { - if ( s_timePolarity & 1 ) - { - SetBkColor( ( HDC ) wParam, RGB( 0x80, 0x80, 0x80 ) ); - SetTextColor( ( HDC ) wParam, RGB( 0xff, 0x0, 0x00 ) ); - } - else - { - SetBkColor( ( HDC ) wParam, RGB( 0x80, 0x80, 0x80 ) ); - SetTextColor( ( HDC ) wParam, RGB( 0x00, 0x0, 0x00 ) ); - } - return ( long ) s_wcd.hbrErrorBackground; - } - break; - - case WM_COMMAND: - if ( wParam == COPY_ID ) - { - SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 ); - SendMessage( s_wcd.hwndBuffer, WM_COPY, 0, 0 ); - } - else if ( wParam == QUIT_ID ) - { - if ( s_wcd.quitOnClose ) - { - PostQuitMessage( 0 ); - } - else - { - cmdString = CopyString( "quit" ); - Sys_QueEvent( 0, SE_CONSOLE, 0, 0, strlen( cmdString ) + 1, cmdString ); - } - } - else if ( wParam == CLEAR_ID ) - { - SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 ); - SendMessage( s_wcd.hwndBuffer, EM_REPLACESEL, FALSE, ( LPARAM ) "" ); - UpdateWindow( s_wcd.hwndBuffer ); - } - break; - case WM_CREATE: -// s_wcd.hbmLogo = LoadBitmap( g_wv.hInstance, MAKEINTRESOURCE( IDB_BITMAP1 ) ); -// s_wcd.hbmClearBitmap = LoadBitmap( g_wv.hInstance, MAKEINTRESOURCE( IDB_BITMAP2 ) ); - s_wcd.hbrEditBackground = CreateSolidBrush( RGB( 0x00, 0x00, 0xB0 ) ); - s_wcd.hbrErrorBackground = CreateSolidBrush( RGB( 0x80, 0x80, 0x80 ) ); - SetTimer( hWnd, 1, 1000, NULL ); - break; - case WM_ERASEBKGND: -#if 0 - HDC hdcScaled; - HGDIOBJ oldObject; - -#if 1 // a single, large image - hdcScaled = CreateCompatibleDC( ( HDC ) wParam ); - assert( hdcScaled != 0 ); - - if ( hdcScaled ) - { - oldObject = SelectObject( ( HDC ) hdcScaled, s_wcd.hbmLogo ); - assert( oldObject != 0 ); - if ( oldObject ) - { - StretchBlt( ( HDC ) wParam, 0, 0, s_wcd.windowWidth, s_wcd.windowHeight, - hdcScaled, 0, 0, 512, 384, - SRCCOPY ); - } - DeleteDC( hdcScaled ); - hdcScaled = 0; - } -#else // a repeating brush - { - HBRUSH hbrClearBrush; - RECT r; - - GetWindowRect( hWnd, &r ); - - r.bottom = r.bottom - r.top + 1; - r.right = r.right - r.left + 1; - r.top = 0; - r.left = 0; - - hbrClearBrush = CreatePatternBrush( s_wcd.hbmClearBitmap ); - - assert( hbrClearBrush != 0 ); - - if ( hbrClearBrush ) - { - FillRect( ( HDC ) wParam, &r, hbrClearBrush ); - DeleteObject( hbrClearBrush ); - } - } -#endif - return 1; -#endif - return DefWindowProc( hWnd, uMsg, wParam, lParam ); - case WM_TIMER: - if ( wParam == 1 ) - { - s_timePolarity = !s_timePolarity; - if ( s_wcd.hwndErrorBox ) - { - InvalidateRect( s_wcd.hwndErrorBox, NULL, FALSE ); - } - } - break; - } - - return DefWindowProc( hWnd, uMsg, wParam, lParam ); -} - -LONG WINAPI InputLineWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - char inputBuffer[1024]; - - switch ( uMsg ) - { - case WM_KILLFOCUS: - if ( ( HWND ) wParam == s_wcd.hWnd || - ( HWND ) wParam == s_wcd.hwndErrorBox ) - { - SetFocus( hWnd ); - return 0; - } - break; - - case WM_CHAR: - if ( wParam == 13 ) - { - GetWindowText( s_wcd.hwndInputLine, inputBuffer, sizeof( inputBuffer ) ); - strncat( s_wcd.consoleText, inputBuffer, sizeof( s_wcd.consoleText ) - strlen( s_wcd.consoleText ) - 5 ); - strcat( s_wcd.consoleText, "\n" ); - SetWindowText( s_wcd.hwndInputLine, "" ); - - Sys_Print( va( "]%s\n", inputBuffer ) ); - - return 0; - } - } - - return CallWindowProc( s_wcd.SysInputLineWndProc, hWnd, uMsg, wParam, lParam ); -} - -/* -** Sys_CreateConsole -*/ -void Sys_CreateConsole( void ) -{ - HDC hDC; - WNDCLASS wc; - RECT rect; - const char *DEDCLASS = "Q3 WinConsole"; - int nHeight; - int swidth, sheight; - int DEDSTYLE = WS_POPUPWINDOW | WS_CAPTION | WS_MINIMIZEBOX; - - memset( &wc, 0, sizeof( wc ) ); - - wc.style = 0; - wc.lpfnWndProc = (WNDPROC) ConWndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = g_wv.hInstance; - wc.hIcon = LoadIcon( g_wv.hInstance, MAKEINTRESOURCE(IDI_ICON1)); - wc.hCursor = LoadCursor (NULL,IDC_ARROW); - wc.hbrBackground = (void *)COLOR_WINDOW; - wc.lpszMenuName = 0; - wc.lpszClassName = DEDCLASS; - - if ( !RegisterClass (&wc) ) - return; - - rect.left = 0; - rect.right = 540; - rect.top = 0; - rect.bottom = 450; - AdjustWindowRect( &rect, DEDSTYLE, FALSE ); - - hDC = GetDC( GetDesktopWindow() ); - swidth = GetDeviceCaps( hDC, HORZRES ); - sheight = GetDeviceCaps( hDC, VERTRES ); - ReleaseDC( GetDesktopWindow(), hDC ); - - s_wcd.windowWidth = rect.right - rect.left + 1; - s_wcd.windowHeight = rect.bottom - rect.top + 1; - - s_wcd.hWnd = CreateWindowEx( 0, - DEDCLASS, - CONSOLE_WINDOW_TITLE, - DEDSTYLE, - ( swidth - 600 ) / 2, ( sheight - 450 ) / 2 , rect.right - rect.left + 1, rect.bottom - rect.top + 1, - NULL, - NULL, - g_wv.hInstance, - NULL ); - - if ( s_wcd.hWnd == NULL ) - { - return; - } - - // - // create fonts - // - hDC = GetDC( s_wcd.hWnd ); - nHeight = -MulDiv( 8, GetDeviceCaps( hDC, LOGPIXELSY), 72); - - s_wcd.hfBufferFont = CreateFont( nHeight, - 0, - 0, - 0, - FW_LIGHT, - 0, - 0, - 0, - DEFAULT_CHARSET, - OUT_DEFAULT_PRECIS, - CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, - FF_MODERN | FIXED_PITCH, - "Courier New" ); - - ReleaseDC( s_wcd.hWnd, hDC ); - - // - // create the input line - // - s_wcd.hwndInputLine = CreateWindow( "edit", NULL, WS_CHILD | WS_VISIBLE | WS_BORDER | - ES_LEFT | ES_AUTOHSCROLL, - 6, 400, 528, 20, - s_wcd.hWnd, - ( HMENU ) INPUT_ID, // child window ID - g_wv.hInstance, NULL ); - - // - // create the buttons - // - s_wcd.hwndButtonCopy = CreateWindow( "button", NULL, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 5, 425, 72, 24, - s_wcd.hWnd, - ( HMENU ) COPY_ID, // child window ID - g_wv.hInstance, NULL ); - SendMessage( s_wcd.hwndButtonCopy, WM_SETTEXT, 0, ( LPARAM ) "copy" ); - - s_wcd.hwndButtonClear = CreateWindow( "button", NULL, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 82, 425, 72, 24, - s_wcd.hWnd, - ( HMENU ) CLEAR_ID, // child window ID - g_wv.hInstance, NULL ); - SendMessage( s_wcd.hwndButtonClear, WM_SETTEXT, 0, ( LPARAM ) "clear" ); - - s_wcd.hwndButtonQuit = CreateWindow( "button", NULL, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 462, 425, 72, 24, - s_wcd.hWnd, - ( HMENU ) QUIT_ID, // child window ID - g_wv.hInstance, NULL ); - SendMessage( s_wcd.hwndButtonQuit, WM_SETTEXT, 0, ( LPARAM ) "quit" ); - - - // - // create the scrollbuffer - // - s_wcd.hwndBuffer = CreateWindow( "edit", NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER | - ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY, - 6, 40, 526, 354, - s_wcd.hWnd, - ( HMENU ) EDIT_ID, // child window ID - g_wv.hInstance, NULL ); - SendMessage( s_wcd.hwndBuffer, WM_SETFONT, ( WPARAM ) s_wcd.hfBufferFont, 0 ); - - s_wcd.SysInputLineWndProc = ( WNDPROC ) SetWindowLong( s_wcd.hwndInputLine, GWL_WNDPROC, ( long ) InputLineWndProc ); - SendMessage( s_wcd.hwndInputLine, WM_SETFONT, ( WPARAM ) s_wcd.hfBufferFont, 0 ); - - ShowWindow( s_wcd.hWnd, SW_SHOWDEFAULT); - UpdateWindow( s_wcd.hWnd ); - SetForegroundWindow( s_wcd.hWnd ); - SetFocus( s_wcd.hwndInputLine ); - - s_wcd.visLevel = 1; -} - -/* -** Sys_DestroyConsole -*/ -void Sys_DestroyConsole( void ) { - if ( s_wcd.hWnd ) { - ShowWindow( s_wcd.hWnd, SW_HIDE ); - CloseWindow( s_wcd.hWnd ); - DestroyWindow( s_wcd.hWnd ); - s_wcd.hWnd = 0; - } -} - -/* -** Sys_ShowConsole -*/ -void Sys_ShowConsole( int visLevel, qboolean quitOnClose ) -{ - s_wcd.quitOnClose = quitOnClose; - - if ( visLevel == s_wcd.visLevel ) - { - return; - } - - s_wcd.visLevel = visLevel; - - if ( !s_wcd.hWnd ) - return; - - switch ( visLevel ) - { - case 0: - ShowWindow( s_wcd.hWnd, SW_HIDE ); - break; - case 1: - ShowWindow( s_wcd.hWnd, SW_SHOWNORMAL ); - SendMessage( s_wcd.hwndBuffer, EM_LINESCROLL, 0, 0xffff ); - break; - case 2: - ShowWindow( s_wcd.hWnd, SW_MINIMIZE ); - break; - default: - Sys_Error( "Invalid visLevel %d sent to Sys_ShowConsole\n", visLevel ); - break; - } -} - -/* -** Sys_ConsoleInput -*/ -char *Sys_ConsoleInput( void ) -{ - if ( s_wcd.consoleText[0] == 0 ) - { - return NULL; - } - - strcpy( s_wcd.returnedText, s_wcd.consoleText ); - s_wcd.consoleText[0] = 0; - - return s_wcd.returnedText; -} - -/* -** Conbuf_AppendText -*/ -void Conbuf_AppendText( const char *pMsg ) -{ -#define CONSOLE_BUFFER_SIZE 16384 - - char buffer[CONSOLE_BUFFER_SIZE*2]; - char *b = buffer; - const char *msg; - int bufLen; - int i = 0; - static unsigned long s_totalChars; - - // - // if the message is REALLY long, use just the last portion of it - // - if ( strlen( pMsg ) > CONSOLE_BUFFER_SIZE - 1 ) - { - msg = pMsg + strlen( pMsg ) - CONSOLE_BUFFER_SIZE + 1; - } - else - { - msg = pMsg; - } - - // - // copy into an intermediate buffer - // - while ( msg[i] && ( ( b - buffer ) < sizeof( buffer ) - 1 ) ) - { - if ( msg[i] == '\n' && msg[i+1] == '\r' ) - { - b[0] = '\r'; - b[1] = '\n'; - b += 2; - i++; - } - else if ( msg[i] == '\r' ) - { - b[0] = '\r'; - b[1] = '\n'; - b += 2; - } - else if ( msg[i] == '\n' ) - { - b[0] = '\r'; - b[1] = '\n'; - b += 2; - } - else if ( Q_IsColorString( &msg[i] ) ) - { - i++; - } - else - { - *b= msg[i]; - b++; - } - i++; - } - *b = 0; - bufLen = b - buffer; - - s_totalChars += bufLen; - - // - // replace selection instead of appending if we're overflowing - // - if ( s_totalChars > 0x7fff ) - { - SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 ); - s_totalChars = bufLen; - } - - // - // put this text into the windows console - // - SendMessage( s_wcd.hwndBuffer, EM_LINESCROLL, 0, 0xffff ); - SendMessage( s_wcd.hwndBuffer, EM_SCROLLCARET, 0, 0 ); - SendMessage( s_wcd.hwndBuffer, EM_REPLACESEL, 0, (LPARAM) buffer ); -} - -/* -** Sys_SetErrorText -*/ -void Sys_SetErrorText( const char *buf ) -{ - Q_strncpyz( s_wcd.errorString, buf, sizeof( s_wcd.errorString ) ); - - if ( !s_wcd.hwndErrorBox ) - { - s_wcd.hwndErrorBox = CreateWindow( "static", NULL, WS_CHILD | WS_VISIBLE | SS_SUNKEN, - 6, 5, 526, 30, - s_wcd.hWnd, - ( HMENU ) ERRORBOX_ID, // child window ID - g_wv.hInstance, NULL ); - SendMessage( s_wcd.hwndErrorBox, WM_SETFONT, ( WPARAM ) s_wcd.hfBufferFont, 0 ); - SetWindowText( s_wcd.hwndErrorBox, s_wcd.errorString ); - - DestroyWindow( s_wcd.hwndInputLine ); - s_wcd.hwndInputLine = NULL; - } -} diff --git a/code/win32/win_wndproc.c b/code/win32/win_wndproc.c deleted file mode 100644 index 3ff79252..00000000 --- a/code/win32/win_wndproc.c +++ /dev/null @@ -1,456 +0,0 @@ -/* -=========================================================================== -Copyright (C) 1999-2005 Id Software, Inc. - -This file is part of Quake III Arena source code. - -Quake III Arena source code is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -Quake III Arena source code is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -=========================================================================== -*/ - -#include "../client/client.h" -#include "win_local.h" - -WinVars_t g_wv; - -#ifndef WM_MOUSEWHEEL -#define WM_MOUSEWHEEL (WM_MOUSELAST+1) // message that will be supported by the OS -#endif - -static UINT MSH_MOUSEWHEEL; - -// Console variables that we need to access from this module -cvar_t *vid_xpos; // X coordinate of window position -cvar_t *vid_ypos; // Y coordinate of window position -cvar_t *r_fullscreen; - -#define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) ) - -LONG WINAPI MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); - -static qboolean s_alttab_disabled; - -static void WIN_DisableAltTab( void ) -{ - if ( s_alttab_disabled ) - return; - - if ( !Q_stricmp( Cvar_VariableString( "arch" ), "winnt" ) ) - { - RegisterHotKey( 0, 0, MOD_ALT, VK_TAB ); - } - else - { - BOOL old; - - SystemParametersInfo( SPI_SETSCREENSAVERRUNNING, 1, &old, 0 ); - } - s_alttab_disabled = qtrue; -} - -static void WIN_EnableAltTab( void ) -{ - if ( s_alttab_disabled ) - { - if ( !Q_stricmp( Cvar_VariableString( "arch" ), "winnt" ) ) - { - UnregisterHotKey( 0, 0 ); - } - else - { - BOOL old; - - SystemParametersInfo( SPI_SETSCREENSAVERRUNNING, 0, &old, 0 ); - } - - s_alttab_disabled = qfalse; - } -} - -/* -================== -VID_AppActivate -================== -*/ -static void VID_AppActivate(BOOL fActive, BOOL minimize) -{ - g_wv.isMinimized = minimize; - - Com_DPrintf("VID_AppActivate: %i\n", fActive ); - - Key_ClearStates(); // FIXME!!! - - // we don't want to act like we're active if we're minimized - if (fActive && !g_wv.isMinimized ) - { - g_wv.activeApp = qtrue; - } - else - { - g_wv.activeApp = qfalse; - } - - // minimize/restore mouse-capture on demand - if (!g_wv.activeApp ) - { - IN_Activate (qfalse); - } - else - { - IN_Activate (qtrue); - } -} - -//========================================================================== - -static byte s_scantokey[128] = - { -// 0 1 2 3 4 5 6 7 -// 8 9 A B C D E F - 0 , 27, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', K_BACKSPACE, 9, // 0 - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '[', ']', 13 , K_CTRL,'a', 's', // 1 - 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', - '\'' , '`', K_SHIFT,'\\', 'z', 'x', 'c', 'v', // 2 - 'b', 'n', 'm', ',', '.', '/', K_SHIFT,'*', - K_ALT,' ', K_CAPSLOCK , K_F1, K_F2, K_F3, K_F4, K_F5, // 3 - K_F6, K_F7, K_F8, K_F9, K_F10, K_PAUSE, 0 , K_HOME, - K_UPARROW,K_PGUP,K_KP_MINUS,K_LEFTARROW,K_KP_5,K_RIGHTARROW, K_KP_PLUS,K_END, //4 - K_DOWNARROW,K_PGDN,K_INS,K_DEL,0,0, 0, K_F11, - K_F12,0 , 0 , 0 , 0 , 0 , 0 , 0, // 5 - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, // 6 - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0, - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 // 7 -}; - -/* -======= -MapKey - -Map from windows to quake keynums -======= -*/ -static int MapKey (int key) -{ - int result; - int modified; - qboolean is_extended; - -// Com_Printf( "0x%x\n", key); - - modified = ( key >> 16 ) & 255; - - if ( modified > 127 ) - return 0; - - if ( key & ( 1 << 24 ) ) - { - is_extended = qtrue; - } - else - { - is_extended = qfalse; - } - - result = s_scantokey[modified]; - - if ( !is_extended ) - { - switch ( result ) - { - case K_HOME: - return K_KP_HOME; - case K_UPARROW: - return K_KP_UPARROW; - case K_PGUP: - return K_KP_PGUP; - case K_LEFTARROW: - return K_KP_LEFTARROW; - case K_RIGHTARROW: - return K_KP_RIGHTARROW; - case K_END: - return K_KP_END; - case K_DOWNARROW: - return K_KP_DOWNARROW; - case K_PGDN: - return K_KP_PGDN; - case K_INS: - return K_KP_INS; - case K_DEL: - return K_KP_DEL; - default: - return result; - } - } - else - { - switch ( result ) - { - case K_PAUSE: - return K_KP_NUMLOCK; - case 0x0D: - return K_KP_ENTER; - case 0x2F: - return K_KP_SLASH; - case 0xAF: - return K_KP_PLUS; - } - return result; - } -} - - -/* -==================== -MainWndProc - -main window procedure -==================== -*/ -extern cvar_t *in_mouse; -extern cvar_t *in_logitechbug; -LONG WINAPI MainWndProc ( - HWND hWnd, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - static qboolean flip = qtrue; - int zDelta, i; - - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/aboutmouseinput.asp - // Windows 95, Windows NT 3.51 - uses MSH_MOUSEWHEEL - // only relevant for non-DI input - // - // NOTE: not sure how reliable this is anymore, might trigger double wheel events - if (in_mouse->integer != 1) - { - if ( uMsg == MSH_MOUSEWHEEL ) - { - if ( ( ( int ) wParam ) > 0 ) - { - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); - } - else - { - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); - } - return DefWindowProc (hWnd, uMsg, wParam, lParam); - } - } - - switch (uMsg) - { - case WM_MOUSEWHEEL: - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/aboutmouseinput.asp - // Windows 98/Me, Windows NT 4.0 and later - uses WM_MOUSEWHEEL - // only relevant for non-DI input and when console is toggled in window mode - // if console is toggled in window mode (KEYCATCH_CONSOLE) then mouse is released and DI doesn't see any mouse wheel - if (in_mouse->integer != 1 || (!r_fullscreen->integer && (cls.keyCatchers & KEYCATCH_CONSOLE))) - { - // 120 increments, might be 240 and multiples if wheel goes too fast - // NOTE Logitech: logitech drivers are screwed and send the message twice? - // could add a cvar to interpret the message as successive press/release events - zDelta = ( short ) HIWORD( wParam ) / 120; - if ( zDelta > 0 ) - { - for(i=0; iinteger) - { - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); - } - else - { - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELUP, flip, 0, NULL ); - flip = !flip; - } - } - } - else - { - for(i=0; i<-zDelta; i++) - { - if (!in_logitechbug->integer) - { - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); - } - else - { - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, K_MWHEELDOWN, flip, 0, NULL ); - flip = !flip; - } - } - } - // when an application processes the WM_MOUSEWHEEL message, it must return zero - return 0; - } - break; - - case WM_CREATE: - - g_wv.hWnd = hWnd; - - vid_xpos = Cvar_Get ("vid_xpos", "3", CVAR_ARCHIVE); - vid_ypos = Cvar_Get ("vid_ypos", "22", CVAR_ARCHIVE); - r_fullscreen = Cvar_Get ("r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH ); - - MSH_MOUSEWHEEL = RegisterWindowMessage("MSWHEEL_ROLLMSG"); - if ( r_fullscreen->integer ) - { - WIN_DisableAltTab(); - } - else - { - WIN_EnableAltTab(); - } - - break; -#if 0 - case WM_DISPLAYCHANGE: - Com_DPrintf( "WM_DISPLAYCHANGE\n" ); - // we need to force a vid_restart if the user has changed - // their desktop resolution while the game is running, - // but don't do anything if the message is a result of - // our own calling of ChangeDisplaySettings - if ( com_insideVidInit ) { - break; // we did this on purpose - } - // something else forced a mode change, so restart all our gl stuff - Cbuf_AddText( "vid_restart\n" ); - break; -#endif - case WM_DESTROY: - // let sound and input know about this? - g_wv.hWnd = NULL; - if ( r_fullscreen->integer ) - { - WIN_EnableAltTab(); - } - break; - - case WM_CLOSE: - Cbuf_ExecuteText( EXEC_APPEND, "quit" ); - break; - - case WM_ACTIVATE: - { - int fActive, fMinimized; - - fActive = LOWORD(wParam); - fMinimized = (BOOL) HIWORD(wParam); - - VID_AppActivate( fActive != WA_INACTIVE, fMinimized); - SNDDMA_Activate(); - } - break; - - case WM_MOVE: - { - int xPos, yPos; - RECT r; - int style; - - if (!r_fullscreen->integer ) - { - xPos = (short) LOWORD(lParam); // horizontal position - yPos = (short) HIWORD(lParam); // vertical position - - r.left = 0; - r.top = 0; - r.right = 1; - r.bottom = 1; - - style = GetWindowLong( hWnd, GWL_STYLE ); - AdjustWindowRect( &r, style, FALSE ); - - Cvar_SetValue( "vid_xpos", xPos + r.left); - Cvar_SetValue( "vid_ypos", yPos + r.top); - vid_xpos->modified = qfalse; - vid_ypos->modified = qfalse; - if ( g_wv.activeApp ) - { - IN_Activate (qtrue); - } - } - } - break; - -// this is complicated because Win32 seems to pack multiple mouse events into -// one update sometimes, so we always check all states and look for events - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_RBUTTONDOWN: - case WM_RBUTTONUP: - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - case WM_MOUSEMOVE: - { - int temp; - - temp = 0; - - if (wParam & MK_LBUTTON) - temp |= 1; - - if (wParam & MK_RBUTTON) - temp |= 2; - - if (wParam & MK_MBUTTON) - temp |= 4; - - IN_MouseEvent (temp); - } - break; - - case WM_SYSCOMMAND: - if ( wParam == SC_SCREENSAVE ) - return 0; - break; - - case WM_SYSKEYDOWN: - if ( wParam == 13 ) - { - if ( r_fullscreen ) - { - Cvar_SetValue( "r_fullscreen", !r_fullscreen->integer ); - Cbuf_AddText( "vid_restart\n" ); - } - return 0; - } - // fall through - case WM_KEYDOWN: - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, MapKey( lParam ), qtrue, 0, NULL ); - break; - - case WM_SYSKEYUP: - case WM_KEYUP: - Sys_QueEvent( g_wv.sysMsgTime, SE_KEY, MapKey( lParam ), qfalse, 0, NULL ); - break; - - case WM_CHAR: - Sys_QueEvent( g_wv.sysMsgTime, SE_CHAR, wParam, 0, 0, NULL ); - break; - } - - return DefWindowProc( hWnd, uMsg, wParam, lParam ); -} - diff --git a/make-macosx-ub.sh b/make-macosx-ub.sh index 11ecf7e7..6f524f2f 100755 --- a/make-macosx-ub.sh +++ b/make-macosx-ub.sh @@ -2,7 +2,7 @@ APPBUNDLE=ioquake3.app BINARY=ioquake3.ub PKGINFO=APPLIOQ3 -ICNS=code/unix/MacSupport/ioquake3.icns +ICNS=misc/quake3.icns DESTDIR=build/release-darwin-ub BASEDIR=baseq3 MPACKDIR=missionpack diff --git a/code/unix/MacSupport/ioquake3.icns b/misc/quake3.icns old mode 100755 new mode 100644 similarity index 100% rename from code/unix/MacSupport/ioquake3.icns rename to misc/quake3.icns diff --git a/code/win32/qe3.ico b/misc/quake3.ico similarity index 100% rename from code/win32/qe3.ico rename to misc/quake3.ico diff --git a/code/unix/quake3.png b/misc/quake3.png similarity index 100% rename from code/unix/quake3.png rename to misc/quake3.png diff --git a/code/unix/quake3.svg b/misc/quake3.svg similarity index 100% rename from code/unix/quake3.svg rename to misc/quake3.svg diff --git a/misc/setup/MacOSX/SLA-dmg.sh b/misc/setup/MacOSX/SLA-dmg.sh new file mode 100755 index 00000000..af268f32 --- /dev/null +++ b/misc/setup/MacOSX/SLA-dmg.sh @@ -0,0 +1,73 @@ +#!/bin/bash +# +# This script appends the text from Q3A_EULA.txt to a .dmg as a SLA resource +# +# usage is './SLA-dmg.sh /path/to/Q3A_EULA.txt /path/to/ioquake3.dmg' +# + +if [ "x$1" = "x" ] || [ "x$2" = "x" ]; then + echo "usage: ./SLA-dmg.sh /path/to/Q3A_EULA.txt /path/to/ioquake3.dmg" + exit 1; +fi + +if [ ! -r $1 ]; then + echo "$1 is not a readable Q3A_EULA.txt file" + exit 1; +fi +if [ ! -w $2 ]; then + echo "$2 is not writable .dmg file" + exit 1; +fi +touch tmp.r +if [ ! -w tmp.r ]; then + echo "Could not create temporary file tmp.r for writing" + exit 1; +fi + +echo " +data 'LPic' (5000) { + \$\"0002 0011 0003 0001 0000 0000 0002 0000\" + \$\"0008 0003 0000 0001 0004 0000 0004 0005\" + \$\"0000 000E 0006 0001 0005 0007 0000 0007\" + \$\"0008 0000 0047 0009 0000 0034 000A 0001\" + \$\"0035 000B 0001 0020 000C 0000 0011 000D\" + \$\"0000 005B 0004 0000 0033 000F 0001 000C\" + \$\"0010 0000 000B 000E 0000\" +}; + +data 'TEXT' (5002, \"English\") { +" > tmp.r + +sed -e 's/"/\\"/g' -e 's/\(.*\)$/"\1\\n"/g' $1 >> tmp.r + +echo " +}; + +resource 'STR#' (5002, \"English\") { + { + \"English\", + \"Agree\", + \"Disagree\", + \"Print\", + \"Save...\", + \"IMPORTANT - Read this License Agreement carefully before clicking on \" + \"the \\\"Agree\\\" button. By clicking on the \\\"Agree\\\" button, you agree \" + \"to be bound by the terms of the License Agreement.\", + \"Software License Agreement\", + \"This text cannot be saved. This disk may be full or locked, or the \" + \"file may be locked.\", + \"Unable to print. Make sure you have selected a printer.\" + } +}; +" >> tmp.r + +hdiutil convert -format UDCO -o tmp.dmg $2 || exit 1 +hdiutil unflatten tmp.dmg || exit 1 +/Developer/Tools/Rez /Developer/Headers/FlatCarbon/*.r tmp.r -a -o tmp.dmg \ + || exit 1 +hdiutil flatten tmp.dmg || exit 1 +hdiutil internet-enable -yes tmp.dmg || exit 1 +mv tmp.dmg $2 || (echo "Could not copy tmp.dmg to $2" && exit 1) +rm tmp.dmg +rm tmp.r +echo "SLA $1 successfully added to $2" diff --git a/code/unix/setup/Makefile b/misc/setup/Makefile similarity index 100% rename from code/unix/setup/Makefile rename to misc/setup/Makefile diff --git a/code/unix/setup/Solaris_pkg.sh b/misc/setup/Solaris_pkg.sh similarity index 100% rename from code/unix/setup/Solaris_pkg.sh rename to misc/setup/Solaris_pkg.sh diff --git a/code/unix/setup/doit b/misc/setup/doit similarity index 100% rename from code/unix/setup/doit rename to misc/setup/doit diff --git a/code/unix/setup/ioq3demo.sh b/misc/setup/ioq3demo.sh similarity index 100% rename from code/unix/setup/ioq3demo.sh rename to misc/setup/ioq3demo.sh diff --git a/code/unix/setup/ioquake3.sh b/misc/setup/ioquake3.sh similarity index 100% rename from code/unix/setup/ioquake3.sh rename to misc/setup/ioquake3.sh diff --git a/code/unix/setup/pkg/ioq3ded.sh b/misc/setup/pkg/ioq3ded.sh similarity index 100% rename from code/unix/setup/pkg/ioq3ded.sh rename to misc/setup/pkg/ioq3ded.sh diff --git a/code/unix/setup/pkg/ioquake3.sh b/misc/setup/pkg/ioquake3.sh similarity index 100% rename from code/unix/setup/pkg/ioquake3.sh rename to misc/setup/pkg/ioquake3.sh diff --git a/code/unix/setup/pkg/ioquake3/depend b/misc/setup/pkg/ioquake3/depend similarity index 100% rename from code/unix/setup/pkg/ioquake3/depend rename to misc/setup/pkg/ioquake3/depend diff --git a/code/unix/setup/pkg/ioquake3/pkginfo.template b/misc/setup/pkg/ioquake3/pkginfo.template similarity index 100% rename from code/unix/setup/pkg/ioquake3/pkginfo.template rename to misc/setup/pkg/ioquake3/pkginfo.template diff --git a/code/unix/setup/pkg/ioquake3/postinstall b/misc/setup/pkg/ioquake3/postinstall similarity index 100% rename from code/unix/setup/pkg/ioquake3/postinstall rename to misc/setup/pkg/ioquake3/postinstall diff --git a/code/unix/setup/pkg/ioquake3/postremove b/misc/setup/pkg/ioquake3/postremove similarity index 100% rename from code/unix/setup/pkg/ioquake3/postremove rename to misc/setup/pkg/ioquake3/postremove diff --git a/code/unix/setup/pkg/ioquake3/preinstall b/misc/setup/pkg/ioquake3/preinstall similarity index 100% rename from code/unix/setup/pkg/ioquake3/preinstall rename to misc/setup/pkg/ioquake3/preinstall diff --git a/code/unix/setup/pkg/ioquake3/preremove b/misc/setup/pkg/ioquake3/preremove similarity index 100% rename from code/unix/setup/pkg/ioquake3/preremove rename to misc/setup/pkg/ioquake3/preremove diff --git a/code/unix/setup/pkg/ioquake3/prototype.template b/misc/setup/pkg/ioquake3/prototype.template similarity index 100% rename from code/unix/setup/pkg/ioquake3/prototype.template rename to misc/setup/pkg/ioquake3/prototype.template diff --git a/code/unix/setup/pkg/ioquake3/space b/misc/setup/pkg/ioquake3/space similarity index 100% rename from code/unix/setup/pkg/ioquake3/space rename to misc/setup/pkg/ioquake3/space diff --git a/code/unix/setup/pkg/ioquake3d/depend b/misc/setup/pkg/ioquake3d/depend similarity index 100% rename from code/unix/setup/pkg/ioquake3d/depend rename to misc/setup/pkg/ioquake3d/depend diff --git a/code/unix/setup/pkg/ioquake3d/pkginfo.template b/misc/setup/pkg/ioquake3d/pkginfo.template similarity index 100% rename from code/unix/setup/pkg/ioquake3d/pkginfo.template rename to misc/setup/pkg/ioquake3d/pkginfo.template diff --git a/code/unix/setup/pkg/ioquake3d/postinstall b/misc/setup/pkg/ioquake3d/postinstall similarity index 100% rename from code/unix/setup/pkg/ioquake3d/postinstall rename to misc/setup/pkg/ioquake3d/postinstall diff --git a/code/unix/setup/pkg/ioquake3d/postremove b/misc/setup/pkg/ioquake3d/postremove similarity index 100% rename from code/unix/setup/pkg/ioquake3d/postremove rename to misc/setup/pkg/ioquake3d/postremove diff --git a/code/unix/setup/pkg/ioquake3d/preinstall b/misc/setup/pkg/ioquake3d/preinstall similarity index 100% rename from code/unix/setup/pkg/ioquake3d/preinstall rename to misc/setup/pkg/ioquake3d/preinstall diff --git a/code/unix/setup/pkg/ioquake3d/preremove b/misc/setup/pkg/ioquake3d/preremove similarity index 100% rename from code/unix/setup/pkg/ioquake3d/preremove rename to misc/setup/pkg/ioquake3d/preremove diff --git a/code/unix/setup/pkg/ioquake3d/prototype.template b/misc/setup/pkg/ioquake3d/prototype.template similarity index 100% rename from code/unix/setup/pkg/ioquake3d/prototype.template rename to misc/setup/pkg/ioquake3d/prototype.template diff --git a/code/unix/setup/pkg/ioquake3d/space b/misc/setup/pkg/ioquake3d/space similarity index 100% rename from code/unix/setup/pkg/ioquake3d/space rename to misc/setup/pkg/ioquake3d/space diff --git a/code/unix/setup/preuninstall.sh b/misc/setup/preuninstall.sh similarity index 100% rename from code/unix/setup/preuninstall.sh rename to misc/setup/preuninstall.sh diff --git a/code/unix/setup/setup.xml b/misc/setup/setup.xml similarity index 100% rename from code/unix/setup/setup.xml rename to misc/setup/setup.xml diff --git a/code/unix/setup/splash.xpm b/misc/setup/splash.xpm similarity index 100% rename from code/unix/setup/splash.xpm rename to misc/setup/splash.xpm