ref: b10d6e123329a38a29030744bf232ac03387cee5
parent: c05151aa1b7ac81866cf937c973e7038035dfe53
author: Konstantinn Bonnet <[email protected]>
date: Sun Mar 1 17:07:44 EST 2015
nuke most useless code and files from orbit
--- a/baseq2/config.cfg
+++ /dev/null
@@ -1,150 +1,0 @@
-// generated by quake, do not modify
-bind TAB "inven"
-bind ENTER "invuse"
-bind ESCAPE "togglemenu"
-bind SPACE "+moveup"
-bind ' "inven_drop"
-bind + "sizeup"
-bind , "+moveleft"
-bind - "sizedown"
-bind . "+moveright"
-bind / "weapnext"
-bind 0 "use BFG10K"
-bind 1 "use Blaster"
-bind 2 "use Shotgun"
-bind 3 "use Super Shotgun"
-bind 4 "use Machinegun"
-bind 5 "use Chaingun"
-bind 6 "use Grenade Launcher"
-bind 7 "use Rocket Launcher"
-bind 8 "use HyperBlaster"
-bind 9 "use Railgun"
-bind = "sizeup"
-bind [ "invprev"
-bind \ "+mlook"
-bind ] "invnext"
-bind ` "toggleconsole"
-bind a "+moveleft"
-bind b "use rebreather"
-bind c "+movedown"
-bind d "+moveright"
-bind e "weapnext"
-bind g "use grenades"
-bind h "wave 0"
-bind i "use invulnerability"
-bind j "wave 1"
-bind k "wave 2"
-bind l "wave 3"
-bind p "use shield"
-bind q "invprev"
-bind r "invuse"
-bind s "+back"
-bind t "messagemode"
-bind u "wave 4"
-bind w "+forward"
-bind x "centerview"
-bind z "+movedown"
-bind ~ "toggleconsole"
-bind BACKSPACE "invdrop"
-bind UPARROW "+forward"
-bind DOWNARROW "+back"
-bind LEFTARROW "+left"
-bind RIGHTARROW "+right"
-bind ALT "+strafe"
-bind CTRL "+attack"
-bind SHIFT "+speed"
-bind F1 "cmd help"
-bind F2 "menu_savegame"
-bind F3 "menu_loadgame"
-bind F4 "give ammo"
-bind F5 "give weapons"
-bind F6 "r_speeds 0"
-bind F7 "r_speeds 1"
-bind F8 "notarget"
-bind F9 "noclip"
-bind F10 "god"
-bind F11 "screenshot"
-bind F12 "quit"
-bind INS "+klook"
-bind DEL "+lookdown"
-bind PGDN "+lookup"
-bind PGUP "+lookup"
-bind END "centerview"
-bind MOUSE1 "+attack"
-bind MOUSE2 "+strafe"
-bind MOUSE3 "+mlook"
-bind PAUSE "pause"
-set gl_3dlabs_broken "1"
-set gl_swapinterval "1"
-set gl_ext_compiled_vertex_array "1"
-set gl_ext_pointparameters "1"
-set gl_ext_multitexture "1"
-set gl_ext_palettedtexture "1"
-set gl_ext_swapinterval "1"
-set gl_vertex_arrays "0"
-set gl_texturesolidmode "default"
-set gl_texturealphamode "default"
-set gl_texturemode "GL_LINEAR_MIPMAP_NEAREST"
-set gl_driver "opengl32"
-set gl_finish "0"
-set gl_shadows "0"
-set gl_mode "3"
-set gl_modulate "1"
-set gl_particle_att_c "0.01"
-set gl_particle_att_b "0.0"
-set gl_particle_att_a "0.01"
-set gl_particle_size "40"
-set gl_particle_max_size "40"
-set gl_particle_min_size "2"
-set g_select_empty "0"
-set in_joystick "0"
-set in_mouse "1"
-set cl_vwep "1"
-set gender_auto "1"
-set gender "male"
-set fov "90"
-set msg "1"
-set rate "25000"
-set freelook "0"
-set cl_stereo_separation "0.4"
-set adr8 ""
-set adr7 ""
-set adr6 ""
-set adr5 ""
-set adr4 ""
-set adr3 ""
-set adr2 ""
-set adr1 ""
-set adr0 ""
-set cd_nocd "0"
-set s_primary "0"
-set s_mixahead "0.2"
-set s_loadas8bit "1"
-set s_khz "11"
-set s_volume "0.7"
-set sw_mode "0"
-set sw_stipplealpha "0"
-set sw_allow_modex "1"
-set vid_gamma "1"
-set vid_ypos "32"
-set vid_xpos "115"
-set vid_ref "gl"
-set sv_reconnect_limit "3"
-set allow_download_maps "1"
-set allow_download_sounds "1"
-set allow_download_models "1"
-set allow_download_players "0"
-set allow_download "0"
-set hostname "noname"
-set skin "male/grunt"
-set name "hook"
-set lookstrafe "0"
-set lookspring "1"
-set m_pitch "-0.022000"
-set hand "2"
-set cl_run "0"
-set crosshair "1"
-set sensitivity "9.000000"
-set win_noalttab "0"
-set vid_fullscreen "0"
-set viewsize "100"
binary files a/baseq2/save/save0/game.ssv /dev/null differ
binary files a/baseq2/save/save0/server.ssv /dev/null differ
--- a/ctf/Makefile.Linux.i386
+++ /dev/null
@@ -1,159 +1,0 @@
-#
-# Quake2 gamei386.so Makefile for Linux 2.0
-#
-# Jan '98 by Zoid <[email protected]>
-#
-# ELF only
-#
-# Probably requires GNU make
-#
-# This builds the gamei386.so for Linux based on the q2source_12_11.zip
-# release.
-# Put his Makefile in the game subdirectory you get when you unzip
-# q2source_12_11.zip.
-#
-# There are two compiler errors you'll get, the following fixes
-# are necessary:
-#
-# In g_local.h (around line 828), you must change the
-# typedef struct g_client_s { ... } gclient_t;
-# to just:
-# struct g_client_s { ... };
-# The typedef is already defined elsewhere (seems to compile fine under
-# MSCV++ for Win32 for some reason).
-#
-# m_player.h has a Ctrl-Z at the end (damn DOS editors). Remove it or
-# gcc complains.
-#
-# Note that the source in q2source_12_11.zip is for version 3.05. To
-# get it to run with Linux 3.10, change the following in game.h:
-# #define GAME_API_VERSION 1
-# change it to:
-# #define GAME_API_VERSION 2
-
-ARCH=i386
-CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp
-
-#use these cflags to optimize it
-CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
- -malign-jumps=2 -malign-functions=2
-#use these when debugging
-#CFLAGS=$(BASE_CFLAGS) -g
-
-OBJDIR=linux
-
-LDFLAGS=-ldl -lm
-SHLIBEXT=so
-SHLIBCFLAGS=-fPIC
-SHLIBLDFLAGS=-shared
-
-DO_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-
-#############################################################################
-# SETUP AND BUILD
-# GAME
-#############################################################################
-
-GAME_OBJS = \
- $(OBJDIR)/g_ai.o $(OBJDIR)/p_client.o $(OBJDIR)/g_svcmds.o $(OBJDIR)/g_cmds.o \
- $(OBJDIR)/g_combat.o $(OBJDIR)/g_func.o $(OBJDIR)/g_items.o \
- $(OBJDIR)/g_main.o $(OBJDIR)/g_misc.o $(OBJDIR)/g_monster.o $(OBJDIR)/g_phys.o \
- $(OBJDIR)/g_save.o $(OBJDIR)/g_spawn.o \
- $(OBJDIR)/g_target.o $(OBJDIR)/g_trigger.o $(OBJDIR)/g_utils.o $(OBJDIR)/g_weapon.o \
- $(OBJDIR)/m_move.o \
- $(OBJDIR)/p_hud.o $(OBJDIR)/p_trail.o $(OBJDIR)/p_view.o $(OBJDIR)/p_weapon.o \
- $(OBJDIR)/q_shared.o $(OBJDIR)/g_ctf.o $(OBJDIR)/p_menu.o $(OBJDIR)/g_chase.o
-
-game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
-
-$(OBJDIR)/g_ai.o : g_ai.c
- $(DO_CC)
-
-$(OBJDIR)/p_client.o : p_client.c
- $(DO_CC)
-
-$(OBJDIR)/g_svcmds.o : g_svcmds.c
- $(DO_CC)
-
-$(OBJDIR)/g_cmds.o : g_cmds.c
- $(DO_CC)
-
-$(OBJDIR)/g_combat.o : g_combat.c
- $(DO_CC)
-
-$(OBJDIR)/g_func.o : g_func.c
- $(DO_CC)
-
-$(OBJDIR)/g_items.o : g_items.c
- $(DO_CC)
-
-$(OBJDIR)/g_main.o : g_main.c
- $(DO_CC)
-
-$(OBJDIR)/g_misc.o : g_misc.c
- $(DO_CC)
-
-$(OBJDIR)/g_monster.o : g_monster.c
- $(DO_CC)
-
-$(OBJDIR)/g_phys.o : g_phys.c
- $(DO_CC)
-
-$(OBJDIR)/g_save.o : g_save.c
- $(DO_CC)
-
-$(OBJDIR)/g_spawn.o : g_spawn.c
- $(DO_CC)
-
-$(OBJDIR)/g_target.o : g_target.c
- $(DO_CC)
-
-$(OBJDIR)/g_trigger.o : g_trigger.c
- $(DO_CC)
-
-$(OBJDIR)/g_utils.o : g_utils.c
- $(DO_CC)
-
-$(OBJDIR)/g_weapon.o : g_weapon.c
- $(DO_CC)
-
-$(OBJDIR)/m_move.o : m_move.c
- $(DO_CC)
-
-$(OBJDIR)/p_hud.o : p_hud.c
- $(DO_CC)
-
-$(OBJDIR)/p_trail.o : p_trail.c
- $(DO_CC)
-
-$(OBJDIR)/p_view.o : p_view.c
- $(DO_CC)
-
-$(OBJDIR)/p_weapon.o : p_weapon.c
- $(DO_CC)
-
-$(OBJDIR)/q_shared.o : q_shared.c
- $(DO_CC)
-
-$(OBJDIR)/g_ctf.o : g_ctf.c
- $(DO_CC)
-
-$(OBJDIR)/p_menu.o : p_menu.c
- $(DO_CC)
-
-$(OBJDIR)/g_chase.o : g_chase.c
- $(DO_CC)
-
-#############################################################################
-# MISC
-#############################################################################
-
-clean:
- -rm -f $(GAME_OBJS)
-
-depend:
- gcc -MM $(GAME_OBJS:.o=.c)
-
--- a/gnu.txt
+++ /dev/null
@@ -1,87 +1,0 @@
-GNU GENERAL PUBLIC LICENSE
-Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-Preamble
-The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
-
-
-a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
-
-c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
-These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
-Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
-The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
-If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
-
-9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-
-END OF TERMS AND CONDITIONS
--- a/irix/cd_irix.c
+++ /dev/null
@@ -1,40 +1,0 @@
-#include <sys/types.h>
-#include <cdaudio.h>
-
-#include "../client/client.h"
-
-void CDAudio_Play(int track, qboolean looping)
-{
- Com_Printf("XXX - CDAudio_Play %i (%i)\n", track, looping);
-}
-
-
-void CDAudio_Stop(void)
-{
- Com_Printf("XXX - CDAudio_Stop\n");
-}
-
-
-void CDAudio_Resume(void)
-{
- Com_Printf("XXX - CDAudio_Resume\n");
-}
-
-
-void CDAudio_Update(void)
-{
-/* Com_Printf("XXX - CDAudio_Update\n"); */
-}
-
-
-int CDAudio_Init(void)
-{
- Com_Printf("XXX - CDAudio_Init\n");
- return 0;
-}
-
-
-void CDAudio_Shutdown(void)
-{
- Com_Printf("XXX - CDAudio_Shutdown\n");
-}
--- a/irix/glw_imp.c
+++ /dev/null
@@ -1,927 +1,0 @@
-/*
-** 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
-**
-*/
-
-#include <signal.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XShm.h>
-#include <Xm/MwmUtil.h>
-
-#include <GL/glx.h>
-
-#include "../ref_gl/gl_local.h"
-#include "../client/keys.h"
-#include "../linux/rw_linux.h"
-
-GLXContext gl_cx;
-
-static qboolean doShm;
-static Display *x_disp;
-static Colormap x_cmap;
-static Window x_win;
-static GC x_gc;
-static Visual *x_vis;
-static XVisualInfo *x_visinfo;
-
-static int StudlyRGBattributes[] =
-{
- GLX_DOUBLEBUFFER,
- GLX_RGBA,
- GLX_RED_SIZE, 4,
- GLX_GREEN_SIZE, 4,
- GLX_BLUE_SIZE, 4,
- GLX_DEPTH_SIZE, 1,
- GLX_SAMPLES_SGIS, 4, /* for better AA */
- None,
-};
-
-static int RGBattributes[] =
-{
- GLX_DOUBLEBUFFER,
- GLX_RGBA,
- GLX_RED_SIZE, 4,
- GLX_GREEN_SIZE, 4,
- GLX_BLUE_SIZE, 4,
- GLX_DEPTH_SIZE, 1,
- None,
-};
-
-#define STD_EVENT_MASK (StructureNotifyMask | KeyPressMask \
- | KeyReleaseMask | ExposureMask | PointerMotionMask | \
- ButtonPressMask | ButtonReleaseMask)
-
-int current_framebuffer;
-static int x_shmeventtype;
-//static XShmSegmentInfo x_shminfo;
-
-static qboolean oktodraw = false;
-static qboolean X11_active = false;
-
-struct
-{
- int key;
- int down;
-} keyq[64];
-int keyq_head=0;
-int keyq_tail=0;
-
-static int mx, my;
-static int p_mouse_x, p_mouse_y;
-static cvar_t *_windowed_mouse;
-
-static cvar_t *sensitivity;
-static cvar_t *lookstrafe;
-static cvar_t *m_side;
-static cvar_t *m_yaw;
-static cvar_t *m_pitch;
-static cvar_t *m_forward;
-static cvar_t *freelook;
-
-int config_notify=0;
-int config_notify_width;
-int config_notify_height;
-
-typedef unsigned short PIXEL;
-
-// Console variables that we need to access from this module
-
-/*****************************************************************************/
-/* MOUSE */
-/*****************************************************************************/
-
-// this is inside the renderer shared lib, so these are called from vid_so
-
-static qboolean mouse_avail;
-static int mouse_buttonstate;
-static int mouse_oldbuttonstate;
-static int mouse_x, mouse_y;
-static int old_mouse_x, old_mouse_y;
-static float old_windowed_mouse;
-static int p_mouse_x, p_mouse_y;
-
-static cvar_t *_windowed_mouse;
-static cvar_t *m_filter;
-static cvar_t *in_mouse;
-
-static qboolean mlooking;
-
-// state struct passed in Init
-static in_state_t *in_state;
-
-int XShmQueryExtension(Display *);
-int XShmGetEventBase(Display *);
-
-static void signal_handler(int sig)
-{
- fprintf(stderr, "Received signal %d, exiting...\n", sig);
- GLimp_Shutdown();
- _exit(0);
-}
-
-static void InitSig(void)
-{
- struct sigaction sa;
- sigaction(SIGINT, 0, &sa);
- sa.sa_handler = signal_handler;
- sigaction(SIGINT, &sa, 0);
- sigaction(SIGTERM, &sa, 0);
-}
-
-/*
-** GLimp_SetMode
-*/
-int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
- int width, height;
- GLint attribs[32];
-
- fprintf(stderr, "GLimp_SetMode\n");
-
- ri.Con_Printf( PRINT_ALL, "Initializing OpenGL display\n");
-
- ri.Con_Printf (PRINT_ALL, "...setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( &width, &height, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d\n", width, height );
-
- // destroy the existing window
- GLimp_Shutdown ();
-
- *pwidth = width;
- *pheight = height;
-
- if ( !GLimp_InitGraphics( fullscreen ) ) {
- // failed to set a valid mode in windowed mode
- return rserr_invalid_mode;
- }
-/* gl_cx = glXCreateContext( x_disp, x_visinfo, 0, True ); */
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (width, height);
-
- return rserr_ok;
-}
-
-/*
-** 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 )
-{
- fprintf(stderr, "GLimp_Shutdown\n");
-
- if (!x_disp)
- return;
-
- XSynchronize( x_disp, True );
- XAutoRepeatOn(x_disp);
- XCloseDisplay(x_disp);
- x_disp = NULL;
-}
-
-/*
-** GLimp_Init
-**
-** This routine is responsible for initializing the OS specific portions
-** of OpenGL.
-*/
-int GLimp_Init( void *hinstance, void *wndproc )
-{
-// catch signals so i can turn on auto-repeat and stuff
- InitSig();
-
- return true;
-}
-
-/*
-** GLimp_BeginFrame
-*/
-void GLimp_BeginFrame( float camera_seperation )
-{
-}
-
-/*
-** 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)
-{
- glFlush();
- glXSwapBuffers( x_disp, x_win );
-}
-
-/*
-** GLimp_AppActivate
-*/
-void GLimp_AppActivate( qboolean active )
-{
-}
-
-// ========================================================================
-// 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;
-}
-
-/*
-** GLimp_InitGraphics
-**
-** This initializes the GL implementation specific
-** graphics subsystem.
-**
-** The necessary width and height parameters are grabbed from
-** vid.width and vid.height.
-*/
-qboolean GLimp_InitGraphics( qboolean fullscreen )
-{
- int pnum, i;
- XVisualInfo template;
- int num_visuals;
- int template_mask;
-
- fprintf(stderr, "GLimp_InitGraphics\n");
-
- srandom(getpid());
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (vid.width, vid.height);
-
- // open the display
- x_disp = XOpenDisplay(NULL);
- if (!x_disp)
- {
- if (getenv("DISPLAY"))
- Sys_Error("VID: Could not open display [%s]\n",
- getenv("DISPLAY"));
- else
- Sys_Error("VID: Could not open local display\n");
- }
- else
- fprintf(stderr, "VID: Opened display %s\n", getenv("DISPLAY"));
-
- XAutoRepeatOff(x_disp);
-
-// for debugging only
- XSynchronize(x_disp, True);
-
-// check for command-line window size
- template_mask = 0;
-
-#if 0
-// specify a visual id
- if ((pnum=COM_CheckParm("-visualid")))
- {
- if (pnum >= com_argc-1)
- Sys_Error("VID: -visualid <id#>\n");
- template.visualid = Q_atoi(com_argv[pnum+1]);
- template_mask = VisualIDMask;
- }
-
-// If not specified, use default visual
- else
-#endif
- {
- int screen;
- screen = XDefaultScreen(x_disp);
- template.visualid =
- XVisualIDFromVisual(XDefaultVisual(x_disp, screen));
- template_mask = VisualIDMask;
- }
-
-// pick a visual- warn if more than one was available
-
- x_visinfo = glXChooseVisual( x_disp, DefaultScreen( x_disp ),
- StudlyRGBattributes );
- if (!x_visinfo)
- {
- fprintf(stderr, "Using non studly RGB attributes\n");
- x_visinfo = glXChooseVisual( x_disp, DefaultScreen( x_disp ),
- RGBattributes );
- if (!x_visinfo) Sys_Error( "No matching visual available!\n" );
- }
-
- ri.Con_Printf(PRINT_ALL, "Using visualid 0x%x:\n",
- (int)(x_visinfo->visualid));
-#if 0
- if (verbose)
- {
- printf("Using visualid %d:\n", (int)(x_visinfo->visualid));
- printf(" screen %d\n", x_visinfo->screen);
- printf(" red_mask 0x%x\n", (int)(x_visinfo->red_mask));
- printf(" green_mask 0x%x\n", (int)(x_visinfo->green_mask));
- printf(" blue_mask 0x%x\n", (int)(x_visinfo->blue_mask));
- printf(" colormap_size %d\n", x_visinfo->colormap_size);
- printf(" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
- }
-#endif
-
- x_vis = x_visinfo->visual;
-
-// setup attributes for main window
- {
- int attribmask = CWEventMask | CWColormap | CWBorderPixel;
- XSetWindowAttributes attribs;
- Colormap tmpcmap;
-
- Window root_win = XRootWindow(x_disp, x_visinfo->screen);
-
- tmpcmap = XCreateColormap(x_disp, root_win, x_vis, AllocNone);
-
-
- attribs.event_mask = STD_EVENT_MASK;
- attribs.border_pixel = 0;
- attribs.colormap = tmpcmap;
-
-// create the main window
- x_win = XCreateWindow( x_disp,
- root_win,
- 0, 0, // x, y
- vid.width, vid.height,
- 0, // borderwidth
- x_visinfo->depth,
- InputOutput,
- x_vis,
- attribmask,
- &attribs );
- XStoreName(x_disp, x_win, "Quake II");
-
- if (x_visinfo->class != TrueColor)
- XFreeColormap(x_disp, tmpcmap);
- }
-
- if (x_visinfo->depth == 8)
- {
- // create and upload the palette
- if (x_visinfo->class == PseudoColor)
- {
- x_cmap = XCreateColormap(x_disp, x_win, x_vis, AllocAll);
- XSetWindowColormap(x_disp, x_win, x_cmap);
- }
-
- }
-
-// inviso cursor
- XDefineCursor(x_disp, x_win, CreateNullCursor(x_disp, x_win));
-
-// create the GC
- {
- XGCValues xgcvalues;
- int valuemask = GCGraphicsExposures;
- xgcvalues.graphics_exposures = False;
- x_gc = XCreateGC(x_disp, x_win, valuemask, &xgcvalues );
- }
-
-// set window properties for full screen
- if (fullscreen) {
- MotifWmHints wmhints;
- Atom aHints;
- XSizeHints sizehints;
- XWindowChanges changes;
-
- aHints = XInternAtom( x_disp, "_MOTIF_WM_HINTS", 0 );
- if (aHints == None)
- {
- ri.Con_Printf( PRINT_ALL, "Could not intern X atom for _MOTIF_WM_HINTS." );
-/* return( false ); */
- }
- else {
- wmhints.flags = MWM_HINTS_DECORATIONS;
- wmhints.decorations = 0; // Absolutely no decorations.
- XChangeProperty(x_disp, x_win, aHints, aHints, 32,
- PropModeReplace, (unsigned char *)&wmhints,
- 4 );
-
- sizehints.flags = USPosition | USSize;
- sizehints.x = 0;
- sizehints.y = 0;
- sizehints.width = vid.width;
- sizehints.height = vid.height;
- XSetWMNormalHints( x_disp, x_win, &sizehints );
-
- changes.x = 0;
- changes.y = 0;
- changes.width = vid.width;
- changes.height = vid.height;
- changes.stack_mode = TopIf;
- XConfigureWindow(x_disp, x_win,
- CWX | CWY | CWWidth | CWHeight | CWStackMode,
- &changes);
- }
- }
-
-// map the window
- XMapWindow(x_disp, x_win);
-
-// wait for first exposure event
- {
- XEvent event;
- do
- {
- XNextEvent(x_disp, &event);
- if (event.type == Expose && !event.xexpose.count)
- oktodraw = true;
- } while (!oktodraw);
- }
-// now safe to draw
-
- gl_cx = glXCreateContext( x_disp, x_visinfo, 0, True );
- if (!glXMakeCurrent( x_disp, x_win, gl_cx ))
- Sys_Error( "Can't make window current to context\n" );
-
-// even if MITSHM is available, make sure it's a local connection
-#if 0
-// This is messing up the DISPLAY environment variable so can't close and
-// reopen the window (it lops off the :0.0)...
- if (XShmQueryExtension(x_disp))
- {
- char *displayname;
- doShm = true;
- displayname = (char *) getenv("DISPLAY");
- if (displayname)
- {
- char *d = displayname;
- while (*d && (*d != ':')) d++;
- if (*d) *d = 0;
- if (!(!strcasecmp(displayname, "unix") || !*displayname))
- doShm = false;
- }
- }
-#endif
-
-#if 0
- if (doShm)
- {
- x_shmeventtype = XShmGetEventBase(x_disp) + ShmCompletion;
- ResetSharedFrameBuffers();
- }
- else
- ResetFrameBuffer();
-#endif
-
- current_framebuffer = 0;
-/* vid.rowbytes = x_framebuffer[0]->bytes_per_line; */
-/* vid.buffer = x_framebuffer[0]->data; */
-
-// XSynchronize(x_disp, False);
-
- X11_active = true;
-
- return true;
-}
-
-/*****************************************************************************/
-
-int XLateKey(XKeyEvent *ev)
-{
-
- int key;
- char buf[64];
- KeySym keysym;
-
- key = 0;
-
- XLookupString(ev, buf, sizeof buf, &keysym, 0);
-
- switch(keysym)
- {
- case XK_KP_Page_Up: key = K_KP_PGUP; break;
- case XK_Page_Up: key = K_PGUP; break;
-
- case XK_KP_Page_Down: key = K_KP_PGDN; break;
- case XK_Page_Down: key = K_PGDN; break;
-
- case XK_KP_Home: key = K_KP_HOME; break;
- case XK_Home: key = K_HOME; break;
-
- case XK_KP_End: key = K_KP_END; break;
- case XK_End: key = K_END; break;
-
- case XK_KP_Left: key = K_KP_LEFTARROW; break;
- case XK_Left: key = K_LEFTARROW; break;
-
- case XK_KP_Right: key = K_KP_RIGHTARROW; break;
- case XK_Right: key = K_RIGHTARROW; break;
-
- case XK_KP_Down: key = K_KP_DOWNARROW; break;
- case XK_Down: key = K_DOWNARROW; break;
-
- case XK_KP_Up: 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;
-
- case XK_BackSpace: key = K_BACKSPACE; break;
-
- case XK_KP_Delete: 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: 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;
-
-#if 0
- case 0x021: key = '1';break;/* [!] */
- case 0x040: key = '2';break;/* [@] */
- case 0x023: key = '3';break;/* [#] */
- case 0x024: key = '4';break;/* [$] */
- case 0x025: key = '5';break;/* [%] */
- case 0x05e: key = '6';break;/* [^] */
- case 0x026: key = '7';break;/* [&] */
- case 0x02a: key = '8';break;/* [*] */
- case 0x028: key = '9';;break;/* [(] */
- case 0x029: key = '0';break;/* [)] */
- case 0x05f: key = '-';break;/* [_] */
- case 0x02b: key = '=';break;/* [+] */
- case 0x07c: key = '\'';break;/* [|] */
- case 0x07d: key = '[';break;/* [}] */
- case 0x07b: key = ']';break;/* [{] */
- case 0x022: key = '\'';break;/* ["] */
- case 0x03a: key = ';';break;/* [:] */
- case 0x03f: key = '/';break;/* [?] */
- case 0x03e: key = '.';break;/* [>] */
- case 0x03c: key = ',';break;/* [<] */
-#endif
-
- default:
- key = *(unsigned char*)buf;
- if (key >= 'A' && key <= 'Z')
- key = key - 'A' + 'a';
- break;
- }
-
- return key;
-}
-
-void GetEvent(void)
-{
- XEvent x_event;
- int b;
-
- XNextEvent(x_disp, &x_event);
- switch(x_event.type) {
- case KeyPress:
- keyq[keyq_head].key = XLateKey(&x_event.xkey);
- keyq[keyq_head].down = true;
- keyq_head = (keyq_head + 1) & 63;
- break;
- case KeyRelease:
- keyq[keyq_head].key = XLateKey(&x_event.xkey);
- keyq[keyq_head].down = false;
- keyq_head = (keyq_head + 1) & 63;
- break;
-
- case MotionNotify:
- if (_windowed_mouse->value) {
- mx += ((int)x_event.xmotion.x - (int)(vid.width/2));
- my += ((int)x_event.xmotion.y - (int)(vid.height/2));
-
- /* move the mouse to the window center again */
- XSelectInput(x_disp,x_win, STD_EVENT_MASK & ~PointerMotionMask);
- XWarpPointer(x_disp,None,x_win,0,0,0,0,
- (vid.width/2),(vid.height/2));
- XSelectInput(x_disp,x_win, STD_EVENT_MASK);
- } else {
- mx = ((int)x_event.xmotion.x - (int)p_mouse_x);
- my = ((int)x_event.xmotion.y - (int)p_mouse_y);
- p_mouse_x=x_event.xmotion.x;
- p_mouse_y=x_event.xmotion.y;
- }
- break;
-
- case ButtonPress:
- b=-1;
- if (x_event.xbutton.button == 1)
- b = 0;
- else if (x_event.xbutton.button == 2)
- b = 2;
- else if (x_event.xbutton.button == 3)
- b = 1;
- if (b>=0)
- mouse_buttonstate |= 1<<b;
- break;
-
- case ButtonRelease:
- b=-1;
- if (x_event.xbutton.button == 1)
- b = 0;
- else if (x_event.xbutton.button == 2)
- b = 2;
- else if (x_event.xbutton.button == 3)
- b = 1;
- if (b>=0)
- mouse_buttonstate &= ~(1<<b);
- break;
-
- case ConfigureNotify:
- config_notify_width = x_event.xconfigure.width;
- config_notify_height = x_event.xconfigure.height;
- config_notify = 1;
- break;
-
- default:
- if (doShm && x_event.type == x_shmeventtype)
- oktodraw = true;
- }
-
- if (old_windowed_mouse != _windowed_mouse->value) {
- old_windowed_mouse = _windowed_mouse->value;
-
- if (!_windowed_mouse->value) {
- /* ungrab the pointer */
- XUngrabPointer(x_disp,CurrentTime);
- } else {
- /* grab the pointer */
- XGrabPointer(x_disp,x_win,True,0,GrabModeAsync,
- GrabModeAsync,x_win,None,CurrentTime);
- }
- }
-}
-
-/*****************************************************************************/
-
-/*****************************************************************************/
-/* KEYBOARD */
-/*****************************************************************************/
-
-Key_Event_fp_t Key_Event_fp;
-
-void KBD_Init(Key_Event_fp_t fp)
-{
- _windowed_mouse = ri.Cvar_Get ("_windowed_mouse", "0", CVAR_ARCHIVE);
- Key_Event_fp = fp;
-}
-
-void KBD_Update(void)
-{
-// get events from x server
- if (x_disp)
- {
- while (XPending(x_disp))
- GetEvent();
- while (keyq_head != keyq_tail)
- {
- Key_Event_fp(keyq[keyq_tail].key, keyq[keyq_tail].down);
- keyq_tail = (keyq_tail + 1) & 63;
- }
- }
-}
-
-void KBD_Close(void)
-{
-}
-
-
-static void Force_CenterView_f (void)
-{
- in_state->viewangles[PITCH] = 0;
-}
-
-static void RW_IN_MLookDown (void)
-{
- mlooking = true;
-}
-
-static void RW_IN_MLookUp (void)
-{
- mlooking = false;
- in_state->IN_CenterView_fp ();
-}
-
-void RW_IN_Init(in_state_t *in_state_p)
-{
- int mtype;
- int i;
-
- fprintf(stderr, "GL RW_IN_Init\n");
-
- in_state = in_state_p;
-
- // mouse variables
- _windowed_mouse = ri.Cvar_Get ("_windowed_mouse", "0", CVAR_ARCHIVE);
- m_filter = ri.Cvar_Get ("m_filter", "0", 0);
- in_mouse = ri.Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
- freelook = ri.Cvar_Get( "freelook", "0", 0 );
- lookstrafe = ri.Cvar_Get ("lookstrafe", "0", 0);
- sensitivity = ri.Cvar_Get ("sensitivity", "3", 0);
- m_pitch = ri.Cvar_Get ("m_pitch", "0.022", 0);
- m_yaw = ri.Cvar_Get ("m_yaw", "0.022", 0);
- m_forward = ri.Cvar_Get ("m_forward", "1", 0);
- m_side = ri.Cvar_Get ("m_side", "0.8", 0);
-
- ri.Cmd_AddCommand ("+mlook", RW_IN_MLookDown);
- ri.Cmd_AddCommand ("-mlook", RW_IN_MLookUp);
-
- ri.Cmd_AddCommand ("force_centerview", Force_CenterView_f);
-
- mouse_x = mouse_y = 0.0;
- mouse_avail = true;
-}
-
-void RW_IN_Shutdown(void)
-{
- mouse_avail = false;
-
- ri.Cmd_RemoveCommand ("force_centerview");
- ri.Cmd_RemoveCommand ("+mlook");
- ri.Cmd_RemoveCommand ("-mlook");
-}
-
-/*
-===========
-IN_Commands
-===========
-*/
-void RW_IN_Commands (void)
-{
- int i;
-
- if (!mouse_avail)
- return;
-
- for (i=0 ; i<3 ; i++) {
- if ( (mouse_buttonstate & (1<<i)) && !(mouse_oldbuttonstate & (1<<i)) )
- in_state->Key_Event_fp (K_MOUSE1 + i, true);
-
- if ( !(mouse_buttonstate & (1<<i)) && (mouse_oldbuttonstate & (1<<i)) )
- in_state->Key_Event_fp (K_MOUSE1 + i, false);
- }
- mouse_oldbuttonstate = mouse_buttonstate;
-}
-
-/*
-===========
-IN_Move
-===========
-*/
-void RW_IN_Move (usercmd_t *cmd)
-{
- if (!mouse_avail)
- return;
-
- if (m_filter->value)
- {
- mouse_x = (mx + old_mouse_x) * 0.5;
- mouse_y = (my + old_mouse_y) * 0.5;
- } else {
- mouse_x = mx;
- mouse_y = my;
- }
-
- old_mouse_x = mx;
- old_mouse_y = my;
-
- if (!mouse_x && !mouse_y)
- return;
-
- mouse_x *= sensitivity->value;
- mouse_y *= sensitivity->value;
-
-// add mouse X/Y movement to cmd
- if ( (*in_state->in_strafe_state & 1) ||
- (lookstrafe->value && mlooking ))
- cmd->sidemove += m_side->value * mouse_x;
- else
- in_state->viewangles[YAW] -= m_yaw->value * mouse_x;
-
- if ( (mlooking || freelook->value) &&
- !(*in_state->in_strafe_state & 1))
- {
- in_state->viewangles[PITCH] += m_pitch->value * mouse_y;
- }
- else
- {
- cmd->forwardmove -= m_forward->value * mouse_y;
- }
- mx = my = 0;
-}
-
-void RW_IN_Frame (void)
-{
-}
-
-void RW_IN_Activate(void)
-{
-}
-
-
-//===============================================================================
-
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-
- int r;
- unsigned long addr;
- int psize = getpagesize();
-
- addr = (startaddr & ~(psize-1)) - psize;
-
-// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
-// addr, startaddr+length, length);
-
- r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
-
- if (r < 0)
- Sys_Error("Protection change failed\n");
-
-}
--- a/irix/q_shirix.c
+++ /dev/null
@@ -1,200 +1,0 @@
-#include <sys/types.h>
-#include <errno.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/time.h>
-
-#include "../linux/glob.h"
-
-#include "../qcommon/qcommon.h"
-
-//===============================================================================
-
-byte *membase;
-int maxhunksize;
-int curhunksize;
-
-void *Hunk_Begin (int maxsize)
-{
- maxhunksize = maxsize + sizeof(int);
- curhunksize = 0;
-/* membase = mmap(0, maxhunksize, PROT_READ|PROT_WRITE, */
-/* MAP_PRIVATE, -1, 0); */
-/* if ((membase == NULL) || (membase == MAP_FAILED)) */
- membase = malloc(maxhunksize);
- if (membase == NULL)
- Com_Error(ERR_FATAL, "unable to virtual allocate %d bytes", maxsize);
-
- *((int *)membase) = curhunksize;
-
- return membase + sizeof(int);
-}
-
-void *Hunk_Alloc (int size)
-{
- byte *buf;
-
- // round to cacheline
- size = (size+31)&~31;
- if (curhunksize + size > maxhunksize)
- Com_Error(ERR_FATAL, "Hunk_Alloc overflow");
- buf = membase + sizeof(int) + curhunksize;
- curhunksize += size;
- return buf;
-}
-
-int Hunk_End (void)
-{
- return curhunksize;
-}
-
-void Hunk_Free (void *base)
-{
- byte *m;
-
- if (base) {
- m = ((byte *)base) - sizeof(int);
- free(m);
- }
-}
-
-//===============================================================================
-
-
-/*
-================
-Sys_Milliseconds
-================
-*/
-int curtime;
-int Sys_Milliseconds (void)
-{
- struct timeval tp;
- struct timezone tzp;
- static int secbase;
-
- gettimeofday(&tp, &tzp);
-
- if (!secbase)
- {
- secbase = tp.tv_sec;
- return tp.tv_usec/1000;
- }
-
- curtime = (tp.tv_sec - secbase)*1000 + tp.tv_usec/1000;
-
- return curtime;
-}
-
-void Sys_Mkdir (char *path)
-{
- mkdir (path, 0777);
-}
-
-char *strlwr (char *s)
-{
- char *origs = s;
- while (*s) {
- *s = tolower(*s);
- s++;
- }
- return origs;
-}
-
-//============================================
-
-static char findbase[MAX_OSPATH];
-static char findpath[MAX_OSPATH];
-static char findpattern[MAX_OSPATH];
-static DIR *fdir;
-
-static qboolean CompareAttributes(char *path, char *name,
- unsigned musthave, unsigned canthave )
-{
- struct stat st;
- char fn[MAX_OSPATH];
-
-// . and .. never match
- if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
- return false;
-
- sprintf(fn, "%s/%s", path, name);
- if (stat(fn, &st) == -1)
- return false; // shouldn't happen
-
- if ( ( st.st_mode & S_IFDIR ) && ( canthave & SFF_SUBDIR ) )
- return false;
-
- if ( ( musthave & SFF_SUBDIR ) && !( st.st_mode & S_IFDIR ) )
- return false;
-
- return true;
-}
-
-char *Sys_FindFirst (char *path, unsigned musthave, unsigned canhave)
-{
- struct dirent *d;
- char *p;
-
- if (fdir)
- Sys_Error ("Sys_BeginFind without close");
-
-// COM_FilePath (path, findbase);
- strcpy(findbase, path);
-
- if ((p = strrchr(findbase, '/')) != NULL) {
- *p = 0;
- strcpy(findpattern, p + 1);
- } else
- strcpy(findpattern, "*");
-
- if (strcmp(findpattern, "*.*") == 0)
- strcpy(findpattern, "*");
-
- if ((fdir = opendir(findbase)) == NULL)
- return NULL;
- while ((d = readdir(fdir)) != NULL) {
- if (!*findpattern || glob_match(findpattern, d->d_name)) {
-// if (*findpattern)
-// printf("%s matched %s\n", findpattern, d->d_name);
- if (CompareAttributes(findbase, d->d_name, musthave, canhave)) {
- sprintf (findpath, "%s/%s", findbase, d->d_name);
- return findpath;
- }
- }
- }
- return NULL;
-}
-
-char *Sys_FindNext (unsigned musthave, unsigned canhave)
-{
- struct dirent *d;
-
- if (fdir == NULL)
- return NULL;
- while ((d = readdir(fdir)) != NULL) {
- if (!*findpattern || glob_match(findpattern, d->d_name)) {
-// if (*findpattern)
-// printf("%s matched %s\n", findpattern, d->d_name);
- if (CompareAttributes(findbase, d->d_name, musthave, canhave)) {
- sprintf (findpath, "%s/%s", findbase, d->d_name);
- return findpath;
- }
- }
- }
- return NULL;
-}
-
-void Sys_FindClose (void)
-{
- if (fdir != NULL)
- closedir(fdir);
- fdir = NULL;
-}
-
-
-//============================================
-
--- a/irix/qgl_irix.c
+++ /dev/null
@@ -1,3997 +1,0 @@
-/*
-** QGL_WIN.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
-*/
-#define QGL
-#include "../ref_gl/gl_local.h"
-
-static FILE *log_fp = NULL;
-
-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 * 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 * 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( log_fp, "glAccum\n" );
- dllAccum( op, value );
-}
-
-static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref)
-{
- fprintf( log_fp, "glAlphaFunc( 0x%x, %f )\n", func, ref );
- dllAlphaFunc( func, ref );
-}
-
-static GLboolean APIENTRY logAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
-{
- fprintf( log_fp, "glAreTexturesResident\n" );
- return dllAreTexturesResident( n, textures, residences );
-}
-
-static void APIENTRY logArrayElement(GLint i)
-{
- fprintf( log_fp, "glArrayElement\n" );
- dllArrayElement( i );
-}
-
-static void APIENTRY logBegin(GLenum mode)
-{
- fprintf( log_fp, "glBegin( 0x%x )\n", mode );
- dllBegin( mode );
-}
-
-static void APIENTRY logBindTexture(GLenum target, GLuint texture)
-{
- fprintf( 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( log_fp, "glBitmap\n" );
- dllBitmap( width, height, xorig, yorig, xmove, ymove, bitmap );
-}
-
-static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor)
-{
- fprintf( log_fp, "glBlendFunc( 0x%x, 0x%x )\n", sfactor, dfactor );
- dllBlendFunc( sfactor, dfactor );
-}
-
-static void APIENTRY logCallList(GLuint list)
-{
- fprintf( log_fp, "glCallList( %u )\n", list );
- dllCallList( list );
-}
-
-static void APIENTRY logCallLists(GLsizei n, GLenum type, const void *lists)
-{
- fprintf( log_fp, "glCallLists\n" );
- dllCallLists( n, type, lists );
-}
-
-static void APIENTRY logClear(GLbitfield mask)
-{
- fprintf( log_fp, "glClear\n" );
- dllClear( mask );
-}
-
-static void APIENTRY logClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- fprintf( log_fp, "glClearAccum\n" );
- dllClearAccum( red, green, blue, alpha );
-}
-
-static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- fprintf( log_fp, "glClearColor\n" );
- dllClearColor( red, green, blue, alpha );
-}
-
-static void APIENTRY logClearDepth(GLclampd depth)
-{
- fprintf( log_fp, "glClearDepth\n" );
- dllClearDepth( depth );
-}
-
-static void APIENTRY logClearIndex(GLfloat c)
-{
- fprintf( log_fp, "glClearIndex\n" );
- dllClearIndex( c );
-}
-
-static void APIENTRY logClearStencil(GLint s)
-{
- fprintf( log_fp, "glClearStencil\n" );
- dllClearStencil( s );
-}
-
-static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation)
-{
- fprintf( log_fp, "glClipPlane\n" );
- dllClipPlane( plane, equation );
-}
-
-static void APIENTRY logColor3b(GLbyte red, GLbyte green, GLbyte blue)
-{
- fprintf( log_fp, "glColor3b\n" );
- dllColor3b( red, green, blue );
-}
-
-static void APIENTRY logColor3bv(const GLbyte *v)
-{
- fprintf( log_fp, "glColor3bv\n" );
- dllColor3bv( v );
-}
-
-static void APIENTRY logColor3d(GLdouble red, GLdouble green, GLdouble blue)
-{
- fprintf( log_fp, "glColor3d\n" );
- dllColor3d( red, green, blue );
-}
-
-static void APIENTRY logColor3dv(const GLdouble *v)
-{
- fprintf( log_fp, "glColor3dv\n" );
- dllColor3dv( v );
-}
-
-static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue)
-{
- fprintf( log_fp, "glColor3f\n" );
- dllColor3f( red, green, blue );
-}
-
-static void APIENTRY logColor3fv(const GLfloat *v)
-{
- fprintf( log_fp, "glColor3fv\n" );
- dllColor3fv( v );
-}
-
-static void APIENTRY logColor3i(GLint red, GLint green, GLint blue)
-{
- fprintf( log_fp, "glColor3i\n" );
- dllColor3i( red, green, blue );
-}
-
-static void APIENTRY logColor3iv(const GLint *v)
-{
- fprintf( log_fp, "glColor3iv\n" );
- dllColor3iv( v );
-}
-
-static void APIENTRY logColor3s(GLshort red, GLshort green, GLshort blue)
-{
- fprintf( log_fp, "glColor3s\n" );
- dllColor3s( red, green, blue );
-}
-
-static void APIENTRY logColor3sv(const GLshort *v)
-{
- fprintf( log_fp, "glColor3sv\n" );
- dllColor3sv( v );
-}
-
-static void APIENTRY logColor3ub(GLubyte red, GLubyte green, GLubyte blue)
-{
- fprintf( log_fp, "glColor3ub\n" );
- dllColor3ub( red, green, blue );
-}
-
-static void APIENTRY logColor3ubv(const GLubyte *v)
-{
- fprintf( log_fp, "glColor3ubv\n" );
- dllColor3ubv( v );
-}
-
-#define SIG( x ) fprintf( 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)
-{
- SIG( "glColor4f" );
- dllColor4f( red, green, blue, alpha );
-}
-static void APIENTRY logColor4fv(const GLfloat *v)
-{
- SIG( "glColor4fv" );
- 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( log_fp, "glDisable( 0x%x )\n", 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( log_fp, "glEnable( 0x%x )\n", 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( 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( 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)
-{
- 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( 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( 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( 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( 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)
-{
- 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 )
-{
- 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;
-
- qglColorTableEXT = NULL;
-
-}
-
-/*
-** 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 )
-{
- gl_config.allow_cds = true;
-
- qglAccum = dllAccum = glAccum;
- qglAlphaFunc = dllAlphaFunc = glAlphaFunc;
- qglAreTexturesResident = dllAreTexturesResident = glAreTexturesResident;
- qglArrayElement = dllArrayElement = glArrayElement;
- qglBegin = dllBegin = glBegin;
- qglBindTexture = dllBindTexture = glBindTexture;
- qglBitmap = dllBitmap = glBitmap;
- qglBlendFunc = dllBlendFunc = glBlendFunc;
- qglCallList = dllCallList = glCallList;
- qglCallLists = dllCallLists = glCallLists;
- qglClear = dllClear = glClear;
- qglClearAccum = dllClearAccum = glClearAccum;
- qglClearColor = dllClearColor = glClearColor;
- qglClearDepth = dllClearDepth = glClearDepth;
- qglClearIndex = dllClearIndex = glClearIndex;
- qglClearStencil = dllClearStencil = glClearStencil;
- qglClipPlane = dllClipPlane = glClipPlane;
- qglColor3b = dllColor3b = glColor3b;
- qglColor3bv = dllColor3bv = glColor3bv;
- qglColor3d = dllColor3d = glColor3d;
- qglColor3dv = dllColor3dv = glColor3dv;
- qglColor3f = dllColor3f = glColor3f;
- qglColor3fv = dllColor3fv = glColor3fv;
- qglColor3i = dllColor3i = glColor3i;
- qglColor3iv = dllColor3iv = glColor3iv;
- qglColor3s = dllColor3s = glColor3s;
- qglColor3sv = dllColor3sv = glColor3sv;
- qglColor3ub = dllColor3ub = glColor3ub;
- qglColor3ubv = dllColor3ubv = glColor3ubv;
- qglColor3ui = dllColor3ui = glColor3ui;
- qglColor3uiv = dllColor3uiv = glColor3uiv;
- qglColor3us = dllColor3us = glColor3us;
- qglColor3usv = dllColor3usv = glColor3usv;
- qglColor4b = dllColor4b = glColor4b;
- qglColor4bv = dllColor4bv = glColor4bv;
- qglColor4d = dllColor4d = glColor4d;
- qglColor4dv = dllColor4dv = glColor4dv;
- qglColor4f = dllColor4f = glColor4f;
- qglColor4fv = dllColor4fv = glColor4fv;
- qglColor4i = dllColor4i = glColor4i;
- qglColor4iv = dllColor4iv = glColor4iv;
- qglColor4s = dllColor4s = glColor4s;
- qglColor4sv = dllColor4sv = glColor4sv;
- qglColor4ub = dllColor4ub = glColor4ub;
- qglColor4ubv = dllColor4ubv = glColor4ubv;
- qglColor4ui = dllColor4ui = glColor4ui;
- qglColor4uiv = dllColor4uiv = glColor4uiv;
- qglColor4us = dllColor4us = glColor4us;
- qglColor4usv = dllColor4usv = glColor4usv;
- qglColorMask = dllColorMask = glColorMask;
- qglColorMaterial = dllColorMaterial = glColorMaterial;
- qglColorPointer = dllColorPointer = glColorPointer;
- qglCopyPixels = dllCopyPixels = glCopyPixels;
- qglCopyTexImage1D = dllCopyTexImage1D = glCopyTexImage1D;
- qglCopyTexImage2D = dllCopyTexImage2D = glCopyTexImage2D;
- qglCopyTexSubImage1D = dllCopyTexSubImage1D = glCopyTexSubImage1D;
- qglCopyTexSubImage2D = dllCopyTexSubImage2D = glCopyTexSubImage2D;
- qglCullFace = dllCullFace = glCullFace;
- qglDeleteLists = dllDeleteLists = glDeleteLists;
- qglDeleteTextures = dllDeleteTextures = glDeleteTextures;
- qglDepthFunc = dllDepthFunc = glDepthFunc;
- qglDepthMask = dllDepthMask = glDepthMask;
- qglDepthRange = dllDepthRange = glDepthRange;
- qglDisable = dllDisable = glDisable;
- qglDisableClientState = dllDisableClientState = glDisableClientState;
- qglDrawArrays = dllDrawArrays = glDrawArrays;
- qglDrawBuffer = dllDrawBuffer = glDrawBuffer;
- qglDrawElements = dllDrawElements = glDrawElements;
- qglDrawPixels = dllDrawPixels = glDrawPixels;
- qglEdgeFlag = dllEdgeFlag = glEdgeFlag;
- qglEdgeFlagPointer = dllEdgeFlagPointer = glEdgeFlagPointer;
- qglEdgeFlagv = dllEdgeFlagv = glEdgeFlagv;
- qglEnable = dllEnable = glEnable;
- qglEnableClientState = dllEnableClientState = glEnableClientState;
- qglEnd = dllEnd = glEnd;
- qglEndList = dllEndList = glEndList;
- qglEvalCoord1d = dllEvalCoord1d = glEvalCoord1d;
- qglEvalCoord1dv = dllEvalCoord1dv = glEvalCoord1dv;
- qglEvalCoord1f = dllEvalCoord1f = glEvalCoord1f;
- qglEvalCoord1fv = dllEvalCoord1fv = glEvalCoord1fv;
- qglEvalCoord2d = dllEvalCoord2d = glEvalCoord2d;
- qglEvalCoord2dv = dllEvalCoord2dv = glEvalCoord2dv;
- qglEvalCoord2f = dllEvalCoord2f = glEvalCoord2f;
- qglEvalCoord2fv = dllEvalCoord2fv = glEvalCoord2fv;
- qglEvalMesh1 = dllEvalMesh1 = glEvalMesh1;
- qglEvalMesh2 = dllEvalMesh2 = glEvalMesh2;
- qglEvalPoint1 = dllEvalPoint1 = glEvalPoint1;
- qglEvalPoint2 = dllEvalPoint2 = glEvalPoint2;
- qglFeedbackBuffer = dllFeedbackBuffer = glFeedbackBuffer;
- qglFinish = dllFinish = glFinish;
- qglFlush = dllFlush = glFlush;
- qglFogf = dllFogf = glFogf;
- qglFogfv = dllFogfv = glFogfv;
- qglFogi = dllFogi = glFogi;
- qglFogiv = dllFogiv = glFogiv;
- qglFrontFace = dllFrontFace = glFrontFace;
- qglFrustum = dllFrustum = glFrustum;
- qglGenLists = dllGenLists = glGenLists;
- qglGenTextures = dllGenTextures = glGenTextures;
- qglGetBooleanv = dllGetBooleanv = glGetBooleanv;
- qglGetClipPlane = dllGetClipPlane = glGetClipPlane;
- qglGetDoublev = dllGetDoublev = glGetDoublev;
- qglGetError = dllGetError = glGetError;
- qglGetFloatv = dllGetFloatv = glGetFloatv;
- qglGetIntegerv = dllGetIntegerv = glGetIntegerv;
- qglGetLightfv = dllGetLightfv = glGetLightfv;
- qglGetLightiv = dllGetLightiv = glGetLightiv;
- qglGetMapdv = dllGetMapdv = glGetMapdv;
- qglGetMapfv = dllGetMapfv = glGetMapfv;
- qglGetMapiv = dllGetMapiv = glGetMapiv;
- qglGetMaterialfv = dllGetMaterialfv = glGetMaterialfv;
- qglGetMaterialiv = dllGetMaterialiv = glGetMaterialiv;
- qglGetPixelMapfv = dllGetPixelMapfv = glGetPixelMapfv;
- qglGetPixelMapuiv = dllGetPixelMapuiv = glGetPixelMapuiv;
- qglGetPixelMapusv = dllGetPixelMapusv = glGetPixelMapusv;
- qglGetPointerv = dllGetPointerv = glGetPointerv;
- qglGetPolygonStipple = dllGetPolygonStipple = glGetPolygonStipple;
- qglGetString = dllGetString = glGetString;
- qglGetTexEnvfv = dllGetTexEnvfv = glGetTexEnvfv;
- qglGetTexEnviv = dllGetTexEnviv = glGetTexEnviv;
- qglGetTexGendv = dllGetTexGendv = glGetTexGendv;
- qglGetTexGenfv = dllGetTexGenfv = glGetTexGenfv;
- qglGetTexGeniv = dllGetTexGeniv = glGetTexGeniv;
- qglGetTexImage = dllGetTexImage = glGetTexImage;
-// qglGetTexLevelParameterfv = dllGetTexLevelParameterfv = glGetLevelParameterfv;
-// qglGetTexLevelParameteriv = dllGetTexLevelParameteriv = glGetLevelParameteriv;
- qglGetTexParameterfv = dllGetTexParameterfv = glGetTexParameterfv;
- qglGetTexParameteriv = dllGetTexParameteriv = glGetTexParameteriv;
- qglHint = dllHint = glHint;
- qglIndexMask = dllIndexMask = glIndexMask;
- qglIndexPointer = dllIndexPointer = glIndexPointer;
- qglIndexd = dllIndexd = glIndexd;
- qglIndexdv = dllIndexdv = glIndexdv;
- qglIndexf = dllIndexf = glIndexf;
- qglIndexfv = dllIndexfv = glIndexfv;
- qglIndexi = dllIndexi = glIndexi;
- qglIndexiv = dllIndexiv = glIndexiv;
- qglIndexs = dllIndexs = glIndexs;
- qglIndexsv = dllIndexsv = glIndexsv;
- qglIndexub = dllIndexub = glIndexub;
- qglIndexubv = dllIndexubv = glIndexubv;
- qglInitNames = dllInitNames = glInitNames;
- qglInterleavedArrays = dllInterleavedArrays = glInterleavedArrays;
- qglIsEnabled = dllIsEnabled = glIsEnabled;
- qglIsList = dllIsList = glIsList;
- qglIsTexture = dllIsTexture = glIsTexture;
- qglLightModelf = dllLightModelf = glLightModelf;
- qglLightModelfv = dllLightModelfv = glLightModelfv;
- qglLightModeli = dllLightModeli = glLightModeli;
- qglLightModeliv = dllLightModeliv = glLightModeliv;
- qglLightf = dllLightf = glLightf;
- qglLightfv = dllLightfv = glLightfv;
- qglLighti = dllLighti = glLighti;
- qglLightiv = dllLightiv = glLightiv;
- qglLineStipple = dllLineStipple = glLineStipple;
- qglLineWidth = dllLineWidth = glLineWidth;
- qglListBase = dllListBase = glListBase;
- qglLoadIdentity = dllLoadIdentity = glLoadIdentity;
- qglLoadMatrixd = dllLoadMatrixd = glLoadMatrixd;
- qglLoadMatrixf = dllLoadMatrixf = glLoadMatrixf;
- qglLoadName = dllLoadName = glLoadName;
- qglLogicOp = dllLogicOp = glLogicOp;
- qglMap1d = dllMap1d = glMap1d;
- qglMap1f = dllMap1f = glMap1f;
- qglMap2d = dllMap2d = glMap2d;
- qglMap2f = dllMap2f = glMap2f;
- qglMapGrid1d = dllMapGrid1d = glMapGrid1d;
- qglMapGrid1f = dllMapGrid1f = glMapGrid1f;
- qglMapGrid2d = dllMapGrid2d = glMapGrid2d;
- qglMapGrid2f = dllMapGrid2f = glMapGrid2f;
- qglMaterialf = dllMaterialf = glMaterialf;
- qglMaterialfv = dllMaterialfv = glMaterialfv;
- qglMateriali = dllMateriali = glMateriali;
- qglMaterialiv = dllMaterialiv = glMaterialiv;
- qglMatrixMode = dllMatrixMode = glMatrixMode;
- qglMultMatrixd = dllMultMatrixd = glMultMatrixd;
- qglMultMatrixf = dllMultMatrixf = glMultMatrixf;
- qglNewList = dllNewList = glNewList;
- qglNormal3b = dllNormal3b = glNormal3b;
- qglNormal3bv = dllNormal3bv = glNormal3bv;
- qglNormal3d = dllNormal3d = glNormal3d;
- qglNormal3dv = dllNormal3dv = glNormal3dv;
- qglNormal3f = dllNormal3f = glNormal3f;
- qglNormal3fv = dllNormal3fv = glNormal3fv;
- qglNormal3i = dllNormal3i = glNormal3i;
- qglNormal3iv = dllNormal3iv = glNormal3iv;
- qglNormal3s = dllNormal3s = glNormal3s;
- qglNormal3sv = dllNormal3sv = glNormal3sv;
- qglNormalPointer = dllNormalPointer = glNormalPointer;
- qglOrtho = dllOrtho = glOrtho;
- qglPassThrough = dllPassThrough = glPassThrough;
- qglPixelMapfv = dllPixelMapfv = glPixelMapfv;
- qglPixelMapuiv = dllPixelMapuiv = glPixelMapuiv;
- qglPixelMapusv = dllPixelMapusv = glPixelMapusv;
- qglPixelStoref = dllPixelStoref = glPixelStoref;
- qglPixelStorei = dllPixelStorei = glPixelStorei;
- qglPixelTransferf = dllPixelTransferf = glPixelTransferf;
- qglPixelTransferi = dllPixelTransferi = glPixelTransferi;
- qglPixelZoom = dllPixelZoom = glPixelZoom;
- qglPointSize = dllPointSize = glPointSize;
- qglPolygonMode = dllPolygonMode = glPolygonMode;
- qglPolygonOffset = dllPolygonOffset = glPolygonOffset;
- qglPolygonStipple = dllPolygonStipple = glPolygonStipple;
- qglPopAttrib = dllPopAttrib = glPopAttrib;
- qglPopClientAttrib = dllPopClientAttrib = glPopClientAttrib;
- qglPopMatrix = dllPopMatrix = glPopMatrix;
- qglPopName = dllPopName = glPopName;
- qglPrioritizeTextures = dllPrioritizeTextures = glPrioritizeTextures;
- qglPushAttrib = dllPushAttrib = glPushAttrib;
- qglPushClientAttrib = dllPushClientAttrib = glPushClientAttrib;
- qglPushMatrix = dllPushMatrix = glPushMatrix;
- qglPushName = dllPushName = glPushName;
- qglRasterPos2d = dllRasterPos2d = glRasterPos2d;
- qglRasterPos2dv = dllRasterPos2dv = glRasterPos2dv;
- qglRasterPos2f = dllRasterPos2f = glRasterPos2f;
- qglRasterPos2fv = dllRasterPos2fv = glRasterPos2fv;
- qglRasterPos2i = dllRasterPos2i = glRasterPos2i;
- qglRasterPos2iv = dllRasterPos2iv = glRasterPos2iv;
- qglRasterPos2s = dllRasterPos2s = glRasterPos2s;
- qglRasterPos2sv = dllRasterPos2sv = glRasterPos2sv;
- qglRasterPos3d = dllRasterPos3d = glRasterPos3d;
- qglRasterPos3dv = dllRasterPos3dv = glRasterPos3dv;
- qglRasterPos3f = dllRasterPos3f = glRasterPos3f;
- qglRasterPos3fv = dllRasterPos3fv = glRasterPos3fv;
- qglRasterPos3i = dllRasterPos3i = glRasterPos3i;
- qglRasterPos3iv = dllRasterPos3iv = glRasterPos3iv;
- qglRasterPos3s = dllRasterPos3s = glRasterPos3s;
- qglRasterPos3sv = dllRasterPos3sv = glRasterPos3sv;
- qglRasterPos4d = dllRasterPos4d = glRasterPos4d;
- qglRasterPos4dv = dllRasterPos4dv = glRasterPos4dv;
- qglRasterPos4f = dllRasterPos4f = glRasterPos4f;
- qglRasterPos4fv = dllRasterPos4fv = glRasterPos4fv;
- qglRasterPos4i = dllRasterPos4i = glRasterPos4i;
- qglRasterPos4iv = dllRasterPos4iv = glRasterPos4iv;
- qglRasterPos4s = dllRasterPos4s = glRasterPos4s;
- qglRasterPos4sv = dllRasterPos4sv = glRasterPos4sv;
- qglReadBuffer = dllReadBuffer = glReadBuffer;
- qglReadPixels = dllReadPixels = glReadPixels;
- qglRectd = dllRectd = glRectd;
- qglRectdv = dllRectdv = glRectdv;
- qglRectf = dllRectf = glRectf;
- qglRectfv = dllRectfv = glRectfv;
- qglRecti = dllRecti = glRecti;
- qglRectiv = dllRectiv = glRectiv;
- qglRects = dllRects = glRects;
- qglRectsv = dllRectsv = glRectsv;
- qglRenderMode = dllRenderMode = glRenderMode;
- qglRotated = dllRotated = glRotated;
- qglRotatef = dllRotatef = glRotatef;
- qglScaled = dllScaled = glScaled;
- qglScalef = dllScalef = glScalef;
- qglScissor = dllScissor = glScissor;
- qglSelectBuffer = dllSelectBuffer = glSelectBuffer;
- qglShadeModel = dllShadeModel = glShadeModel;
- qglStencilFunc = dllStencilFunc = glStencilFunc;
- qglStencilMask = dllStencilMask = glStencilMask;
- qglStencilOp = dllStencilOp = glStencilOp;
- qglTexCoord1d = dllTexCoord1d = glTexCoord1d;
- qglTexCoord1dv = dllTexCoord1dv = glTexCoord1dv;
- qglTexCoord1f = dllTexCoord1f = glTexCoord1f;
- qglTexCoord1fv = dllTexCoord1fv = glTexCoord1fv;
- qglTexCoord1i = dllTexCoord1i = glTexCoord1i;
- qglTexCoord1iv = dllTexCoord1iv = glTexCoord1iv;
- qglTexCoord1s = dllTexCoord1s = glTexCoord1s;
- qglTexCoord1sv = dllTexCoord1sv = glTexCoord1sv;
- qglTexCoord2d = dllTexCoord2d = glTexCoord2d;
- qglTexCoord2dv = dllTexCoord2dv = glTexCoord2dv;
- qglTexCoord2f = dllTexCoord2f = glTexCoord2f;
- qglTexCoord2fv = dllTexCoord2fv = glTexCoord2fv;
- qglTexCoord2i = dllTexCoord2i = glTexCoord2i;
- qglTexCoord2iv = dllTexCoord2iv = glTexCoord2iv;
- qglTexCoord2s = dllTexCoord2s = glTexCoord2s;
- qglTexCoord2sv = dllTexCoord2sv = glTexCoord2sv;
- qglTexCoord3d = dllTexCoord3d = glTexCoord3d;
- qglTexCoord3dv = dllTexCoord3dv = glTexCoord3dv;
- qglTexCoord3f = dllTexCoord3f = glTexCoord3f;
- qglTexCoord3fv = dllTexCoord3fv = glTexCoord3fv;
- qglTexCoord3i = dllTexCoord3i = glTexCoord3i;
- qglTexCoord3iv = dllTexCoord3iv = glTexCoord3iv;
- qglTexCoord3s = dllTexCoord3s = glTexCoord3s;
- qglTexCoord3sv = dllTexCoord3sv = glTexCoord3sv;
- qglTexCoord4d = dllTexCoord4d = glTexCoord4d;
- qglTexCoord4dv = dllTexCoord4dv = glTexCoord4dv;
- qglTexCoord4f = dllTexCoord4f = glTexCoord4f;
- qglTexCoord4fv = dllTexCoord4fv = glTexCoord4fv;
- qglTexCoord4i = dllTexCoord4i = glTexCoord4i;
- qglTexCoord4iv = dllTexCoord4iv = glTexCoord4iv;
- qglTexCoord4s = dllTexCoord4s = glTexCoord4s;
- qglTexCoord4sv = dllTexCoord4sv = glTexCoord4sv;
- qglTexCoordPointer = dllTexCoordPointer = glTexCoordPointer;
- qglTexEnvf = dllTexEnvf = glTexEnvf;
- qglTexEnvfv = dllTexEnvfv = glTexEnvfv;
- qglTexEnvi = dllTexEnvi = glTexEnvi;
- qglTexEnviv = dllTexEnviv = glTexEnviv;
- qglTexGend = dllTexGend = glTexGend;
- qglTexGendv = dllTexGendv = glTexGendv;
- qglTexGenf = dllTexGenf = glTexGenf;
- qglTexGenfv = dllTexGenfv = glTexGenfv;
- qglTexGeni = dllTexGeni = glTexGeni;
- qglTexGeniv = dllTexGeniv = glTexGeniv;
- qglTexImage1D = dllTexImage1D = glTexImage1D;
- qglTexImage2D = dllTexImage2D = glTexImage2D;
- qglTexParameterf = dllTexParameterf = glTexParameterf;
- qglTexParameterfv = dllTexParameterfv = glTexParameterfv;
- qglTexParameteri = dllTexParameteri = glTexParameteri;
- qglTexParameteriv = dllTexParameteriv = glTexParameteriv;
- qglTexSubImage1D = dllTexSubImage1D = glTexSubImage1D;
- qglTexSubImage2D = dllTexSubImage2D = glTexSubImage2D;
- qglTranslated = dllTranslated = glTranslated;
- qglTranslatef = dllTranslatef = glTranslatef;
- qglVertex2d = dllVertex2d = glVertex2d;
- qglVertex2dv = dllVertex2dv = glVertex2dv;
- qglVertex2f = dllVertex2f = glVertex2f;
- qglVertex2fv = dllVertex2fv = glVertex2fv;
- qglVertex2i = dllVertex2i = glVertex2i;
- qglVertex2iv = dllVertex2iv = glVertex2iv;
- qglVertex2s = dllVertex2s = glVertex2s;
- qglVertex2sv = dllVertex2sv = glVertex2sv;
- qglVertex3d = dllVertex3d = glVertex3d;
- qglVertex3dv = dllVertex3dv = glVertex3dv;
- qglVertex3f = dllVertex3f = glVertex3f;
- qglVertex3fv = dllVertex3fv = glVertex3fv;
- qglVertex3i = dllVertex3i = glVertex3i;
- qglVertex3iv = dllVertex3iv = glVertex3iv;
- qglVertex3s = dllVertex3s = glVertex3s;
- qglVertex3sv = dllVertex3sv = glVertex3sv;
- qglVertex4d = dllVertex4d = glVertex4d;
- qglVertex4dv = dllVertex4dv = glVertex4dv;
- qglVertex4f = dllVertex4f = glVertex4f;
- qglVertex4fv = dllVertex4fv = glVertex4fv;
- qglVertex4i = dllVertex4i = glVertex4i;
- qglVertex4iv = dllVertex4iv = glVertex4iv;
- qglVertex4s = dllVertex4s = glVertex4s;
- qglVertex4sv = dllVertex4sv = glVertex4sv;
- qglVertexPointer = dllVertexPointer = glVertexPointer;
- qglViewport = dllViewport = glViewport;
-
- qglPointParameterfEXT = 0;
- qglPointParameterfvEXT = 0;
- qglColorTableEXT = glColorTableSGI;
- qglColorTableEXT = 0;
- qglSelectTextureSGIS = 0;
- qglMTexCoord2fSGIS = 0;
-
- return true;
-}
-
-void GLimp_EnableLogging( qboolean enable )
-{
- if ( enable )
- {
- if ( !log_fp )
- {
- struct tm *newtime;
- time_t aclock;
- char buffer[1024];
-
- time( &aclock );
- newtime = localtime( &aclock );
-
- asctime( newtime );
-
- sprintf( buffer, "%s/gl.log", ri.FS_Gamedir() );
- log_fp = fopen( buffer, "wt");
-
- fprintf( 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( log_fp, "*** R_BeginFrame ***\n");
-}
-
-
--- a/irix/snd_irix.c
+++ /dev/null
@@ -1,222 +1,0 @@
-#include <dmedia/dmedia.h>
-#include <dmedia/audio.h>
-
-#include "../client/client.h"
-#include "../client/snd_loc.h"
-
-/*
-==================
-SNDDM_Init
-
-Try to find a sound device to mix for.
-Returns false if nothing is found.
-Returns true and fills in the "dma" structure with information for the mixer.
-==================
-*/
-
-// must be power of two!
-#define QSND_SKID 2
-#define QSND_BUFFER_FRAMES 8192
-#define QSND_BUFFER_SIZE (QSND_BUFFER_FRAMES*2)
-
-#define UST_TO_BUFFPOS(ust) ((int)((ust) & (QSND_BUFFER_FRAMES - 1)) << 1)
-
-cvar_t *s_loadas8bit;
-cvar_t *s_khz;
-cvar_t *sndchannels;
-
-short int dma_buffer[QSND_BUFFER_SIZE];
-ALport sgisnd_aport = NULL;
-long long sgisnd_startframe;
-double sgisnd_frames_per_ns;
-long long sgisnd_lastframewritten = 0;
-
-qboolean SNDDMA_Init(void)
-{
- ALconfig ac = NULL;
- ALpv pvbuf[2];
-
- s_loadas8bit = Cvar_Get("s_loadas8bit", "16", CVAR_ARCHIVE);
- if ((int)s_loadas8bit->value)
- dma.samplebits = 8;
- else
- dma.samplebits = 16;
-
- if (dma.samplebits != 16) {
- Com_Printf("Don't currently support %i-bit data. Forcing 16-bit.\n",
- dma.samplebits);
- dma.samplebits = 16;
- Cvar_SetValue( "s_loadas8bit", false );
- }
-
- s_khz = Cvar_Get("s_khz", "0", CVAR_ARCHIVE);
- switch ((int)s_khz->value) {
- case 48:
- dma.speed = AL_RATE_48000;
- break;
- case 44:
- dma.speed = AL_RATE_44100;
- break;
- case 32:
- dma.speed = AL_RATE_32000;
- break;
- case 22:
- dma.speed = AL_RATE_22050;
- break;
- case 16:
- dma.speed = AL_RATE_16000;
- break;
- case 11:
- dma.speed = AL_RATE_11025;
- break;
- case 8:
- dma.speed = AL_RATE_8000;
- break;
- default:
- dma.speed = AL_RATE_22050;
- Com_Printf("Don't currently support %i kHz sample rate. Using %i.\n",
- (int)s_khz->value, (int)(dma.speed/1000));
- }
-
- sndchannels = Cvar_Get("sndchannels", "2", CVAR_ARCHIVE);
- dma.channels = (int)sndchannels->value;
- if (dma.channels != 2)
- Com_Printf("Don't currently support %i sound channels. Try 2.\n",
- sndchannels);
-
- /***********************/
-
- ac = alNewConfig();
- alSetChannels( ac, AL_STEREO );
- alSetSampFmt( ac, AL_SAMPFMT_TWOSCOMP );
- alSetQueueSize( ac, QSND_BUFFER_FRAMES );
- if (dma.samplebits == 8)
- alSetWidth( ac, AL_SAMPLE_8 );
- else
- alSetWidth( ac, AL_SAMPLE_16 );
-
- sgisnd_aport = alOpenPort( "Quake", "w", ac );
- if (!sgisnd_aport)
- {
- printf( "failed to open audio port!\n" );
- }
-
- // set desired sample rate
- pvbuf[0].param = AL_MASTER_CLOCK;
- pvbuf[0].value.i = AL_CRYSTAL_MCLK_TYPE;
- pvbuf[1].param = AL_RATE;
- pvbuf[1].value.ll = alIntToFixed( dma.speed );
- alSetParams( alGetResource( sgisnd_aport ), pvbuf, 2 );
- if (pvbuf[1].sizeOut < 0)
- printf( "illegal sample rate %d\n", dma.speed );
-
- sgisnd_frames_per_ns = dma.speed * 1.0e-9;
-
- dma.samples = sizeof(dma_buffer)/(dma.samplebits/8);
- dma.submission_chunk = 1;
-
- dma.buffer = (unsigned char *)dma_buffer;
-
- dma.samplepos = 0;
-
- alFreeConfig( ac );
- return true;
-}
-
-
-/*
-==============
-SNDDMA_GetDMAPos
-
-return the current sample position (in mono samples, not stereo)
-inside the recirculating dma buffer, so the mixing code will know
-how many sample are required to fill it up.
-===============
-*/
-int SNDDMA_GetDMAPos(void)
-{
- long long ustFuture, ustNow;
- if (!sgisnd_aport) return( 0 );
- alGetFrameTime( sgisnd_aport, &sgisnd_startframe, &ustFuture );
- dmGetUST( (unsigned long long *)&ustNow );
- sgisnd_startframe -= (long long)((ustFuture - ustNow) * sgisnd_frames_per_ns);
- sgisnd_startframe += 100;
-//printf( "frame %ld pos %d\n", frame, UST_TO_BUFFPOS( sgisnd_startframe ) );
- return( UST_TO_BUFFPOS( sgisnd_startframe ) );
-}
-
-/*
-==============
-SNDDMA_Shutdown
-
-Reset the sound device for exiting
-===============
-*/
-void SNDDMA_Shutdown(void)
-{
- if (sgisnd_aport) alClosePort( sgisnd_aport ), sgisnd_aport = NULL;
- return;
-}
-
-/*
-==============
-SNDDMA_Submit
-
-Send sound to device if buffer isn't really the dma buffer
-===============
-*/
-
-extern int soundtime;
-
-void SNDDMA_Submit(void)
-{
- int nFillable, nFilled, nPos;
- int nFrames, nFramesLeft;
- unsigned endtime;
-
- if (!sgisnd_aport) return;
-
- nFillable = alGetFillable( sgisnd_aport );
- nFilled = QSND_BUFFER_FRAMES - nFillable;
-
- nFrames = dma.samples >> (dma.channels - 1);
-
- if (paintedtime - soundtime < nFrames)
- nFrames = paintedtime - soundtime;
-
- if (nFrames <= QSND_SKID) return;
-
- nPos = UST_TO_BUFFPOS( sgisnd_startframe );
-
- // dump re-written contents of the buffer
- if (sgisnd_lastframewritten > sgisnd_startframe)
- {
- alDiscardFrames( sgisnd_aport, sgisnd_lastframewritten - sgisnd_startframe );
- }
- else if ((int)(sgisnd_startframe - sgisnd_lastframewritten) >= QSND_BUFFER_FRAMES)
- {
- // blow away everything if we've underflowed
- alDiscardFrames( sgisnd_aport, QSND_BUFFER_FRAMES );
- }
-
- // don't block
- if (nFrames > nFillable) nFrames = nFillable;
-
- // account for stereo
- nFramesLeft = nFrames;
- if (nPos + nFrames * dma.channels > QSND_BUFFER_SIZE)
- {
- int nFramesAtEnd = (QSND_BUFFER_SIZE - nPos) >> (dma.channels - 1);
-
- alWriteFrames( sgisnd_aport, &dma_buffer[nPos], nFramesAtEnd );
- nPos = 0;
- nFramesLeft -= nFramesAtEnd;
- }
- alWriteFrames( sgisnd_aport, &dma_buffer[nPos], nFramesLeft );
-
- sgisnd_lastframewritten = sgisnd_startframe + nFrames;
-}
-
-void SNDDMA_BeginPainting (void)
-{
-}
--- a/irix/sys_irix.c
+++ /dev/null
@@ -1,383 +1,0 @@
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <mntent.h>
-
-#include <dlfcn.h>
-
-#include "../qcommon/qcommon.h"
-
-#include "../linux/rw_linux.h"
-
-cvar_t *nostdout;
-
-unsigned sys_frame_time;
-
-uid_t saved_euid;
-qboolean stdin_active = true;
-
-// =======================================================================
-// General routines
-// =======================================================================
-
-void Sys_ConsoleOutput (char *string)
-{
- if (nostdout && nostdout->value)
- return;
-
- fputs(string, stdout);
-}
-
-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");
-
- if (nostdout && nostdout->value)
- return;
-
- 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);
- }
-}
-
-void Sys_Quit (void)
-{
- CL_Shutdown ();
- Qcommon_Shutdown ();
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
- _exit(0);
-}
-
-void Sys_Init(void)
-{
-#if id386
-// Sys_SetFPCW();
-#endif
-}
-
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
- char string[1024];
-
-// change stdin to non blocking
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-
- va_start (argptr,error);
- vsprintf (string,error,argptr);
- va_end (argptr);
- fprintf(stderr, "Error: %s\n", string);
-
- CL_Shutdown ();
- Qcommon_Shutdown ();
- _exit (1);
-
-}
-
-void Sys_Warn (char *warning, ...)
-{
- va_list argptr;
- char string[1024];
-
- va_start (argptr,warning);
- vsprintf (string,warning,argptr);
- va_end (argptr);
- fprintf(stderr, "Warning: %s", string);
-}
-
-/*
-============
-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)
-{
-// Sys_Warn("floating point exception\n");
- signal(SIGFPE, floating_point_exception_handler);
-}
-
-char *Sys_ConsoleInput(void)
-{
- static char text[256];
- int len;
- fd_set fdset;
- struct timeval timeout;
-
- if (!dedicated || !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 = false;
- return NULL;
- }
-
- if (len < 1)
- return NULL;
- text[len-1] = 0; // rip off the /n and terminate
-
- return text;
-}
-
-/*****************************************************************************/
-
-static void *game_library;
-
-/*
-=================
-Sys_UnloadGame
-=================
-*/
-void Sys_UnloadGame (void)
-{
- if (game_library)
- dlclose (game_library);
- game_library = NULL;
-}
-
-/*
-=================
-Sys_GetGameAPI
-
-Loads the game dll
-=================
-*/
-void *Sys_GetGameAPI (void *parms)
-{
-#ifndef REF_HARD_LINKED
- void *(*GetGameAPI) (void *);
-
- char name[MAX_OSPATH];
- char curpath[MAX_OSPATH];
- char *path;
-#ifdef __sgi
- const char *gamename = "gamemips.so";
-#else
-#error Unknown arch
-#endif
-
- setreuid(getuid(), getuid());
- setegid(getgid());
-
- if (game_library)
- Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
-
- getcwd(curpath, sizeof(curpath));
-
- Com_Printf("------- Loading %s -------", gamename);
-
- // now run through the search paths
- path = NULL;
- while (1)
- {
- path = FS_NextPath (path);
- if (!path)
- return NULL; // couldn't find one anywhere
- sprintf (name, "%s/%s/%s", curpath, path, gamename);
- Com_Printf ("Trying to load library (%s)\n",name);
- game_library = dlopen (name, RTLD_NOW );
- if (game_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n",name);
- break;
- }
- }
-
- GetGameAPI = (void *)dlsym (game_library, "GetGameAPI");
- if (!GetGameAPI)
- {
- Sys_UnloadGame ();
- return NULL;
- }
-
- return GetGameAPI (parms);
-#else
- return (void *)GetGameAPI (parms);
-#endif
-}
-
-/*****************************************************************************/
-
-void Sys_AppActivate (void)
-{
-}
-
-void Sys_SendKeyEvents (void)
-{
- if (KBD_Update_fp)
- KBD_Update_fp();
-
- // grab frame time
- sys_frame_time = Sys_Milliseconds();
-}
-
-/*****************************************************************************/
-
-char *Sys_GetClipboardData(void)
-{
- return NULL;
-}
-
-int main (int argc, char **argv)
-{
- int time, oldtime, newtime;
-
- // go back to real user for config loads
- saved_euid = geteuid();
- seteuid(getuid());
-
- Qcommon_Init(argc, argv);
-
-/* fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); */
-
- nostdout = Cvar_Get("nostdout", "0", 0);
- if (!nostdout->value) {
-/* fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); */
-// printf ("Linux Quake -- Version %0.3f\n", LINUX_VERSION);
- }
-
- oldtime = Sys_Milliseconds ();
- while (1)
- {
-// find time spent rendering last frame
- do {
- newtime = Sys_Milliseconds ();
- time = newtime - oldtime;
- } while (time < 1);
- Qcommon_Frame (time);
- oldtime = newtime;
- }
-
-}
-
-void Sys_CopyProtect(void)
-{
- FILE *mnt;
- struct mntent *ent;
- char path[MAX_OSPATH];
- struct stat st;
- qboolean found_cd = false;
-
- static qboolean checked = false;
-
- if (checked)
- return;
-
- Com_Printf("XXX - Sys_CopyProtect disabled\n");
- checked = true;
- return;
-
- if ((mnt = setmntent("/etc/mtab", "r")) == NULL)
- Com_Error(ERR_FATAL, "Can't read mount table to determine mounted cd location.");
-
- while ((ent = getmntent(mnt)) != NULL) {
- if (strcmp(ent->mnt_type, "iso9660") == 0) {
- // found a cd file system
- found_cd = true;
- sprintf(path, "%s/%s", ent->mnt_dir, "install/data/quake2.exe");
- if (stat(path, &st) == 0) {
- // found it
- checked = true;
- endmntent(mnt);
- return;
- }
- sprintf(path, "%s/%s", ent->mnt_dir, "Install/Data/quake2.exe");
- if (stat(path, &st) == 0) {
- // found it
- checked = true;
- endmntent(mnt);
- return;
- }
- sprintf(path, "%s/%s", ent->mnt_dir, "quake2.exe");
- if (stat(path, &st) == 0) {
- // found it
- checked = true;
- endmntent(mnt);
- return;
- }
- }
- }
- endmntent(mnt);
-
- if (found_cd)
- Com_Error (ERR_FATAL, "Could not find a Quake2 CD in your CD drive.");
- Com_Error (ERR_FATAL, "Unable to find a mounted iso9660 file system.\n"
- "You must mount the Quake2 CD in a cdrom drive in order to play.");
-}
-
-#if 0
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-
- int r;
- unsigned long addr;
- int psize = getpagesize();
-
- addr = (startaddr & ~(psize-1)) - psize;
-
-// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
-// addr, startaddr+length, length);
-
- r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
-
- if (r < 0)
- Sys_Error("Protection change failed\n");
-
-}
-
-#endif
--- a/irix/vid_menu.c
+++ /dev/null
@@ -1,426 +1,0 @@
-#include "../client/client.h"
-#include "../client/qmenu.h"
-
-#define REF_SOFT 0
-#define REF_OPENGL 1
-
-extern cvar_t *vid_ref;
-extern cvar_t *vid_fullscreen;
-extern cvar_t *vid_gamma;
-extern cvar_t *scr_viewsize;
-
-static cvar_t *gl_mode;
-static cvar_t *gl_driver;
-static cvar_t *gl_picmip;
-static cvar_t *gl_ext_palettedtexture;
-
-static cvar_t *sw_mode;
-static cvar_t *sw_stipplealpha;
-
-static cvar_t *_windowed_mouse;
-
-extern void M_ForceMenuOff( void );
-
-/*
-====================================================================
-
-MENU INTERACTION
-
-====================================================================
-*/
-#define SOFTWARE_MENU 0
-#define OPENGL_MENU 1
-
-static menuframework_s s_software_menu;
-static menuframework_s s_opengl_menu;
-static menuframework_s *s_current_menu;
-static int s_current_menu_index;
-
-static menulist_s s_mode_list[2];
-static menulist_s s_ref_list[2];
-static menuslider_s s_tq_slider;
-static menuslider_s s_screensize_slider[2];
-static menuslider_s s_brightness_slider[2];
-static menulist_s s_fs_box[2];
-static menulist_s s_stipple_box;
-static menulist_s s_paletted_texture_box;
-static menulist_s s_windowed_mouse;
-static menuaction_s s_apply_action[2];
-static menuaction_s s_defaults_action[2];
-
-static void DriverCallback( void *unused )
-{
- s_ref_list[!s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue;
-
- if ( s_ref_list[s_current_menu_index].curvalue < 1 )
- {
- s_current_menu = &s_software_menu;
- s_current_menu_index = 0;
- }
- else
- {
- s_current_menu = &s_opengl_menu;
- s_current_menu_index = 1;
- }
-
-}
-
-static void ScreenSizeCallback( void *s )
-{
- menuslider_s *slider = ( menuslider_s * ) s;
-
- Cvar_SetValue( "viewsize", slider->curvalue * 10 );
-}
-
-static void BrightnessCallback( void *s )
-{
- menuslider_s *slider = ( menuslider_s * ) s;
-
- if ( s_current_menu_index == 0)
- s_brightness_slider[1].curvalue = s_brightness_slider[0].curvalue;
- else
- s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue;
-
- if ( Q_stricmp( vid_ref->string, "soft" ) == 0 )
- {
- float gamma = ( 0.8 - ( slider->curvalue/10.0 - 0.5 ) ) + 0.5;
-
- Cvar_SetValue( "vid_gamma", gamma );
- }
-}
-
-static void ResetDefaults( void *unused )
-{
- VID_MenuInit();
-}
-
-static void ApplyChanges( void *unused )
-{
- float gamma;
-
- /*
- ** make values consistent
- */
- s_fs_box[!s_current_menu_index].curvalue = s_fs_box[s_current_menu_index].curvalue;
- s_brightness_slider[!s_current_menu_index].curvalue = s_brightness_slider[s_current_menu_index].curvalue;
- s_ref_list[!s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue;
-
- /*
- ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3
- */
- gamma = ( 0.8 - ( s_brightness_slider[s_current_menu_index].curvalue/10.0 - 0.5 ) ) + 0.5;
-
- Cvar_SetValue( "vid_gamma", gamma );
- Cvar_SetValue( "sw_stipplealpha", s_stipple_box.curvalue );
- Cvar_SetValue( "gl_picmip", 3 - s_tq_slider.curvalue );
- Cvar_SetValue( "vid_fullscreen", s_fs_box[s_current_menu_index].curvalue );
- Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue );
- Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue );
- Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue );
- Cvar_SetValue( "_windowed_mouse", s_windowed_mouse.curvalue);
-
- switch ( s_ref_list[s_current_menu_index].curvalue )
- {
- case REF_SOFT:
- Cvar_Set( "vid_ref", "soft" );
- break;
- case REF_OPENGL:
- Cvar_Set( "vid_ref", "gl" );
- Cvar_Set( "gl_driver", "opengl32" );
- break;
- }
-
-#if 0
- /*
- ** update appropriate stuff if we're running OpenGL and gamma
- ** has been modified
- */
- if ( Q_stricmp( vid_ref->string, "gl" ) == 0 )
- {
- if ( vid_gamma->modified )
- {
- vid_ref->modified = true;
- if ( Q_stricmp( gl_driver->string, "3dfxgl" ) == 0 )
- {
- char envbuffer[1024];
- float g;
-
- vid_ref->modified = true;
-
- g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
- Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
- putenv( envbuffer );
-
- vid_gamma->modified = false;
- }
- }
- }
-#endif
-
- M_ForceMenuOff();
-}
-
-/*
-** VID_MenuInit
-*/
-void VID_MenuInit( void )
-{
- static const char *resolutions[] =
- {
- "[320 240 ]",
- "[400 300 ]",
- "[512 384 ]",
- "[640 480 ]",
- "[800 600 ]",
- "[960 720 ]",
- "[1024 768 ]",
- "[1152 864 ]",
- "[1280 1024]",
- "[1600 1200]",
- 0
- };
- static const char *refs[] =
- {
- "[software ]",
- "[default OpenGL]",
- 0
- };
- static const char *yesno_names[] =
- {
- "no",
- "yes",
- 0
- };
- int i;
-
- if ( !gl_driver )
- gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
- if ( !gl_picmip )
- gl_picmip = Cvar_Get( "gl_picmip", "0", 0 );
- if ( !gl_mode )
- gl_mode = Cvar_Get( "gl_mode", "3", 0 );
- if ( !sw_mode )
- sw_mode = Cvar_Get( "sw_mode", "0", 0 );
- if ( !gl_ext_palettedtexture )
- gl_ext_palettedtexture = Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE );
-
- if ( !sw_stipplealpha )
- sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE );
-
- if ( !_windowed_mouse)
- _windowed_mouse = Cvar_Get( "_windowed_mouse", "0", CVAR_ARCHIVE );
-
- s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value;
- s_mode_list[OPENGL_MENU].curvalue = gl_mode->value;
-
- if ( !scr_viewsize )
- scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);
-
- s_screensize_slider[SOFTWARE_MENU].curvalue = scr_viewsize->value/10;
- s_screensize_slider[OPENGL_MENU].curvalue = scr_viewsize->value/10;
-
- if (strcmp( vid_ref->string, "soft" ) == 0 )
- {
- s_current_menu_index = SOFTWARE_MENU;
- s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFT;
- }
- else if ( strcmp( vid_ref->string, "gl" ) == 0 )
- {
- s_current_menu_index = OPENGL_MENU;
- s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
-#if 0
- if ( strcmp( gl_driver->string, "3dfxgl" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_3DFX;
- else if ( strcmp( gl_driver->string, "pvrgl" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_POWERVR;
- else if ( strcmp( gl_driver->string, "opengl32" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
- else
- s_ref_list[s_current_menu_index].curvalue = REF_VERITE;
-#endif
- }
-
- s_software_menu.x = viddef.width * 0.50;
- s_software_menu.nitems = 0;
- s_opengl_menu.x = viddef.width * 0.50;
- s_opengl_menu.nitems = 0;
-
- for ( i = 0; i < 2; i++ )
- {
- s_ref_list[i].generic.type = MTYPE_SPINCONTROL;
- s_ref_list[i].generic.name = "driver";
- s_ref_list[i].generic.x = 0;
- s_ref_list[i].generic.y = 0;
- s_ref_list[i].generic.callback = DriverCallback;
- s_ref_list[i].itemnames = refs;
-
- s_mode_list[i].generic.type = MTYPE_SPINCONTROL;
- s_mode_list[i].generic.name = "video mode";
- s_mode_list[i].generic.x = 0;
- s_mode_list[i].generic.y = 10;
- s_mode_list[i].itemnames = resolutions;
-
- s_screensize_slider[i].generic.type = MTYPE_SLIDER;
- s_screensize_slider[i].generic.x = 0;
- s_screensize_slider[i].generic.y = 20;
- s_screensize_slider[i].generic.name = "screen size";
- s_screensize_slider[i].minvalue = 3;
- s_screensize_slider[i].maxvalue = 12;
- s_screensize_slider[i].generic.callback = ScreenSizeCallback;
-
- s_brightness_slider[i].generic.type = MTYPE_SLIDER;
- s_brightness_slider[i].generic.x = 0;
- s_brightness_slider[i].generic.y = 30;
- s_brightness_slider[i].generic.name = "brightness";
- s_brightness_slider[i].generic.callback = BrightnessCallback;
- s_brightness_slider[i].minvalue = 5;
- s_brightness_slider[i].maxvalue = 13;
- s_brightness_slider[i].curvalue = ( 1.3 - vid_gamma->value + 0.5 ) * 10;
-
- s_fs_box[i].generic.type = MTYPE_SPINCONTROL;
- s_fs_box[i].generic.x = 0;
- s_fs_box[i].generic.y = 40;
- s_fs_box[i].generic.name = "fullscreen";
- s_fs_box[i].itemnames = yesno_names;
- s_fs_box[i].curvalue = vid_fullscreen->value;
-
- s_defaults_action[i].generic.type = MTYPE_ACTION;
- s_defaults_action[i].generic.name = "reset to default";
- s_defaults_action[i].generic.x = 0;
- s_defaults_action[i].generic.y = 90;
- s_defaults_action[i].generic.callback = ResetDefaults;
-
- s_apply_action[i].generic.type = MTYPE_ACTION;
- s_apply_action[i].generic.name = "apply";
- s_apply_action[i].generic.x = 0;
- s_apply_action[i].generic.y = 100;
- s_apply_action[i].generic.callback = ApplyChanges;
- }
-
- s_stipple_box.generic.type = MTYPE_SPINCONTROL;
- s_stipple_box.generic.x = 0;
- s_stipple_box.generic.y = 60;
- s_stipple_box.generic.name = "stipple alpha";
- s_stipple_box.curvalue = sw_stipplealpha->value;
- s_stipple_box.itemnames = yesno_names;
-
- s_windowed_mouse.generic.type = MTYPE_SPINCONTROL;
- s_windowed_mouse.generic.x = 0;
- s_windowed_mouse.generic.y = 72;
- s_windowed_mouse.generic.name = "windowed mouse";
- s_windowed_mouse.curvalue = _windowed_mouse->value;
- s_windowed_mouse.itemnames = yesno_names;
-
- s_tq_slider.generic.type = MTYPE_SLIDER;
- s_tq_slider.generic.x = 0;
- s_tq_slider.generic.y = 60;
- s_tq_slider.generic.name = "texture quality";
- s_tq_slider.minvalue = 0;
- s_tq_slider.maxvalue = 3;
- s_tq_slider.curvalue = 3-gl_picmip->value;
-
- s_paletted_texture_box.generic.type = MTYPE_SPINCONTROL;
- s_paletted_texture_box.generic.x = 0;
- s_paletted_texture_box.generic.y = 70;
- s_paletted_texture_box.generic.name = "8-bit textures";
- s_paletted_texture_box.itemnames = yesno_names;
- s_paletted_texture_box.curvalue = gl_ext_palettedtexture->value;
-
- Menu_AddItem( &s_software_menu, ( void * ) &s_ref_list[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_mode_list[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_screensize_slider[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_brightness_slider[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_fs_box[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_stipple_box );
- Menu_AddItem( &s_software_menu, ( void * ) &s_windowed_mouse );
-
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_ref_list[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_mode_list[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_screensize_slider[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_brightness_slider[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_fs_box[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_tq_slider );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_paletted_texture_box );
-
- Menu_AddItem( &s_software_menu, ( void * ) &s_defaults_action[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_apply_action[SOFTWARE_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_defaults_action[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_apply_action[OPENGL_MENU] );
-
- Menu_Center( &s_software_menu );
- Menu_Center( &s_opengl_menu );
- s_opengl_menu.x -= 8;
- s_software_menu.x -= 8;
-}
-
-/*
-================
-VID_MenuDraw
-================
-*/
-void VID_MenuDraw (void)
-{
- int w, h;
-
- if ( s_current_menu_index == 0 )
- s_current_menu = &s_software_menu;
- else
- s_current_menu = &s_opengl_menu;
-
- /*
- ** draw the banner
- */
- re.DrawGetPicSize( &w, &h, "m_banner_video" );
- re.DrawPic( viddef.width / 2 - w / 2, viddef.height /2 - 110, "m_banner_video" );
-
- /*
- ** move cursor to a reasonable starting position
- */
- Menu_AdjustCursor( s_current_menu, 1 );
-
- /*
- ** draw the menu
- */
- Menu_Draw( s_current_menu );
-}
-
-/*
-================
-VID_MenuKey
-================
-*/
-const char *VID_MenuKey( int key )
-{
- extern void M_PopMenu( void );
-
- menuframework_s *m = s_current_menu;
- static const char *sound = "misc/menu1.wav";
-
- switch ( key )
- {
- case K_ESCAPE:
- M_PopMenu();
- return NULL;
- case K_UPARROW:
- m->cursor--;
- Menu_AdjustCursor( m, -1 );
- break;
- case K_DOWNARROW:
- m->cursor++;
- Menu_AdjustCursor( m, 1 );
- break;
- case K_LEFTARROW:
- Menu_SlideItem( m, -1 );
- break;
- case K_RIGHTARROW:
- Menu_SlideItem( m, 1 );
- break;
- case K_ENTER:
- Menu_SelectItem( m );
- break;
- }
-
- return sound;
-}
-
-
--- a/irix/vid_so.c
+++ /dev/null
@@ -1,492 +1,0 @@
-// Main windowed and fullscreen graphics interface module. This module
-// is used for both the software and OpenGL rendering versions of the
-// Quake refresh engine.
-
-#define SO_FILE "/etc/quake2.conf"
-
-#include <errno.h>
-#include <assert.h>
-#include <dlfcn.h> // ELF dl loader
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "../client/client.h"
-
-#include "../linux/rw_linux.h"
-
-// Structure containing functions exported from refresh DLL
-refexport_t re;
-
-#ifdef REF_HARD_LINKED
-refexport_t GetRefAPI (refimport_t rimp);
-#endif
-
-// Console variables that we need to access from this module
-cvar_t *vid_gamma;
-cvar_t *vid_ref; // Name of Refresh DLL loaded
-cvar_t *vid_xpos; // X coordinate of window position
-cvar_t *vid_ypos; // Y coordinate of window position
-cvar_t *vid_fullscreen;
-
-// Global variables used internally by this module
-viddef_t viddef; // global video state; used by other modules
-void *reflib_library; // Handle to refresh DLL
-qboolean reflib_active = 0;
-
-#define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
-
-/** KEYBOARD **************************************************************/
-
-void Do_Key_Event(int key, qboolean down);
-
-void (*KBD_Update_fp)(void);
-void (*KBD_Init_fp)(Key_Event_fp_t fp);
-void (*KBD_Close_fp)(void);
-
-/** MOUSE *****************************************************************/
-
-in_state_t in_state;
-
-void (*RW_IN_Init_fp)(in_state_t *in_state_p);
-void (*RW_IN_Shutdown_fp)(void);
-void (*RW_IN_Activate_fp)(qboolean active);
-void (*RW_IN_Commands_fp)(void);
-void (*RW_IN_Move_fp)(usercmd_t *cmd);
-void (*RW_IN_Frame_fp)(void);
-
-void Real_IN_Init (void);
-
-/*
-==========================================================================
-
-DLL GLUE
-
-==========================================================================
-*/
-
-#define MAXPRINTMSG 4096
-void VID_Printf (int print_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
- static qboolean inupdate;
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- if (print_level == PRINT_ALL)
- Com_Printf ("%s", msg);
- else
- Com_DPrintf ("%s", msg);
-}
-
-void VID_Error (int err_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
- static qboolean inupdate;
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- Com_Error (err_level,"%s", msg);
-}
-
-//==========================================================================
-
-/*
-============
-VID_Restart_f
-
-Console command to re-start the video mode and refresh DLL. We do this
-simply by setting the modified flag for the vid_ref variable, which will
-cause the entire video mode and refresh DLL to be reset on the next frame.
-============
-*/
-void VID_Restart_f (void)
-{
- vid_ref->modified = true;
-}
-
-/*
-** VID_GetModeInfo
-*/
-typedef struct vidmode_s
-{
- const char *description;
- int width, height;
- int mode;
-} vidmode_t;
-
-vidmode_t vid_modes[] =
-{
- { "Mode 0: 320x240", 320, 240, 0 },
- { "Mode 1: 400x300", 400, 300, 1 },
- { "Mode 2: 512x384", 512, 384, 2 },
- { "Mode 3: 640x480", 640, 480, 3 },
- { "Mode 4: 800x600", 800, 600, 4 },
- { "Mode 5: 960x720", 960, 720, 5 },
- { "Mode 6: 1024x768", 1024, 768, 6 },
- { "Mode 7: 1152x864", 1152, 864, 7 },
- { "Mode 8: 1280x1024", 1280, 1024, 8 },
- { "Mode 9: 1600x1200", 1600, 1200, 9 }
-};
-
-qboolean VID_GetModeInfo( int *width, int *height, int mode )
-{
- if ( mode < 0 || mode >= VID_NUM_MODES )
- return false;
-
- *width = vid_modes[mode].width;
- *height = vid_modes[mode].height;
-
- return true;
-}
-
-/*
-** VID_NewWindow
-*/
-void VID_NewWindow ( int width, int height)
-{
- viddef.width = width;
- viddef.height = height;
-}
-
-void VID_FreeReflib (void)
-{
- if (reflib_library) {
- if (KBD_Close_fp)
- KBD_Close_fp();
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
-#ifndef REF_HARD_LINKED
- dlclose(reflib_library);
-#endif
- }
-
- KBD_Init_fp = NULL;
- KBD_Update_fp = NULL;
- KBD_Close_fp = NULL;
- RW_IN_Init_fp = NULL;
- RW_IN_Shutdown_fp = NULL;
- RW_IN_Activate_fp = NULL;
- RW_IN_Commands_fp = NULL;
- RW_IN_Move_fp = NULL;
- RW_IN_Frame_fp = NULL;
-
- memset (&re, 0, sizeof(re));
- reflib_library = NULL;
- reflib_active = false;
-}
-
-/*
-==============
-VID_LoadRefresh
-==============
-*/
-qboolean VID_LoadRefresh( char *name )
-{
- refimport_t ri;
-#ifndef REF_HARD_LINKED
- GetRefAPI_t GetRefAPI;
-#endif
- char fn[MAX_OSPATH];
- struct stat st;
- extern uid_t saved_euid;
- FILE *fp;
- char *path;
- char curpath[MAX_OSPATH];
-
- if ( reflib_active )
- {
- if (KBD_Close_fp)
- KBD_Close_fp();
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
- KBD_Close_fp = NULL;
- RW_IN_Shutdown_fp = NULL;
- re.Shutdown();
- VID_FreeReflib ();
- }
-
-#ifndef REF_HARD_LINKED
- getcwd(curpath, sizeof(curpath));
-
- Com_Printf( "------- Loading %s -------\n", name );
-
- // now run through the search paths
- path = NULL;
- while (1)
- {
- path = FS_NextPath (path);
- if (!path)
- return NULL; // couldn't find one anywhere
- sprintf (fn, "%s/%s/%s", curpath, path, name);
- Com_Printf ("Trying to load library (%s)\n", fn);
-
- reflib_library = dlopen( fn, RTLD_NOW );
- if (reflib_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n",name);
- break;
- }
- }
-
-#endif
-
- ri.Cmd_AddCommand = Cmd_AddCommand;
- ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
- ri.Cmd_Argc = Cmd_Argc;
- ri.Cmd_Argv = Cmd_Argv;
- ri.Cmd_ExecuteText = Cbuf_ExecuteText;
- ri.Con_Printf = VID_Printf;
- ri.Sys_Error = VID_Error;
- ri.FS_LoadFile = FS_LoadFile;
- ri.FS_FreeFile = FS_FreeFile;
- ri.FS_Gamedir = FS_Gamedir;
- ri.Cvar_Get = Cvar_Get;
- ri.Cvar_Set = Cvar_Set;
- ri.Cvar_SetValue = Cvar_SetValue;
- ri.Vid_GetModeInfo = VID_GetModeInfo;
- ri.Vid_MenuInit = VID_MenuInit;
- ri.Vid_NewWindow = VID_NewWindow;
-
-#ifndef REF_HARD_LINKED
- if ( ( GetRefAPI = (void *) dlsym( reflib_library, "GetRefAPI" ) ) == 0 )
- Com_Error( ERR_FATAL, "dlsym failed on %s", name );
-#endif
- re = GetRefAPI( ri );
-
- if (re.api_version != API_VERSION)
- {
- VID_FreeReflib ();
- Com_Error (ERR_FATAL, "%s has incompatible api_version", name);
- }
-
- /* Init IN (Mouse) */
- in_state.IN_CenterView_fp = IN_CenterView;
- in_state.Key_Event_fp = Do_Key_Event;
- in_state.viewangles = cl.viewangles;
- in_state.in_strafe_state = &in_strafe.state;
-
-#ifndef REF_HARD_LINKED
- if ((RW_IN_Init_fp = dlsym(reflib_library, "RW_IN_Init")) == NULL ||
- (RW_IN_Shutdown_fp = dlsym(reflib_library, "RW_IN_Shutdown")) == NULL ||
- (RW_IN_Activate_fp = dlsym(reflib_library, "RW_IN_Activate")) == NULL ||
- (RW_IN_Commands_fp = dlsym(reflib_library, "RW_IN_Commands")) == NULL ||
- (RW_IN_Move_fp = dlsym(reflib_library, "RW_IN_Move")) == NULL ||
- (RW_IN_Frame_fp = dlsym(reflib_library, "RW_IN_Frame")) == NULL)
- Sys_Error("No RW_IN functions in REF.\n");
-#else
- {
- void RW_IN_Init(in_state_t *in_state_p);
- void RW_IN_Shutdown(void);
- void RW_IN_Commands (void);
- void RW_IN_Move (usercmd_t *cmd);
- void RW_IN_Frame (void);
- void RW_IN_Activate(void);
-
- RW_IN_Init_fp = RW_IN_Init;
- RW_IN_Shutdown_fp = RW_IN_Shutdown;
- RW_IN_Activate_fp = RW_IN_Activate;
- RW_IN_Commands_fp = RW_IN_Commands;
- RW_IN_Move_fp = RW_IN_Move;
- RW_IN_Frame_fp = RW_IN_Frame;
- }
-#endif
-
- if ( re.Init( 0, 0 ) == -1 )
- {
- re.Shutdown();
- VID_FreeReflib ();
- return false;
- }
-
- // give up root now
- setreuid(getuid(), getuid());
- setegid(getgid());
-
- /* Init KBD */
-#ifndef REF_HARD_LINKED
- if ((KBD_Init_fp = dlsym(reflib_library, "KBD_Init")) == NULL ||
- (KBD_Update_fp = dlsym(reflib_library, "KBD_Update")) == NULL ||
- (KBD_Close_fp = dlsym(reflib_library, "KBD_Close")) == NULL)
- Sys_Error("No KBD functions in REF.\n");
-#else
- {
- void KBD_Init(void);
- void KBD_Update(void);
- void KBD_Close(void);
-
- KBD_Init_fp = KBD_Init;
- KBD_Update_fp = KBD_Update;
- KBD_Close_fp = KBD_Close;
- }
-#endif
- KBD_Init_fp(Do_Key_Event);
- Real_IN_Init();
-
- Com_Printf( "------------------------------------\n");
- reflib_active = true;
- return true;
-}
-
-/*
-============
-VID_CheckChanges
-
-This function gets called once just before drawing each frame, and it's sole purpose in life
-is to check to see if any of the video mode parameters have changed, and if they have to
-update the rendering DLL and/or video mode to match.
-============
-*/
-void VID_CheckChanges (void)
-{
- char name[100];
- cvar_t *sw_mode;
-
- if ( vid_ref->modified )
- {
- S_StopAllSounds();
- }
-
- while (vid_ref->modified)
- {
- /*
- ** refresh has changed
- */
- vid_ref->modified = false;
- vid_fullscreen->modified = true;
- cl.refresh_prepped = false;
- cls.disable_screen = true;
-
- sprintf( name, "ref_%s.so", vid_ref->string );
- if ( !VID_LoadRefresh( name ) )
- {
- if ( strcmp (vid_ref->string, "soft") == 0 ) {
- Com_Printf("Refresh failed\n");
- sw_mode = Cvar_Get( "sw_mode", "0", 0 );
- if (sw_mode->value != 0) {
- Com_Printf("Trying mode 0\n");
- Cvar_SetValue("sw_mode", 0);
- if ( !VID_LoadRefresh( name ) )
- Com_Error (ERR_FATAL, "Couldn't fall back to software refresh!");
- } else
- Com_Error (ERR_FATAL, "Couldn't fall back to software refresh!");
- }
-
- Cvar_Set( "vid_ref", "soft" );
-
- /*
- ** drop the console if we fail to load a refresh
- */
- if ( cls.key_dest != key_console )
- {
- Con_ToggleConsole_f();
- }
- }
- cls.disable_screen = false;
- }
-
-}
-
-/*
-============
-VID_Init
-============
-*/
-void VID_Init (void)
-{
- /* Create the video variables so we know how to start the graphics drivers */
- vid_ref = Cvar_Get ("vid_ref", "soft", CVAR_ARCHIVE);
- vid_xpos = Cvar_Get ("vid_xpos", "3", CVAR_ARCHIVE);
- vid_ypos = Cvar_Get ("vid_ypos", "22", CVAR_ARCHIVE);
- vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE);
- vid_gamma = Cvar_Get( "vid_gamma", "1", CVAR_ARCHIVE );
-
- /* Add some console commands that we want to handle */
- Cmd_AddCommand ("vid_restart", VID_Restart_f);
-
- /* Disable the 3Dfx splash screen */
- putenv("FX_GLIDE_NO_SPLASH=0");
-
- /* Start the graphics mode and load refresh DLL */
- VID_CheckChanges();
-}
-
-/*
-============
-VID_Shutdown
-============
-*/
-void VID_Shutdown (void)
-{
- if ( reflib_active )
- {
- if (KBD_Close_fp)
- KBD_Close_fp();
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
- KBD_Close_fp = NULL;
- RW_IN_Shutdown_fp = NULL;
- re.Shutdown ();
- VID_FreeReflib ();
- }
-}
-
-
-/*****************************************************************************/
-/* INPUT */
-/*****************************************************************************/
-
-cvar_t *in_joystick;
-
-// This if fake, it's acutally done by the Refresh load
-void IN_Init (void)
-{
- in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE);
-}
-
-void Real_IN_Init (void)
-{
- if (RW_IN_Init_fp)
- RW_IN_Init_fp(&in_state);
-}
-
-void IN_Shutdown (void)
-{
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
-}
-
-void IN_Commands (void)
-{
- if (RW_IN_Commands_fp)
- RW_IN_Commands_fp();
-}
-
-void IN_Move (usercmd_t *cmd)
-{
- if (RW_IN_Move_fp)
- RW_IN_Move_fp(cmd);
-}
-
-void IN_Frame (void)
-{
- if (RW_IN_Frame_fp)
- RW_IN_Frame_fp();
-}
-
-void IN_Activate (qboolean active)
-{
- if (RW_IN_Activate_fp)
- RW_IN_Activate_fp(active);
-}
-
-void Do_Key_Event(int key, qboolean down)
-{
- Key_Event(key, down, Sys_Milliseconds());
-}
-
--- a/linux/Makefile
+++ /dev/null
@@ -1,1063 +1,0 @@
-ARCH=i386
-
-MOUNT_DIR=..
-
-BUILD_DEBUG_DIR=debug$(ARCH)
-BUILD_RELEASE_DIR=release$(ARCH)
-CLIENT_DIR=$(MOUNT_DIR)/client
-SERVER_DIR=$(MOUNT_DIR)/server
-REF_SOFT_DIR=$(MOUNT_DIR)/ref_soft
-REF_GL_DIR=$(MOUNT_DIR)/ref_gl
-COMMON_DIR=$(MOUNT_DIR)/qcommon
-LINUX_DIR=$(MOUNT_DIR)/linux
-GAME_DIR=$(MOUNT_DIR)/game
-CTF_DIR=$(MOUNT_DIR)/ctf
-XATRIX_DIR=$(MOUNT_DIR)/xatrix
-
-CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp -m32
-
-DEBUG_CFLAGS=$(BASE_CFLAGS) -O0 -ggdb
-RELEASE_CFLAGS=$(DEBUG_CFLAGS)
-
-LDFLAGS=-ldl -lm
-SVGALDFLAGS=-lvga
-XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext
-XCFLAGS=
-
-GLLDFLAGS=-L/usr/local/glide/lib -L/usr/X11/lib -L/usr/local/lib \
- -L/usr/local/src/Mesa-2.6/lib -lMesaGL -lglide2x -lX11 -lXext -lvga
-GLCFLAGS=-I/usr/local/src/Mesa-2.6/include -I/usr/local/glide/include
-
-SHLIBEXT=so
-
-SHLIBCFLAGS=-fPIC
-SHLIBLDFLAGS=-shared -rdynamic
-
-DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
-DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-DO_GL_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) $(GLCFLAGS) -o $@ -c $<
-DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
-DO_SHLIB_AS=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
-
-#############################################################################
-# SETUP AND BUILD
-#############################################################################
-
-all: build_debug build_release
-
- #$(BUILDDIR)/ref_soft.$(SHLIBEXT)
- #$(BUILDDIR)/ref_gl.$(SHLIBEXT)
- #$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
-targets: $(BUILDDIR)/quake2 \
- $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/ref_softx.$(SHLIBEXT) \
- $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT)
-
-build_debug:
- @-mkdir $(BUILD_DEBUG_DIR) \
- $(BUILD_DEBUG_DIR)/client \
- $(BUILD_DEBUG_DIR)/ref_soft \
- $(BUILD_DEBUG_DIR)/ref_gl \
- $(BUILD_DEBUG_DIR)/game \
- $(BUILD_DEBUG_DIR)/ctf \
- $(BUILD_DEBUG_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-build_release:
- @-mkdir $(BUILD_RELEASE_DIR) \
- $(BUILD_RELEASE_DIR)/client \
- $(BUILD_RELEASE_DIR)/ref_soft \
- $(BUILD_RELEASE_DIR)/ref_gl \
- $(BUILD_RELEASE_DIR)/game \
- $(BUILD_RELEASE_DIR)/ctf \
- $(BUILD_RELEASE_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
-
-linux:
-
-#############################################################################
-# CLIENT/SERVER
-#############################################################################
-
-QUAKE2_OBJS = \
- $(BUILDDIR)/client/cl_cin.o \
- $(BUILDDIR)/client/cl_ents.o \
- $(BUILDDIR)/client/cl_fx.o \
- $(BUILDDIR)/client/cl_input.o \
- $(BUILDDIR)/client/cl_inv.o \
- $(BUILDDIR)/client/cl_main.o \
- $(BUILDDIR)/client/cl_newfx.o \
- $(BUILDDIR)/client/cl_parse.o \
- $(BUILDDIR)/client/cl_pred.o \
- $(BUILDDIR)/client/cl_tent.o \
- $(BUILDDIR)/client/cl_scrn.o \
- $(BUILDDIR)/client/cl_view.o \
- $(BUILDDIR)/client/console.o \
- $(BUILDDIR)/client/keys.o \
- $(BUILDDIR)/client/menu.o \
- $(BUILDDIR)/client/snd_dma.o \
- $(BUILDDIR)/client/snd_mem.o \
- $(BUILDDIR)/client/snd_mix.o \
- $(BUILDDIR)/client/qmenu.o \
- $(BUILDDIR)/client/m_flash.o \
- \
- $(BUILDDIR)/client/cmd.o \
- $(BUILDDIR)/client/cmodel.o \
- $(BUILDDIR)/client/common.o \
- $(BUILDDIR)/client/crc.o \
- $(BUILDDIR)/client/cvar.o \
- $(BUILDDIR)/client/files.o \
- $(BUILDDIR)/client/md4.o \
- $(BUILDDIR)/client/net_chan.o \
- \
- $(BUILDDIR)/client/sv_ccmds.o \
- $(BUILDDIR)/client/sv_ents.o \
- $(BUILDDIR)/client/sv_game.o \
- $(BUILDDIR)/client/sv_init.o \
- $(BUILDDIR)/client/sv_main.o \
- $(BUILDDIR)/client/sv_send.o \
- $(BUILDDIR)/client/sv_user.o \
- $(BUILDDIR)/client/sv_world.o \
- \
- $(BUILDDIR)/client/cd_linux.o \
- $(BUILDDIR)/client/q_shlinux.o \
- $(BUILDDIR)/client/vid_menu.o \
- $(BUILDDIR)/client/vid_so.o \
- $(BUILDDIR)/client/snd_linux.o \
- $(BUILDDIR)/client/sys_linux.o \
- $(BUILDDIR)/client/glob.o \
- $(BUILDDIR)/client/net_udp.o \
- \
- $(BUILDDIR)/client/q_shared.o \
- $(BUILDDIR)/client/pmove.o
-
-QUAKE2_AS_OBJS = $(BUILDDIR)/client/snd_mixa.o
-
-$(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS)
- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS)
-
-$(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_ents.o : $(CLIENT_DIR)/cl_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_fx.o : $(CLIENT_DIR)/cl_fx.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_newfx.o : $(CLIENT_DIR)/cl_newfx.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_input.o : $(CLIENT_DIR)/cl_input.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_inv.o : $(CLIENT_DIR)/cl_inv.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_main.o : $(CLIENT_DIR)/cl_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_parse.o : $(CLIENT_DIR)/cl_parse.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_pred.o : $(CLIENT_DIR)/cl_pred.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_tent.o : $(CLIENT_DIR)/cl_tent.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_scrn.o : $(CLIENT_DIR)/cl_scrn.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_view.o : $(CLIENT_DIR)/cl_view.c
- $(DO_CC)
-
-$(BUILDDIR)/client/console.o : $(CLIENT_DIR)/console.c
- $(DO_CC)
-
-$(BUILDDIR)/client/keys.o : $(CLIENT_DIR)/keys.c
- $(DO_CC)
-
-$(BUILDDIR)/client/menu.o : $(CLIENT_DIR)/menu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_dma.o : $(CLIENT_DIR)/snd_dma.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mem.o : $(CLIENT_DIR)/snd_mem.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mix.o : $(CLIENT_DIR)/snd_mix.c
- $(DO_CC)
-
-$(BUILDDIR)/client/qmenu.o : $(CLIENT_DIR)/qmenu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmd.o : $(COMMON_DIR)/cmd.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmodel.o : $(COMMON_DIR)/cmodel.c
- $(DO_CC)
-
-$(BUILDDIR)/client/common.o : $(COMMON_DIR)/common.c
- $(DO_CC)
-
-$(BUILDDIR)/client/crc.o : $(COMMON_DIR)/crc.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cvar.o : $(COMMON_DIR)/cvar.c
- $(DO_CC)
-
-$(BUILDDIR)/client/files.o : $(COMMON_DIR)/files.c
- $(DO_CC)
-
-$(BUILDDIR)/client/md4.o : $(COMMON_DIR)/md4.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_chan.o : $(COMMON_DIR)/net_chan.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_CC)
-
-$(BUILDDIR)/client/pmove.o : $(COMMON_DIR)/pmove.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ccmds.o : $(SERVER_DIR)/sv_ccmds.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ents.o : $(SERVER_DIR)/sv_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_game.o : $(SERVER_DIR)/sv_game.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_init.o : $(SERVER_DIR)/sv_init.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_main.o : $(SERVER_DIR)/sv_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_send.o : $(SERVER_DIR)/sv_send.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_user.o : $(SERVER_DIR)/sv_user.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_world.o : $(SERVER_DIR)/sv_world.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cd_linux.o : $(LINUX_DIR)/cd_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/vid_menu.o : $(LINUX_DIR)/vid_menu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/vid_so.o : $(LINUX_DIR)/vid_so.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_linux.o : $(LINUX_DIR)/snd_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mixa.o : $(LINUX_DIR)/snd_mixa.s
- $(DO_AS)
-
-$(BUILDDIR)/client/sys_linux.o : $(LINUX_DIR)/sys_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/glob.o : $(LINUX_DIR)/glob.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_udp.o : $(LINUX_DIR)/net_udp.c
- $(DO_CC)
-
-#############################################################################
-# GAME
-#############################################################################
-
-# g_chase.c -> ChasePrev, ChaseNext, .. undefined symbols -> dlopen fails
-GAME_OBJS = \
- $(BUILDDIR)/game/g_ai.o \
- $(BUILDDIR)/game/g_chase.o \
- $(BUILDDIR)/game/p_client.o \
- $(BUILDDIR)/game/g_cmds.o \
- $(BUILDDIR)/game/g_svcmds.o \
- $(BUILDDIR)/game/g_combat.o \
- $(BUILDDIR)/game/g_func.o \
- $(BUILDDIR)/game/g_items.o \
- $(BUILDDIR)/game/g_main.o \
- $(BUILDDIR)/game/g_misc.o \
- $(BUILDDIR)/game/g_monster.o \
- $(BUILDDIR)/game/g_phys.o \
- $(BUILDDIR)/game/g_save.o \
- $(BUILDDIR)/game/g_spawn.o \
- $(BUILDDIR)/game/g_target.o \
- $(BUILDDIR)/game/g_trigger.o \
- $(BUILDDIR)/game/g_turret.o \
- $(BUILDDIR)/game/g_utils.o \
- $(BUILDDIR)/game/g_weapon.o \
- $(BUILDDIR)/game/m_actor.o \
- $(BUILDDIR)/game/m_berserk.o \
- $(BUILDDIR)/game/m_boss2.o \
- $(BUILDDIR)/game/m_boss3.o \
- $(BUILDDIR)/game/m_boss31.o \
- $(BUILDDIR)/game/m_boss32.o \
- $(BUILDDIR)/game/m_brain.o \
- $(BUILDDIR)/game/m_chick.o \
- $(BUILDDIR)/game/m_flipper.o \
- $(BUILDDIR)/game/m_float.o \
- $(BUILDDIR)/game/m_flyer.o \
- $(BUILDDIR)/game/m_gladiator.o \
- $(BUILDDIR)/game/m_gunner.o \
- $(BUILDDIR)/game/m_hover.o \
- $(BUILDDIR)/game/m_infantry.o \
- $(BUILDDIR)/game/m_insane.o \
- $(BUILDDIR)/game/m_medic.o \
- $(BUILDDIR)/game/m_move.o \
- $(BUILDDIR)/game/m_mutant.o \
- $(BUILDDIR)/game/m_parasite.o \
- $(BUILDDIR)/game/m_soldier.o \
- $(BUILDDIR)/game/m_supertank.o \
- $(BUILDDIR)/game/m_tank.o \
- $(BUILDDIR)/game/p_hud.o \
- $(BUILDDIR)/game/p_trail.o \
- $(BUILDDIR)/game/p_view.o \
- $(BUILDDIR)/game/p_weapon.o \
- $(BUILDDIR)/game/q_shared.o \
- $(BUILDDIR)/game/m_flash.o
-
-$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
-
-$(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_client.o : $(GAME_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_chase.o : $(GAME_DIR)/g_chase.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_cmds.o : $(GAME_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_svcmds.o : $(GAME_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_combat.o : $(GAME_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_func.o : $(GAME_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_items.o : $(GAME_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_main.o : $(GAME_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_misc.o : $(GAME_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_monster.o : $(GAME_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_phys.o : $(GAME_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_save.o : $(GAME_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_spawn.o : $(GAME_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_target.o : $(GAME_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_trigger.o : $(GAME_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_turret.o : $(GAME_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_utils.o : $(GAME_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_weapon.o : $(GAME_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_actor.o : $(GAME_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_berserk.o : $(GAME_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss2.o : $(GAME_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss3.o : $(GAME_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss31.o : $(GAME_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss32.o : $(GAME_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_brain.o : $(GAME_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_chick.o : $(GAME_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flipper.o : $(GAME_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_float.o : $(GAME_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flyer.o : $(GAME_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gladiator.o : $(GAME_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gunner.o : $(GAME_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_hover.o : $(GAME_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_infantry.o : $(GAME_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_insane.o : $(GAME_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_medic.o : $(GAME_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_move.o : $(GAME_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_mutant.o : $(GAME_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_parasite.o : $(GAME_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_soldier.o : $(GAME_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_supertank.o : $(GAME_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_tank.o : $(GAME_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_hud.o : $(GAME_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_trail.o : $(GAME_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_view.o : $(GAME_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_weapon.o : $(GAME_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# CTF
-#############################################################################
-
-CTF_OBJS = \
- $(BUILDDIR)/ctf/g_ai.o \
- $(BUILDDIR)/ctf/g_chase.o \
- $(BUILDDIR)/ctf/g_cmds.o \
- $(BUILDDIR)/ctf/g_combat.o \
- $(BUILDDIR)/ctf/g_ctf.o \
- $(BUILDDIR)/ctf/g_func.o \
- $(BUILDDIR)/ctf/g_items.o \
- $(BUILDDIR)/ctf/g_main.o \
- $(BUILDDIR)/ctf/g_misc.o \
- $(BUILDDIR)/ctf/g_monster.o \
- $(BUILDDIR)/ctf/g_phys.o \
- $(BUILDDIR)/ctf/g_save.o \
- $(BUILDDIR)/ctf/g_spawn.o \
- $(BUILDDIR)/ctf/g_svcmds.o \
- $(BUILDDIR)/ctf/g_target.o \
- $(BUILDDIR)/ctf/g_trigger.o \
- $(BUILDDIR)/ctf/g_utils.o \
- $(BUILDDIR)/ctf/g_weapon.o \
- $(BUILDDIR)/ctf/m_move.o \
- $(BUILDDIR)/ctf/p_client.o \
- $(BUILDDIR)/ctf/p_hud.o \
- $(BUILDDIR)/ctf/p_menu.o \
- $(BUILDDIR)/ctf/p_trail.o \
- $(BUILDDIR)/ctf/p_view.o \
- $(BUILDDIR)/ctf/p_weapon.o \
- $(BUILDDIR)/ctf/q_shared.o
-
-$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
-
-$(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_chase.o : $(CTF_DIR)/g_chase.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_cmds.o : $(CTF_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_combat.o : $(CTF_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_ctf.o : $(CTF_DIR)/g_ctf.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_func.o : $(CTF_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_items.o : $(CTF_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_main.o : $(CTF_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_misc.o : $(CTF_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_monster.o : $(CTF_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_phys.o : $(CTF_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_save.o : $(CTF_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_spawn.o : $(CTF_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_svcmds.o : $(CTF_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_target.o : $(CTF_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_trigger.o : $(CTF_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_utils.o : $(CTF_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_weapon.o : $(CTF_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/m_move.o : $(CTF_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_client.o : $(CTF_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_hud.o : $(CTF_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_menu.o : $(CTF_DIR)/p_menu.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_trail.o : $(CTF_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_view.o : $(CTF_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_weapon.o : $(CTF_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/q_shared.o : $(CTF_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# XATRIX
-#############################################################################
-
-XATRIX_OBJS = \
- $(BUILDDIR)/xatrix/g_ai.o \
- $(BUILDDIR)/xatrix/g_cmds.o \
- $(BUILDDIR)/xatrix/g_combat.o \
- $(BUILDDIR)/xatrix/g_func.o \
- $(BUILDDIR)/xatrix/g_items.o \
- $(BUILDDIR)/xatrix/g_main.o \
- $(BUILDDIR)/xatrix/g_misc.o \
- $(BUILDDIR)/xatrix/g_monster.o \
- $(BUILDDIR)/xatrix/g_phys.o \
- $(BUILDDIR)/xatrix/g_save.o \
- $(BUILDDIR)/xatrix/g_spawn.o \
- $(BUILDDIR)/xatrix/g_svcmds.o \
- $(BUILDDIR)/xatrix/g_target.o \
- $(BUILDDIR)/xatrix/g_trigger.o \
- $(BUILDDIR)/xatrix/g_turret.o \
- $(BUILDDIR)/xatrix/g_utils.o \
- $(BUILDDIR)/xatrix/g_weapon.o \
- $(BUILDDIR)/xatrix/m_actor.o \
- $(BUILDDIR)/xatrix/m_berserk.o \
- $(BUILDDIR)/xatrix/m_boss2.o \
- $(BUILDDIR)/xatrix/m_boss3.o \
- $(BUILDDIR)/xatrix/m_boss31.o \
- $(BUILDDIR)/xatrix/m_boss32.o \
- $(BUILDDIR)/xatrix/m_boss5.o \
- $(BUILDDIR)/xatrix/m_brain.o \
- $(BUILDDIR)/xatrix/m_chick.o \
- $(BUILDDIR)/xatrix/m_fixbot.o \
- $(BUILDDIR)/xatrix/m_flash.o \
- $(BUILDDIR)/xatrix/m_flipper.o \
- $(BUILDDIR)/xatrix/m_float.o \
- $(BUILDDIR)/xatrix/m_flyer.o \
- $(BUILDDIR)/xatrix/m_gekk.o \
- $(BUILDDIR)/xatrix/m_gladb.o \
- $(BUILDDIR)/xatrix/m_gladiator.o \
- $(BUILDDIR)/xatrix/m_gunner.o \
- $(BUILDDIR)/xatrix/m_hover.o \
- $(BUILDDIR)/xatrix/m_infantry.o \
- $(BUILDDIR)/xatrix/m_insane.o \
- $(BUILDDIR)/xatrix/m_medic.o \
- $(BUILDDIR)/xatrix/m_move.o \
- $(BUILDDIR)/xatrix/m_mutant.o \
- $(BUILDDIR)/xatrix/m_parasite.o \
- $(BUILDDIR)/xatrix/m_soldier.o \
- $(BUILDDIR)/xatrix/m_supertank.o \
- $(BUILDDIR)/xatrix/m_tank.o \
- $(BUILDDIR)/xatrix/p_client.o \
- $(BUILDDIR)/xatrix/p_hud.o \
- $(BUILDDIR)/xatrix/p_trail.o \
- $(BUILDDIR)/xatrix/p_view.o \
- $(BUILDDIR)/xatrix/p_weapon.o \
- $(BUILDDIR)/xatrix/q_shared.o
-
-$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
-
-$(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_cmds.o : $(XATRIX_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_combat.o : $(XATRIX_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_func.o : $(XATRIX_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_items.o : $(XATRIX_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_main.o : $(XATRIX_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_misc.o : $(XATRIX_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_monster.o : $(XATRIX_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_phys.o : $(XATRIX_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_save.o : $(XATRIX_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_spawn.o : $(XATRIX_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_svcmds.o : $(XATRIX_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_target.o : $(XATRIX_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_trigger.o : $(XATRIX_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_turret.o : $(XATRIX_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_utils.o : $(XATRIX_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_weapon.o : $(XATRIX_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_actor.o : $(XATRIX_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_berserk.o : $(XATRIX_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss2.o : $(XATRIX_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss3.o : $(XATRIX_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss31.o : $(XATRIX_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss32.o : $(XATRIX_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss5.o : $(XATRIX_DIR)/m_boss5.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_brain.o : $(XATRIX_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_chick.o : $(XATRIX_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_fixbot.o : $(XATRIX_DIR)/m_fixbot.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flash.o : $(XATRIX_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flipper.o : $(XATRIX_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_float.o : $(XATRIX_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flyer.o : $(XATRIX_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gekk.o : $(XATRIX_DIR)/m_gekk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladb.o : $(XATRIX_DIR)/m_gladb.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladiator.o : $(XATRIX_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gunner.o : $(XATRIX_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_hover.o : $(XATRIX_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_infantry.o : $(XATRIX_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_insane.o : $(XATRIX_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_medic.o : $(XATRIX_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_move.o : $(XATRIX_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_mutant.o : $(XATRIX_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_parasite.o : $(XATRIX_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_soldier.o : $(XATRIX_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_supertank.o : $(XATRIX_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_tank.o : $(XATRIX_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_client.o : $(XATRIX_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_hud.o : $(XATRIX_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_trail.o : $(XATRIX_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_view.o : $(XATRIX_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_weapon.o : $(XATRIX_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/q_shared.o : $(XATRIX_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-
-#############################################################################
-# REF_SOFT
-#############################################################################
-
-REF_SOFT_OBJS = \
- $(BUILDDIR)/ref_soft/r_aclip.o \
- $(BUILDDIR)/ref_soft/r_alias.o \
- $(BUILDDIR)/ref_soft/r_bsp.o \
- $(BUILDDIR)/ref_soft/r_draw.o \
- $(BUILDDIR)/ref_soft/r_edge.o \
- $(BUILDDIR)/ref_soft/r_image.o \
- $(BUILDDIR)/ref_soft/r_light.o \
- $(BUILDDIR)/ref_soft/r_main.o \
- $(BUILDDIR)/ref_soft/r_misc.o \
- $(BUILDDIR)/ref_soft/r_model.o \
- $(BUILDDIR)/ref_soft/r_part.o \
- $(BUILDDIR)/ref_soft/r_poly.o \
- $(BUILDDIR)/ref_soft/r_polyse.o \
- $(BUILDDIR)/ref_soft/r_rast.o \
- $(BUILDDIR)/ref_soft/r_scan.o \
- $(BUILDDIR)/ref_soft/r_sprite.o \
- $(BUILDDIR)/ref_soft/r_surf.o \
- \
- $(BUILDDIR)/ref_soft/r_aclipa.o \
- $(BUILDDIR)/ref_soft/r_draw16.o \
- $(BUILDDIR)/ref_soft/r_drawa.o \
- $(BUILDDIR)/ref_soft/r_edgea.o \
- $(BUILDDIR)/ref_soft/r_scana.o \
- $(BUILDDIR)/ref_soft/r_spr8.o \
- $(BUILDDIR)/ref_soft/r_surf8.o \
- $(BUILDDIR)/ref_soft/math.o \
- $(BUILDDIR)/ref_soft/d_polysa.o \
- $(BUILDDIR)/ref_soft/r_varsa.o \
- $(BUILDDIR)/ref_soft/sys_dosa.o \
- \
- $(BUILDDIR)/ref_soft/q_shared.o \
- $(BUILDDIR)/ref_soft/q_shlinux.o \
- $(BUILDDIR)/ref_soft/glob.o
-
-REF_SOFT_SVGA_OBJS = \
- $(BUILDDIR)/ref_soft/rw_svgalib.o \
- $(BUILDDIR)/ref_soft/d_copy.o \
- $(BUILDDIR)/ref_soft/rw_in_svgalib.o
-
-REF_SOFT_X11_OBJS = \
- $(BUILDDIR)/ref_soft/rw_x11.o
-
-$(BUILDDIR)/ref_soft.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_SVGA_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
- $(REF_SOFT_SVGA_OBJS) $(SVGALDFLAGS)
-
-$(BUILDDIR)/ref_softx.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_X11_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
- $(REF_SOFT_X11_OBJS) $(XLDFLAGS)
-
-$(BUILDDIR)/ref_soft/r_aclip.o : $(REF_SOFT_DIR)/r_aclip.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_alias.o : $(REF_SOFT_DIR)/r_alias.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_bsp.o : $(REF_SOFT_DIR)/r_bsp.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_draw.o : $(REF_SOFT_DIR)/r_draw.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_edge.o : $(REF_SOFT_DIR)/r_edge.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_image.o : $(REF_SOFT_DIR)/r_image.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_light.o : $(REF_SOFT_DIR)/r_light.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_main.o : $(REF_SOFT_DIR)/r_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_misc.o : $(REF_SOFT_DIR)/r_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_model.o : $(REF_SOFT_DIR)/r_model.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_part.o : $(REF_SOFT_DIR)/r_part.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_poly.o : $(REF_SOFT_DIR)/r_poly.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_polyse.o : $(REF_SOFT_DIR)/r_polyse.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_rast.o : $(REF_SOFT_DIR)/r_rast.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_scan.o : $(REF_SOFT_DIR)/r_scan.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_sprite.o : $(REF_SOFT_DIR)/r_sprite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_surf.o : $(REF_SOFT_DIR)/r_surf.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_aclipa.o : $(LINUX_DIR)/r_aclipa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_draw16.o : $(LINUX_DIR)/r_draw16.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_drawa.o : $(LINUX_DIR)/r_drawa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_edgea.o : $(LINUX_DIR)/r_edgea.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_scana.o : $(LINUX_DIR)/r_scana.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_spr8.o : $(LINUX_DIR)/r_spr8.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_surf8.o : $(LINUX_DIR)/r_surf8.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/math.o : $(LINUX_DIR)/math.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/d_polysa.o : $(LINUX_DIR)/d_polysa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_varsa.o : $(LINUX_DIR)/r_varsa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/sys_dosa.o : $(LINUX_DIR)/sys_dosa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/glob.o : $(LINUX_DIR)/glob.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/rw_svgalib.o : $(LINUX_DIR)/rw_svgalib.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/d_copy.o : $(LINUX_DIR)/d_copy.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/rw_in_svgalib.o : $(LINUX_DIR)/rw_in_svgalib.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/rw_x11.o : $(LINUX_DIR)/rw_x11.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# REF_GL
-#############################################################################
-
-REF_GL_OBJS = \
- $(BUILDDIR)/ref_gl/gl_draw.o \
- $(BUILDDIR)/ref_gl/gl_image.o \
- $(BUILDDIR)/ref_gl/gl_light.o \
- $(BUILDDIR)/ref_gl/gl_mesh.o \
- $(BUILDDIR)/ref_gl/gl_model.o \
- $(BUILDDIR)/ref_gl/gl_rmain.o \
- $(BUILDDIR)/ref_gl/gl_rmisc.o \
- $(BUILDDIR)/ref_gl/gl_rsurf.o \
- $(BUILDDIR)/ref_gl/gl_warp.o \
- \
- $(BUILDDIR)/ref_gl/qgl_linux.o \
- $(BUILDDIR)/ref_gl/gl_fxmesa.o \
- $(BUILDDIR)/ref_gl/rw_in_svgalib.o \
- $(BUILDDIR)/ref_gl/q_shared.o \
- $(BUILDDIR)/ref_gl/q_shlinux.o \
- $(BUILDDIR)/ref_gl/glob.o
-
-$(BUILDDIR)/ref_gl.$(SHLIBEXT) : $(REF_GL_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(GLLDFLAGS)
-
-$(BUILDDIR)/ref_gl/gl_draw.o : $(REF_GL_DIR)/gl_draw.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_image.o : $(REF_GL_DIR)/gl_image.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_light.o : $(REF_GL_DIR)/gl_light.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_mesh.o : $(REF_GL_DIR)/gl_mesh.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_model.o : $(REF_GL_DIR)/gl_model.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_rmain.o : $(REF_GL_DIR)/gl_rmain.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_rmisc.o : $(REF_GL_DIR)/gl_rmisc.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_rsurf.o : $(REF_GL_DIR)/gl_rsurf.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_warp.o : $(REF_GL_DIR)/gl_warp.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/qgl_linux.o : $(LINUX_DIR)/qgl_linux.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_fxmesa.o : $(LINUX_DIR)/gl_fxmesa.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/rw_in_svgalib.o : $(LINUX_DIR)/rw_in_svgalib.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/glob.o : $(LINUX_DIR)/glob.c
- $(DO_GL_SHLIB_CC)
-
-#############################################################################
-# MISC
-#############################################################################
-
-clean: clean-debug clean-release
-
-clean-debug:
- $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean-release:
- $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean2:
- -rm -f \
- $(QUAKE2_OBJS) \
- $(QUAKE2_AS_OBJS) \
- $(GAME_OBJS) \
- $(CTF_OBJS) \
- $(XATRIX_OBJS) \
- $(REF_SOFT_OBJS) \
- $(REF_SOFT_SVGA_OBJS) \
- $(REF_SOFT_X11_OBJS) \
- $(REF_GL_OBJS)
-
--- a/linux/Makefile.AXP
+++ /dev/null
@@ -1,716 +1,0 @@
-#
-# Quake2 Makefile for Solaris
-#
-# Nov '97 by Zoid <[email protected]>
-#
-# ELF only
-#
-
-ARCH=axp
-
-MOUNT_DIR=/chest/Quake2/code
-
-BUILD_DEBUG_DIR=debug$(ARCH)
-BUILD_RELEASE_DIR=release$(ARCH)
-CLIENT_DIR=$(MOUNT_DIR)/client
-SERVER_DIR=$(MOUNT_DIR)/server
-COMMON_DIR=$(MOUNT_DIR)/qcommon
-LINUX_DIR=$(MOUNT_DIR)/linux
-GAME_DIR=$(MOUNT_DIR)/game
-CTF_DIR=$(MOUNT_DIR)/ctf
-XATRIX_DIR=$(MOUNT_DIR)/xatrix
-NULL_DIR=$(MOUNT_DIR)/null
-
-CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp -DC_ONLY -DDEDICATED_ONLY
-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations
-DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-LDFLAGS=-ldl -lm
-XCFLAGS=
-
-SHLIBEXT=so
-
-SHLIBCFLAGS=-fPIC
-SHLIBLDFLAGS=-shared
-
-DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
-DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-
-#############################################################################
-# SETUP AND BUILD
-#############################################################################
-
-TARGETS=$(BUILDDIR)/q2ded \
- $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
-
-build_debug:
- @-mkdir $(BUILD_DEBUG_DIR) \
- $(BUILD_DEBUG_DIR)/client \
- $(BUILD_DEBUG_DIR)/game \
- $(BUILD_DEBUG_DIR)/ctf \
- $(BUILD_DEBUG_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-build_release:
- @-mkdir $(BUILD_RELEASE_DIR) \
- $(BUILD_RELEASE_DIR)/client \
- $(BUILD_RELEASE_DIR)/game \
- $(BUILD_RELEASE_DIR)/ctf \
- $(BUILD_RELEASE_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
-
-all: build_debug build_release
-
-targets: $(TARGETS)
-
-#############################################################################
-# CLIENT/SERVER
-#############################################################################
-
-QUAKE2_OBJS = \
- \
- $(BUILDDIR)/client/cmd.o \
- $(BUILDDIR)/client/cmodel.o \
- $(BUILDDIR)/client/common.o \
- $(BUILDDIR)/client/crc.o \
- $(BUILDDIR)/client/cvar.o \
- $(BUILDDIR)/client/files.o \
- $(BUILDDIR)/client/md4.o \
- $(BUILDDIR)/client/net_chan.o \
- \
- $(BUILDDIR)/client/sv_ccmds.o \
- $(BUILDDIR)/client/sv_ents.o \
- $(BUILDDIR)/client/sv_game.o \
- $(BUILDDIR)/client/sv_init.o \
- $(BUILDDIR)/client/sv_main.o \
- $(BUILDDIR)/client/sv_send.o \
- $(BUILDDIR)/client/sv_user.o \
- $(BUILDDIR)/client/sv_world.o \
- \
- $(BUILDDIR)/client/q_shlinux.o \
- $(BUILDDIR)/client/sys_linux.o \
- $(BUILDDIR)/client/glob.o \
- $(BUILDDIR)/client/net_udp.o \
- \
- $(BUILDDIR)/client/q_shared.o \
- $(BUILDDIR)/client/pmove.o \
- \
- $(BUILDDIR)/client/cl_null.o \
- $(BUILDDIR)/client/cd_null.o
-
-$(BUILDDIR)/q2ded : $(QUAKE2_OBJS)
- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(LDFLAGS)
-
-$(BUILDDIR)/client/cmd.o : $(COMMON_DIR)/cmd.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmodel.o : $(COMMON_DIR)/cmodel.c
- $(DO_CC)
-
-$(BUILDDIR)/client/common.o : $(COMMON_DIR)/common.c
- $(DO_CC)
-
-$(BUILDDIR)/client/crc.o : $(COMMON_DIR)/crc.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cvar.o : $(COMMON_DIR)/cvar.c
- $(DO_CC)
-
-$(BUILDDIR)/client/files.o : $(COMMON_DIR)/files.c
- $(DO_CC)
-
-$(BUILDDIR)/client/md4.o : $(COMMON_DIR)/md4.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_chan.o : $(COMMON_DIR)/net_chan.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_CC)
-
-$(BUILDDIR)/client/pmove.o : $(COMMON_DIR)/pmove.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ccmds.o : $(SERVER_DIR)/sv_ccmds.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ents.o : $(SERVER_DIR)/sv_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_game.o : $(SERVER_DIR)/sv_game.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_init.o : $(SERVER_DIR)/sv_init.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_main.o : $(SERVER_DIR)/sv_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_send.o : $(SERVER_DIR)/sv_send.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_user.o : $(SERVER_DIR)/sv_user.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_world.o : $(SERVER_DIR)/sv_world.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sys_linux.o : $(LINUX_DIR)/sys_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/glob.o : $(LINUX_DIR)/glob.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_udp.o : $(LINUX_DIR)/net_udp.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cd_null.o : $(NULL_DIR)/cd_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_null.o : $(NULL_DIR)/cl_null.c
- $(DO_CC)
-
-#############################################################################
-# GAME
-#############################################################################
-
-GAME_OBJS = \
- $(BUILDDIR)/game/g_ai.o \
- $(BUILDDIR)/game/p_client.o \
- $(BUILDDIR)/game/g_cmds.o \
- $(BUILDDIR)/game/g_svcmds.o \
- $(BUILDDIR)/game/g_combat.o \
- $(BUILDDIR)/game/g_func.o \
- $(BUILDDIR)/game/g_items.o \
- $(BUILDDIR)/game/g_main.o \
- $(BUILDDIR)/game/g_misc.o \
- $(BUILDDIR)/game/g_monster.o \
- $(BUILDDIR)/game/g_phys.o \
- $(BUILDDIR)/game/g_save.o \
- $(BUILDDIR)/game/g_spawn.o \
- $(BUILDDIR)/game/g_target.o \
- $(BUILDDIR)/game/g_trigger.o \
- $(BUILDDIR)/game/g_turret.o \
- $(BUILDDIR)/game/g_utils.o \
- $(BUILDDIR)/game/g_weapon.o \
- $(BUILDDIR)/game/m_actor.o \
- $(BUILDDIR)/game/m_berserk.o \
- $(BUILDDIR)/game/m_boss2.o \
- $(BUILDDIR)/game/m_boss3.o \
- $(BUILDDIR)/game/m_boss31.o \
- $(BUILDDIR)/game/m_boss32.o \
- $(BUILDDIR)/game/m_brain.o \
- $(BUILDDIR)/game/m_chick.o \
- $(BUILDDIR)/game/m_flipper.o \
- $(BUILDDIR)/game/m_float.o \
- $(BUILDDIR)/game/m_flyer.o \
- $(BUILDDIR)/game/m_gladiator.o \
- $(BUILDDIR)/game/m_gunner.o \
- $(BUILDDIR)/game/m_hover.o \
- $(BUILDDIR)/game/m_infantry.o \
- $(BUILDDIR)/game/m_insane.o \
- $(BUILDDIR)/game/m_medic.o \
- $(BUILDDIR)/game/m_move.o \
- $(BUILDDIR)/game/m_mutant.o \
- $(BUILDDIR)/game/m_parasite.o \
- $(BUILDDIR)/game/m_soldier.o \
- $(BUILDDIR)/game/m_supertank.o \
- $(BUILDDIR)/game/m_tank.o \
- $(BUILDDIR)/game/p_hud.o \
- $(BUILDDIR)/game/p_trail.o \
- $(BUILDDIR)/game/p_view.o \
- $(BUILDDIR)/game/p_weapon.o \
- $(BUILDDIR)/game/q_shared.o \
- $(BUILDDIR)/game/m_flash.o
-
-$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
-
-$(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_client.o : $(GAME_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_cmds.o : $(GAME_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_svcmds.o : $(GAME_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_combat.o : $(GAME_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_func.o : $(GAME_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_items.o : $(GAME_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_main.o : $(GAME_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_misc.o : $(GAME_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_monster.o : $(GAME_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_phys.o : $(GAME_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_save.o : $(GAME_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_spawn.o : $(GAME_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_target.o : $(GAME_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_trigger.o : $(GAME_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_turret.o : $(GAME_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_utils.o : $(GAME_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_weapon.o : $(GAME_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_actor.o : $(GAME_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_berserk.o : $(GAME_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss2.o : $(GAME_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss3.o : $(GAME_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss31.o : $(GAME_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss32.o : $(GAME_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_brain.o : $(GAME_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_chick.o : $(GAME_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flipper.o : $(GAME_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_float.o : $(GAME_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flyer.o : $(GAME_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gladiator.o : $(GAME_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gunner.o : $(GAME_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_hover.o : $(GAME_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_infantry.o : $(GAME_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_insane.o : $(GAME_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_medic.o : $(GAME_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_move.o : $(GAME_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_mutant.o : $(GAME_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_parasite.o : $(GAME_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_soldier.o : $(GAME_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_supertank.o : $(GAME_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_tank.o : $(GAME_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_hud.o : $(GAME_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_trail.o : $(GAME_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_view.o : $(GAME_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_weapon.o : $(GAME_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# CTF
-#############################################################################
-
-CTF_OBJS = \
- $(BUILDDIR)/ctf/g_ai.o \
- $(BUILDDIR)/ctf/g_chase.o \
- $(BUILDDIR)/ctf/g_cmds.o \
- $(BUILDDIR)/ctf/g_combat.o \
- $(BUILDDIR)/ctf/g_ctf.o \
- $(BUILDDIR)/ctf/g_func.o \
- $(BUILDDIR)/ctf/g_items.o \
- $(BUILDDIR)/ctf/g_main.o \
- $(BUILDDIR)/ctf/g_misc.o \
- $(BUILDDIR)/ctf/g_monster.o \
- $(BUILDDIR)/ctf/g_phys.o \
- $(BUILDDIR)/ctf/g_save.o \
- $(BUILDDIR)/ctf/g_spawn.o \
- $(BUILDDIR)/ctf/g_svcmds.o \
- $(BUILDDIR)/ctf/g_target.o \
- $(BUILDDIR)/ctf/g_trigger.o \
- $(BUILDDIR)/ctf/g_utils.o \
- $(BUILDDIR)/ctf/g_weapon.o \
- $(BUILDDIR)/ctf/m_move.o \
- $(BUILDDIR)/ctf/p_client.o \
- $(BUILDDIR)/ctf/p_hud.o \
- $(BUILDDIR)/ctf/p_menu.o \
- $(BUILDDIR)/ctf/p_trail.o \
- $(BUILDDIR)/ctf/p_view.o \
- $(BUILDDIR)/ctf/p_weapon.o \
- $(BUILDDIR)/ctf/q_shared.o
-
-$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
-
-$(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_chase.o : $(CTF_DIR)/g_chase.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_cmds.o : $(CTF_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_combat.o : $(CTF_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_ctf.o : $(CTF_DIR)/g_ctf.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_func.o : $(CTF_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_items.o : $(CTF_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_main.o : $(CTF_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_misc.o : $(CTF_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_monster.o : $(CTF_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_phys.o : $(CTF_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_save.o : $(CTF_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_spawn.o : $(CTF_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_svcmds.o : $(CTF_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_target.o : $(CTF_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_trigger.o : $(CTF_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_utils.o : $(CTF_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_weapon.o : $(CTF_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/m_move.o : $(CTF_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_client.o : $(CTF_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_hud.o : $(CTF_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_menu.o : $(CTF_DIR)/p_menu.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_trail.o : $(CTF_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_view.o : $(CTF_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_weapon.o : $(CTF_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/q_shared.o : $(CTF_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# XATRIX
-#############################################################################
-
-XATRIX_OBJS = \
- $(BUILDDIR)/xatrix/g_ai.o \
- $(BUILDDIR)/xatrix/g_cmds.o \
- $(BUILDDIR)/xatrix/g_combat.o \
- $(BUILDDIR)/xatrix/g_func.o \
- $(BUILDDIR)/xatrix/g_items.o \
- $(BUILDDIR)/xatrix/g_main.o \
- $(BUILDDIR)/xatrix/g_misc.o \
- $(BUILDDIR)/xatrix/g_monster.o \
- $(BUILDDIR)/xatrix/g_phys.o \
- $(BUILDDIR)/xatrix/g_save.o \
- $(BUILDDIR)/xatrix/g_spawn.o \
- $(BUILDDIR)/xatrix/g_svcmds.o \
- $(BUILDDIR)/xatrix/g_target.o \
- $(BUILDDIR)/xatrix/g_trigger.o \
- $(BUILDDIR)/xatrix/g_turret.o \
- $(BUILDDIR)/xatrix/g_utils.o \
- $(BUILDDIR)/xatrix/g_weapon.o \
- $(BUILDDIR)/xatrix/m_actor.o \
- $(BUILDDIR)/xatrix/m_berserk.o \
- $(BUILDDIR)/xatrix/m_boss2.o \
- $(BUILDDIR)/xatrix/m_boss3.o \
- $(BUILDDIR)/xatrix/m_boss31.o \
- $(BUILDDIR)/xatrix/m_boss32.o \
- $(BUILDDIR)/xatrix/m_boss5.o \
- $(BUILDDIR)/xatrix/m_brain.o \
- $(BUILDDIR)/xatrix/m_chick.o \
- $(BUILDDIR)/xatrix/m_fixbot.o \
- $(BUILDDIR)/xatrix/m_flash.o \
- $(BUILDDIR)/xatrix/m_flipper.o \
- $(BUILDDIR)/xatrix/m_float.o \
- $(BUILDDIR)/xatrix/m_flyer.o \
- $(BUILDDIR)/xatrix/m_gekk.o \
- $(BUILDDIR)/xatrix/m_gladb.o \
- $(BUILDDIR)/xatrix/m_gladiator.o \
- $(BUILDDIR)/xatrix/m_gunner.o \
- $(BUILDDIR)/xatrix/m_hover.o \
- $(BUILDDIR)/xatrix/m_infantry.o \
- $(BUILDDIR)/xatrix/m_insane.o \
- $(BUILDDIR)/xatrix/m_medic.o \
- $(BUILDDIR)/xatrix/m_move.o \
- $(BUILDDIR)/xatrix/m_mutant.o \
- $(BUILDDIR)/xatrix/m_parasite.o \
- $(BUILDDIR)/xatrix/m_soldier.o \
- $(BUILDDIR)/xatrix/m_supertank.o \
- $(BUILDDIR)/xatrix/m_tank.o \
- $(BUILDDIR)/xatrix/p_client.o \
- $(BUILDDIR)/xatrix/p_hud.o \
- $(BUILDDIR)/xatrix/p_trail.o \
- $(BUILDDIR)/xatrix/p_view.o \
- $(BUILDDIR)/xatrix/p_weapon.o \
- $(BUILDDIR)/xatrix/q_shared.o
-
-$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
-
-$(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_cmds.o : $(XATRIX_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_combat.o : $(XATRIX_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_func.o : $(XATRIX_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_items.o : $(XATRIX_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_main.o : $(XATRIX_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_misc.o : $(XATRIX_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_monster.o : $(XATRIX_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_phys.o : $(XATRIX_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_save.o : $(XATRIX_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_spawn.o : $(XATRIX_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_svcmds.o : $(XATRIX_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_target.o : $(XATRIX_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_trigger.o : $(XATRIX_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_turret.o : $(XATRIX_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_utils.o : $(XATRIX_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_weapon.o : $(XATRIX_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_actor.o : $(XATRIX_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_berserk.o : $(XATRIX_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss2.o : $(XATRIX_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss3.o : $(XATRIX_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss31.o : $(XATRIX_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss32.o : $(XATRIX_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss5.o : $(XATRIX_DIR)/m_boss5.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_brain.o : $(XATRIX_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_chick.o : $(XATRIX_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_fixbot.o : $(XATRIX_DIR)/m_fixbot.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flash.o : $(XATRIX_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flipper.o : $(XATRIX_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_float.o : $(XATRIX_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flyer.o : $(XATRIX_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gekk.o : $(XATRIX_DIR)/m_gekk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladb.o : $(XATRIX_DIR)/m_gladb.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladiator.o : $(XATRIX_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gunner.o : $(XATRIX_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_hover.o : $(XATRIX_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_infantry.o : $(XATRIX_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_insane.o : $(XATRIX_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_medic.o : $(XATRIX_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_move.o : $(XATRIX_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_mutant.o : $(XATRIX_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_parasite.o : $(XATRIX_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_soldier.o : $(XATRIX_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_supertank.o : $(XATRIX_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_tank.o : $(XATRIX_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_client.o : $(XATRIX_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_hud.o : $(XATRIX_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_trail.o : $(XATRIX_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_view.o : $(XATRIX_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_weapon.o : $(XATRIX_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/q_shared.o : $(XATRIX_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# MISC
-#############################################################################
-
-clean: clean-debug clean-release
-
-clean-debug:
- $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean-release:
- $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean2:
- -rm -f $(QUAKE2_OBJS) $(GAME_OBJS) $(CTF_OBJS) $(XATRIX_OBJS)
-
--- a/linux/Makefile.i386
+++ /dev/null
@@ -1,1085 +1,0 @@
-#
-# Quake2 Makefile for Linux 2.0
-#
-# Nov '97 by Zoid <[email protected]>
-#
-# ELF only
-#
-
-ifneq (,$(findstring alpha,$(shell uname -m)))
-ARCH=axp
-else
-ARCH=i386
-endif
-
-MOUNT_DIR=/grog/NewWork/Quake2/code
-
-BUILD_DEBUG_DIR=debug$(ARCH)
-BUILD_RELEASE_DIR=release$(ARCH)
-CLIENT_DIR=$(MOUNT_DIR)/client
-SERVER_DIR=$(MOUNT_DIR)/server
-REF_SOFT_DIR=$(MOUNT_DIR)/ref_soft
-REF_GL_DIR=$(MOUNT_DIR)/ref_gl
-COMMON_DIR=$(MOUNT_DIR)/qcommon
-LINUX_DIR=$(MOUNT_DIR)/linux
-GAME_DIR=$(MOUNT_DIR)/game
-CTF_DIR=$(MOUNT_DIR)/ctf
-XATRIX_DIR=$(MOUNT_DIR)/xatrix
-
-CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp
-
-ifeq ($(ARCH),axp)
-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations
-else
-RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
- -malign-jumps=2 -malign-functions=2
-endif
-
-DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-LDFLAGS=-ldl -lm
-SVGALDFLAGS=-lvga
-XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext
-XCFLAGS=
-
-GLLDFLAGS=-L/usr/local/glide/lib -L/usr/X11/lib -L/usr/local/lib \
- -L/usr/local/src/Mesa-2.6/lib -lMesaGL -lglide2x -lX11 -lXext -lvga
-GLCFLAGS=-I/usr/local/src/Mesa-2.6/include -I/usr/local/glide/include
-
-SHLIBEXT=so
-
-SHLIBCFLAGS=-fPIC
-SHLIBLDFLAGS=-shared
-
-DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
-DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-DO_GL_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) $(GLCFLAGS) -o $@ -c $<
-DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
-DO_SHLIB_AS=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
-
-#############################################################################
-# SETUP AND BUILD
-#############################################################################
-
-ifeq ($(ARCH),axp)
-TARGETS=$(BUILDDIR)/quake2 \
- $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
-else
-TARGETS=$(BUILDDIR)/quake2 \
- $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/ref_soft.$(SHLIBEXT) \
- $(BUILDDIR)/ref_softx.$(SHLIBEXT) \
- $(BUILDDIR)/ref_gl.$(SHLIBEXT) \
- $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
-endif
-
-build_debug:
- @-mkdir $(BUILD_DEBUG_DIR) \
- $(BUILD_DEBUG_DIR)/client \
- $(BUILD_DEBUG_DIR)/ref_soft \
- $(BUILD_DEBUG_DIR)/ref_gl \
- $(BUILD_DEBUG_DIR)/game \
- $(BUILD_DEBUG_DIR)/ctf \
- $(BUILD_DEBUG_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-build_release:
- @-mkdir $(BUILD_RELEASE_DIR) \
- $(BUILD_RELEASE_DIR)/client \
- $(BUILD_RELEASE_DIR)/ref_soft \
- $(BUILD_RELEASE_DIR)/ref_gl \
- $(BUILD_RELEASE_DIR)/game \
- $(BUILD_RELEASE_DIR)/ctf \
- $(BUILD_RELEASE_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
-
-all: build_debug build_release
-
-targets: $(TARGETS)
-
-#############################################################################
-# CLIENT/SERVER
-#############################################################################
-
-QUAKE2_OBJS = \
- $(BUILDDIR)/client/cl_cin.o \
- $(BUILDDIR)/client/cl_ents.o \
- $(BUILDDIR)/client/cl_fx.o \
- $(BUILDDIR)/client/cl_input.o \
- $(BUILDDIR)/client/cl_inv.o \
- $(BUILDDIR)/client/cl_main.o \
- $(BUILDDIR)/client/cl_parse.o \
- $(BUILDDIR)/client/cl_pred.o \
- $(BUILDDIR)/client/cl_tent.o \
- $(BUILDDIR)/client/cl_scrn.o \
- $(BUILDDIR)/client/cl_view.o \
- $(BUILDDIR)/client/console.o \
- $(BUILDDIR)/client/keys.o \
- $(BUILDDIR)/client/menu.o \
- $(BUILDDIR)/client/snd_dma.o \
- $(BUILDDIR)/client/snd_mem.o \
- $(BUILDDIR)/client/snd_mix.o \
- $(BUILDDIR)/client/qmenu.o \
- $(BUILDDIR)/client/m_flash.o \
- \
- $(BUILDDIR)/client/cmd.o \
- $(BUILDDIR)/client/cmodel.o \
- $(BUILDDIR)/client/common.o \
- $(BUILDDIR)/client/crc.o \
- $(BUILDDIR)/client/cvar.o \
- $(BUILDDIR)/client/files.o \
- $(BUILDDIR)/client/md4.o \
- $(BUILDDIR)/client/net_chan.o \
- \
- $(BUILDDIR)/client/sv_ccmds.o \
- $(BUILDDIR)/client/sv_ents.o \
- $(BUILDDIR)/client/sv_game.o \
- $(BUILDDIR)/client/sv_init.o \
- $(BUILDDIR)/client/sv_main.o \
- $(BUILDDIR)/client/sv_send.o \
- $(BUILDDIR)/client/sv_user.o \
- $(BUILDDIR)/client/sv_world.o \
- \
- $(BUILDDIR)/client/cd_linux.o \
- $(BUILDDIR)/client/q_shlinux.o \
- $(BUILDDIR)/client/vid_menu.o \
- $(BUILDDIR)/client/vid_so.o \
- $(BUILDDIR)/client/snd_linux.o \
- $(BUILDDIR)/client/sys_linux.o \
- $(BUILDDIR)/client/glob.o \
- $(BUILDDIR)/client/net_udp.o \
- \
- $(BUILDDIR)/client/q_shared.o \
- $(BUILDDIR)/client/pmove.o
-
-ifeq ($(ARCH),axp)
-QUAKE2_AS_OBJS = #blank
-else
-QUAKE2_AS_OBJS = \
- $(BUILDDIR)/client/snd_mixa.o
-endif
-
-$(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS)
- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS)
-
-$(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_ents.o : $(CLIENT_DIR)/cl_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_fx.o : $(CLIENT_DIR)/cl_fx.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_input.o : $(CLIENT_DIR)/cl_input.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_inv.o : $(CLIENT_DIR)/cl_inv.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_main.o : $(CLIENT_DIR)/cl_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_parse.o : $(CLIENT_DIR)/cl_parse.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_pred.o : $(CLIENT_DIR)/cl_pred.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_tent.o : $(CLIENT_DIR)/cl_tent.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_scrn.o : $(CLIENT_DIR)/cl_scrn.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_view.o : $(CLIENT_DIR)/cl_view.c
- $(DO_CC)
-
-$(BUILDDIR)/client/console.o : $(CLIENT_DIR)/console.c
- $(DO_CC)
-
-$(BUILDDIR)/client/keys.o : $(CLIENT_DIR)/keys.c
- $(DO_CC)
-
-$(BUILDDIR)/client/menu.o : $(CLIENT_DIR)/menu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_dma.o : $(CLIENT_DIR)/snd_dma.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mem.o : $(CLIENT_DIR)/snd_mem.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mix.o : $(CLIENT_DIR)/snd_mix.c
- $(DO_CC)
-
-$(BUILDDIR)/client/qmenu.o : $(CLIENT_DIR)/qmenu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmd.o : $(COMMON_DIR)/cmd.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmodel.o : $(COMMON_DIR)/cmodel.c
- $(DO_CC)
-
-$(BUILDDIR)/client/common.o : $(COMMON_DIR)/common.c
- $(DO_CC)
-
-$(BUILDDIR)/client/crc.o : $(COMMON_DIR)/crc.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cvar.o : $(COMMON_DIR)/cvar.c
- $(DO_CC)
-
-$(BUILDDIR)/client/files.o : $(COMMON_DIR)/files.c
- $(DO_CC)
-
-$(BUILDDIR)/client/md4.o : $(COMMON_DIR)/md4.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_chan.o : $(COMMON_DIR)/net_chan.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_CC)
-
-$(BUILDDIR)/client/pmove.o : $(COMMON_DIR)/pmove.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ccmds.o : $(SERVER_DIR)/sv_ccmds.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ents.o : $(SERVER_DIR)/sv_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_game.o : $(SERVER_DIR)/sv_game.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_init.o : $(SERVER_DIR)/sv_init.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_main.o : $(SERVER_DIR)/sv_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_send.o : $(SERVER_DIR)/sv_send.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_user.o : $(SERVER_DIR)/sv_user.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_world.o : $(SERVER_DIR)/sv_world.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cd_linux.o : $(LINUX_DIR)/cd_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/vid_menu.o : $(LINUX_DIR)/vid_menu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/vid_so.o : $(LINUX_DIR)/vid_so.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_linux.o : $(LINUX_DIR)/snd_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mixa.o : $(LINUX_DIR)/snd_mixa.s
- $(DO_AS)
-
-$(BUILDDIR)/client/sys_linux.o : $(LINUX_DIR)/sys_linux.c
- $(DO_CC)
-
-$(BUILDDIR)/client/glob.o : $(LINUX_DIR)/glob.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_udp.o : $(LINUX_DIR)/net_udp.c
- $(DO_CC)
-
-#############################################################################
-# GAME
-#############################################################################
-
-GAME_OBJS = \
- $(BUILDDIR)/game/g_ai.o \
- $(BUILDDIR)/game/p_client.o \
- $(BUILDDIR)/game/g_cmds.o \
- $(BUILDDIR)/game/g_svcmds.o \
- $(BUILDDIR)/game/g_combat.o \
- $(BUILDDIR)/game/g_func.o \
- $(BUILDDIR)/game/g_items.o \
- $(BUILDDIR)/game/g_main.o \
- $(BUILDDIR)/game/g_misc.o \
- $(BUILDDIR)/game/g_monster.o \
- $(BUILDDIR)/game/g_phys.o \
- $(BUILDDIR)/game/g_save.o \
- $(BUILDDIR)/game/g_spawn.o \
- $(BUILDDIR)/game/g_target.o \
- $(BUILDDIR)/game/g_trigger.o \
- $(BUILDDIR)/game/g_turret.o \
- $(BUILDDIR)/game/g_utils.o \
- $(BUILDDIR)/game/g_weapon.o \
- $(BUILDDIR)/game/m_actor.o \
- $(BUILDDIR)/game/m_berserk.o \
- $(BUILDDIR)/game/m_boss2.o \
- $(BUILDDIR)/game/m_boss3.o \
- $(BUILDDIR)/game/m_boss31.o \
- $(BUILDDIR)/game/m_boss32.o \
- $(BUILDDIR)/game/m_brain.o \
- $(BUILDDIR)/game/m_chick.o \
- $(BUILDDIR)/game/m_flipper.o \
- $(BUILDDIR)/game/m_float.o \
- $(BUILDDIR)/game/m_flyer.o \
- $(BUILDDIR)/game/m_gladiator.o \
- $(BUILDDIR)/game/m_gunner.o \
- $(BUILDDIR)/game/m_hover.o \
- $(BUILDDIR)/game/m_infantry.o \
- $(BUILDDIR)/game/m_insane.o \
- $(BUILDDIR)/game/m_medic.o \
- $(BUILDDIR)/game/m_move.o \
- $(BUILDDIR)/game/m_mutant.o \
- $(BUILDDIR)/game/m_parasite.o \
- $(BUILDDIR)/game/m_soldier.o \
- $(BUILDDIR)/game/m_supertank.o \
- $(BUILDDIR)/game/m_tank.o \
- $(BUILDDIR)/game/p_hud.o \
- $(BUILDDIR)/game/p_trail.o \
- $(BUILDDIR)/game/p_view.o \
- $(BUILDDIR)/game/p_weapon.o \
- $(BUILDDIR)/game/q_shared.o \
- $(BUILDDIR)/game/m_flash.o
-
-$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
-
-$(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_client.o : $(GAME_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_cmds.o : $(GAME_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_svcmds.o : $(GAME_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_combat.o : $(GAME_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_func.o : $(GAME_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_items.o : $(GAME_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_main.o : $(GAME_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_misc.o : $(GAME_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_monster.o : $(GAME_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_phys.o : $(GAME_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_save.o : $(GAME_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_spawn.o : $(GAME_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_target.o : $(GAME_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_trigger.o : $(GAME_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_turret.o : $(GAME_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_utils.o : $(GAME_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_weapon.o : $(GAME_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_actor.o : $(GAME_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_berserk.o : $(GAME_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss2.o : $(GAME_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss3.o : $(GAME_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss31.o : $(GAME_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss32.o : $(GAME_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_brain.o : $(GAME_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_chick.o : $(GAME_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flipper.o : $(GAME_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_float.o : $(GAME_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flyer.o : $(GAME_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gladiator.o : $(GAME_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gunner.o : $(GAME_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_hover.o : $(GAME_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_infantry.o : $(GAME_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_insane.o : $(GAME_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_medic.o : $(GAME_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_move.o : $(GAME_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_mutant.o : $(GAME_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_parasite.o : $(GAME_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_soldier.o : $(GAME_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_supertank.o : $(GAME_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_tank.o : $(GAME_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_hud.o : $(GAME_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_trail.o : $(GAME_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_view.o : $(GAME_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_weapon.o : $(GAME_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# CTF
-#############################################################################
-
-CTF_OBJS = \
- $(BUILDDIR)/ctf/g_ai.o \
- $(BUILDDIR)/ctf/g_chase.o \
- $(BUILDDIR)/ctf/g_cmds.o \
- $(BUILDDIR)/ctf/g_combat.o \
- $(BUILDDIR)/ctf/g_ctf.o \
- $(BUILDDIR)/ctf/g_func.o \
- $(BUILDDIR)/ctf/g_items.o \
- $(BUILDDIR)/ctf/g_main.o \
- $(BUILDDIR)/ctf/g_misc.o \
- $(BUILDDIR)/ctf/g_monster.o \
- $(BUILDDIR)/ctf/g_phys.o \
- $(BUILDDIR)/ctf/g_save.o \
- $(BUILDDIR)/ctf/g_spawn.o \
- $(BUILDDIR)/ctf/g_svcmds.o \
- $(BUILDDIR)/ctf/g_target.o \
- $(BUILDDIR)/ctf/g_trigger.o \
- $(BUILDDIR)/ctf/g_utils.o \
- $(BUILDDIR)/ctf/g_weapon.o \
- $(BUILDDIR)/ctf/m_move.o \
- $(BUILDDIR)/ctf/p_client.o \
- $(BUILDDIR)/ctf/p_hud.o \
- $(BUILDDIR)/ctf/p_menu.o \
- $(BUILDDIR)/ctf/p_trail.o \
- $(BUILDDIR)/ctf/p_view.o \
- $(BUILDDIR)/ctf/p_weapon.o \
- $(BUILDDIR)/ctf/q_shared.o
-
-$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
-
-$(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_chase.o : $(CTF_DIR)/g_chase.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_cmds.o : $(CTF_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_combat.o : $(CTF_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_ctf.o : $(CTF_DIR)/g_ctf.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_func.o : $(CTF_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_items.o : $(CTF_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_main.o : $(CTF_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_misc.o : $(CTF_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_monster.o : $(CTF_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_phys.o : $(CTF_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_save.o : $(CTF_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_spawn.o : $(CTF_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_svcmds.o : $(CTF_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_target.o : $(CTF_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_trigger.o : $(CTF_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_utils.o : $(CTF_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_weapon.o : $(CTF_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/m_move.o : $(CTF_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_client.o : $(CTF_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_hud.o : $(CTF_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_menu.o : $(CTF_DIR)/p_menu.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_trail.o : $(CTF_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_view.o : $(CTF_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_weapon.o : $(CTF_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/q_shared.o : $(CTF_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# XATRIX
-#############################################################################
-
-XATRIX_OBJS = \
- $(BUILDDIR)/xatrix/g_ai.o \
- $(BUILDDIR)/xatrix/g_cmds.o \
- $(BUILDDIR)/xatrix/g_combat.o \
- $(BUILDDIR)/xatrix/g_func.o \
- $(BUILDDIR)/xatrix/g_items.o \
- $(BUILDDIR)/xatrix/g_main.o \
- $(BUILDDIR)/xatrix/g_misc.o \
- $(BUILDDIR)/xatrix/g_monster.o \
- $(BUILDDIR)/xatrix/g_phys.o \
- $(BUILDDIR)/xatrix/g_save.o \
- $(BUILDDIR)/xatrix/g_spawn.o \
- $(BUILDDIR)/xatrix/g_svcmds.o \
- $(BUILDDIR)/xatrix/g_target.o \
- $(BUILDDIR)/xatrix/g_trigger.o \
- $(BUILDDIR)/xatrix/g_turret.o \
- $(BUILDDIR)/xatrix/g_utils.o \
- $(BUILDDIR)/xatrix/g_weapon.o \
- $(BUILDDIR)/xatrix/m_actor.o \
- $(BUILDDIR)/xatrix/m_berserk.o \
- $(BUILDDIR)/xatrix/m_boss2.o \
- $(BUILDDIR)/xatrix/m_boss3.o \
- $(BUILDDIR)/xatrix/m_boss31.o \
- $(BUILDDIR)/xatrix/m_boss32.o \
- $(BUILDDIR)/xatrix/m_boss5.o \
- $(BUILDDIR)/xatrix/m_brain.o \
- $(BUILDDIR)/xatrix/m_chick.o \
- $(BUILDDIR)/xatrix/m_fixbot.o \
- $(BUILDDIR)/xatrix/m_flash.o \
- $(BUILDDIR)/xatrix/m_flipper.o \
- $(BUILDDIR)/xatrix/m_float.o \
- $(BUILDDIR)/xatrix/m_flyer.o \
- $(BUILDDIR)/xatrix/m_gekk.o \
- $(BUILDDIR)/xatrix/m_gladb.o \
- $(BUILDDIR)/xatrix/m_gladiator.o \
- $(BUILDDIR)/xatrix/m_gunner.o \
- $(BUILDDIR)/xatrix/m_hover.o \
- $(BUILDDIR)/xatrix/m_infantry.o \
- $(BUILDDIR)/xatrix/m_insane.o \
- $(BUILDDIR)/xatrix/m_medic.o \
- $(BUILDDIR)/xatrix/m_move.o \
- $(BUILDDIR)/xatrix/m_mutant.o \
- $(BUILDDIR)/xatrix/m_parasite.o \
- $(BUILDDIR)/xatrix/m_soldier.o \
- $(BUILDDIR)/xatrix/m_supertank.o \
- $(BUILDDIR)/xatrix/m_tank.o \
- $(BUILDDIR)/xatrix/p_client.o \
- $(BUILDDIR)/xatrix/p_hud.o \
- $(BUILDDIR)/xatrix/p_trail.o \
- $(BUILDDIR)/xatrix/p_view.o \
- $(BUILDDIR)/xatrix/p_weapon.o \
- $(BUILDDIR)/xatrix/q_shared.o
-
-$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
-
-$(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_cmds.o : $(XATRIX_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_combat.o : $(XATRIX_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_func.o : $(XATRIX_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_items.o : $(XATRIX_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_main.o : $(XATRIX_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_misc.o : $(XATRIX_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_monster.o : $(XATRIX_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_phys.o : $(XATRIX_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_save.o : $(XATRIX_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_spawn.o : $(XATRIX_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_svcmds.o : $(XATRIX_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_target.o : $(XATRIX_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_trigger.o : $(XATRIX_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_turret.o : $(XATRIX_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_utils.o : $(XATRIX_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_weapon.o : $(XATRIX_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_actor.o : $(XATRIX_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_berserk.o : $(XATRIX_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss2.o : $(XATRIX_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss3.o : $(XATRIX_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss31.o : $(XATRIX_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss32.o : $(XATRIX_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss5.o : $(XATRIX_DIR)/m_boss5.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_brain.o : $(XATRIX_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_chick.o : $(XATRIX_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_fixbot.o : $(XATRIX_DIR)/m_fixbot.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flash.o : $(XATRIX_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flipper.o : $(XATRIX_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_float.o : $(XATRIX_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flyer.o : $(XATRIX_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gekk.o : $(XATRIX_DIR)/m_gekk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladb.o : $(XATRIX_DIR)/m_gladb.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladiator.o : $(XATRIX_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gunner.o : $(XATRIX_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_hover.o : $(XATRIX_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_infantry.o : $(XATRIX_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_insane.o : $(XATRIX_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_medic.o : $(XATRIX_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_move.o : $(XATRIX_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_mutant.o : $(XATRIX_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_parasite.o : $(XATRIX_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_soldier.o : $(XATRIX_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_supertank.o : $(XATRIX_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_tank.o : $(XATRIX_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_client.o : $(XATRIX_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_hud.o : $(XATRIX_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_trail.o : $(XATRIX_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_view.o : $(XATRIX_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_weapon.o : $(XATRIX_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/q_shared.o : $(XATRIX_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-
-#############################################################################
-# REF_SOFT
-#############################################################################
-
-REF_SOFT_OBJS = \
- $(BUILDDIR)/ref_soft/r_aclip.o \
- $(BUILDDIR)/ref_soft/r_alias.o \
- $(BUILDDIR)/ref_soft/r_bsp.o \
- $(BUILDDIR)/ref_soft/r_draw.o \
- $(BUILDDIR)/ref_soft/r_edge.o \
- $(BUILDDIR)/ref_soft/r_image.o \
- $(BUILDDIR)/ref_soft/r_light.o \
- $(BUILDDIR)/ref_soft/r_main.o \
- $(BUILDDIR)/ref_soft/r_misc.o \
- $(BUILDDIR)/ref_soft/r_model.o \
- $(BUILDDIR)/ref_soft/r_part.o \
- $(BUILDDIR)/ref_soft/r_poly.o \
- $(BUILDDIR)/ref_soft/r_polyse.o \
- $(BUILDDIR)/ref_soft/r_rast.o \
- $(BUILDDIR)/ref_soft/r_scan.o \
- $(BUILDDIR)/ref_soft/r_sprite.o \
- $(BUILDDIR)/ref_soft/r_surf.o \
- \
- $(BUILDDIR)/ref_soft/r_aclipa.o \
- $(BUILDDIR)/ref_soft/r_draw16.o \
- $(BUILDDIR)/ref_soft/r_drawa.o \
- $(BUILDDIR)/ref_soft/r_edgea.o \
- $(BUILDDIR)/ref_soft/r_scana.o \
- $(BUILDDIR)/ref_soft/r_spr8.o \
- $(BUILDDIR)/ref_soft/r_surf8.o \
- $(BUILDDIR)/ref_soft/math.o \
- $(BUILDDIR)/ref_soft/d_polysa.o \
- $(BUILDDIR)/ref_soft/r_varsa.o \
- $(BUILDDIR)/ref_soft/sys_dosa.o \
- \
- $(BUILDDIR)/ref_soft/q_shared.o \
- $(BUILDDIR)/ref_soft/q_shlinux.o \
- $(BUILDDIR)/ref_soft/glob.o
-
-REF_SOFT_SVGA_OBJS = \
- $(BUILDDIR)/ref_soft/rw_svgalib.o \
- $(BUILDDIR)/ref_soft/d_copy.o \
- $(BUILDDIR)/ref_soft/rw_in_svgalib.o
-
-REF_SOFT_X11_OBJS = \
- $(BUILDDIR)/ref_soft/rw_x11.o
-
-$(BUILDDIR)/ref_soft.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_SVGA_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
- $(REF_SOFT_SVGA_OBJS) $(SVGALDFLAGS)
-
-$(BUILDDIR)/ref_softx.$(SHLIBEXT) : $(REF_SOFT_OBJS) $(REF_SOFT_X11_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_SOFT_OBJS) \
- $(REF_SOFT_X11_OBJS) $(XLDFLAGS)
-
-$(BUILDDIR)/ref_soft/r_aclip.o : $(REF_SOFT_DIR)/r_aclip.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_alias.o : $(REF_SOFT_DIR)/r_alias.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_bsp.o : $(REF_SOFT_DIR)/r_bsp.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_draw.o : $(REF_SOFT_DIR)/r_draw.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_edge.o : $(REF_SOFT_DIR)/r_edge.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_image.o : $(REF_SOFT_DIR)/r_image.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_light.o : $(REF_SOFT_DIR)/r_light.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_main.o : $(REF_SOFT_DIR)/r_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_misc.o : $(REF_SOFT_DIR)/r_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_model.o : $(REF_SOFT_DIR)/r_model.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_part.o : $(REF_SOFT_DIR)/r_part.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_poly.o : $(REF_SOFT_DIR)/r_poly.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_polyse.o : $(REF_SOFT_DIR)/r_polyse.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_rast.o : $(REF_SOFT_DIR)/r_rast.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_scan.o : $(REF_SOFT_DIR)/r_scan.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_sprite.o : $(REF_SOFT_DIR)/r_sprite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_surf.o : $(REF_SOFT_DIR)/r_surf.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/r_aclipa.o : $(LINUX_DIR)/r_aclipa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_draw16.o : $(LINUX_DIR)/r_draw16.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_drawa.o : $(LINUX_DIR)/r_drawa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_edgea.o : $(LINUX_DIR)/r_edgea.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_scana.o : $(LINUX_DIR)/r_scana.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_spr8.o : $(LINUX_DIR)/r_spr8.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_surf8.o : $(LINUX_DIR)/r_surf8.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/math.o : $(LINUX_DIR)/math.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/d_polysa.o : $(LINUX_DIR)/d_polysa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/r_varsa.o : $(LINUX_DIR)/r_varsa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/sys_dosa.o : $(LINUX_DIR)/sys_dosa.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/glob.o : $(LINUX_DIR)/glob.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/rw_svgalib.o : $(LINUX_DIR)/rw_svgalib.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/d_copy.o : $(LINUX_DIR)/d_copy.s
- $(DO_SHLIB_AS)
-
-$(BUILDDIR)/ref_soft/rw_in_svgalib.o : $(LINUX_DIR)/rw_in_svgalib.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ref_soft/rw_x11.o : $(LINUX_DIR)/rw_x11.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# REF_GL
-#############################################################################
-
-REF_GL_OBJS = \
- $(BUILDDIR)/ref_gl/gl_draw.o \
- $(BUILDDIR)/ref_gl/gl_image.o \
- $(BUILDDIR)/ref_gl/gl_light.o \
- $(BUILDDIR)/ref_gl/gl_mesh.o \
- $(BUILDDIR)/ref_gl/gl_model.o \
- $(BUILDDIR)/ref_gl/gl_rmain.o \
- $(BUILDDIR)/ref_gl/gl_rmisc.o \
- $(BUILDDIR)/ref_gl/gl_rsurf.o \
- $(BUILDDIR)/ref_gl/gl_warp.o \
- \
- $(BUILDDIR)/ref_gl/qgl_linux.o \
- $(BUILDDIR)/ref_gl/gl_fxmesa.o \
- $(BUILDDIR)/ref_gl/rw_in_svgalib.o \
- $(BUILDDIR)/ref_gl/q_shared.o \
- $(BUILDDIR)/ref_gl/q_shlinux.o \
- $(BUILDDIR)/ref_gl/glob.o
-
-$(BUILDDIR)/ref_gl.$(SHLIBEXT) : $(REF_GL_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(GLLDFLAGS)
-
-$(BUILDDIR)/ref_gl/gl_draw.o : $(REF_GL_DIR)/gl_draw.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_image.o : $(REF_GL_DIR)/gl_image.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_light.o : $(REF_GL_DIR)/gl_light.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_mesh.o : $(REF_GL_DIR)/gl_mesh.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_model.o : $(REF_GL_DIR)/gl_model.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_rmain.o : $(REF_GL_DIR)/gl_rmain.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_rmisc.o : $(REF_GL_DIR)/gl_rmisc.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_rsurf.o : $(REF_GL_DIR)/gl_rsurf.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_warp.o : $(REF_GL_DIR)/gl_warp.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/qgl_linux.o : $(LINUX_DIR)/qgl_linux.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/gl_fxmesa.o : $(LINUX_DIR)/gl_fxmesa.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/rw_in_svgalib.o : $(LINUX_DIR)/rw_in_svgalib.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
- $(DO_GL_SHLIB_CC)
-
-$(BUILDDIR)/ref_gl/glob.o : $(LINUX_DIR)/glob.c
- $(DO_GL_SHLIB_CC)
-
-#############################################################################
-# MISC
-#############################################################################
-
-clean: clean-debug clean-release
-
-clean-debug:
- $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean-release:
- $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean2:
- -rm -f \
- $(QUAKE2_OBJS) \
- $(QUAKE2_AS_OBJS) \
- $(GAME_OBJS) \
- $(CTF_OBJS) \
- $(XATRIX_OBJS) \
- $(REF_SOFT_OBJS) \
- $(REF_SOFT_SVGA_OBJS) \
- $(REF_SOFT_X11_OBJS) \
- $(REF_GL_OBJS)
-
--- a/linux/block16.h
+++ /dev/null
@@ -1,123 +1,0 @@
-LEnter16_16:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch0:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch1:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch2:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch3:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch4:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch5:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch6:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch7:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
-LEnter8_16:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch8:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch9:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch10:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch11:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
-LEnter4_16:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch12:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch13:
- movw %cx,2(%edi)
- addl $0x4,%edi
-
-LEnter2_16:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movw 0x12345678(,%eax,2),%ax
-LBPatch14:
- addl %ebp,%edx
- movw %ax,(%edi)
- movw 0x12345678(,%ecx,2),%cx
-LBPatch15:
- movw %cx,2(%edi)
- addl $0x4,%edi
--- a/linux/block8.h
+++ /dev/null
@@ -1,124 +1,0 @@
-LEnter16_8:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch0:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch1:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch2:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch3:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch4:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch5:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch6:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch7:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
-LEnter8_8:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch8:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch9:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch10:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch11:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
-LEnter4_8:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch12:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch13:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
-LEnter2_8:
- movb (%esi),%al
- movb (%esi,%ebx,),%cl
- movb %dh,%ah
- addl %ebp,%edx
- movb %dh,%ch
- leal (%esi,%ebx,2),%esi
- movb 0x12345678(%eax),%al
-LBPatch14:
- addl %ebp,%edx
- movb %al,(%edi)
- movb 0x12345678(%ecx),%cl
-LBPatch15:
- movb %cl,1(%edi)
- addl $0x2,%edi
-
--- a/linux/cd_linux.c
+++ /dev/null
@@ -1,420 +1,0 @@
-// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
-// rights reserved.
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-
-#include <linux/cdrom.h>
-
-#include "../client/client.h"
-
-static qboolean cdValid = false;
-static qboolean playing = false;
-static qboolean wasPlaying = false;
-static qboolean initialized = false;
-static qboolean enabled = true;
-static qboolean playLooping = false;
-static float cdvolume;
-static byte remap[100];
-static byte playTrack;
-static byte maxTrack;
-
-static int cdfile = -1;
-
-//static char cd_dev[64] = "/dev/cdrom";
-
-cvar_t *cd_volume;
-cvar_t *cd_nocd;
-cvar_t *cd_dev;
-
-void CDAudio_Pause(void);
-
-static void CDAudio_Eject(void)
-{
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-
- if ( ioctl(cdfile, CDROMEJECT) == -1 )
- Com_DPrintf("ioctl cdromeject failed\n");
-}
-
-
-static void CDAudio_CloseDoor(void)
-{
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-
- if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
- Com_DPrintf("ioctl cdromclosetray failed\n");
-}
-
-static int CDAudio_GetAudioDiskInfo(void)
-{
- struct cdrom_tochdr tochdr;
-
- cdValid = false;
-
- if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 )
- {
- Com_DPrintf("ioctl cdromreadtochdr failed\n");
- return -1;
- }
-
- if (tochdr.cdth_trk0 < 1)
- {
- Com_DPrintf("CDAudio: no music tracks\n");
- return -1;
- }
-
- cdValid = true;
- maxTrack = tochdr.cdth_trk1;
-
- return 0;
-}
-
-
-void CDAudio_Play(int track, qboolean looping)
-{
- struct cdrom_tocentry entry;
- struct cdrom_ti ti;
-
- if (cdfile == -1 || !enabled)
- return;
-
- if (!cdValid)
- {
- CDAudio_GetAudioDiskInfo();
- if (!cdValid)
- return;
- }
-
- track = remap[track];
-
- if (track < 1 || track > maxTrack)
- {
- Com_DPrintf("CDAudio: Bad track number %u.\n", track);
- return;
- }
-
- // don't try to play a non-audio track
- entry.cdte_track = track;
- entry.cdte_format = CDROM_MSF;
- if ( ioctl(cdfile, CDROMREADTOCENTRY, &entry) == -1 )
- {
- Com_DPrintf("ioctl cdromreadtocentry failed\n");
- return;
- }
- if (entry.cdte_ctrl == CDROM_DATA_TRACK)
- {
- Com_Printf("CDAudio: track %i is not audio\n", track);
- return;
- }
-
- if (playing)
- {
- if (playTrack == track)
- return;
- CDAudio_Stop();
- }
-
- ti.cdti_trk0 = track;
- ti.cdti_trk1 = track;
- ti.cdti_ind0 = 1;
- ti.cdti_ind1 = 99;
-
- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
- {
- Com_DPrintf("ioctl cdromplaytrkind failed\n");
- return;
- }
-
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Com_DPrintf("ioctl cdromresume failed\n");
-
- playLooping = looping;
- playTrack = track;
- playing = true;
-
- if (cd_volume->value == 0.0)
- CDAudio_Pause ();
-}
-
-
-void CDAudio_Stop(void)
-{
- if (cdfile == -1 || !enabled)
- return;
-
- if (!playing)
- return;
-
- if ( ioctl(cdfile, CDROMSTOP) == -1 )
- Com_DPrintf("ioctl cdromstop failed (%d)\n", errno);
-
- wasPlaying = false;
- playing = false;
-}
-
-void CDAudio_Pause(void)
-{
- if (cdfile == -1 || !enabled)
- return;
-
- if (!playing)
- return;
-
- if ( ioctl(cdfile, CDROMPAUSE) == -1 )
- Com_DPrintf("ioctl cdrompause failed\n");
-
- wasPlaying = playing;
- playing = false;
-}
-
-
-void CDAudio_Resume(void)
-{
- if (cdfile == -1 || !enabled)
- return;
-
- if (!cdValid)
- return;
-
- if (!wasPlaying)
- return;
-
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Com_DPrintf("ioctl cdromresume failed\n");
- playing = true;
-}
-
-static void CD_f (void)
-{
- char *command;
- int ret;
- int n;
-
- if (Cmd_Argc() < 2)
- return;
-
- command = Cmd_Argv (1);
-
- if (Q_strcasecmp(command, "on") == 0)
- {
- enabled = true;
- return;
- }
-
- if (Q_strcasecmp(command, "off") == 0)
- {
- if (playing)
- CDAudio_Stop();
- enabled = false;
- return;
- }
-
- if (Q_strcasecmp(command, "reset") == 0)
- {
- enabled = true;
- if (playing)
- CDAudio_Stop();
- for (n = 0; n < 100; n++)
- remap[n] = n;
- CDAudio_GetAudioDiskInfo();
- return;
- }
-
- if (Q_strcasecmp(command, "remap") == 0)
- {
- ret = Cmd_Argc() - 2;
- if (ret <= 0)
- {
- for (n = 1; n < 100; n++)
- if (remap[n] != n)
- Com_Printf(" %u -> %u\n", n, remap[n]);
- return;
- }
- for (n = 1; n <= ret; n++)
- remap[n] = atoi(Cmd_Argv (n+1));
- return;
- }
-
- if (Q_strcasecmp(command, "close") == 0)
- {
- CDAudio_CloseDoor();
- return;
- }
-
- if (!cdValid)
- {
- CDAudio_GetAudioDiskInfo();
- if (!cdValid)
- {
- Com_Printf("No CD in player.\n");
- return;
- }
- }
-
- if (Q_strcasecmp(command, "play") == 0)
- {
- CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
- return;
- }
-
- if (Q_strcasecmp(command, "loop") == 0)
- {
- CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
- return;
- }
-
- if (Q_strcasecmp(command, "stop") == 0)
- {
- CDAudio_Stop();
- return;
- }
-
- if (Q_strcasecmp(command, "pause") == 0)
- {
- CDAudio_Pause();
- return;
- }
-
- if (Q_strcasecmp(command, "resume") == 0)
- {
- CDAudio_Resume();
- return;
- }
-
- if (Q_strcasecmp(command, "eject") == 0)
- {
- if (playing)
- CDAudio_Stop();
- CDAudio_Eject();
- cdValid = false;
- return;
- }
-
- if (Q_strcasecmp(command, "info") == 0)
- {
- Com_Printf("%u tracks\n", maxTrack);
- if (playing)
- Com_Printf("Currently %s track %u\n", playLooping ? "looping" : "playing", playTrack);
- else if (wasPlaying)
- Com_Printf("Paused %s track %u\n", playLooping ? "looping" : "playing", playTrack);
- Com_Printf("Volume is %f\n", cdvolume);
- return;
- }
-}
-
-void CDAudio_Update(void)
-{
- struct cdrom_subchnl subchnl;
- static time_t lastchk;
-
- if (cdfile == -1 || !enabled)
- return;
-
- if (cd_volume && cd_volume->value != cdvolume)
- {
- if (cdvolume)
- {
- Cvar_SetValue ("cd_volume", 0.0);
- cdvolume = cd_volume->value;
- CDAudio_Pause ();
- }
- else
- {
- Cvar_SetValue ("cd_volume", 1.0);
- cdvolume = cd_volume->value;
- CDAudio_Resume ();
- }
- }
-
- if (playing && lastchk < time(NULL)) {
- lastchk = time(NULL) + 2; //two seconds between chks
- subchnl.cdsc_format = CDROM_MSF;
- if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) {
- Com_DPrintf("ioctl cdromsubchnl failed\n");
- playing = false;
- return;
- }
- if (subchnl.cdsc_audiostatus != CDROM_AUDIO_PLAY &&
- subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED) {
- playing = false;
- if (playLooping)
- CDAudio_Play(playTrack, true);
- }
- }
-}
-
-int CDAudio_Init(void)
-{
- int i;
- cvar_t *cv;
- extern uid_t saved_euid;
-
- cv = Cvar_Get ("nocdaudio", "0", CVAR_NOSET);
- if (cv->value)
- return -1;
-
- cd_nocd = Cvar_Get ("cd_nocd", "0", CVAR_ARCHIVE );
- if ( cd_nocd->value)
- return -1;
-
- cd_volume = Cvar_Get ("cd_volume", "1", CVAR_ARCHIVE);
-
- cd_dev = Cvar_Get("cd_dev", "/dev/cdrom", CVAR_ARCHIVE);
-
- seteuid(saved_euid);
-
- cdfile = open(cd_dev->string, O_RDONLY);
-
- seteuid(getuid());
-
- if (cdfile == -1) {
- Com_Printf("CDAudio_Init: open of \"%s\" failed (%i)\n", cd_dev->string, errno);
- cdfile = -1;
- return -1;
- }
-
- for (i = 0; i < 100; i++)
- remap[i] = i;
- initialized = true;
- enabled = true;
-
- if (CDAudio_GetAudioDiskInfo())
- {
- Com_Printf("CDAudio_Init: No CD in player.\n");
- cdValid = false;
- }
-
- Cmd_AddCommand ("cd", CD_f);
-
- Com_Printf("CD Audio Initialized\n");
-
- return 0;
-}
-
-void CDAudio_Activate (qboolean active)
-{
- if (active)
- CDAudio_Resume ();
- else
- CDAudio_Pause ();
-}
-
-void CDAudio_Shutdown(void)
-{
- if (!initialized)
- return;
- CDAudio_Stop();
- close(cdfile);
- cdfile = -1;
-}
--- a/linux/d_copy.s
+++ /dev/null
@@ -1,147 +1,0 @@
-/
-// d_copy.s
-// x86 assembly-language screen copying code.
-//
-
-#include "qasm.h"
-
- .data
-
-LCopyWidth: .long 0
-LBlockSrcStep: .long 0
-LBlockDestStep: .long 0
-LSrcDelta: .long 0
-LDestDelta: .long 0
-
-#define bufptr 4+16
-
-// copies 16 rows per plane at a pop; idea is that 16*512 = 8k, and since
-// no Mode X mode is wider than 360, all the data should fit in the cache for
-// the passes for the next 3 planes
-
- .text
-
-.globl C(VGA_UpdatePlanarScreen)
-C(VGA_UpdatePlanarScreen):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
- movl C(VGA_bufferrowbytes),%eax
- shll $1,%eax
- movl %eax,LBlockSrcStep
- movl C(VGA_rowbytes),%eax
- shll $1,%eax
- movl %eax,LBlockDestStep
-
- movl $0x3C4,%edx
- movb $2,%al
- outb %al,%dx // point the SC to the Map Mask
- incl %edx
-
- movl bufptr(%esp),%esi
- movl C(VGA_pagebase),%edi
- movl C(VGA_height),%ebp
- shrl $1,%ebp
-
- movl C(VGA_width),%ecx
- movl C(VGA_bufferrowbytes),%eax
- subl %ecx,%eax
- movl %eax,LSrcDelta
- movl C(VGA_rowbytes),%eax
- shll $2,%eax
- subl %ecx,%eax
- movl %eax,LDestDelta
- shrl $4,%ecx
- movl %ecx,LCopyWidth
-
-LRowLoop:
- movb $1,%al
-
-LPlaneLoop:
- outb %al,%dx
- movb $2,%ah
-
- pushl %esi
- pushl %edi
-LRowSetLoop:
- movl LCopyWidth,%ecx
-LColumnLoop:
- movb 12(%esi),%bh
- movb 8(%esi),%bl
- shll $16,%ebx
- movb 4(%esi),%bh
- movb (%esi),%bl
- movl %ebx,(%edi)
- addl $16,%esi
- addl $4,%edi
- decl %ecx
- jnz LColumnLoop
-
- addl LDestDelta,%edi
- addl LSrcDelta,%esi
- decb %ah
- jnz LRowSetLoop
-
- popl %edi
- popl %esi
- incl %esi
-
- shlb $1,%al
- cmpb $16,%al
- jnz LPlaneLoop
-
- subl $4,%esi
- addl LBlockSrcStep,%esi
- addl LBlockDestStep,%edi
- decl %ebp
- jnz LRowLoop
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
-
- ret
-
-
-#define srcptr 4+16
-#define destptr 8+16
-#define width 12+16
-#define height 16+16
-#define srcrowbytes 20+16
-#define destrowbytes 24+16
-
-.globl C(VGA_UpdateLinearScreen)
-C(VGA_UpdateLinearScreen):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
- cld
- movl srcptr(%esp),%esi
- movl destptr(%esp),%edi
- movl width(%esp),%ebx
- movl srcrowbytes(%esp),%eax
- subl %ebx,%eax
- movl destrowbytes(%esp),%edx
- subl %ebx,%edx
- shrl $2,%ebx
- movl height(%esp),%ebp
-LLRowLoop:
- movl %ebx,%ecx
- rep/movsl (%esi),(%edi)
- addl %eax,%esi
- addl %edx,%edi
- decl %ebp
- jnz LLRowLoop
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
-
- ret
-
--- a/linux/d_ifacea.h
+++ /dev/null
@@ -1,79 +1,0 @@
-//
-// d_ifacea.h
-//
-// Include file for asm driver interface.
-//
-
-//
-// !!! note that this file must match the corresponding C structures in
-// d_iface.h at all times !!!
-//
-
-// !!! if this is changed, it must be changed in r_shared.h too !!!
-#define ALIAS_ONSEAM 0x0020
-
-// !!! if this is changed, it must be changed in d_iface.h too !!!
-#define TURB_TEX_SIZE 64 // base turbulent texture size
-
-// !!! if this is changed, it must be changed in d_iface.h too !!!
-#define CYCLE 128
-
-// !!! if this is changed, it must be changed in r_shared.h too !!!
-#define MAXHEIGHT 1024
-
-// !!! if this is changed, it must be changed in quakedef.h too !!!
-#define CACHE_SIZE 32 // used to align key data structures
-
-// particle_t structure
-// !!! if this is changed, it must be changed in d_iface.h too !!!
-// driver-usable fields
-#define pt_org 0
-#define pt_color 12
-// drivers never touch the following fields
-#define pt_next 16
-#define pt_vel 20
-#define pt_ramp 32
-#define pt_die 36
-#define pt_type 40
-#define pt_size 44
-
-#define PARTICLE_Z_CLIP 8.0
-
-// finalvert_t structure
-// !!! if this is changed, it must be changed in d_iface.h too !!!
-#define fv_v 0 // !!! if this is moved, cases where the !!!
- // !!! address of this field is pushed in !!!
- // !!! d_polysa.s must be changed !!!
-#define fv_flags 24
-#define fv_reserved 28
-#define fv_size 32
-#define fv_shift 5
-
-
-// stvert_t structure
-// !!! if this is changed, it must be changed in modelgen.h too !!!
-#define stv_onseam 0
-#define stv_s 4
-#define stv_t 8
-#define stv_size 12
-
-
-// trivertx_t structure
-// !!! if this is changed, it must be changed in modelgen.h too !!!
-#define tv_v 0
-#define tv_lightnormalindex 3
-#define tv_size 4
-
-// affinetridesc_t structure
-// !!! if this is changed, it must be changed in d_iface.h too !!!
-#define atd_pskin 0
-#define atd_pskindesc 4
-#define atd_skinwidth 8
-#define atd_skinheight 12
-#define atd_ptriangles 16
-#define atd_pfinalverts 20
-#define atd_numtriangles 24
-#define atd_drawtype 28
-#define atd_seamfixupX16 32
-#define atd_size 36
-
--- a/linux/d_polysa.s
+++ /dev/null
@@ -1,1250 +1,0 @@
-//
-// d_polysa.s
-// x86 assembly-language polygon model drawing code
-//
-
-#include "qasm.h"
-#include "d_ifacea.h"
-
-#if id386
-
-// !!! if this is changed, it must be changed in d_polyse.c too !!!
-#define DPS_MAXSPANS MAXHEIGHT+1
- // 1 extra for spanpackage that marks end
-
-//#define SPAN_SIZE (((DPS_MAXSPANS + 1 + ((CACHE_SIZE - 1) / spanpackage_t_size)) + 1) * spanpackage_t_size)
-#define SPAN_SIZE (1024+1+1+1)*32
-
-
-
- .data
-
- .align 4
-p10_minus_p20: .single 0
-p01_minus_p21: .single 0
-temp0: .single 0
-temp1: .single 0
-Ltemp: .single 0
-
-aff8entryvec_table: .long LDraw8, LDraw7, LDraw6, LDraw5
- .long LDraw4, LDraw3, LDraw2, LDraw1
-
-lzistepx: .long 0
-
-
- .text
-
-#ifndef NeXT
- .extern C(D_PolysetSetEdgeTable)
- .extern C(D_RasterizeAliasPolySmooth)
-#endif
-
-//----------------------------------------------------------------------
-// affine triangle gradient calculation code
-//----------------------------------------------------------------------
-
-#if 0
-#define skinwidth 4+0
-
-.globl C(R_PolysetCalcGradients)
-C(R_PolysetCalcGradients):
-
-// p00_minus_p20 = r_p0[0] - r_p2[0];
-// p01_minus_p21 = r_p0[1] - r_p2[1];
-// p10_minus_p20 = r_p1[0] - r_p2[0];
-// p11_minus_p21 = r_p1[1] - r_p2[1];
-//
-// xstepdenominv = 1.0 / (p10_minus_p20 * p01_minus_p21 -
-// p00_minus_p20 * p11_minus_p21);
-//
-// ystepdenominv = -xstepdenominv;
-
- fildl C(r_p0)+0 // r_p0[0]
- fildl C(r_p2)+0 // r_p2[0] | r_p0[0]
- fildl C(r_p0)+4 // r_p0[1] | r_p2[0] | r_p0[0]
- fildl C(r_p2)+4 // r_p2[1] | r_p0[1] | r_p2[0] | r_p0[0]
- fildl C(r_p1)+0 // r_p1[0] | r_p2[1] | r_p0[1] | r_p2[0] | r_p0[0]
- fildl C(r_p1)+4 // r_p1[1] | r_p1[0] | r_p2[1] | r_p0[1] |
- // r_p2[0] | r_p0[0]
- fxch %st(3) // r_p0[1] | r_p1[0] | r_p2[1] | r_p1[1] |
- // r_p2[0] | r_p0[0]
- fsub %st(2),%st(0) // p01_minus_p21 | r_p1[0] | r_p2[1] | r_p1[1] |
- // r_p2[0] | r_p0[0]
- fxch %st(1) // r_p1[0] | p01_minus_p21 | r_p2[1] | r_p1[1] |
- // r_p2[0] | r_p0[0]
- fsub %st(4),%st(0) // p10_minus_p20 | p01_minus_p21 | r_p2[1] |
- // r_p1[1] | r_p2[0] | r_p0[0]
- fxch %st(5) // r_p0[0] | p01_minus_p21 | r_p2[1] |
- // r_p1[1] | r_p2[0] | p10_minus_p20
- fsubp %st(0),%st(4) // p01_minus_p21 | r_p2[1] | r_p1[1] |
- // p00_minus_p20 | p10_minus_p20
- fxch %st(2) // r_p1[1] | r_p2[1] | p01_minus_p21 |
- // p00_minus_p20 | p10_minus_p20
- fsubp %st(0),%st(1) // p11_minus_p21 | p01_minus_p21 |
- // p00_minus_p20 | p10_minus_p20
- fxch %st(1) // p01_minus_p21 | p11_minus_p21 |
- // p00_minus_p20 | p10_minus_p20
- flds C(d_xdenom) // d_xdenom | p01_minus_p21 | p11_minus_p21 |
- // p00_minus_p20 | p10_minus_p20
- fxch %st(4) // p10_minus_p20 | p01_minus_p21 | p11_minus_p21 |
- // p00_minus_p20 | d_xdenom
- fstps p10_minus_p20 // p01_minus_p21 | p11_minus_p21 |
- // p00_minus_p20 | d_xdenom
- fstps p01_minus_p21 // p11_minus_p21 | p00_minus_p20 | xstepdenominv
- fxch %st(2) // xstepdenominv | p00_minus_p20 | p11_minus_p21
-
-//// ceil () for light so positive steps are exaggerated, negative steps
-//// diminished, pushing us away from underflow toward overflow. Underflow is
-//// very visible, overflow is very unlikely, because of ambient lighting
-// t0 = r_p0[4] - r_p2[4];
-// t1 = r_p1[4] - r_p2[4];
-
- fildl C(r_p2)+16 // r_p2[4] | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fildl C(r_p0)+16 // r_p0[4] | r_p2[4] | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fildl C(r_p1)+16 // r_p1[4] | r_p0[4] | r_p2[4] | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fxch %st(2) // r_p2[4] | r_p0[4] | r_p1[4] | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fld %st(0) // r_p2[4] | r_p2[4] | r_p0[4] | r_p1[4] |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fsubrp %st(0),%st(2) // r_p2[4] | t0 | r_p1[4] | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fsubrp %st(0),%st(2) // t0 | t1 | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
-
-// r_lstepx = (int)
-// ceil((t1 * p01_minus_p21 - t0 * p11_minus_p21) * xstepdenominv);
-// r_lstepy = (int)
-// ceil((t1 * p00_minus_p20 - t0 * p10_minus_p20) * ystepdenominv);
-
- fld %st(0) // t0 | t0 | t1 | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmul %st(5),%st(0) // t0*p11_minus_p21 | t0 | t1 | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fxch %st(2) // t1 | t0 | t0*p11_minus_p21 | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fld %st(0) // t1 | t1 | t0 | t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmuls p01_minus_p21 // t1*p01_minus_p21 | t1 | t0 | t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // t0 | t1 | t1*p01_minus_p21 | t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmuls p10_minus_p20 // t0*p10_minus_p20 | t1 | t1*p01_minus_p21 |
- // t0*p11_minus_p21 | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fxch %st(1) // t1 | t0*p10_minus_p20 | t1*p01_minus_p21 |
- // t0*p11_minus_p21 | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fmul %st(5),%st(0) // t1*p00_minus_p20 | t0*p10_minus_p20 |
- // t1*p01_minus_p21 | t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // t1*p01_minus_p21 | t0*p10_minus_p20 |
- // t1*p00_minus_p20 | t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fsubp %st(0),%st(3) // t0*p10_minus_p20 | t1*p00_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fsubrp %st(0),%st(1) // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fld %st(2) // xstepdenominv |
- // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmuls float_minus_1 // ystepdenominv |
- // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmul %st(3),%st(0) // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv |
- // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fxch %st(1) // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmul %st(2),%st(0) // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv |
- // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fldcw ceil_cw
- fistpl C(r_lstepy) // r_lstepx | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fistpl C(r_lstepx) // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fldcw single_cw
-
-// t0 = r_p0[2] - r_p2[2];
-// t1 = r_p1[2] - r_p2[2];
-
- fildl C(r_p2)+8 // r_p2[2] | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fildl C(r_p0)+8 // r_p0[2] | r_p2[2] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fildl C(r_p1)+8 // r_p1[2] | r_p0[2] | r_p2[2] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // r_p2[2] | r_p0[2] | r_p1[2] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fld %st(0) // r_p2[2] | r_p2[2] | r_p0[2] | r_p1[2] |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubrp %st(0),%st(2) // r_p2[2] | t0 | r_p1[2] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fsubrp %st(0),%st(2) // t0 | t1 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
-
-// r_sstepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
-// xstepdenominv);
-// r_sstepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
-// ystepdenominv);
-
- fld %st(0) // t0 | t0 | t1 | ystepdenominv | xstepdenominv
- fmul %st(6),%st(0) // t0*p11_minus_p21 | t0 | t1 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // t1 | t0 | t0*p11_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fld %st(0) // t1 | t1 | t0 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmuls p01_minus_p21 // t1*p01_minus_p21 | t1 | t0 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fxch %st(2) // t0 | t1 | t1*p01_minus_p21 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmuls p10_minus_p20 // t0*p10_minus_p20 | t1 | t1*p01_minus_p21 |
- // t0*p11_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(1) // t1 | t0*p10_minus_p20 | t1*p01_minus_p21 |
- // t0*p11_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmul %st(6),%st(0) // t1*p00_minus_p20 | t0*p10_minus_p20 |
- // t1*p01_minus_p21 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fxch %st(2) // t1*p01_minus_p21 | t0*p10_minus_p20 |
- // t1*p00_minus_p20 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubp %st(0),%st(3) // t0*p10_minus_p20 | t1*p00_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubrp %st(0),%st(1) // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmul %st(2),%st(0) // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fxch %st(1) // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmul %st(3),%st(0) // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv |
- // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(1) // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv |
- // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fistpl C(r_sstepy) // r_sstepx | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fistpl C(r_sstepx) // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
-
-// t0 = r_p0[3] - r_p2[3];
-// t1 = r_p1[3] - r_p2[3];
-
- fildl C(r_p2)+12 // r_p2[3] | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fildl C(r_p0)+12 // r_p0[3] | r_p2[3] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fildl C(r_p1)+12 // r_p1[3] | r_p0[3] | r_p2[3] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // r_p2[3] | r_p0[3] | r_p1[3] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fld %st(0) // r_p2[3] | r_p2[3] | r_p0[3] | r_p1[3] |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubrp %st(0),%st(2) // r_p2[3] | t0 | r_p1[3] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fsubrp %st(0),%st(2) // t0 | t1 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
-
-// r_tstepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
-// xstepdenominv);
-// r_tstepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
-// ystepdenominv);
-
- fld %st(0) // t0 | t0 | t1 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fmul %st(6),%st(0) // t0*p11_minus_p21 | t0 | t1 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // t1 | t0 | t0*p11_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fld %st(0) // t1 | t1 | t0 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmuls p01_minus_p21 // t1*p01_minus_p21 | t1 | t0 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fxch %st(2) // t0 | t1 | t1*p01_minus_p21 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmuls p10_minus_p20 // t0*p10_minus_p20 | t1 | t1*p01_minus_p21 |
- // t0*p11_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(1) // t1 | t0*p10_minus_p20 | t1*p01_minus_p21 |
- // t0*p11_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmul %st(6),%st(0) // t1*p00_minus_p20 | t0*p10_minus_p20 |
- // t1*p01_minus_p21 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fxch %st(2) // t1*p01_minus_p21 | t0*p10_minus_p20 |
- // t1*p00_minus_p20 | t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubp %st(0),%st(3) // t0*p10_minus_p20 | t1*p00_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubrp %st(0),%st(1) // t1*p00_minus_p20 - t0*p10_minus_p20 |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fmul %st(2),%st(0) // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fxch %st(1) // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fmul %st(3),%st(0) // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv |
- // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(1) // (t1*p00_minus_p20 - t0*p10_minus_p20)*
- // ystepdenominv |
- // (t1*p01_minus_p21 - t0*p11_minus_p21)*
- // xstepdenominv | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fistpl C(r_tstepy) // r_tstepx | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fistpl C(r_tstepx) // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
-
-// t0 = r_p0[5] - r_p2[5];
-// t1 = r_p1[5] - r_p2[5];
-
- fildl C(r_p2)+20 // r_p2[5] | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fildl C(r_p0)+20 // r_p0[5] | r_p2[5] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fildl C(r_p1)+20 // r_p1[5] | r_p0[5] | r_p2[5] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fxch %st(2) // r_p2[5] | r_p0[5] | r_p1[5] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fld %st(0) // r_p2[5] | r_p2[5] | r_p0[5] | r_p1[5] |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // p11_minus_p21
- fsubrp %st(0),%st(2) // r_p2[5] | t0 | r_p1[5] | ystepdenominv |
- // xstepdenominv | p00_minus_p20 | p11_minus_p21
- fsubrp %st(0),%st(2) // t0 | t1 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
-
-// r_zistepx = (int)((t1 * p01_minus_p21 - t0 * p11_minus_p21) *
-// xstepdenominv);
-// r_zistepy = (int)((t1 * p00_minus_p20 - t0 * p10_minus_p20) *
-// ystepdenominv);
-
- fld %st(0) // t0 | t0 | t1 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | p11_minus_p21
- fmulp %st(0),%st(6) // t0 | t1 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | t0*p11_minus_p21
- fxch %st(1) // t1 | t0 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | t0*p11_minus_p21
- fld %st(0) // t1 | t1 | t0 | ystepdenominv | xstepdenominv |
- // p00_minus_p20 | t0*p11_minus_p21
- fmuls p01_minus_p21 // t1*p01_minus_p21 | t1 | t0 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 |
- // t0*p11_minus_p21
- fxch %st(2) // t0 | t1 | t1*p01_minus_p21 | ystepdenominv |
- // xstepdenominv | p00_minus_p20 |
- // t0*p11_minus_p21
- fmuls p10_minus_p20 // t0*p10_minus_p20 | t1 | t1*p01_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // t0*p11_minus_p21
- fxch %st(1) // t1 | t0*p10_minus_p20 | t1*p01_minus_p21 |
- // ystepdenominv | xstepdenominv | p00_minus_p20 |
- // t0*p11_minus_p21
- fmulp %st(0),%st(5) // t0*p10_minus_p20 | t1*p01_minus_p21 |
- // ystepdenominv | xstepdenominv |
- // t1*p00_minus_p20 | t0*p11_minus_p21
- fxch %st(5) // t0*p11_minus_p21 | t1*p01_minus_p21 |
- // ystepdenominv | xstepdenominv |
- // t1*p00_minus_p20 | t0*p10_minus_p20
- fsubrp %st(0),%st(1) // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // ystepdenominv | xstepdenominv |
- // t1*p00_minus_p20 | t0*p10_minus_p20
- fxch %st(3) // t1*p00_minus_p20 | ystepdenominv |
- // xstepdenominv |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // t0*p10_minus_p20
- fsubp %st(0),%st(4) // ystepdenominv | xstepdenominv |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // t1*p00_minus_p20 - t0*p10_minus_p20
- fxch %st(1) // xstepdenominv | ystepdenominv |
- // t1*p01_minus_p21 - t0*p11_minus_p21 |
- // t1*p00_minus_p20 - t0*p10_minus_p20
- fmulp %st(0),%st(2) // ystepdenominv |
- // (t1*p01_minus_p21 - t0*p11_minus_p21) *
- // xstepdenominv |
- // t1*p00_minus_p20 - t0*p10_minus_p20
- fmulp %st(0),%st(2) // (t1*p01_minus_p21 - t0*p11_minus_p21) *
- // xstepdenominv |
- // (t1*p00_minus_p20 - t0*p10_minus_p20) *
- // ystepdenominv
- fistpl C(r_zistepx) // (t1*p00_minus_p20 - t0*p10_minus_p20) *
- // ystepdenominv
- fistpl C(r_zistepy)
-
-// a_sstepxfrac = r_sstepx << 16;
-// a_tstepxfrac = r_tstepx << 16;
-//
-// a_ststepxwhole = r_affinetridesc.skinwidth * (r_tstepx >> 16) +
-// (r_sstepx >> 16);
-
- movl C(r_sstepx),%eax
- movl C(r_tstepx),%edx
- shll $16,%eax
- shll $16,%edx
- movl %eax,C(a_sstepxfrac)
- movl %edx,C(a_tstepxfrac)
-
- movl C(r_sstepx),%ecx
- movl C(r_tstepx),%eax
- sarl $16,%ecx
- sarl $16,%eax
- imull skinwidth(%esp)
- addl %ecx,%eax
- movl %eax,C(a_ststepxwhole)
-
- ret
-
-#endif
-
-//----------------------------------------------------------------------
-// recursive subdivision affine triangle drawing code
-//
-// not C-callable because of stdcall return
-//----------------------------------------------------------------------
-
-#define lp1 4+16
-#define lp2 8+16
-#define lp3 12+16
-
-.globl C(D_PolysetRecursiveTriangle)
-C(D_PolysetRecursiveTriangle):
- pushl %ebp // preserve caller stack frame pointer
- pushl %esi // preserve register variables
- pushl %edi
- pushl %ebx
-
-// int *temp;
-// int d;
-// int new[6];
-// int i;
-// int z;
-// short *zbuf;
- movl lp2(%esp),%esi
- movl lp1(%esp),%ebx
- movl lp3(%esp),%edi
-
-// d = lp2[0] - lp1[0];
-// if (d < -1 || d > 1)
-// goto split;
- movl 0(%esi),%eax
-
- movl 0(%ebx),%edx
- movl 4(%esi),%ebp
-
- subl %edx,%eax
- movl 4(%ebx),%ecx
-
- subl %ecx,%ebp
- incl %eax
-
- cmpl $2,%eax
- ja LSplit
-
-// d = lp2[1] - lp1[1];
-// if (d < -1 || d > 1)
-// goto split;
- movl 0(%edi),%eax
- incl %ebp
-
- cmpl $2,%ebp
- ja LSplit
-
-// d = lp3[0] - lp2[0];
-// if (d < -1 || d > 1)
-// goto split2;
- movl 0(%esi),%edx
- movl 4(%edi),%ebp
-
- subl %edx,%eax
- movl 4(%esi),%ecx
-
- subl %ecx,%ebp
- incl %eax
-
- cmpl $2,%eax
- ja LSplit2
-
-// d = lp3[1] - lp2[1];
-// if (d < -1 || d > 1)
-// goto split2;
- movl 0(%ebx),%eax
- incl %ebp
-
- cmpl $2,%ebp
- ja LSplit2
-
-// d = lp1[0] - lp3[0];
-// if (d < -1 || d > 1)
-// goto split3;
- movl 0(%edi),%edx
- movl 4(%ebx),%ebp
-
- subl %edx,%eax
- movl 4(%edi),%ecx
-
- subl %ecx,%ebp
- incl %eax
-
- incl %ebp
- movl %ebx,%edx
-
- cmpl $2,%eax
- ja LSplit3
-
-// d = lp1[1] - lp3[1];
-// if (d < -1 || d > 1)
-// {
-//split3:
-// temp = lp1;
-// lp3 = lp2;
-// lp1 = lp3;
-// lp2 = temp;
-// goto split;
-// }
-//
-// return; // entire tri is filled
-//
- cmpl $2,%ebp
- jna LDone
-
-LSplit3:
- movl %edi,%ebx
- movl %esi,%edi
- movl %edx,%esi
- jmp LSplit
-
-//split2:
-LSplit2:
-
-// temp = lp1;
-// lp1 = lp2;
-// lp2 = lp3;
-// lp3 = temp;
- movl %ebx,%eax
- movl %esi,%ebx
- movl %edi,%esi
- movl %eax,%edi
-
-//split:
-LSplit:
-
- subl $24,%esp // allocate space for a new vertex
-
-//// split this edge
-// new[0] = (lp1[0] + lp2[0]) >> 1;
-// new[1] = (lp1[1] + lp2[1]) >> 1;
-// new[2] = (lp1[2] + lp2[2]) >> 1;
-// new[3] = (lp1[3] + lp2[3]) >> 1;
-// new[5] = (lp1[5] + lp2[5]) >> 1;
- movl 8(%ebx),%eax
-
- movl 8(%esi),%edx
- movl 12(%ebx),%ecx
-
- addl %edx,%eax
- movl 12(%esi),%edx
-
- sarl $1,%eax
- addl %edx,%ecx
-
- movl %eax,8(%esp)
- movl 20(%ebx),%eax
-
- sarl $1,%ecx
- movl 20(%esi),%edx
-
- movl %ecx,12(%esp)
- addl %edx,%eax
-
- movl 0(%ebx),%ecx
- movl 0(%esi),%edx
-
- sarl $1,%eax
- addl %ecx,%edx
-
- movl %eax,20(%esp)
- movl 4(%ebx),%eax
-
- sarl $1,%edx
- movl 4(%esi),%ebp
-
- movl %edx,0(%esp)
- addl %eax,%ebp
-
- sarl $1,%ebp
- movl %ebp,4(%esp)
-
-//// draw the point if splitting a leading edge
-// if (lp2[1] > lp1[1])
-// goto nodraw;
- cmpl %eax,4(%esi)
- jg LNoDraw
-
-// if ((lp2[1] == lp1[1]) && (lp2[0] < lp1[0]))
-// goto nodraw;
- movl 0(%esi),%edx
- jnz LDraw
-
- cmpl %ecx,%edx
- jl LNoDraw
-
-LDraw:
-
-// z = new[5] >> 16;
- movl 20(%esp),%edx
- movl 4(%esp),%ecx
-
- sarl $16,%edx
- movl 0(%esp),%ebp
-
-// zbuf = zspantable[new[1]] + new[0];
- movl C(zspantable)(,%ecx,4),%eax
-
-// if (z >= *zbuf)
-// {
- cmpw (%eax,%ebp,2),%dx
- jnge LNoDraw
-
-// int pix;
-//
-// *zbuf = z;
- movw %dx,(%eax,%ebp,2)
-
-// pix = d_pcolormap[skintable[new[3]>>16][new[2]>>16]];
- movl 12(%esp),%eax
-
- sarl $16,%eax
- movl 8(%esp),%edx
-
- sarl $16,%edx
- subl %ecx,%ecx
-
- movl C(skintable)(,%eax,4),%eax
- movl 4(%esp),%ebp
-
- movb (%eax,%edx,),%cl
- movl C(d_pcolormap),%edx
-
- movb (%edx,%ecx,),%dl
- movl 0(%esp),%ecx
-
-// d_viewbuffer[d_scantable[new[1]] + new[0]] = pix;
- movl C(d_scantable)(,%ebp,4),%eax
- addl %eax,%ecx
- movl C(d_viewbuffer),%eax
- movb %dl,(%eax,%ecx,1)
-
-// }
-//
-//nodraw:
-LNoDraw:
-
-//// recursively continue
-// D_PolysetRecursiveTriangle (lp3, lp1, new);
- pushl %esp
- pushl %ebx
- pushl %edi
- call C(D_PolysetRecursiveTriangle)
-
-// D_PolysetRecursiveTriangle (lp3, new, lp2);
- movl %esp,%ebx
- pushl %esi
- pushl %ebx
- pushl %edi
- call C(D_PolysetRecursiveTriangle)
- addl $24,%esp
-
-LDone:
- popl %ebx // restore register variables
- popl %edi
- popl %esi
- popl %ebp // restore caller stack frame pointer
- ret $12
-
-
-//----------------------------------------------------------------------
-// 8-bpp horizontal span drawing code for affine polygons, with smooth
-// shading and no transparency
-//----------------------------------------------------------------------
-
-#define pspans 4+8
-
-.globl C(D_PolysetAff8Start)
-C(D_PolysetAff8Start):
-
-.globl C(R_PolysetDrawSpans8_Opaque)
-C(R_PolysetDrawSpans8_Opaque):
- pushl %esi // preserve register variables
- pushl %ebx
-
- movl pspans(%esp),%esi // point to the first span descriptor
- movl C(r_zistepx),%ecx
-
- pushl %ebp // preserve caller's stack frame
- pushl %edi
-
- rorl $16,%ecx // put high 16 bits of 1/z step in low word
- movl spanpackage_t_count(%esi),%edx
-
- movl %ecx,lzistepx
-
-LSpanLoop:
-
-// lcount = d_aspancount - pspanpackage->count;
-//
-// errorterm += erroradjustup;
-// if (errorterm >= 0)
-// {
-// d_aspancount += d_countextrastep;
-// errorterm -= erroradjustdown;
-// }
-// else
-// {
-// d_aspancount += ubasestep;
-// }
- movl C(d_aspancount),%eax
- subl %edx,%eax
-
- movl C(erroradjustup),%edx
- movl C(errorterm),%ebx
- addl %edx,%ebx
- js LNoTurnover
-
- movl C(erroradjustdown),%edx
- movl C(d_countextrastep),%edi
- subl %edx,%ebx
- movl C(d_aspancount),%ebp
- movl %ebx,C(errorterm)
- addl %edi,%ebp
- movl %ebp,C(d_aspancount)
- jmp LRightEdgeStepped
-
-LNoTurnover:
- movl C(d_aspancount),%edi
- movl C(ubasestep),%edx
- movl %ebx,C(errorterm)
- addl %edx,%edi
- movl %edi,C(d_aspancount)
-
-LRightEdgeStepped:
- cmpl $1,%eax
-
- jl LNextSpan
- jz LExactlyOneLong
-
-//
-// set up advancetable
-//
- movl C(a_ststepxwhole),%ecx
- movl C(r_affinetridesc)+atd_skinwidth,%edx
-
- movl %ecx,advancetable+4 // advance base in t
- addl %edx,%ecx
-
- movl %ecx,advancetable // advance extra in t
- movl C(a_tstepxfrac),%ecx
-
- movw C(r_lstepx),%cx
- movl %eax,%edx // count
-
- movl %ecx,tstep
- addl $7,%edx
-
- shrl $3,%edx // count of full and partial loops
- movl spanpackage_t_sfrac(%esi),%ebx
-
- movw %dx,%bx
- movl spanpackage_t_pz(%esi),%ecx
-
- negl %eax
-
- movl spanpackage_t_pdest(%esi),%edi
- andl $7,%eax // 0->0, 1->7, 2->6, ... , 7->1
-
- subl %eax,%edi // compensate for hardwired offsets
- subl %eax,%ecx
-
- subl %eax,%ecx
- movl spanpackage_t_tfrac(%esi),%edx
-
- movw spanpackage_t_light(%esi),%dx
- movl spanpackage_t_zi(%esi),%ebp
-
- rorl $16,%ebp // put high 16 bits of 1/z in low word
- pushl %esi
-
- movl spanpackage_t_ptex(%esi),%esi
- jmp aff8entryvec_table(,%eax,4)
-
-// %bx = count of full and partial loops
-// %ebx high word = sfrac
-// %ecx = pz
-// %dx = light
-// %edx high word = tfrac
-// %esi = ptex
-// %edi = pdest
-// %ebp = 1/z
-// tstep low word = C(r_lstepx)
-// tstep high word = C(a_tstepxfrac)
-// C(a_sstepxfrac) low word = 0
-// C(a_sstepxfrac) high word = C(a_sstepxfrac)
-
-LDrawLoop:
-
-// FIXME: do we need to clamp light? We may need at least a buffer bit to
-// keep it from poking into tfrac and causing problems
-
-LDraw8:
- cmpw (%ecx),%bp
- jl Lp1
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,(%ecx)
- movb 0x12345678(%eax),%al
-LPatch8:
- movb %al,(%edi)
-Lp1:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw7:
- cmpw 2(%ecx),%bp
- jl Lp2
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,2(%ecx)
- movb 0x12345678(%eax),%al
-LPatch7:
- movb %al,1(%edi)
-Lp2:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw6:
- cmpw 4(%ecx),%bp
- jl Lp3
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,4(%ecx)
- movb 0x12345678(%eax),%al
-LPatch6:
- movb %al,2(%edi)
-Lp3:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw5:
- cmpw 6(%ecx),%bp
- jl Lp4
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,6(%ecx)
- movb 0x12345678(%eax),%al
-LPatch5:
- movb %al,3(%edi)
-Lp4:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw4:
- cmpw 8(%ecx),%bp
- jl Lp5
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,8(%ecx)
- movb 0x12345678(%eax),%al
-LPatch4:
- movb %al,4(%edi)
-Lp5:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw3:
- cmpw 10(%ecx),%bp
- jl Lp6
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,10(%ecx)
- movb 0x12345678(%eax),%al
-LPatch3:
- movb %al,5(%edi)
-Lp6:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw2:
- cmpw 12(%ecx),%bp
- jl Lp7
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,12(%ecx)
- movb 0x12345678(%eax),%al
-LPatch2:
- movb %al,6(%edi)
-Lp7:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LDraw1:
- cmpw 14(%ecx),%bp
- jl Lp8
- xorl %eax,%eax
- movb %dh,%ah
- movb (%esi),%al
- movw %bp,14(%ecx)
- movb 0x12345678(%eax),%al
-LPatch1:
- movb %al,7(%edi)
-Lp8:
- addl tstep,%edx
- sbbl %eax,%eax
- addl lzistepx,%ebp
- adcl $0,%ebp
- addl C(a_sstepxfrac),%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- addl $8,%edi
- addl $16,%ecx
-
- decw %bx
- jnz LDrawLoop
-
- popl %esi // restore spans pointer
-LNextSpan:
- addl $(spanpackage_t_size),%esi // point to next span
-LNextSpanESISet:
- movl spanpackage_t_count(%esi),%edx
- cmpl $-999999,%edx // any more spans?
- jnz LSpanLoop // yes
-
- popl %edi
- popl %ebp // restore the caller's stack frame
- popl %ebx // restore register variables
- popl %esi
- ret
-
-
-// draw a one-long span
-
-LExactlyOneLong:
-
- movl spanpackage_t_pz(%esi),%ecx
- movl spanpackage_t_zi(%esi),%ebp
-
- rorl $16,%ebp // put high 16 bits of 1/z in low word
- movl spanpackage_t_ptex(%esi),%ebx
-
- cmpw (%ecx),%bp
- jl LNextSpan
- xorl %eax,%eax
- movl spanpackage_t_pdest(%esi),%edi
- movb spanpackage_t_light+1(%esi),%ah
- addl $(spanpackage_t_size),%esi // point to next span
- movb (%ebx),%al
- movw %bp,(%ecx)
- movb 0x12345678(%eax),%al
-LPatch9:
- movb %al,(%edi)
-
- jmp LNextSpanESISet
-
-.globl C(D_PolysetAff8End)
-C(D_PolysetAff8End):
-
-
-.extern C(alias_colormap)
-// #define pcolormap 4
-
-.globl C(D_Aff8Patch)
-C(D_Aff8Patch):
- movl C(alias_colormap),%eax
- movl %eax,LPatch1-4
- movl %eax,LPatch2-4
- movl %eax,LPatch3-4
- movl %eax,LPatch4-4
- movl %eax,LPatch5-4
- movl %eax,LPatch6-4
- movl %eax,LPatch7-4
- movl %eax,LPatch8-4
- movl %eax,LPatch9-4
-
- ret
-
-//----------------------------------------------------------------------
-// Alias model triangle left-edge scanning code
-//----------------------------------------------------------------------
-
-#define height 4+16
-
-.globl C(R_PolysetScanLeftEdge)
-C(R_PolysetScanLeftEdge):
- pushl %ebp // preserve caller stack frame pointer
- pushl %esi // preserve register variables
- pushl %edi
- pushl %ebx
-
- movl height(%esp),%eax
- movl C(d_sfrac),%ecx
- andl $0xFFFF,%eax
- movl C(d_ptex),%ebx
- orl %eax,%ecx
- movl C(d_pedgespanpackage),%esi
- movl C(d_tfrac),%edx
- movl C(d_light),%edi
- movl C(d_zi),%ebp
-
-// %eax: scratch
-// %ebx: d_ptex
-// %ecx: d_sfrac in high word, count in low word
-// %edx: d_tfrac
-// %esi: d_pedgespanpackage, errorterm, scratch alternately
-// %edi: d_light
-// %ebp: d_zi
-
-// do
-// {
-
-LScanLoop:
-
-// d_pedgespanpackage->ptex = ptex;
-// d_pedgespanpackage->pdest = d_pdest;
-// d_pedgespanpackage->pz = d_pz;
-// d_pedgespanpackage->count = d_aspancount;
-// d_pedgespanpackage->light = d_light;
-// d_pedgespanpackage->zi = d_zi;
-// d_pedgespanpackage->sfrac = d_sfrac << 16;
-// d_pedgespanpackage->tfrac = d_tfrac << 16;
- movl %ebx,spanpackage_t_ptex(%esi)
- movl C(d_pdest),%eax
- movl %eax,spanpackage_t_pdest(%esi)
- movl C(d_pz),%eax
- movl %eax,spanpackage_t_pz(%esi)
- movl C(d_aspancount),%eax
- movl %eax,spanpackage_t_count(%esi)
- movl %edi,spanpackage_t_light(%esi)
- movl %ebp,spanpackage_t_zi(%esi)
- movl %ecx,spanpackage_t_sfrac(%esi)
- movl %edx,spanpackage_t_tfrac(%esi)
-
-// pretouch the next cache line
- movb spanpackage_t_size(%esi),%al
-
-// d_pedgespanpackage++;
- addl $(spanpackage_t_size),%esi
- movl C(erroradjustup),%eax
- movl %esi,C(d_pedgespanpackage)
-
-// errorterm += erroradjustup;
- movl C(errorterm),%esi
- addl %eax,%esi
- movl C(d_pdest),%eax
-
-// if (errorterm >= 0)
-// {
- js LNoLeftEdgeTurnover
-
-// errorterm -= erroradjustdown;
-// d_pdest += d_pdestextrastep;
- subl C(erroradjustdown),%esi
- addl C(d_pdestextrastep),%eax
- movl %esi,C(errorterm)
- movl %eax,C(d_pdest)
-
-// d_pz += d_pzextrastep;
-// d_aspancount += d_countextrastep;
-// d_ptex += d_ptexextrastep;
-// d_sfrac += d_sfracextrastep;
-// d_ptex += d_sfrac >> 16;
-// d_sfrac &= 0xFFFF;
-// d_tfrac += d_tfracextrastep;
- movl C(d_pz),%eax
- movl C(d_aspancount),%esi
- addl C(d_pzextrastep),%eax
- addl C(d_sfracextrastep),%ecx
- adcl C(d_ptexextrastep),%ebx
- addl C(d_countextrastep),%esi
- movl %eax,C(d_pz)
- movl C(d_tfracextrastep),%eax
- movl %esi,C(d_aspancount)
- addl %eax,%edx
-
-// if (d_tfrac & 0x10000)
-// {
- jnc LSkip1
-
-// d_ptex += r_affinetridesc.skinwidth;
-// d_tfrac &= 0xFFFF;
- addl C(r_affinetridesc)+atd_skinwidth,%ebx
-
-// }
-
-LSkip1:
-
-// d_light += d_lightextrastep;
-// d_zi += d_ziextrastep;
- addl C(d_lightextrastep),%edi
- addl C(d_ziextrastep),%ebp
-
-// }
- movl C(d_pedgespanpackage),%esi
- decl %ecx
- testl $0xFFFF,%ecx
- jnz LScanLoop
-
- popl %ebx
- popl %edi
- popl %esi
- popl %ebp
- ret
-
-// else
-// {
-
-LNoLeftEdgeTurnover:
- movl %esi,C(errorterm)
-
-// d_pdest += d_pdestbasestep;
- addl C(d_pdestbasestep),%eax
- movl %eax,C(d_pdest)
-
-// d_pz += d_pzbasestep;
-// d_aspancount += ubasestep;
-// d_ptex += d_ptexbasestep;
-// d_sfrac += d_sfracbasestep;
-// d_ptex += d_sfrac >> 16;
-// d_sfrac &= 0xFFFF;
- movl C(d_pz),%eax
- movl C(d_aspancount),%esi
- addl C(d_pzbasestep),%eax
- addl C(d_sfracbasestep),%ecx
- adcl C(d_ptexbasestep),%ebx
- addl C(ubasestep),%esi
- movl %eax,C(d_pz)
- movl %esi,C(d_aspancount)
-
-// d_tfrac += d_tfracbasestep;
- movl C(d_tfracbasestep),%esi
- addl %esi,%edx
-
-// if (d_tfrac & 0x10000)
-// {
- jnc LSkip2
-
-// d_ptex += r_affinetridesc.skinwidth;
-// d_tfrac &= 0xFFFF;
- addl C(r_affinetridesc)+atd_skinwidth,%ebx
-
-// }
-
-LSkip2:
-
-// d_light += d_lightbasestep;
-// d_zi += d_zibasestep;
- addl C(d_lightbasestep),%edi
- addl C(d_zibasestep),%ebp
-
-// }
-// } while (--height);
- movl C(d_pedgespanpackage),%esi
- decl %ecx
- testl $0xFFFF,%ecx
- jnz LScanLoop
-
- popl %ebx
- popl %edi
- popl %esi
- popl %ebp
- ret
-
-#endif // id386
-
--- a/linux/gl_fxmesa.c
+++ /dev/null
@@ -1,206 +1,0 @@
-/*
-** 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
-**
-*/
-
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/vt.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <signal.h>
-
-#include "../ref_gl/gl_local.h"
-#include "../client/keys.h"
-#include "../linux/rw_linux.h"
-
-#include <GL/fxmesa.h>
-
-/*****************************************************************************/
-
-static qboolean GLimp_SwitchFullscreen( int width, int height );
-qboolean GLimp_InitGL (void);
-
-extern cvar_t *vid_fullscreen;
-extern cvar_t *vid_ref;
-
-static fxMesaContext fc = NULL;
-
-#define NUM_RESOLUTIONS 3
-
-static resolutions[NUM_RESOLUTIONS][3]={
- { 512, 384, GR_RESOLUTION_512x384 },
- { 640, 400, GR_RESOLUTION_640x400 },
- { 640, 480, GR_RESOLUTION_640x480 }
-};
-
-static int findres(int *width, int *height)
-{
- int i;
-
- for(i=0;i<NUM_RESOLUTIONS;i++)
- if((*width<=resolutions[i][0]) && (*height<=resolutions[i][1])) {
- *width = resolutions[i][0];
- *height = resolutions[i][1];
- return resolutions[i][2];
- }
-
- *width = 640;
- *height = 480;
- return GR_RESOLUTION_640x480;
-}
-
-static void signal_handler(int sig)
-{
- printf("Received signal %d, exiting...\n", sig);
- GLimp_Shutdown();
- _exit(0);
-}
-
-static 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);
-}
-
-/*
-** GLimp_SetMode
-*/
-int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
- int width, height;
- GLint attribs[32];
-
- ri.Con_Printf( PRINT_ALL, "Initializing OpenGL display\n");
-
- ri.Con_Printf (PRINT_ALL, "...setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( &width, &height, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d\n", width, height );
-
- // destroy the existing window
- GLimp_Shutdown ();
-
- // set fx attribs
- attribs[0] = FXMESA_DOUBLEBUFFER;
- attribs[1] = FXMESA_ALPHA_SIZE;
- attribs[2] = 1;
- attribs[3] = FXMESA_DEPTH_SIZE;
- attribs[4] = 1;
- attribs[5] = FXMESA_NONE;
-
- fc = fxMesaCreateContext(0, findres(&width, &height), GR_REFRESH_75Hz,
- attribs);
- if (!fc)
- return rserr_invalid_mode;
-
- *pwidth = width;
- *pheight = height;
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (width, height);
-
- fxMesaMakeCurrent(fc);
-
- return rserr_ok;
-}
-
-/*
-** 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 (fc) {
- fxMesaDestroyContext(fc);
- fc = NULL;
- }
-}
-
-/*
-** GLimp_Init
-**
-** This routine is responsible for initializing the OS specific portions
-** of OpenGL.
-*/
-int GLimp_Init( void *hinstance, void *wndproc )
-{
- InitSig();
-
- return true;
-}
-
-/*
-** GLimp_BeginFrame
-*/
-void GLimp_BeginFrame( float camera_seperation )
-{
-}
-
-/*
-** 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)
-{
- glFlush();
- fxMesaSwapBuffers();
-}
-
-/*
-** GLimp_AppActivate
-*/
-void GLimp_AppActivate( qboolean active )
-{
-}
-
-extern void gl3DfxSetPaletteEXT(GLuint *pal);
-
-void Fake_glColorTableEXT( GLenum target, GLenum internalformat,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid *table )
-{
- byte temptable[256][4];
- byte *intbl;
- int i;
-
- for (intbl = (byte *)table, i = 0; i < 256; i++) {
- temptable[i][2] = *intbl++;
- temptable[i][1] = *intbl++;
- temptable[i][0] = *intbl++;
- temptable[i][3] = 255;
- }
- gl3DfxSetPaletteEXT((GLuint *)temptable);
-}
-
-
--- a/linux/glob.c
+++ /dev/null
@@ -1,164 +1,0 @@
-
-#include <stdio.h>
-#include "../linux/glob.h"
-
-/* Like glob_match, but match PATTERN against any final segment of TEXT. */
-static int glob_match_after_star(char *pattern, char *text)
-{
- register char *p = pattern, *t = text;
- register char c, c1;
-
- while ((c = *p++) == '?' || c == '*')
- if (c == '?' && *t++ == '\0')
- return 0;
-
- if (c == '\0')
- return 1;
-
- if (c == '\\')
- c1 = *p;
- else
- c1 = c;
-
- while (1) {
- if ((c == '[' || *t == c1) && glob_match(p - 1, t))
- return 1;
- if (*t++ == '\0')
- return 0;
- }
-}
-
-/* Return nonzero if PATTERN has any special globbing chars in it. */
-static int glob_pattern_p(char *pattern)
-{
- register char *p = pattern;
- register char c;
- int open = 0;
-
- while ((c = *p++) != '\0')
- switch (c) {
- case '?':
- case '*':
- return 1;
-
- case '[': /* Only accept an open brace if there is a close */
- open++; /* brace to match it. Bracket expressions must be */
- continue; /* complete, according to Posix.2 */
- case ']':
- if (open)
- return 1;
- continue;
-
- case '\\':
- if (*p++ == '\0')
- return 0;
- }
-
- return 0;
-}
-
-/* Match the pattern PATTERN against the string TEXT;
- return 1 if it matches, 0 otherwise.
-
- A match means the entire string TEXT is used up in matching.
-
- In the pattern string, `*' matches any sequence of characters,
- `?' matches any character, [SET] matches any character in the specified set,
- [!SET] matches any character not in the specified set.
-
- A set is composed of characters or ranges; a range looks like
- character hyphen character (as in 0-9 or A-Z).
- [0-9a-zA-Z_] is the set of characters allowed in C identifiers.
- Any other character in the pattern must be matched exactly.
-
- To suppress the special syntactic significance of any of `[]*?!-\',
- and match the character exactly, precede it with a `\'.
-*/
-
-int glob_match(char *pattern, char *text)
-{
- register char *p = pattern, *t = text;
- register char c;
-
- while ((c = *p++) != '\0')
- switch (c) {
- case '?':
- if (*t == '\0')
- return 0;
- else
- ++t;
- break;
-
- case '\\':
- if (*p++ != *t++)
- return 0;
- break;
-
- case '*':
- return glob_match_after_star(p, t);
-
- case '[':
- {
- register char c1 = *t++;
- int invert;
-
- if (!c1)
- return (0);
-
- invert = ((*p == '!') || (*p == '^'));
- if (invert)
- p++;
-
- c = *p++;
- while (1) {
- register char cstart = c, cend = c;
-
- if (c == '\\') {
- cstart = *p++;
- cend = cstart;
- }
- if (c == '\0')
- return 0;
-
- c = *p++;
- if (c == '-' && *p != ']') {
- cend = *p++;
- if (cend == '\\')
- cend = *p++;
- if (cend == '\0')
- return 0;
- c = *p++;
- }
- if (c1 >= cstart && c1 <= cend)
- goto match;
- if (c == ']')
- break;
- }
- if (!invert)
- return 0;
- break;
-
- match:
- /* Skip the rest of the [...] construct that already matched. */
- while (c != ']') {
- if (c == '\0')
- return 0;
- c = *p++;
- if (c == '\0')
- return 0;
- else if (c == '\\')
- ++p;
- }
- if (invert)
- return 0;
- break;
- }
-
- default:
- if (c != *t++)
- return 0;
- }
-
- return *t == '\0';
-}
-
--- a/linux/glob.h
+++ /dev/null
@@ -1,1 +1,0 @@
-int glob_match(char *pattern, char *text);
--- a/linux/in_linux.c
+++ /dev/null
@@ -1,29 +1,0 @@
-// in_null.c -- for systems without a mouse
-
-#include "../client/client.h"
-
-cvar_t *in_mouse;
-cvar_t *in_joystick;
-
-void IN_Init (void)
-{
- in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
- in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE);
-}
-
-void IN_Shutdown (void)
-{
-}
-
-void IN_Commands (void)
-{
-}
-
-void IN_Move (usercmd_t *cmd)
-{
-}
-
-void IN_Activate (qboolean active)
-{
-}
-
--- a/linux/math.s
+++ /dev/null
@@ -1,403 +1,0 @@
-//
-// math.s
-// x86 assembly-language math routines.
-
-#define GLQUAKE 1 // don't include unneeded defs
-#include "qasm.h"
-
-
-#if id386
-
- .data
-
-#if 0
- .align 4
-Ljmptab: .long Lcase0, Lcase1, Lcase2, Lcase3
- .long Lcase4, Lcase5, Lcase6, Lcase7
-#endif
-
- .text
-
-// TODO: rounding needed?
-// stack parameter offset
-#define val 4
-
-.globl C(Invert24To16)
-C(Invert24To16):
-
- movl val(%esp),%ecx
- movl $0x100,%edx // 0x10000000000 as dividend
- cmpl %edx,%ecx
- jle LOutOfRange
-
- subl %eax,%eax
- divl %ecx
-
- ret
-
-LOutOfRange:
- movl $0xFFFFFFFF,%eax
- ret
-
-#define in 4
-#define out 8
-
- .align 2
-.globl C(TransformVector)
-C(TransformVector):
- movl in(%esp),%eax
- movl out(%esp),%edx
-
- flds (%eax) // in[0]
- fmuls C(vright) // in[0]*vright[0]
- flds (%eax) // in[0] | in[0]*vright[0]
- fmuls C(vup) // in[0]*vup[0] | in[0]*vright[0]
- flds (%eax) // in[0] | in[0]*vup[0] | in[0]*vright[0]
- fmuls C(vpn) // in[0]*vpn[0] | in[0]*vup[0] | in[0]*vright[0]
-
- flds 4(%eax) // in[1] | ...
- fmuls C(vright)+4 // in[1]*vright[1] | ...
- flds 4(%eax) // in[1] | in[1]*vright[1] | ...
- fmuls C(vup)+4 // in[1]*vup[1] | in[1]*vright[1] | ...
- flds 4(%eax) // in[1] | in[1]*vup[1] | in[1]*vright[1] | ...
- fmuls C(vpn)+4 // in[1]*vpn[1] | in[1]*vup[1] | in[1]*vright[1] | ...
- fxch %st(2) // in[1]*vright[1] | in[1]*vup[1] | in[1]*vpn[1] | ...
-
- faddp %st(0),%st(5) // in[1]*vup[1] | in[1]*vpn[1] | ...
- faddp %st(0),%st(3) // in[1]*vpn[1] | ...
- faddp %st(0),%st(1) // vpn_accum | vup_accum | vright_accum
-
- flds 8(%eax) // in[2] | ...
- fmuls C(vright)+8 // in[2]*vright[2] | ...
- flds 8(%eax) // in[2] | in[2]*vright[2] | ...
- fmuls C(vup)+8 // in[2]*vup[2] | in[2]*vright[2] | ...
- flds 8(%eax) // in[2] | in[2]*vup[2] | in[2]*vright[2] | ...
- fmuls C(vpn)+8 // in[2]*vpn[2] | in[2]*vup[2] | in[2]*vright[2] | ...
- fxch %st(2) // in[2]*vright[2] | in[2]*vup[2] | in[2]*vpn[2] | ...
-
- faddp %st(0),%st(5) // in[2]*vup[2] | in[2]*vpn[2] | ...
- faddp %st(0),%st(3) // in[2]*vpn[2] | ...
- faddp %st(0),%st(1) // vpn_accum | vup_accum | vright_accum
-
- fstps 8(%edx) // out[2]
- fstps 4(%edx) // out[1]
- fstps (%edx) // out[0]
-
- ret
-
-#if 0 // in C
-
-#define EMINS 4+4
-#define EMAXS 4+8
-#define P 4+12
-
- .align 2
-.globl C(BoxOnPlaneSide)
-C(BoxOnPlaneSide):
- pushl %ebx
-
- movl P(%esp),%edx
- movl EMINS(%esp),%ecx
- xorl %eax,%eax
- movl EMAXS(%esp),%ebx
- movb pl_signbits(%edx),%al
- cmpb $8,%al
- jge Lerror
- flds pl_normal(%edx) // p->normal[0]
- fld %st(0) // p->normal[0] | p->normal[0]
- jmp Ljmptab(,%eax,4)
-
-
-//dist1= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
-//dist2= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
-Lcase0:
- fmuls (%ebx) // p->normal[0]*emaxs[0] | p->normal[0]
- flds pl_normal+4(%edx) // p->normal[1] | p->normal[0]*emaxs[0] |
- // p->normal[0]
- fxch %st(2) // p->normal[0] | p->normal[0]*emaxs[0] |
- // p->normal[1]
- fmuls (%ecx) // p->normal[0]*emins[0] |
- // p->normal[0]*emaxs[0] | p->normal[1]
- fxch %st(2) // p->normal[1] | p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fld %st(0) // p->normal[1] | p->normal[1] |
- // p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fmuls 4(%ebx) // p->normal[1]*emaxs[1] | p->normal[1] |
- // p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- flds pl_normal+8(%edx) // p->normal[2] | p->normal[1]*emaxs[1] |
- // p->normal[1] | p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fxch %st(2) // p->normal[1] | p->normal[1]*emaxs[1] |
- // p->normal[2] | p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fmuls 4(%ecx) // p->normal[1]*emins[1] |
- // p->normal[1]*emaxs[1] |
- // p->normal[2] | p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fxch %st(2) // p->normal[2] | p->normal[1]*emaxs[1] |
- // p->normal[1]*emins[1] |
- // p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fld %st(0) // p->normal[2] | p->normal[2] |
- // p->normal[1]*emaxs[1] |
- // p->normal[1]*emins[1] |
- // p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fmuls 8(%ebx) // p->normal[2]*emaxs[2] |
- // p->normal[2] |
- // p->normal[1]*emaxs[1] |
- // p->normal[1]*emins[1] |
- // p->normal[0]*emaxs[0] |
- // p->normal[0]*emins[0]
- fxch %st(5) // p->normal[0]*emins[0] |
- // p->normal[2] |
- // p->normal[1]*emaxs[1] |
- // p->normal[1]*emins[1] |
- // p->normal[0]*emaxs[0] |
- // p->normal[2]*emaxs[2]
- faddp %st(0),%st(3) //p->normal[2] |
- // p->normal[1]*emaxs[1] |
- // p->normal[1]*emins[1]+p->normal[0]*emins[0]|
- // p->normal[0]*emaxs[0] |
- // p->normal[2]*emaxs[2]
- fmuls 8(%ecx) //p->normal[2]*emins[2] |
- // p->normal[1]*emaxs[1] |
- // p->normal[1]*emins[1]+p->normal[0]*emins[0]|
- // p->normal[0]*emaxs[0] |
- // p->normal[2]*emaxs[2]
- fxch %st(1) //p->normal[1]*emaxs[1] |
- // p->normal[2]*emins[2] |
- // p->normal[1]*emins[1]+p->normal[0]*emins[0]|
- // p->normal[0]*emaxs[0] |
- // p->normal[2]*emaxs[2]
- faddp %st(0),%st(3) //p->normal[2]*emins[2] |
- // p->normal[1]*emins[1]+p->normal[0]*emins[0]|
- // p->normal[0]*emaxs[0]+p->normal[1]*emaxs[1]|
- // p->normal[2]*emaxs[2]
- fxch %st(3) //p->normal[2]*emaxs[2] +
- // p->normal[1]*emins[1]+p->normal[0]*emins[0]|
- // p->normal[0]*emaxs[0]+p->normal[1]*emaxs[1]|
- // p->normal[2]*emins[2]
- faddp %st(0),%st(2) //p->normal[1]*emins[1]+p->normal[0]*emins[0]|
- // dist1 | p->normal[2]*emins[2]
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
-//dist2= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
-Lcase1:
- fmuls (%ecx) // emins[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ebx) // emaxs[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ebx) // emaxs[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ecx) // emins[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ecx) // emins[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
-//dist2= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
-Lcase2:
- fmuls (%ebx) // emaxs[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ecx) // emins[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ecx) // emins[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ebx) // emaxs[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ecx) // emins[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
-//dist2= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
-Lcase3:
- fmuls (%ecx) // emins[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ebx) // emaxs[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ecx) // emins[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ebx) // emaxs[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ecx) // emins[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
-//dist2= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
-Lcase4:
- fmuls (%ebx) // emaxs[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ecx) // emins[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ebx) // emaxs[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ecx) // emins[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ecx) // emins[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emins[2];
-//dist2= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emaxs[2];
-Lcase5:
- fmuls (%ecx) // emins[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ebx) // emaxs[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ebx) // emaxs[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ecx) // emins[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ecx) // emins[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emaxs[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
-//dist2= p->normal[0]*emins[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
-Lcase6:
- fmuls (%ebx) // emaxs[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ecx) // emins[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ecx) // emins[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ebx) // emaxs[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ecx) // emins[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
- jmp LSetSides
-
-//dist1= p->normal[0]*emins[0] + p->normal[1]*emins[1] + p->normal[2]*emins[2];
-//dist2= p->normal[0]*emaxs[0] + p->normal[1]*emaxs[1] + p->normal[2]*emaxs[2];
-Lcase7:
- fmuls (%ecx) // emins[0]
- flds pl_normal+4(%edx)
- fxch %st(2)
- fmuls (%ebx) // emaxs[0]
- fxch %st(2)
- fld %st(0)
- fmuls 4(%ecx) // emins[1]
- flds pl_normal+8(%edx)
- fxch %st(2)
- fmuls 4(%ebx) // emaxs[1]
- fxch %st(2)
- fld %st(0)
- fmuls 8(%ecx) // emins[2]
- fxch %st(5)
- faddp %st(0),%st(3)
- fmuls 8(%ebx) // emaxs[2]
- fxch %st(1)
- faddp %st(0),%st(3)
- fxch %st(3)
- faddp %st(0),%st(2)
-
-LSetSides:
-
-// sides = 0;
-// if (dist1 >= p->dist)
-// sides = 1;
-// if (dist2 < p->dist)
-// sides |= 2;
-
- faddp %st(0),%st(2) // dist1 | dist2
- fcomps pl_dist(%edx)
- xorl %ecx,%ecx
- fnstsw %ax
- fcomps pl_dist(%edx)
- andb $1,%ah
- xorb $1,%ah
- addb %ah,%cl
-
- fnstsw %ax
- andb $1,%ah
- addb %ah,%ah
- addb %ah,%cl
-
-// return sides;
-
- popl %ebx
- movl %ecx,%eax // return status
-
- ret
-
-
-Lerror:
- call C(BOPS_Error)
-
-#endif
-
-#endif // id386
--- a/linux/net_udp.c
+++ /dev/null
@@ -1,537 +1,0 @@
-// net_wins.c
-
-#include "../qcommon/qcommon.h"
-
-#include <unistd.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/uio.h>
-#include <errno.h>
-
-#ifdef NeXT
-#include <libc.h>
-#endif
-
-netadr_t net_local_adr;
-
-#define LOOPBACK 0x7f000001
-
-#define MAX_LOOPBACK 4
-
-typedef struct
-{
- byte data[MAX_MSGLEN];
- int datalen;
-} loopmsg_t;
-
-typedef struct
-{
- loopmsg_t msgs[MAX_LOOPBACK];
- int get, send;
-} loopback_t;
-
-loopback_t loopbacks[2];
-int ip_sockets[2];
-int ipx_sockets[2];
-
-int NET_Socket (char *net_interface, int port);
-char *NET_ErrorString (void);
-
-//=============================================================================
-
-void NetadrToSockadr (netadr_t *a, struct sockaddr_in *s)
-{
- memset (s, 0, sizeof(*s));
-
- if (a->type == NA_BROADCAST)
- {
- s->sin_family = AF_INET;
-
- s->sin_port = a->port;
- *(int *)&s->sin_addr = -1;
- }
- else if (a->type == NA_IP)
- {
- s->sin_family = AF_INET;
-
- *(int *)&s->sin_addr = *(int *)&a->ip;
- s->sin_port = a->port;
- }
-}
-
-void SockadrToNetadr (struct sockaddr_in *s, netadr_t *a)
-{
- *(int *)&a->ip = *(int *)&s->sin_addr;
- a->port = s->sin_port;
- a->type = NA_IP;
-}
-
-
-qboolean NET_CompareAdr (netadr_t a, netadr_t b)
-{
- if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3] && a.port == b.port)
- return true;
- return false;
-}
-
-/*
-===================
-NET_CompareBaseAdr
-
-Compares without the port
-===================
-*/
-qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b)
-{
- if (a.type != b.type)
- return false;
-
- if (a.type == NA_LOOPBACK)
- return true;
-
- if (a.type == NA_IP)
- {
- if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3])
- return true;
- return false;
- }
-
- if (a.type == NA_IPX)
- {
- if ((memcmp(a.ipx, b.ipx, 10) == 0))
- return true;
- return false;
- }
-}
-
-char *NET_AdrToString (netadr_t a)
-{
- static char s[64];
-
- Com_sprintf (s, sizeof(s), "%i.%i.%i.%i:%i", a.ip[0], a.ip[1], a.ip[2], a.ip[3], ntohs(a.port));
-
- return s;
-}
-
-char *NET_BaseAdrToString (netadr_t a)
-{
- static char s[64];
-
- Com_sprintf (s, sizeof(s), "%i.%i.%i.%i", a.ip[0], a.ip[1], a.ip[2], a.ip[3]);
-
- return s;
-}
-
-/*
-=============
-NET_StringToAdr
-
-localhost
-idnewt
-idnewt:28000
-192.246.40.70
-192.246.40.70:28000
-=============
-*/
-qboolean NET_StringToSockaddr (char *s, struct sockaddr *sadr)
-{
- struct hostent *h;
- char *colon;
- char copy[128];
-
- memset (sadr, 0, sizeof(*sadr));
- ((struct sockaddr_in *)sadr)->sin_family = AF_INET;
-
- ((struct sockaddr_in *)sadr)->sin_port = 0;
-
- strcpy (copy, s);
- // strip off a trailing :port if present
- for (colon = copy ; *colon ; colon++)
- if (*colon == ':')
- {
- *colon = 0;
- ((struct sockaddr_in *)sadr)->sin_port = htons((short)atoi(colon+1));
- }
-
- if (copy[0] >= '0' && copy[0] <= '9')
- {
- *(int *)&((struct sockaddr_in *)sadr)->sin_addr = inet_addr(copy);
- }
- else
- {
- if (! (h = gethostbyname(copy)) )
- return 0;
- *(int *)&((struct sockaddr_in *)sadr)->sin_addr = *(int *)h->h_addr_list[0];
- }
-
- return true;
-}
-
-/*
-=============
-NET_StringToAdr
-
-localhost
-idnewt
-idnewt:28000
-192.246.40.70
-192.246.40.70:28000
-=============
-*/
-qboolean NET_StringToAdr (char *s, netadr_t *a)
-{
- struct sockaddr_in sadr;
-
- if (!strcmp (s, "localhost"))
- {
- memset (a, 0, sizeof(*a));
- a->type = NA_LOOPBACK;
- return true;
- }
-
- if (!NET_StringToSockaddr (s, (struct sockaddr *)&sadr))
- return false;
-
- SockadrToNetadr (&sadr, a);
-
- return true;
-}
-
-
-qboolean NET_IsLocalAddress (netadr_t adr)
-{
- return NET_CompareAdr (adr, net_local_adr);
-}
-
-/*
-=============================================================================
-
-LOOPBACK BUFFERS FOR LOCAL PLAYER
-
-=============================================================================
-*/
-
-qboolean NET_GetLoopPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
-{
- int i;
- loopback_t *loop;
-
- loop = &loopbacks[sock];
-
- if (loop->send - loop->get > MAX_LOOPBACK)
- loop->get = loop->send - MAX_LOOPBACK;
-
- if (loop->get >= loop->send)
- return false;
-
- i = loop->get & (MAX_LOOPBACK-1);
- loop->get++;
-
- memcpy (net_message->data, loop->msgs[i].data, loop->msgs[i].datalen);
- net_message->cursize = loop->msgs[i].datalen;
- *net_from = net_local_adr;
- return true;
-
-}
-
-
-void NET_SendLoopPacket (netsrc_t sock, int length, void *data, netadr_t to)
-{
- int i;
- loopback_t *loop;
-
- loop = &loopbacks[sock^1];
-
- i = loop->send & (MAX_LOOPBACK-1);
- loop->send++;
-
- memcpy (loop->msgs[i].data, data, length);
- loop->msgs[i].datalen = length;
-}
-
-//=============================================================================
-
-qboolean NET_GetPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
-{
- int ret;
- struct sockaddr_in from;
- int fromlen;
- int net_socket;
- int protocol;
- int err;
-
- if (NET_GetLoopPacket (sock, net_from, net_message))
- return true;
-
- for (protocol = 0 ; protocol < 2 ; protocol++)
- {
- if (protocol == 0)
- net_socket = ip_sockets[sock];
- else
- net_socket = ipx_sockets[sock];
-
- if (!net_socket)
- continue;
-
- fromlen = sizeof(from);
- ret = recvfrom (net_socket, net_message->data, net_message->maxsize
- , 0, (struct sockaddr *)&from, &fromlen);
- if (ret == -1)
- {
- err = errno;
-
- if (err == EWOULDBLOCK || err == ECONNREFUSED)
- continue;
- Com_Printf ("NET_GetPacket: %s", NET_ErrorString());
- continue;
- }
-
- if (ret == net_message->maxsize)
- {
- Com_Printf ("Oversize packet from %s\n", NET_AdrToString (*net_from));
- continue;
- }
-
- net_message->cursize = ret;
- SockadrToNetadr (&from, net_from);
- return true;
- }
-
- return false;
-}
-
-//=============================================================================
-
-void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to)
-{
- int ret;
- struct sockaddr_in addr;
- int net_socket;
-
- if ( to.type == NA_LOOPBACK )
- {
- NET_SendLoopPacket (sock, length, data, to);
- return;
- }
-
- if (to.type == NA_BROADCAST)
- {
- net_socket = ip_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_IP)
- {
- net_socket = ip_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_IPX)
- {
- net_socket = ipx_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_BROADCAST_IPX)
- {
- net_socket = ipx_sockets[sock];
- if (!net_socket)
- return;
- }
- else
- Com_Error (ERR_FATAL, "NET_SendPacket: bad address type");
-
- NetadrToSockadr (&to, &addr);
-
- ret = sendto (net_socket, data, length, 0, (struct sockaddr *)&addr, sizeof(addr) );
- if (ret == -1)
- {
- Com_Printf ("NET_SendPacket ERROR: %i\n", NET_ErrorString());
- }
-}
-
-
-//=============================================================================
-
-
-
-
-/*
-====================
-NET_OpenIP
-====================
-*/
-void NET_OpenIP (void)
-{
- cvar_t *port, *ip;
-
- port = Cvar_Get ("port", va("%i", PORT_SERVER), CVAR_NOSET);
- ip = Cvar_Get ("ip", "localhost", CVAR_NOSET);
-
- if (!ip_sockets[NS_SERVER])
- ip_sockets[NS_SERVER] = NET_Socket (ip->string, port->value);
- if (!ip_sockets[NS_CLIENT])
- ip_sockets[NS_CLIENT] = NET_Socket (ip->string, PORT_ANY);
-}
-
-/*
-====================
-NET_OpenIPX
-====================
-*/
-void NET_OpenIPX (void)
-{
-}
-
-
-/*
-====================
-NET_Config
-
-A single player game will only use the loopback code
-====================
-*/
-void NET_Config (qboolean multiplayer)
-{
- int i;
-
- if (!multiplayer)
- { // shut down any existing sockets
- for (i=0 ; i<2 ; i++)
- {
- if (ip_sockets[i])
- {
- close (ip_sockets[i]);
- ip_sockets[i] = 0;
- }
- if (ipx_sockets[i])
- {
- close (ipx_sockets[i]);
- ipx_sockets[i] = 0;
- }
- }
- }
- else
- { // open sockets
- NET_OpenIP ();
- NET_OpenIPX ();
- }
-}
-
-
-//===================================================================
-
-
-/*
-====================
-NET_Init
-====================
-*/
-void NET_Init (void)
-{
-}
-
-
-/*
-====================
-NET_Socket
-====================
-*/
-int NET_Socket (char *net_interface, int port)
-{
- int newsocket;
- struct sockaddr_in address;
- qboolean _true = true;
- int i = 1;
-
- if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: socket:", NET_ErrorString());
- return 0;
- }
-
- // make it non-blocking
- if (ioctl (newsocket, FIONBIO, &_true) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: ioctl FIONBIO:%s\n", NET_ErrorString());
- return 0;
- }
-
- // make it broadcast capable
- if (setsockopt(newsocket, SOL_SOCKET, SO_BROADCAST, (char *)&i, sizeof(i)) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: setsockopt SO_BROADCAST:%s\n", NET_ErrorString());
- return 0;
- }
-
- if (!net_interface || !net_interface[0] || !stricmp(net_interface, "localhost"))
- address.sin_addr.s_addr = INADDR_ANY;
- else
- NET_StringToSockaddr (net_interface, (struct sockaddr *)&address);
-
- if (port == PORT_ANY)
- address.sin_port = 0;
- else
- address.sin_port = htons((short)port);
-
- address.sin_family = AF_INET;
-
- if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: bind: %s\n", NET_ErrorString());
- close (newsocket);
- return 0;
- }
-
- return newsocket;
-}
-
-
-/*
-====================
-NET_Shutdown
-====================
-*/
-void NET_Shutdown (void)
-{
- NET_Config (false); // close sockets
-}
-
-
-/*
-====================
-NET_ErrorString
-====================
-*/
-char *NET_ErrorString (void)
-{
- int code;
-
- code = errno;
- return strerror (code);
-}
-
-// sleeps msec or until net socket is ready
-void NET_Sleep(int msec)
-{
- struct timeval timeout;
- fd_set fdset;
- extern cvar_t *dedicated;
- extern qboolean stdin_active;
-
- if (!ip_sockets[NS_SERVER] || (dedicated && !dedicated->value))
- return; // we're not a server, just run full speed
-
- FD_ZERO(&fdset);
- if (stdin_active)
- FD_SET(0, &fdset); // stdin is processed too
- FD_SET(ip_sockets[NS_SERVER], &fdset); // network socket
- timeout.tv_sec = msec/1000;
- timeout.tv_usec = (msec%1000)*1000;
- select(ip_sockets[NS_SERVER]+1, &fdset, NULL, NULL, &timeout);
-}
-
--- a/linux/q_shlinux.c
+++ /dev/null
@@ -1,205 +1,0 @@
-#include <sys/types.h>
-#include <errno.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/time.h>
-
-#include "../linux/glob.h"
-
-#include "../qcommon/qcommon.h"
-
-//===============================================================================
-
-byte *membase;
-int maxhunksize;
-int curhunksize;
-
-void *Hunk_Begin (int maxsize)
-{
- // reserve a huge chunk of memory, but don't commit any yet
- maxhunksize = maxsize + sizeof(int);
- curhunksize = 0;
- membase = mmap(0, maxhunksize, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
- if (membase == NULL || membase == (byte *)-1)
- Sys_Error("unable to virtual allocate %d bytes", maxsize);
-
- *((int *)membase) = curhunksize;
-
- return membase + sizeof(int);
-}
-
-void *Hunk_Alloc (int size)
-{
- byte *buf;
-
- // round to cacheline
- size = (size+31)&~31;
- if (curhunksize + size > maxhunksize)
- Sys_Error("Hunk_Alloc overflow");
- buf = membase + sizeof(int) + curhunksize;
- curhunksize += size;
- return buf;
-}
-
-int Hunk_End (void)
-{
- byte *n;
-
- n = mremap(membase, maxhunksize, curhunksize + sizeof(int), 0);
- if (n != membase)
- Sys_Error("Hunk_End: Could not remap virtual block (%d)", errno);
- *((int *)membase) = curhunksize + sizeof(int);
-
- return curhunksize;
-}
-
-void Hunk_Free (void *base)
-{
- byte *m;
-
- if (base) {
- m = ((byte *)base) - sizeof(int);
- if (munmap(m, *((int *)m)))
- Sys_Error("Hunk_Free: munmap failed (%d)", errno);
- }
-}
-
-//===============================================================================
-
-
-/*
-================
-Sys_Milliseconds
-================
-*/
-int curtime;
-int Sys_Milliseconds (void)
-{
- struct timeval tp;
- struct timezone tzp;
- static int secbase;
-
- gettimeofday(&tp, &tzp);
-
- if (!secbase)
- {
- secbase = tp.tv_sec;
- return tp.tv_usec/1000;
- }
-
- curtime = (tp.tv_sec - secbase)*1000 + tp.tv_usec/1000;
-
- return curtime;
-}
-
-void Sys_Mkdir (char *path)
-{
- mkdir (path, 0777);
-}
-
-char *strlwr (char *s)
-{
- while (*s) {
- *s = tolower(*s);
- s++;
- }
-}
-
-//============================================
-
-static char findbase[MAX_OSPATH];
-static char findpath[MAX_OSPATH];
-static char findpattern[MAX_OSPATH];
-static DIR *fdir;
-
-static qboolean CompareAttributes(char *path, char *name,
- unsigned musthave, unsigned canthave )
-{
- struct stat st;
- char fn[MAX_OSPATH];
-
-// . and .. never match
- if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
- return false;
-
- sprintf(fn, "%s/%s", path, name);
- if (stat(fn, &st) == -1)
- return false; // shouldn't happen
-
- if ( ( st.st_mode & S_IFDIR ) && ( canthave & SFF_SUBDIR ) )
- return false;
-
- if ( ( musthave & SFF_SUBDIR ) && !( st.st_mode & S_IFDIR ) )
- return false;
-
- return true;
-}
-
-char *Sys_FindFirst (char *path, unsigned musthave, unsigned canhave)
-{
- struct dirent *d;
- char *p;
-
- if (fdir)
- Sys_Error ("Sys_BeginFind without close");
-
-// COM_FilePath (path, findbase);
- strcpy(findbase, path);
-
- if ((p = strrchr(findbase, '/')) != NULL) {
- *p = 0;
- strcpy(findpattern, p + 1);
- } else
- strcpy(findpattern, "*");
-
- if (strcmp(findpattern, "*.*") == 0)
- strcpy(findpattern, "*");
-
- if ((fdir = opendir(findbase)) == NULL)
- return NULL;
- while ((d = readdir(fdir)) != NULL) {
- if (!*findpattern || glob_match(findpattern, d->d_name)) {
-// if (*findpattern)
-// printf("%s matched %s\n", findpattern, d->d_name);
- if (CompareAttributes(findbase, d->d_name, musthave, canhave)) {
- sprintf (findpath, "%s/%s", findbase, d->d_name);
- return findpath;
- }
- }
- }
- return NULL;
-}
-
-char *Sys_FindNext (unsigned musthave, unsigned canhave)
-{
- struct dirent *d;
-
- if (fdir == NULL)
- return NULL;
- while ((d = readdir(fdir)) != NULL) {
- if (!*findpattern || glob_match(findpattern, d->d_name)) {
-// if (*findpattern)
-// printf("%s matched %s\n", findpattern, d->d_name);
- if (CompareAttributes(findbase, d->d_name, musthave, canhave)) {
- sprintf (findpath, "%s/%s", findbase, d->d_name);
- return findpath;
- }
- }
- }
- return NULL;
-}
-
-void Sys_FindClose (void)
-{
- if (fdir != NULL)
- closedir(fdir);
- fdir = NULL;
-}
-
-
-//============================================
-
--- a/linux/qasm.h
+++ /dev/null
@@ -1,459 +1,0 @@
-#ifndef __ASM_I386__
-#define __ASM_I386__
-
-#ifdef ELF
-#define C(label) label
-#else
-#define C(label) _##label
-#endif
-
-
-//#define GLQUAKE 1
-
-#if defined(_WIN32) && !defined(WINDED)
-
-#if defined(_M_IX86)
-#define __i386__ 1
-#endif
-
-#endif
-
-#ifdef __i386__
-#define id386 1
-#else
-#define id386 0
-#endif
-
-// !!! must be kept the same as in d_iface.h !!!
-#define TRANSPARENT_COLOR 255
-
-#ifndef GLQUAKE
- .extern C(d_zistepu)
- .extern C(d_pzbuffer)
- .extern C(d_zistepv)
- .extern C(d_zrowbytes)
- .extern C(d_ziorigin)
- .extern C(r_turb_s)
- .extern C(r_turb_t)
- .extern C(r_turb_pdest)
- .extern C(r_turb_spancount)
- .extern C(r_turb_turb)
- .extern C(r_turb_pbase)
- .extern C(r_turb_sstep)
- .extern C(r_turb_tstep)
- .extern C(r_bmodelactive)
- .extern C(d_sdivzstepu)
- .extern C(d_tdivzstepu)
- .extern C(d_sdivzstepv)
- .extern C(d_tdivzstepv)
- .extern C(d_sdivzorigin)
- .extern C(d_tdivzorigin)
- .extern C(sadjust)
- .extern C(tadjust)
- .extern C(bbextents)
- .extern C(bbextentt)
- .extern C(cacheblock)
- .extern C(d_viewbuffer)
- .extern C(cachewidth)
- .extern C(d_pzbuffer)
- .extern C(d_zrowbytes)
- .extern C(d_zwidth)
- .extern C(d_scantable)
- .extern C(r_lightptr)
- .extern C(r_numvblocks)
- .extern C(prowdestbase)
- .extern C(pbasesource)
- .extern C(r_lightwidth)
- .extern C(lightright)
- .extern C(lightrightstep)
- .extern C(lightdeltastep)
- .extern C(lightdelta)
- .extern C(lightright)
- .extern C(lightdelta)
- .extern C(sourcetstep)
- .extern C(surfrowbytes)
- .extern C(lightrightstep)
- .extern C(lightdeltastep)
- .extern C(r_sourcemax)
- .extern C(r_stepback)
- .extern C(colormap)
- .extern C(blocksize)
- .extern C(sourcesstep)
- .extern C(lightleft)
- .extern C(blockdivshift)
- .extern C(blockdivmask)
- .extern C(lightleftstep)
- .extern C(r_origin)
- .extern C(r_ppn)
- .extern C(r_pup)
- .extern C(r_pright)
- .extern C(ycenter)
- .extern C(xcenter)
- .extern C(d_vrectbottom_particle)
- .extern C(d_vrectright_particle)
- .extern C(d_vrecty)
- .extern C(d_vrectx)
- .extern C(d_pix_shift)
- .extern C(d_pix_min)
- .extern C(d_pix_max)
- .extern C(d_y_aspect_shift)
- .extern C(screenwidth)
- .extern C(r_leftclipped)
- .extern C(r_leftenter)
- .extern C(r_rightclipped)
- .extern C(r_rightenter)
- .extern C(modelorg)
- .extern C(xscale)
- .extern C(r_refdef)
- .extern C(yscale)
- .extern C(r_leftexit)
- .extern C(r_rightexit)
- .extern C(r_lastvertvalid)
- .extern C(cacheoffset)
- .extern C(newedges)
- .extern C(removeedges)
- .extern C(r_pedge)
- .extern C(r_framecount)
- .extern C(r_u1)
- .extern C(r_emitted)
- .extern C(edge_p)
- .extern C(surface_p)
- .extern C(surfaces)
- .extern C(r_lzi1)
- .extern C(r_v1)
- .extern C(r_ceilv1)
- .extern C(r_nearzi)
- .extern C(r_nearzionly)
- .extern C(edge_aftertail)
- .extern C(edge_tail)
- .extern C(current_iv)
- .extern C(edge_head_u_shift20)
- .extern C(span_p)
- .extern C(edge_head)
- .extern C(fv)
- .extern C(edge_tail_u_shift20)
- .extern C(r_apverts)
- .extern C(r_anumverts)
- .extern C(aliastransform)
- .extern C(r_avertexnormals)
- .extern C(r_plightvec)
- .extern C(r_ambientlight)
- .extern C(r_shadelight)
- .extern C(aliasxcenter)
- .extern C(aliasycenter)
- .extern C(a_sstepxfrac)
- .extern C(r_affinetridesc)
- .extern C(acolormap)
- .extern C(d_pcolormap)
- .extern C(r_affinetridesc)
- .extern C(d_sfrac)
- .extern C(d_ptex)
- .extern C(d_pedgespanpackage)
- .extern C(d_tfrac)
- .extern C(d_light)
- .extern C(d_zi)
- .extern C(d_pdest)
- .extern C(d_pz)
- .extern C(d_aspancount)
- .extern C(erroradjustup)
- .extern C(errorterm)
- .extern C(d_xdenom)
- .extern C(r_p0)
- .extern C(r_p1)
- .extern C(r_p2)
- .extern C(a_tstepxfrac)
- .extern C(r_sstepx)
- .extern C(r_tstepx)
- .extern C(a_ststepxwhole)
- .extern C(zspantable)
- .extern C(skintable)
- .extern C(r_zistepx)
- .extern C(erroradjustdown)
- .extern C(d_countextrastep)
- .extern C(ubasestep)
- .extern C(a_ststepxwhole)
- .extern C(a_tstepxfrac)
- .extern C(r_lstepx)
- .extern C(a_spans)
- .extern C(erroradjustdown)
- .extern C(d_pdestextrastep)
- .extern C(d_pzextrastep)
- .extern C(d_sfracextrastep)
- .extern C(d_ptexextrastep)
- .extern C(d_countextrastep)
- .extern C(d_tfracextrastep)
- .extern C(d_lightextrastep)
- .extern C(d_ziextrastep)
- .extern C(d_pdestbasestep)
- .extern C(d_pzbasestep)
- .extern C(d_sfracbasestep)
- .extern C(d_ptexbasestep)
- .extern C(ubasestep)
- .extern C(d_tfracbasestep)
- .extern C(d_lightbasestep)
- .extern C(d_zibasestep)
- .extern C(zspantable)
- .extern C(r_lstepy)
- .extern C(r_sstepy)
- .extern C(r_tstepy)
- .extern C(r_zistepy)
- .extern C(D_PolysetSetEdgeTable)
- .extern C(D_RasterizeAliasPolySmooth)
-
- .extern float_point5
- .extern Float2ToThe31nd
- .extern izistep
- .extern izi
- .extern FloatMinus2ToThe31nd
- .extern float_1
- .extern float_particle_z_clip
- .extern float_minus_1
- .extern float_0
- .extern fp_16
- .extern fp_64k
- .extern fp_1m
- .extern fp_1m_minus_1
- .extern fp_8
- .extern entryvec_table
- .extern advancetable
- .extern sstep
- .extern tstep
- .extern pspantemp
- .extern counttemp
- .extern jumptemp
- .extern reciprocal_table
- .extern DP_Count
- .extern DP_u
- .extern DP_v
- .extern DP_32768
- .extern DP_Color
- .extern DP_Pix
- .extern DP_EntryTable
- .extern pbase
- .extern s
- .extern t
- .extern sfracf
- .extern tfracf
- .extern snext
- .extern tnext
- .extern spancountminus1
- .extern zi16stepu
- .extern sdivz16stepu
- .extern tdivz16stepu
- .extern zi8stepu
- .extern sdivz8stepu
- .extern tdivz8stepu
- .extern reciprocal_table_16
- .extern entryvec_table_16
- .extern ceil_cw
- .extern single_cw
- .extern fp_64kx64k
- .extern pz
- .extern spr8entryvec_table
-#endif
-
- .extern C(snd_scaletable)
- .extern C(paintbuffer)
- .extern C(snd_linear_count)
- .extern C(snd_p)
- .extern C(snd_vol)
- .extern C(snd_out)
- .extern C(vright)
- .extern C(vup)
- .extern C(vpn)
- .extern C(BOPS_Error)
-
-//
-// !!! note that this file must match the corresponding C structures at all
-// times !!!
-//
-
-// plane_t structure
-// !!! if this is changed, it must be changed in model.h too !!!
-// !!! if the size of this is changed, the array lookup in SV_HullPointContents
-// must be changed too !!!
-#define pl_normal 0
-#define pl_dist 12
-#define pl_type 16
-#define pl_signbits 17
-#define pl_pad 18
-#define pl_size 20
-
-// hull_t structure
-// !!! if this is changed, it must be changed in model.h too !!!
-#define hu_clipnodes 0
-#define hu_planes 4
-#define hu_firstclipnode 8
-#define hu_lastclipnode 12
-#define hu_clip_mins 16
-#define hu_clip_maxs 28
-#define hu_size 40
-
-// dnode_t structure
-// !!! if this is changed, it must be changed in bspfile.h too !!!
-#define nd_planenum 0
-#define nd_children 4
-#define nd_mins 8
-#define nd_maxs 20
-#define nd_firstface 32
-#define nd_numfaces 36
-#define nd_size 40
-
-// sfxcache_t structure
-// !!! if this is changed, it much be changed in sound.h too !!!
-#define sfxc_length 0
-#define sfxc_loopstart 4
-#define sfxc_speed 8
-#define sfxc_width 12
-#define sfxc_stereo 16
-#define sfxc_data 20
-
-// channel_t structure
-// !!! if this is changed, it much be changed in sound.h too !!!
-#define ch_sfx 0
-#define ch_leftvol 4
-#define ch_rightvol 8
-#define ch_end 12
-#define ch_pos 16
-#define ch_looping 20
-#define ch_entnum 24
-#define ch_entchannel 28
-#define ch_origin 32
-#define ch_dist_mult 44
-#define ch_master_vol 48
-#define ch_size 52
-
-// portable_samplepair_t structure
-// !!! if this is changed, it much be changed in sound.h too !!!
-#define psp_left 0
-#define psp_right 4
-#define psp_size 8
-
-
-//
-// !!! note that this file must match the corresponding C structures at all
-// times !!!
-//
-
-// !!! if this is changed, it must be changed in r_local.h too !!!
-#define NEAR_CLIP 0.01
-
-// !!! if this is changed, it must be changed in r_local.h too !!!
-#define CYCLE 128
-
-// espan_t structure
-// !!! if this is changed, it must be changed in r_shared.h too !!!
-#define espan_t_u 0
-#define espan_t_v 4
-#define espan_t_count 8
-#define espan_t_pnext 12
-#define espan_t_size 16
-
-// sspan_t structure
-// !!! if this is changed, it must be changed in d_local.h too !!!
-#define sspan_t_u 0
-#define sspan_t_v 4
-#define sspan_t_count 8
-#define sspan_t_size 12
-
-// spanpackage_t structure
-// !!! if this is changed, it must be changed in d_polyset.c too !!!
-#define spanpackage_t_pdest 0
-#define spanpackage_t_pz 4
-#define spanpackage_t_count 8
-#define spanpackage_t_ptex 12
-#define spanpackage_t_sfrac 16
-#define spanpackage_t_tfrac 20
-#define spanpackage_t_light 24
-#define spanpackage_t_zi 28
-#define spanpackage_t_size 32
-
-// edge_t structure
-// !!! if this is changed, it must be changed in r_shared.h too !!!
-#define et_u 0
-#define et_u_step 4
-#define et_prev 8
-#define et_next 12
-#define et_surfs 16
-#define et_nextremove 20
-#define et_nearzi 24
-#define et_owner 28
-#define et_size 32
-
-// surf_t structure
-// !!! if this is changed, it must be changed in r_shared.h too !!!
-#define SURF_T_SHIFT 6
-#define st_next 0
-#define st_prev 4
-#define st_spans 8
-#define st_key 12
-#define st_last_u 16
-#define st_spanstate 20
-#define st_flags 24
-#define st_data 28
-#define st_entity 32
-#define st_nearzi 36
-#define st_insubmodel 40
-#define st_d_ziorigin 44
-#define st_d_zistepu 48
-#define st_d_zistepv 52
-#define st_pad 56
-#define st_size 64
-
-// clipplane_t structure
-// !!! if this is changed, it must be changed in r_local.h too !!!
-#define cp_normal 0
-#define cp_dist 12
-#define cp_next 16
-#define cp_leftedge 20
-#define cp_rightedge 21
-#define cp_reserved 22
-#define cp_size 24
-
-// medge_t structure
-// !!! if this is changed, it must be changed in model.h too !!!
-#define me_v 0
-#define me_cachededgeoffset 4
-#define me_size 8
-
-// mvertex_t structure
-// !!! if this is changed, it must be changed in model.h too !!!
-#define mv_position 0
-#define mv_size 12
-
-// refdef_t structure
-// !!! if this is changed, it must be changed in render.h too !!!
-#define rd_vrect 0
-#define rd_aliasvrect 20
-#define rd_vrectright 40
-#define rd_vrectbottom 44
-#define rd_aliasvrectright 48
-#define rd_aliasvrectbottom 52
-#define rd_vrectrightedge 56
-#define rd_fvrectx 60
-#define rd_fvrecty 64
-#define rd_fvrectx_adj 68
-#define rd_fvrecty_adj 72
-#define rd_vrect_x_adj_shift20 76
-#define rd_vrectright_adj_shift20 80
-#define rd_fvrectright_adj 84
-#define rd_fvrectbottom_adj 88
-#define rd_fvrectright 92
-#define rd_fvrectbottom 96
-#define rd_horizontalFieldOfView 100
-#define rd_xOrigin 104
-#define rd_yOrigin 108
-#define rd_vieworg 112
-#define rd_viewangles 124
-#define rd_ambientlight 136
-#define rd_size 140
-
-// mtriangle_t structure
-// !!! if this is changed, it must be changed in model.h too !!!
-#define mtri_facesfront 0
-#define mtri_vertindex 4
-#define mtri_size 16 // !!! if this changes, array indexing in !!!
- // !!! d_polysa.s must be changed to match !!!
-#define mtri_shift 4
-
-#endif
--- a/linux/qgl_linux.c
+++ /dev/null
@@ -1,3994 +1,0 @@
-/*
-** QGL_WIN.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
-*/
-#define QGL
-#include "../ref_gl/gl_local.h"
-
-static FILE *log_fp = NULL;
-
-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 * qglLockArraysEXT)( int, int);
-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 * 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( log_fp, "glAccum\n" );
- dllAccum( op, value );
-}
-
-static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref)
-{
- fprintf( log_fp, "glAlphaFunc( 0x%x, %f )\n", func, ref );
- dllAlphaFunc( func, ref );
-}
-
-static GLboolean APIENTRY logAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
-{
- fprintf( log_fp, "glAreTexturesResident\n" );
- return dllAreTexturesResident( n, textures, residences );
-}
-
-static void APIENTRY logArrayElement(GLint i)
-{
- fprintf( log_fp, "glArrayElement\n" );
- dllArrayElement( i );
-}
-
-static void APIENTRY logBegin(GLenum mode)
-{
- fprintf( log_fp, "glBegin( 0x%x )\n", mode );
- dllBegin( mode );
-}
-
-static void APIENTRY logBindTexture(GLenum target, GLuint texture)
-{
- fprintf( 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( log_fp, "glBitmap\n" );
- dllBitmap( width, height, xorig, yorig, xmove, ymove, bitmap );
-}
-
-static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor)
-{
- fprintf( log_fp, "glBlendFunc( 0x%x, 0x%x )\n", sfactor, dfactor );
- dllBlendFunc( sfactor, dfactor );
-}
-
-static void APIENTRY logCallList(GLuint list)
-{
- fprintf( log_fp, "glCallList( %u )\n", list );
- dllCallList( list );
-}
-
-static void APIENTRY logCallLists(GLsizei n, GLenum type, const void *lists)
-{
- fprintf( log_fp, "glCallLists\n" );
- dllCallLists( n, type, lists );
-}
-
-static void APIENTRY logClear(GLbitfield mask)
-{
- fprintf( log_fp, "glClear\n" );
- dllClear( mask );
-}
-
-static void APIENTRY logClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-{
- fprintf( log_fp, "glClearAccum\n" );
- dllClearAccum( red, green, blue, alpha );
-}
-
-static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- fprintf( log_fp, "glClearColor\n" );
- dllClearColor( red, green, blue, alpha );
-}
-
-static void APIENTRY logClearDepth(GLclampd depth)
-{
- fprintf( log_fp, "glClearDepth\n" );
- dllClearDepth( depth );
-}
-
-static void APIENTRY logClearIndex(GLfloat c)
-{
- fprintf( log_fp, "glClearIndex\n" );
- dllClearIndex( c );
-}
-
-static void APIENTRY logClearStencil(GLint s)
-{
- fprintf( log_fp, "glClearStencil\n" );
- dllClearStencil( s );
-}
-
-static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation)
-{
- fprintf( log_fp, "glClipPlane\n" );
- dllClipPlane( plane, equation );
-}
-
-static void APIENTRY logColor3b(GLbyte red, GLbyte green, GLbyte blue)
-{
- fprintf( log_fp, "glColor3b\n" );
- dllColor3b( red, green, blue );
-}
-
-static void APIENTRY logColor3bv(const GLbyte *v)
-{
- fprintf( log_fp, "glColor3bv\n" );
- dllColor3bv( v );
-}
-
-static void APIENTRY logColor3d(GLdouble red, GLdouble green, GLdouble blue)
-{
- fprintf( log_fp, "glColor3d\n" );
- dllColor3d( red, green, blue );
-}
-
-static void APIENTRY logColor3dv(const GLdouble *v)
-{
- fprintf( log_fp, "glColor3dv\n" );
- dllColor3dv( v );
-}
-
-static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue)
-{
- fprintf( log_fp, "glColor3f\n" );
- dllColor3f( red, green, blue );
-}
-
-static void APIENTRY logColor3fv(const GLfloat *v)
-{
- fprintf( log_fp, "glColor3fv\n" );
- dllColor3fv( v );
-}
-
-static void APIENTRY logColor3i(GLint red, GLint green, GLint blue)
-{
- fprintf( log_fp, "glColor3i\n" );
- dllColor3i( red, green, blue );
-}
-
-static void APIENTRY logColor3iv(const GLint *v)
-{
- fprintf( log_fp, "glColor3iv\n" );
- dllColor3iv( v );
-}
-
-static void APIENTRY logColor3s(GLshort red, GLshort green, GLshort blue)
-{
- fprintf( log_fp, "glColor3s\n" );
- dllColor3s( red, green, blue );
-}
-
-static void APIENTRY logColor3sv(const GLshort *v)
-{
- fprintf( log_fp, "glColor3sv\n" );
- dllColor3sv( v );
-}
-
-static void APIENTRY logColor3ub(GLubyte red, GLubyte green, GLubyte blue)
-{
- fprintf( log_fp, "glColor3ub\n" );
- dllColor3ub( red, green, blue );
-}
-
-static void APIENTRY logColor3ubv(const GLubyte *v)
-{
- fprintf( log_fp, "glColor3ubv\n" );
- dllColor3ubv( v );
-}
-
-#define SIG( x ) fprintf( 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)
-{
- SIG( "glColor4f" );
- dllColor4f( red, green, blue, alpha );
-}
-static void APIENTRY logColor4fv(const GLfloat *v)
-{
- SIG( "glColor4fv" );
- 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( log_fp, "glDisable( 0x%x )\n", 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( log_fp, "glEnable( 0x%x )\n", 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( 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( 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)
-{
- 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( 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( 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( 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( 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)
-{
- 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 )
-{
- 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;
-}
-
-/*
-** 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 )
-{
- qglAccum = dllAccum = glAccum;
- qglAlphaFunc = dllAlphaFunc = glAlphaFunc;
- qglAreTexturesResident = dllAreTexturesResident = glAreTexturesResident;
- qglArrayElement = dllArrayElement = glArrayElement;
- qglBegin = dllBegin = glBegin;
- qglBindTexture = dllBindTexture = glBindTexture;
- qglBitmap = dllBitmap = glBitmap;
- qglBlendFunc = dllBlendFunc = glBlendFunc;
- qglCallList = dllCallList = glCallList;
- qglCallLists = dllCallLists = glCallLists;
- qglClear = dllClear = glClear;
- qglClearAccum = dllClearAccum = glClearAccum;
- qglClearColor = dllClearColor = glClearColor;
- qglClearDepth = dllClearDepth = glClearDepth;
- qglClearIndex = dllClearIndex = glClearIndex;
- qglClearStencil = dllClearStencil = glClearStencil;
- qglClipPlane = dllClipPlane = glClipPlane;
- qglColor3b = dllColor3b = glColor3b;
- qglColor3bv = dllColor3bv = glColor3bv;
- qglColor3d = dllColor3d = glColor3d;
- qglColor3dv = dllColor3dv = glColor3dv;
- qglColor3f = dllColor3f = glColor3f;
- qglColor3fv = dllColor3fv = glColor3fv;
- qglColor3i = dllColor3i = glColor3i;
- qglColor3iv = dllColor3iv = glColor3iv;
- qglColor3s = dllColor3s = glColor3s;
- qglColor3sv = dllColor3sv = glColor3sv;
- qglColor3ub = dllColor3ub = glColor3ub;
- qglColor3ubv = dllColor3ubv = glColor3ubv;
- qglColor3ui = dllColor3ui = glColor3ui;
- qglColor3uiv = dllColor3uiv = glColor3uiv;
- qglColor3us = dllColor3us = glColor3us;
- qglColor3usv = dllColor3usv = glColor3usv;
- qglColor4b = dllColor4b = glColor4b;
- qglColor4bv = dllColor4bv = glColor4bv;
- qglColor4d = dllColor4d = glColor4d;
- qglColor4dv = dllColor4dv = glColor4dv;
- qglColor4f = dllColor4f = glColor4f;
- qglColor4fv = dllColor4fv = glColor4fv;
- qglColor4i = dllColor4i = glColor4i;
- qglColor4iv = dllColor4iv = glColor4iv;
- qglColor4s = dllColor4s = glColor4s;
- qglColor4sv = dllColor4sv = glColor4sv;
- qglColor4ub = dllColor4ub = glColor4ub;
- qglColor4ubv = dllColor4ubv = glColor4ubv;
- qglColor4ui = dllColor4ui = glColor4ui;
- qglColor4uiv = dllColor4uiv = glColor4uiv;
- qglColor4us = dllColor4us = glColor4us;
- qglColor4usv = dllColor4usv = glColor4usv;
- qglColorMask = dllColorMask = glColorMask;
- qglColorMaterial = dllColorMaterial = glColorMaterial;
- qglColorPointer = dllColorPointer = glColorPointer;
- qglCopyPixels = dllCopyPixels = glCopyPixels;
- qglCopyTexImage1D = dllCopyTexImage1D = glCopyTexImage1D;
- qglCopyTexImage2D = dllCopyTexImage2D = glCopyTexImage2D;
- qglCopyTexSubImage1D = dllCopyTexSubImage1D = glCopyTexSubImage1D;
- qglCopyTexSubImage2D = dllCopyTexSubImage2D = glCopyTexSubImage2D;
- qglCullFace = dllCullFace = glCullFace;
- qglDeleteLists = dllDeleteLists = glDeleteLists;
- qglDeleteTextures = dllDeleteTextures = glDeleteTextures;
- qglDepthFunc = dllDepthFunc = glDepthFunc;
- qglDepthMask = dllDepthMask = glDepthMask;
- qglDepthRange = dllDepthRange = glDepthRange;
- qglDisable = dllDisable = glDisable;
- qglDisableClientState = dllDisableClientState = glDisableClientState;
- qglDrawArrays = dllDrawArrays = glDrawArrays;
- qglDrawBuffer = dllDrawBuffer = glDrawBuffer;
- qglDrawElements = dllDrawElements = glDrawElements;
- qglDrawPixels = dllDrawPixels = glDrawPixels;
- qglEdgeFlag = dllEdgeFlag = glEdgeFlag;
- qglEdgeFlagPointer = dllEdgeFlagPointer = glEdgeFlagPointer;
- qglEdgeFlagv = dllEdgeFlagv = glEdgeFlagv;
- qglEnable = dllEnable = glEnable;
- qglEnableClientState = dllEnableClientState = glEnableClientState;
- qglEnd = dllEnd = glEnd;
- qglEndList = dllEndList = glEndList;
- qglEvalCoord1d = dllEvalCoord1d = glEvalCoord1d;
- qglEvalCoord1dv = dllEvalCoord1dv = glEvalCoord1dv;
- qglEvalCoord1f = dllEvalCoord1f = glEvalCoord1f;
- qglEvalCoord1fv = dllEvalCoord1fv = glEvalCoord1fv;
- qglEvalCoord2d = dllEvalCoord2d = glEvalCoord2d;
- qglEvalCoord2dv = dllEvalCoord2dv = glEvalCoord2dv;
- qglEvalCoord2f = dllEvalCoord2f = glEvalCoord2f;
- qglEvalCoord2fv = dllEvalCoord2fv = glEvalCoord2fv;
- qglEvalMesh1 = dllEvalMesh1 = glEvalMesh1;
- qglEvalMesh2 = dllEvalMesh2 = glEvalMesh2;
- qglEvalPoint1 = dllEvalPoint1 = glEvalPoint1;
- qglEvalPoint2 = dllEvalPoint2 = glEvalPoint2;
- qglFeedbackBuffer = dllFeedbackBuffer = glFeedbackBuffer;
- qglFinish = dllFinish = glFinish;
- qglFlush = dllFlush = glFlush;
- qglFogf = dllFogf = glFogf;
- qglFogfv = dllFogfv = glFogfv;
- qglFogi = dllFogi = glFogi;
- qglFogiv = dllFogiv = glFogiv;
- qglFrontFace = dllFrontFace = glFrontFace;
- qglFrustum = dllFrustum = glFrustum;
- qglGenLists = dllGenLists = glGenLists;
- qglGenTextures = dllGenTextures = glGenTextures;
- qglGetBooleanv = dllGetBooleanv = glGetBooleanv;
- qglGetClipPlane = dllGetClipPlane = glGetClipPlane;
- qglGetDoublev = dllGetDoublev = glGetDoublev;
- qglGetError = dllGetError = glGetError;
- qglGetFloatv = dllGetFloatv = glGetFloatv;
- qglGetIntegerv = dllGetIntegerv = glGetIntegerv;
- qglGetLightfv = dllGetLightfv = glGetLightfv;
- qglGetLightiv = dllGetLightiv = glGetLightiv;
- qglGetMapdv = dllGetMapdv = glGetMapdv;
- qglGetMapfv = dllGetMapfv = glGetMapfv;
- qglGetMapiv = dllGetMapiv = glGetMapiv;
- qglGetMaterialfv = dllGetMaterialfv = glGetMaterialfv;
- qglGetMaterialiv = dllGetMaterialiv = glGetMaterialiv;
- qglGetPixelMapfv = dllGetPixelMapfv = glGetPixelMapfv;
- qglGetPixelMapuiv = dllGetPixelMapuiv = glGetPixelMapuiv;
- qglGetPixelMapusv = dllGetPixelMapusv = glGetPixelMapusv;
- qglGetPointerv = dllGetPointerv = glGetPointerv;
- qglGetPolygonStipple = dllGetPolygonStipple = glGetPolygonStipple;
- qglGetString = dllGetString = glGetString;
- qglGetTexEnvfv = dllGetTexEnvfv = glGetTexEnvfv;
- qglGetTexEnviv = dllGetTexEnviv = glGetTexEnviv;
- qglGetTexGendv = dllGetTexGendv = glGetTexGendv;
- qglGetTexGenfv = dllGetTexGenfv = glGetTexGenfv;
- qglGetTexGeniv = dllGetTexGeniv = glGetTexGeniv;
- qglGetTexImage = dllGetTexImage = glGetTexImage;
-// qglGetTexLevelParameterfv = dllGetTexLevelParameterfv = glGetLevelParameterfv;
-// qglGetTexLevelParameteriv = dllGetTexLevelParameteriv = glGetLevelParameteriv;
- qglGetTexParameterfv = dllGetTexParameterfv = glGetTexParameterfv;
- qglGetTexParameteriv = dllGetTexParameteriv = glGetTexParameteriv;
- qglHint = dllHint = glHint;
- qglIndexMask = dllIndexMask = glIndexMask;
- qglIndexPointer = dllIndexPointer = glIndexPointer;
- qglIndexd = dllIndexd = glIndexd;
- qglIndexdv = dllIndexdv = glIndexdv;
- qglIndexf = dllIndexf = glIndexf;
- qglIndexfv = dllIndexfv = glIndexfv;
- qglIndexi = dllIndexi = glIndexi;
- qglIndexiv = dllIndexiv = glIndexiv;
- qglIndexs = dllIndexs = glIndexs;
- qglIndexsv = dllIndexsv = glIndexsv;
- qglIndexub = dllIndexub = glIndexub;
- qglIndexubv = dllIndexubv = glIndexubv;
- qglInitNames = dllInitNames = glInitNames;
- qglInterleavedArrays = dllInterleavedArrays = glInterleavedArrays;
- qglIsEnabled = dllIsEnabled = glIsEnabled;
- qglIsList = dllIsList = glIsList;
- qglIsTexture = dllIsTexture = glIsTexture;
- qglLightModelf = dllLightModelf = glLightModelf;
- qglLightModelfv = dllLightModelfv = glLightModelfv;
- qglLightModeli = dllLightModeli = glLightModeli;
- qglLightModeliv = dllLightModeliv = glLightModeliv;
- qglLightf = dllLightf = glLightf;
- qglLightfv = dllLightfv = glLightfv;
- qglLighti = dllLighti = glLighti;
- qglLightiv = dllLightiv = glLightiv;
- qglLineStipple = dllLineStipple = glLineStipple;
- qglLineWidth = dllLineWidth = glLineWidth;
- qglListBase = dllListBase = glListBase;
- qglLoadIdentity = dllLoadIdentity = glLoadIdentity;
- qglLoadMatrixd = dllLoadMatrixd = glLoadMatrixd;
- qglLoadMatrixf = dllLoadMatrixf = glLoadMatrixf;
- qglLoadName = dllLoadName = glLoadName;
- qglLogicOp = dllLogicOp = glLogicOp;
- qglMap1d = dllMap1d = glMap1d;
- qglMap1f = dllMap1f = glMap1f;
- qglMap2d = dllMap2d = glMap2d;
- qglMap2f = dllMap2f = glMap2f;
- qglMapGrid1d = dllMapGrid1d = glMapGrid1d;
- qglMapGrid1f = dllMapGrid1f = glMapGrid1f;
- qglMapGrid2d = dllMapGrid2d = glMapGrid2d;
- qglMapGrid2f = dllMapGrid2f = glMapGrid2f;
- qglMaterialf = dllMaterialf = glMaterialf;
- qglMaterialfv = dllMaterialfv = glMaterialfv;
- qglMateriali = dllMateriali = glMateriali;
- qglMaterialiv = dllMaterialiv = glMaterialiv;
- qglMatrixMode = dllMatrixMode = glMatrixMode;
- qglMultMatrixd = dllMultMatrixd = glMultMatrixd;
- qglMultMatrixf = dllMultMatrixf = glMultMatrixf;
- qglNewList = dllNewList = glNewList;
- qglNormal3b = dllNormal3b = glNormal3b;
- qglNormal3bv = dllNormal3bv = glNormal3bv;
- qglNormal3d = dllNormal3d = glNormal3d;
- qglNormal3dv = dllNormal3dv = glNormal3dv;
- qglNormal3f = dllNormal3f = glNormal3f;
- qglNormal3fv = dllNormal3fv = glNormal3fv;
- qglNormal3i = dllNormal3i = glNormal3i;
- qglNormal3iv = dllNormal3iv = glNormal3iv;
- qglNormal3s = dllNormal3s = glNormal3s;
- qglNormal3sv = dllNormal3sv = glNormal3sv;
- qglNormalPointer = dllNormalPointer = glNormalPointer;
- qglOrtho = dllOrtho = glOrtho;
- qglPassThrough = dllPassThrough = glPassThrough;
- qglPixelMapfv = dllPixelMapfv = glPixelMapfv;
- qglPixelMapuiv = dllPixelMapuiv = glPixelMapuiv;
- qglPixelMapusv = dllPixelMapusv = glPixelMapusv;
- qglPixelStoref = dllPixelStoref = glPixelStoref;
- qglPixelStorei = dllPixelStorei = glPixelStorei;
- qglPixelTransferf = dllPixelTransferf = glPixelTransferf;
- qglPixelTransferi = dllPixelTransferi = glPixelTransferi;
- qglPixelZoom = dllPixelZoom = glPixelZoom;
- qglPointSize = dllPointSize = glPointSize;
- qglPolygonMode = dllPolygonMode = glPolygonMode;
- qglPolygonOffset = dllPolygonOffset = glPolygonOffset;
- qglPolygonStipple = dllPolygonStipple = glPolygonStipple;
- qglPopAttrib = dllPopAttrib = glPopAttrib;
- qglPopClientAttrib = dllPopClientAttrib = glPopClientAttrib;
- qglPopMatrix = dllPopMatrix = glPopMatrix;
- qglPopName = dllPopName = glPopName;
- qglPrioritizeTextures = dllPrioritizeTextures = glPrioritizeTextures;
- qglPushAttrib = dllPushAttrib = glPushAttrib;
- qglPushClientAttrib = dllPushClientAttrib = glPushClientAttrib;
- qglPushMatrix = dllPushMatrix = glPushMatrix;
- qglPushName = dllPushName = glPushName;
- qglRasterPos2d = dllRasterPos2d = glRasterPos2d;
- qglRasterPos2dv = dllRasterPos2dv = glRasterPos2dv;
- qglRasterPos2f = dllRasterPos2f = glRasterPos2f;
- qglRasterPos2fv = dllRasterPos2fv = glRasterPos2fv;
- qglRasterPos2i = dllRasterPos2i = glRasterPos2i;
- qglRasterPos2iv = dllRasterPos2iv = glRasterPos2iv;
- qglRasterPos2s = dllRasterPos2s = glRasterPos2s;
- qglRasterPos2sv = dllRasterPos2sv = glRasterPos2sv;
- qglRasterPos3d = dllRasterPos3d = glRasterPos3d;
- qglRasterPos3dv = dllRasterPos3dv = glRasterPos3dv;
- qglRasterPos3f = dllRasterPos3f = glRasterPos3f;
- qglRasterPos3fv = dllRasterPos3fv = glRasterPos3fv;
- qglRasterPos3i = dllRasterPos3i = glRasterPos3i;
- qglRasterPos3iv = dllRasterPos3iv = glRasterPos3iv;
- qglRasterPos3s = dllRasterPos3s = glRasterPos3s;
- qglRasterPos3sv = dllRasterPos3sv = glRasterPos3sv;
- qglRasterPos4d = dllRasterPos4d = glRasterPos4d;
- qglRasterPos4dv = dllRasterPos4dv = glRasterPos4dv;
- qglRasterPos4f = dllRasterPos4f = glRasterPos4f;
- qglRasterPos4fv = dllRasterPos4fv = glRasterPos4fv;
- qglRasterPos4i = dllRasterPos4i = glRasterPos4i;
- qglRasterPos4iv = dllRasterPos4iv = glRasterPos4iv;
- qglRasterPos4s = dllRasterPos4s = glRasterPos4s;
- qglRasterPos4sv = dllRasterPos4sv = glRasterPos4sv;
- qglReadBuffer = dllReadBuffer = glReadBuffer;
- qglReadPixels = dllReadPixels = glReadPixels;
- qglRectd = dllRectd = glRectd;
- qglRectdv = dllRectdv = glRectdv;
- qglRectf = dllRectf = glRectf;
- qglRectfv = dllRectfv = glRectfv;
- qglRecti = dllRecti = glRecti;
- qglRectiv = dllRectiv = glRectiv;
- qglRects = dllRects = glRects;
- qglRectsv = dllRectsv = glRectsv;
- qglRenderMode = dllRenderMode = glRenderMode;
- qglRotated = dllRotated = glRotated;
- qglRotatef = dllRotatef = glRotatef;
- qglScaled = dllScaled = glScaled;
- qglScalef = dllScalef = glScalef;
- qglScissor = dllScissor = glScissor;
- qglSelectBuffer = dllSelectBuffer = glSelectBuffer;
- qglShadeModel = dllShadeModel = glShadeModel;
- qglStencilFunc = dllStencilFunc = glStencilFunc;
- qglStencilMask = dllStencilMask = glStencilMask;
- qglStencilOp = dllStencilOp = glStencilOp;
- qglTexCoord1d = dllTexCoord1d = glTexCoord1d;
- qglTexCoord1dv = dllTexCoord1dv = glTexCoord1dv;
- qglTexCoord1f = dllTexCoord1f = glTexCoord1f;
- qglTexCoord1fv = dllTexCoord1fv = glTexCoord1fv;
- qglTexCoord1i = dllTexCoord1i = glTexCoord1i;
- qglTexCoord1iv = dllTexCoord1iv = glTexCoord1iv;
- qglTexCoord1s = dllTexCoord1s = glTexCoord1s;
- qglTexCoord1sv = dllTexCoord1sv = glTexCoord1sv;
- qglTexCoord2d = dllTexCoord2d = glTexCoord2d;
- qglTexCoord2dv = dllTexCoord2dv = glTexCoord2dv;
- qglTexCoord2f = dllTexCoord2f = glTexCoord2f;
- qglTexCoord2fv = dllTexCoord2fv = glTexCoord2fv;
- qglTexCoord2i = dllTexCoord2i = glTexCoord2i;
- qglTexCoord2iv = dllTexCoord2iv = glTexCoord2iv;
- qglTexCoord2s = dllTexCoord2s = glTexCoord2s;
- qglTexCoord2sv = dllTexCoord2sv = glTexCoord2sv;
- qglTexCoord3d = dllTexCoord3d = glTexCoord3d;
- qglTexCoord3dv = dllTexCoord3dv = glTexCoord3dv;
- qglTexCoord3f = dllTexCoord3f = glTexCoord3f;
- qglTexCoord3fv = dllTexCoord3fv = glTexCoord3fv;
- qglTexCoord3i = dllTexCoord3i = glTexCoord3i;
- qglTexCoord3iv = dllTexCoord3iv = glTexCoord3iv;
- qglTexCoord3s = dllTexCoord3s = glTexCoord3s;
- qglTexCoord3sv = dllTexCoord3sv = glTexCoord3sv;
- qglTexCoord4d = dllTexCoord4d = glTexCoord4d;
- qglTexCoord4dv = dllTexCoord4dv = glTexCoord4dv;
- qglTexCoord4f = dllTexCoord4f = glTexCoord4f;
- qglTexCoord4fv = dllTexCoord4fv = glTexCoord4fv;
- qglTexCoord4i = dllTexCoord4i = glTexCoord4i;
- qglTexCoord4iv = dllTexCoord4iv = glTexCoord4iv;
- qglTexCoord4s = dllTexCoord4s = glTexCoord4s;
- qglTexCoord4sv = dllTexCoord4sv = glTexCoord4sv;
- qglTexCoordPointer = dllTexCoordPointer = glTexCoordPointer;
- qglTexEnvf = dllTexEnvf = glTexEnvf;
- qglTexEnvfv = dllTexEnvfv = glTexEnvfv;
- qglTexEnvi = dllTexEnvi = glTexEnvi;
- qglTexEnviv = dllTexEnviv = glTexEnviv;
- qglTexGend = dllTexGend = glTexGend;
- qglTexGendv = dllTexGendv = glTexGendv;
- qglTexGenf = dllTexGenf = glTexGenf;
- qglTexGenfv = dllTexGenfv = glTexGenfv;
- qglTexGeni = dllTexGeni = glTexGeni;
- qglTexGeniv = dllTexGeniv = glTexGeniv;
- qglTexImage1D = dllTexImage1D = glTexImage1D;
- qglTexImage2D = dllTexImage2D = glTexImage2D;
- qglTexParameterf = dllTexParameterf = glTexParameterf;
- qglTexParameterfv = dllTexParameterfv = glTexParameterfv;
- qglTexParameteri = dllTexParameteri = glTexParameteri;
- qglTexParameteriv = dllTexParameteriv = glTexParameteriv;
- qglTexSubImage1D = dllTexSubImage1D = glTexSubImage1D;
- qglTexSubImage2D = dllTexSubImage2D = glTexSubImage2D;
- qglTranslated = dllTranslated = glTranslated;
- qglTranslatef = dllTranslatef = glTranslatef;
- qglVertex2d = dllVertex2d = glVertex2d;
- qglVertex2dv = dllVertex2dv = glVertex2dv;
- qglVertex2f = dllVertex2f = glVertex2f;
- qglVertex2fv = dllVertex2fv = glVertex2fv;
- qglVertex2i = dllVertex2i = glVertex2i;
- qglVertex2iv = dllVertex2iv = glVertex2iv;
- qglVertex2s = dllVertex2s = glVertex2s;
- qglVertex2sv = dllVertex2sv = glVertex2sv;
- qglVertex3d = dllVertex3d = glVertex3d;
- qglVertex3dv = dllVertex3dv = glVertex3dv;
- qglVertex3f = dllVertex3f = glVertex3f;
- qglVertex3fv = dllVertex3fv = glVertex3fv;
- qglVertex3i = dllVertex3i = glVertex3i;
- qglVertex3iv = dllVertex3iv = glVertex3iv;
- qglVertex3s = dllVertex3s = glVertex3s;
- qglVertex3sv = dllVertex3sv = glVertex3sv;
- qglVertex4d = dllVertex4d = glVertex4d;
- qglVertex4dv = dllVertex4dv = glVertex4dv;
- qglVertex4f = dllVertex4f = glVertex4f;
- qglVertex4fv = dllVertex4fv = glVertex4fv;
- qglVertex4i = dllVertex4i = glVertex4i;
- qglVertex4iv = dllVertex4iv = glVertex4iv;
- qglVertex4s = dllVertex4s = glVertex4s;
- qglVertex4sv = dllVertex4sv = glVertex4sv;
- qglVertexPointer = dllVertexPointer = glVertexPointer;
- qglViewport = dllViewport = glViewport;
-
- qglPointParameterfEXT = 0;
- qglPointParameterfvEXT = 0;
- qglColorTableEXT = 0;
- qglSelectTextureSGIS = 0;
- qglMTexCoord2fSGIS = 0;
-
- return true;
-}
-
-void GLimp_EnableLogging( qboolean enable )
-{
- if ( enable )
- {
- if ( !log_fp )
- {
- struct tm *newtime;
- time_t aclock;
- char buffer[1024];
-
- time( &aclock );
- newtime = localtime( &aclock );
-
- asctime( newtime );
-
- sprintf( buffer, "%s/gl.log", ri.FS_Gamedir() );
- log_fp = fopen( buffer, "wt");
-
- fprintf( 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( log_fp, "*** R_BeginFrame ***\n");
-}
-
-
--- a/linux/r_aclipa.s
+++ /dev/null
@@ -1,195 +1,0 @@
-//
-// r_aliasa.s
-// x86 assembly-language Alias model transform and project code.
-//
-
-#include "qasm.h"
-#include "d_ifacea.h"
-
-#if id386
-
- .data
-Ltemp0: .long 0
-Ltemp1: .long 0
-
- .text
-
-#define pfv0 8+4
-#define pfv1 8+8
-#define out 8+12
-
-.globl C(R_Alias_clip_bottom)
-C(R_Alias_clip_bottom):
- pushl %esi
- pushl %edi
-
- movl pfv0(%esp),%esi
- movl pfv1(%esp),%edi
-
- movl C(r_refdef)+rd_aliasvrectbottom,%eax
-
-LDoForwardOrBackward:
-
- movl fv_v+4(%esi),%edx
- movl fv_v+4(%edi),%ecx
-
- cmpl %ecx,%edx
- jl LDoForward
-
- movl fv_v+4(%esi),%ecx
- movl fv_v+4(%edi),%edx
- movl pfv0(%esp),%edi
- movl pfv1(%esp),%esi
-
-LDoForward:
-
- subl %edx,%ecx
- subl %edx,%eax
- movl %ecx,Ltemp1
- movl %eax,Ltemp0
- fildl Ltemp1
- fildl Ltemp0
- movl out(%esp),%edx
- movl $2,%eax
-
- fdivp %st(0),%st(1) // scale
-
-LDo3Forward:
- fildl fv_v+0(%esi) // fv0v0 | scale
- fildl fv_v+0(%edi) // fv1v0 | fv0v0 | scale
- fildl fv_v+4(%esi) // fv0v1 | fv1v0 | fv0v0 | scale
- fildl fv_v+4(%edi) // fv1v1 | fv0v1 | fv1v0 | fv0v0 | scale
- fildl fv_v+8(%esi) // fv0v2 | fv1v1 | fv0v1 | fv1v0 | fv0v0 | scale
- fildl fv_v+8(%edi) // fv1v2 | fv0v2 | fv1v1 | fv0v1 | fv1v0 | fv0v0 |
- // scale
- fxch %st(5) // fv0v0 | fv0v2 | fv1v1 | fv0v1 | fv1v0 | fv1v2 |
- // scale
- fsubr %st(0),%st(4) // fv0v0 | fv0v2 | fv1v1 | fv0v1 | fv1v0-fv0v0 |
- // fv1v2 | scale
- fxch %st(3) // fv0v1 | fv0v2 | fv1v1 | fv0v0 | fv1v0-fv0v0 |
- // fv1v2 | scale
- fsubr %st(0),%st(2) // fv0v1 | fv0v2 | fv1v1-fv0v1 | fv0v0 |
- // fv1v0-fv0v0 | fv1v2 | scale
- fxch %st(1) // fv0v2 | fv0v1 | fv1v1-fv0v1 | fv0v0 |
- // fv1v0-fv0v0 | fv1v2 | scale
- fsubr %st(0),%st(5) // fv0v2 | fv0v1 | fv1v1-fv0v1 | fv0v0 |
- // fv1v0-fv0v0 | fv1v2-fv0v2 | scale
- fxch %st(6) // scale | fv0v1 | fv1v1-fv0v1 | fv0v0 |
- // fv1v0-fv0v0 | fv1v2-fv0v2 | fv0v2
- fmul %st(0),%st(4) // scale | fv0v1 | fv1v1-fv0v1 | fv0v0 |
- // (fv1v0-fv0v0)*scale | fv1v2-fv0v2 | fv0v2
- addl $12,%edi
- fmul %st(0),%st(2) // scale | fv0v1 | (fv1v1-fv0v1)*scale | fv0v0 |
- // (fv1v0-fv0v0)*scale | fv1v2-fv0v2 | fv0v2
- addl $12,%esi
- addl $12,%edx
- fmul %st(0),%st(5) // scale | fv0v1 | (fv1v1-fv0v1)*scale | fv0v0 |
- // (fv1v0-fv0v0)*scale | (fv1v2-fv0v2)*scale |
- // fv0v2
- fxch %st(3) // fv0v0 | fv0v1 | (fv1v1-fv0v1)*scale | scale |
- // (fv1v0-fv0v0)*scale | (fv1v2-fv0v2)*scale |
- // fv0v2
- faddp %st(0),%st(4) // fv0v1 | (fv1v1-fv0v1)*scale | scale |
- // fv0v0+(fv1v0-fv0v0)*scale |
- // (fv1v2-fv0v2)*scale | fv0v2
- faddp %st(0),%st(1) // fv0v1+(fv1v1-fv0v1)*scale | scale |
- // fv0v0+(fv1v0-fv0v0)*scale |
- // (fv1v2-fv0v2)*scale | fv0v2
- fxch %st(4) // fv0v2 | scale | fv0v0+(fv1v0-fv0v0)*scale |
- // (fv1v2-fv0v2)*scale | fv0v1+(fv1v1-fv0v1)*scale
- faddp %st(0),%st(3) // scale | fv0v0+(fv1v0-fv0v0)*scale |
- // fv0v2+(fv1v2-fv0v2)*scale |
- // fv0v1+(fv1v1-fv0v1)*scale
- fxch %st(1) // fv0v0+(fv1v0-fv0v0)*scale | scale |
- // fv0v2+(fv1v2-fv0v2)*scale |
- // fv0v1+(fv1v1-fv0v1)*scale
- fadds float_point5
- fxch %st(3) // fv0v1+(fv1v1-fv0v1)*scale | scale |
- // fv0v2+(fv1v2-fv0v2)*scale |
- // fv0v0+(fv1v0-fv0v0)*scale
- fadds float_point5
- fxch %st(2) // fv0v2+(fv1v2-fv0v2)*scale | scale |
- // fv0v1+(fv1v1-fv0v1)*scale |
- // fv0v0+(fv1v0-fv0v0)*scale
- fadds float_point5
- fxch %st(3) // fv0v0+(fv1v0-fv0v0)*scale | scale |
- // fv0v1+(fv1v1-fv0v1)*scale |
- // fv0v2+(fv1v2-fv0v2)*scale
- fistpl fv_v+0-12(%edx) // scale | fv0v1+(fv1v1-fv0v1)*scale |
- // fv0v2+(fv1v2-fv0v2)*scale
- fxch %st(1) // fv0v1+(fv1v1-fv0v1)*scale | scale |
- // fv0v2+(fv1v2-fv0v2)*scale | scale
- fistpl fv_v+4-12(%edx) // scale | fv0v2+(fv1v2-fv0v2)*scale
- fxch %st(1) // fv0v2+(fv1v2-fv0v2)*sc | scale
- fistpl fv_v+8-12(%edx) // scale
-
- decl %eax
- jnz LDo3Forward
-
- fstp %st(0)
-
- popl %edi
- popl %esi
-
- ret
-
-
-.globl C(R_Alias_clip_top)
-C(R_Alias_clip_top):
- pushl %esi
- pushl %edi
-
- movl pfv0(%esp),%esi
- movl pfv1(%esp),%edi
-
- movl C(r_refdef)+rd_aliasvrect+4,%eax
- jmp LDoForwardOrBackward
-
-
-
-.globl C(R_Alias_clip_right)
-C(R_Alias_clip_right):
- pushl %esi
- pushl %edi
-
- movl pfv0(%esp),%esi
- movl pfv1(%esp),%edi
-
- movl C(r_refdef)+rd_aliasvrectright,%eax
-
-LRightLeftEntry:
-
-
- movl fv_v+4(%esi),%edx
- movl fv_v+4(%edi),%ecx
-
- cmpl %ecx,%edx
- movl fv_v+0(%esi),%edx
-
- movl fv_v+0(%edi),%ecx
- jl LDoForward2
-
- movl fv_v+0(%esi),%ecx
- movl fv_v+0(%edi),%edx
- movl pfv0(%esp),%edi
- movl pfv1(%esp),%esi
-
-LDoForward2:
-
- jmp LDoForward
-
-
-.globl C(R_Alias_clip_left)
-C(R_Alias_clip_left):
- pushl %esi
- pushl %edi
-
- movl pfv0(%esp),%esi
- movl pfv1(%esp),%edi
-
- movl C(r_refdef)+rd_aliasvrect+0,%eax
- jmp LRightLeftEntry
-
-
-#endif // id386
-
--- a/linux/r_draw16.s
+++ /dev/null
@@ -1,1227 +1,0 @@
-//
-// d_draw16.s
-// x86 assembly-language horizontal 8-bpp span-drawing code, with 16-pixel
-// subdivision.
-//
-
-#include "qasm.h"
-#include "d_ifacea.h"
-
-#if id386
-
-//----------------------------------------------------------------------
-// 8-bpp horizontal span drawing code for polygons, with no transparency and
-// 16-pixel subdivision.
-//
-// Assumes there is at least one span in pspans, and that every span
-// contains at least one pixel
-//----------------------------------------------------------------------
-
- .data
-
- .text
-
-// out-of-line, rarely-needed clamping code
-
-LClampHigh0:
- movl C(bbextents),%esi
- jmp LClampReentry0
-LClampHighOrLow0:
- jg LClampHigh0
- xorl %esi,%esi
- jmp LClampReentry0
-
-LClampHigh1:
- movl C(bbextentt),%edx
- jmp LClampReentry1
-LClampHighOrLow1:
- jg LClampHigh1
- xorl %edx,%edx
- jmp LClampReentry1
-
-LClampLow2:
- movl $4096,%ebp
- jmp LClampReentry2
-LClampHigh2:
- movl C(bbextents),%ebp
- jmp LClampReentry2
-
-LClampLow3:
- movl $4096,%ecx
- jmp LClampReentry3
-LClampHigh3:
- movl C(bbextentt),%ecx
- jmp LClampReentry3
-
-LClampLow4:
- movl $4096,%eax
- jmp LClampReentry4
-LClampHigh4:
- movl C(bbextents),%eax
- jmp LClampReentry4
-
-LClampLow5:
- movl $4096,%ebx
- jmp LClampReentry5
-LClampHigh5:
- movl C(bbextentt),%ebx
- jmp LClampReentry5
-
-
-#define pspans 4+16
-
- .align 4
-.globl C(D_DrawSpans16)
-C(D_DrawSpans16):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-//
-// set up scaled-by-16 steps, for 16-long segments; also set up cacheblock
-// and span list pointers
-//
-// TODO: any overlap from rearranging?
- flds C(d_sdivzstepu)
- fmuls fp_16
- movl C(cacheblock),%edx
- flds C(d_tdivzstepu)
- fmuls fp_16
- movl pspans(%esp),%ebx // point to the first span descriptor
- flds C(d_zistepu)
- fmuls fp_16
- movl %edx,pbase // pbase = cacheblock
- fstps zi16stepu
- fstps tdivz16stepu
- fstps sdivz16stepu
-
-LSpanLoop:
-//
-// set up the initial s/z, t/z, and 1/z on the FP stack, and generate the
-// initial s and t values
-//
-// FIXME: pipeline FILD?
- fildl espan_t_v(%ebx)
- fildl espan_t_u(%ebx)
-
- fld %st(1) // dv | du | dv
- fmuls C(d_sdivzstepv) // dv*d_sdivzstepv | du | dv
- fld %st(1) // du | dv*d_sdivzstepv | du | dv
- fmuls C(d_sdivzstepu) // du*d_sdivzstepu | dv*d_sdivzstepv | du | dv
- fld %st(2) // du | du*d_sdivzstepu | dv*d_sdivzstepv | du | dv
- fmuls C(d_tdivzstepu) // du*d_tdivzstepu | du*d_sdivzstepu |
- // dv*d_sdivzstepv | du | dv
- fxch %st(1) // du*d_sdivzstepu | du*d_tdivzstepu |
- // dv*d_sdivzstepv | du | dv
- faddp %st(0),%st(2) // du*d_tdivzstepu |
- // du*d_sdivzstepu + dv*d_sdivzstepv | du | dv
- fxch %st(1) // du*d_sdivzstepu + dv*d_sdivzstepv |
- // du*d_tdivzstepu | du | dv
- fld %st(3) // dv | du*d_sdivzstepu + dv*d_sdivzstepv |
- // du*d_tdivzstepu | du | dv
- fmuls C(d_tdivzstepv) // dv*d_tdivzstepv |
- // du*d_sdivzstepu + dv*d_sdivzstepv |
- // du*d_tdivzstepu | du | dv
- fxch %st(1) // du*d_sdivzstepu + dv*d_sdivzstepv |
- // dv*d_tdivzstepv | du*d_tdivzstepu | du | dv
- fadds C(d_sdivzorigin) // sdivz = d_sdivzorigin + dv*d_sdivzstepv +
- // du*d_sdivzstepu; stays in %st(2) at end
- fxch %st(4) // dv | dv*d_tdivzstepv | du*d_tdivzstepu | du |
- // s/z
- fmuls C(d_zistepv) // dv*d_zistepv | dv*d_tdivzstepv |
- // du*d_tdivzstepu | du | s/z
- fxch %st(1) // dv*d_tdivzstepv | dv*d_zistepv |
- // du*d_tdivzstepu | du | s/z
- faddp %st(0),%st(2) // dv*d_zistepv |
- // dv*d_tdivzstepv + du*d_tdivzstepu | du | s/z
- fxch %st(2) // du | dv*d_tdivzstepv + du*d_tdivzstepu |
- // dv*d_zistepv | s/z
- fmuls C(d_zistepu) // du*d_zistepu |
- // dv*d_tdivzstepv + du*d_tdivzstepu |
- // dv*d_zistepv | s/z
- fxch %st(1) // dv*d_tdivzstepv + du*d_tdivzstepu |
- // du*d_zistepu | dv*d_zistepv | s/z
- fadds C(d_tdivzorigin) // tdivz = d_tdivzorigin + dv*d_tdivzstepv +
- // du*d_tdivzstepu; stays in %st(1) at end
- fxch %st(2) // dv*d_zistepv | du*d_zistepu | t/z | s/z
- faddp %st(0),%st(1) // dv*d_zistepv + du*d_zistepu | t/z | s/z
-
- flds fp_64k // fp_64k | dv*d_zistepv + du*d_zistepu | t/z | s/z
- fxch %st(1) // dv*d_zistepv + du*d_zistepu | fp_64k | t/z | s/z
- fadds C(d_ziorigin) // zi = d_ziorigin + dv*d_zistepv +
- // du*d_zistepu; stays in %st(0) at end
- // 1/z | fp_64k | t/z | s/z
-//
-// calculate and clamp s & t
-//
- fdivr %st(0),%st(1) // 1/z | z*64k | t/z | s/z
-
-//
-// point %edi to the first pixel in the span
-//
- movl C(d_viewbuffer),%ecx
- movl espan_t_v(%ebx),%eax
- movl %ebx,pspantemp // preserve spans pointer
-
- movl C(tadjust),%edx
- movl C(sadjust),%esi
- movl C(d_scantable)(,%eax,4),%edi // v * screenwidth
- addl %ecx,%edi
- movl espan_t_u(%ebx),%ecx
- addl %ecx,%edi // pdest = &pdestspan[scans->u];
- movl espan_t_count(%ebx),%ecx
-
-//
-// now start the FDIV for the end of the span
-//
- cmpl $16,%ecx
- ja LSetupNotLast1
-
- decl %ecx
- jz LCleanup1 // if only one pixel, no need to start an FDIV
- movl %ecx,spancountminus1
-
-// finish up the s and t calcs
- fxch %st(1) // z*64k | 1/z | t/z | s/z
-
- fld %st(0) // z*64k | z*64k | 1/z | t/z | s/z
- fmul %st(4),%st(0) // s | z*64k | 1/z | t/z | s/z
- fxch %st(1) // z*64k | s | 1/z | t/z | s/z
- fmul %st(3),%st(0) // t | s | 1/z | t/z | s/z
- fxch %st(1) // s | t | 1/z | t/z | s/z
- fistpl s // 1/z | t | t/z | s/z
- fistpl t // 1/z | t/z | s/z
-
- fildl spancountminus1
-
- flds C(d_tdivzstepu) // C(d_tdivzstepu) | spancountminus1
- flds C(d_zistepu) // C(d_zistepu) | C(d_tdivzstepu) | spancountminus1
- fmul %st(2),%st(0) // C(d_zistepu)*scm1 | C(d_tdivzstepu) | scm1
- fxch %st(1) // C(d_tdivzstepu) | C(d_zistepu)*scm1 | scm1
- fmul %st(2),%st(0) // C(d_tdivzstepu)*scm1 | C(d_zistepu)*scm1 | scm1
- fxch %st(2) // scm1 | C(d_zistepu)*scm1 | C(d_tdivzstepu)*scm1
- fmuls C(d_sdivzstepu) // C(d_sdivzstepu)*scm1 | C(d_zistepu)*scm1 |
- // C(d_tdivzstepu)*scm1
- fxch %st(1) // C(d_zistepu)*scm1 | C(d_sdivzstepu)*scm1 |
- // C(d_tdivzstepu)*scm1
- faddp %st(0),%st(3) // C(d_sdivzstepu)*scm1 | C(d_tdivzstepu)*scm1
- fxch %st(1) // C(d_tdivzstepu)*scm1 | C(d_sdivzstepu)*scm1
- faddp %st(0),%st(3) // C(d_sdivzstepu)*scm1
- faddp %st(0),%st(3)
-
- flds fp_64k
- fdiv %st(1),%st(0) // this is what we've gone to all this trouble to
- // overlap
- jmp LFDIVInFlight1
-
-LCleanup1:
-// finish up the s and t calcs
- fxch %st(1) // z*64k | 1/z | t/z | s/z
-
- fld %st(0) // z*64k | z*64k | 1/z | t/z | s/z
- fmul %st(4),%st(0) // s | z*64k | 1/z | t/z | s/z
- fxch %st(1) // z*64k | s | 1/z | t/z | s/z
- fmul %st(3),%st(0) // t | s | 1/z | t/z | s/z
- fxch %st(1) // s | t | 1/z | t/z | s/z
- fistpl s // 1/z | t | t/z | s/z
- fistpl t // 1/z | t/z | s/z
- jmp LFDIVInFlight1
-
- .align 4
-LSetupNotLast1:
-// finish up the s and t calcs
- fxch %st(1) // z*64k | 1/z | t/z | s/z
-
- fld %st(0) // z*64k | z*64k | 1/z | t/z | s/z
- fmul %st(4),%st(0) // s | z*64k | 1/z | t/z | s/z
- fxch %st(1) // z*64k | s | 1/z | t/z | s/z
- fmul %st(3),%st(0) // t | s | 1/z | t/z | s/z
- fxch %st(1) // s | t | 1/z | t/z | s/z
- fistpl s // 1/z | t | t/z | s/z
- fistpl t // 1/z | t/z | s/z
-
- fadds zi16stepu
- fxch %st(2)
- fadds sdivz16stepu
- fxch %st(2)
- flds tdivz16stepu
- faddp %st(0),%st(2)
- flds fp_64k
- fdiv %st(1),%st(0) // z = 1/1/z
- // this is what we've gone to all this trouble to
- // overlap
-LFDIVInFlight1:
-
- addl s,%esi
- addl t,%edx
- movl C(bbextents),%ebx
- movl C(bbextentt),%ebp
- cmpl %ebx,%esi
- ja LClampHighOrLow0
-LClampReentry0:
- movl %esi,s
- movl pbase,%ebx
- shll $16,%esi
- cmpl %ebp,%edx
- movl %esi,sfracf
- ja LClampHighOrLow1
-LClampReentry1:
- movl %edx,t
- movl s,%esi // sfrac = scans->sfrac;
- shll $16,%edx
- movl t,%eax // tfrac = scans->tfrac;
- sarl $16,%esi
- movl %edx,tfracf
-
-//
-// calculate the texture starting address
-//
- sarl $16,%eax
- movl C(cachewidth),%edx
- imull %edx,%eax // (tfrac >> 16) * cachewidth
- addl %ebx,%esi
- addl %eax,%esi // psource = pbase + (sfrac >> 16) +
- // ((tfrac >> 16) * cachewidth);
-//
-// determine whether last span or not
-//
- cmpl $16,%ecx
- jna LLastSegment
-
-//
-// not the last segment; do full 16-wide segment
-//
-LNotLastSegment:
-
-//
-// advance s/z, t/z, and 1/z, and calculate s & t at end of span and steps to
-// get there
-//
-
-// pick up after the FDIV that was left in flight previously
-
- fld %st(0) // duplicate it
- fmul %st(4),%st(0) // s = s/z * z
- fxch %st(1)
- fmul %st(3),%st(0) // t = t/z * z
- fxch %st(1)
- fistpl snext
- fistpl tnext
- movl snext,%eax
- movl tnext,%edx
-
- movb (%esi),%bl // get first source texel
- subl $16,%ecx // count off this segments' pixels
- movl C(sadjust),%ebp
- movl %ecx,counttemp // remember count of remaining pixels
-
- movl C(tadjust),%ecx
- movb %bl,(%edi) // store first dest pixel
-
- addl %eax,%ebp
- addl %edx,%ecx
-
- movl C(bbextents),%eax
- movl C(bbextentt),%edx
-
- cmpl $4096,%ebp
- jl LClampLow2
- cmpl %eax,%ebp
- ja LClampHigh2
-LClampReentry2:
-
- cmpl $4096,%ecx
- jl LClampLow3
- cmpl %edx,%ecx
- ja LClampHigh3
-LClampReentry3:
-
- movl %ebp,snext
- movl %ecx,tnext
-
- subl s,%ebp
- subl t,%ecx
-
-//
-// set up advancetable
-//
- movl %ecx,%eax
- movl %ebp,%edx
- sarl $20,%eax // tstep >>= 16;
- jz LZero
- sarl $20,%edx // sstep >>= 16;
- movl C(cachewidth),%ebx
- imull %ebx,%eax
- jmp LSetUp1
-
-LZero:
- sarl $20,%edx // sstep >>= 16;
- movl C(cachewidth),%ebx
-
-LSetUp1:
-
- addl %edx,%eax // add in sstep
- // (tstep >> 16) * cachewidth + (sstep >> 16);
- movl tfracf,%edx
- movl %eax,advancetable+4 // advance base in t
- addl %ebx,%eax // ((tstep >> 16) + 1) * cachewidth +
- // (sstep >> 16);
- shll $12,%ebp // left-justify sstep fractional part
- movl sfracf,%ebx
- shll $12,%ecx // left-justify tstep fractional part
- movl %eax,advancetable // advance extra in t
-
- movl %ecx,tstep
- addl %ecx,%edx // advance tfrac fractional part by tstep frac
-
- sbbl %ecx,%ecx // turn tstep carry into -1 (0 if none)
- addl %ebp,%ebx // advance sfrac fractional part by sstep frac
- adcl advancetable+4(,%ecx,4),%esi // point to next source texel
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb (%esi),%al
- addl %ebp,%ebx
- movb %al,1(%edi)
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,2(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,3(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,4(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,5(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,6(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,7(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
-
-//
-// start FDIV for end of next segment in flight, so it can overlap
-//
- movl counttemp,%ecx
- cmpl $16,%ecx // more than one segment after this?
- ja LSetupNotLast2 // yes
-
- decl %ecx
- jz LFDIVInFlight2 // if only one pixel, no need to start an FDIV
- movl %ecx,spancountminus1
- fildl spancountminus1
-
- flds C(d_zistepu) // C(d_zistepu) | spancountminus1
- fmul %st(1),%st(0) // C(d_zistepu)*scm1 | scm1
- flds C(d_tdivzstepu) // C(d_tdivzstepu) | C(d_zistepu)*scm1 | scm1
- fmul %st(2),%st(0) // C(d_tdivzstepu)*scm1 | C(d_zistepu)*scm1 | scm1
- fxch %st(1) // C(d_zistepu)*scm1 | C(d_tdivzstepu)*scm1 | scm1
- faddp %st(0),%st(3) // C(d_tdivzstepu)*scm1 | scm1
- fxch %st(1) // scm1 | C(d_tdivzstepu)*scm1
- fmuls C(d_sdivzstepu) // C(d_sdivzstepu)*scm1 | C(d_tdivzstepu)*scm1
- fxch %st(1) // C(d_tdivzstepu)*scm1 | C(d_sdivzstepu)*scm1
- faddp %st(0),%st(3) // C(d_sdivzstepu)*scm1
- flds fp_64k // 64k | C(d_sdivzstepu)*scm1
- fxch %st(1) // C(d_sdivzstepu)*scm1 | 64k
- faddp %st(0),%st(4) // 64k
-
- fdiv %st(1),%st(0) // this is what we've gone to all this trouble to
- // overlap
- jmp LFDIVInFlight2
-
- .align 4
-LSetupNotLast2:
- fadds zi16stepu
- fxch %st(2)
- fadds sdivz16stepu
- fxch %st(2)
- flds tdivz16stepu
- faddp %st(0),%st(2)
- flds fp_64k
- fdiv %st(1),%st(0) // z = 1/1/z
- // this is what we've gone to all this trouble to
- // overlap
-LFDIVInFlight2:
- movl %ecx,counttemp
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,8(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,9(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,10(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,11(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,12(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,13(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,14(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-
- addl $16,%edi
- movl %edx,tfracf
- movl snext,%edx
- movl %ebx,sfracf
- movl tnext,%ebx
- movl %edx,s
- movl %ebx,t
-
- movl counttemp,%ecx // retrieve count
-
-//
-// determine whether last span or not
-//
- cmpl $16,%ecx // are there multiple segments remaining?
- movb %al,-1(%edi)
- ja LNotLastSegment // yes
-
-//
-// last segment of scan
-//
-LLastSegment:
-
-//
-// advance s/z, t/z, and 1/z, and calculate s & t at end of span and steps to
-// get there. The number of pixels left is variable, and we want to land on the
-// last pixel, not step one past it, so we can't run into arithmetic problems
-//
- testl %ecx,%ecx
- jz LNoSteps // just draw the last pixel and we're done
-
-// pick up after the FDIV that was left in flight previously
-
-
- fld %st(0) // duplicate it
- fmul %st(4),%st(0) // s = s/z * z
- fxch %st(1)
- fmul %st(3),%st(0) // t = t/z * z
- fxch %st(1)
- fistpl snext
- fistpl tnext
-
- movb (%esi),%al // load first texel in segment
- movl C(tadjust),%ebx
- movb %al,(%edi) // store first pixel in segment
- movl C(sadjust),%eax
-
- addl snext,%eax
- addl tnext,%ebx
-
- movl C(bbextents),%ebp
- movl C(bbextentt),%edx
-
- cmpl $4096,%eax
- jl LClampLow4
- cmpl %ebp,%eax
- ja LClampHigh4
-LClampReentry4:
- movl %eax,snext
-
- cmpl $4096,%ebx
- jl LClampLow5
- cmpl %edx,%ebx
- ja LClampHigh5
-LClampReentry5:
-
- cmpl $1,%ecx // don't bother
- je LOnlyOneStep // if two pixels in segment, there's only one step,
- // of the segment length
- subl s,%eax
- subl t,%ebx
-
- addl %eax,%eax // convert to 15.17 format so multiply by 1.31
- addl %ebx,%ebx // reciprocal yields 16.48
-
- imull reciprocal_table_16-8(,%ecx,4) // sstep = (snext - s) /
- // (spancount-1)
- movl %edx,%ebp
-
- movl %ebx,%eax
- imull reciprocal_table_16-8(,%ecx,4) // tstep = (tnext - t) /
- // (spancount-1)
-LSetEntryvec:
-//
-// set up advancetable
-//
- movl entryvec_table_16(,%ecx,4),%ebx
- movl %edx,%eax
- movl %ebx,jumptemp // entry point into code for RET later
- movl %ebp,%ecx
- sarl $16,%edx // tstep >>= 16;
- movl C(cachewidth),%ebx
- sarl $16,%ecx // sstep >>= 16;
- imull %ebx,%edx
-
- addl %ecx,%edx // add in sstep
- // (tstep >> 16) * cachewidth + (sstep >> 16);
- movl tfracf,%ecx
- movl %edx,advancetable+4 // advance base in t
- addl %ebx,%edx // ((tstep >> 16) + 1) * cachewidth +
- // (sstep >> 16);
- shll $16,%ebp // left-justify sstep fractional part
- movl sfracf,%ebx
- shll $16,%eax // left-justify tstep fractional part
- movl %edx,advancetable // advance extra in t
-
- movl %eax,tstep
- movl %ecx,%edx
- addl %eax,%edx
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
-
- jmp *jumptemp // jump to the number-of-pixels handler
-
-//----------------------------------------
-
-LNoSteps:
- movb (%esi),%al // load first texel in segment
- subl $15,%edi // adjust for hardwired offset
- jmp LEndSpan
-
-
-LOnlyOneStep:
- subl s,%eax
- subl t,%ebx
- movl %eax,%ebp
- movl %ebx,%edx
- jmp LSetEntryvec
-
-//----------------------------------------
-
-.globl Entry2_16, Entry3_16, Entry4_16, Entry5_16
-.globl Entry6_16, Entry7_16, Entry8_16, Entry9_16
-.globl Entry10_16, Entry11_16, Entry12_16, Entry13_16
-.globl Entry14_16, Entry15_16, Entry16_16
-
-Entry2_16:
- subl $14,%edi // adjust for hardwired offsets
- movb (%esi),%al
- jmp LEntry2_16
-
-//----------------------------------------
-
-Entry3_16:
- subl $13,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- jmp LEntry3_16
-
-//----------------------------------------
-
-Entry4_16:
- subl $12,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry4_16
-
-//----------------------------------------
-
-Entry5_16:
- subl $11,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry5_16
-
-//----------------------------------------
-
-Entry6_16:
- subl $10,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry6_16
-
-//----------------------------------------
-
-Entry7_16:
- subl $9,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry7_16
-
-//----------------------------------------
-
-Entry8_16:
- subl $8,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry8_16
-
-//----------------------------------------
-
-Entry9_16:
- subl $7,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry9_16
-
-//----------------------------------------
-
-Entry10_16:
- subl $6,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry10_16
-
-//----------------------------------------
-
-Entry11_16:
- subl $5,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry11_16
-
-//----------------------------------------
-
-Entry12_16:
- subl $4,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry12_16
-
-//----------------------------------------
-
-Entry13_16:
- subl $3,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry13_16
-
-//----------------------------------------
-
-Entry14_16:
- subl $2,%edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry14_16
-
-//----------------------------------------
-
-Entry15_16:
- decl %edi // adjust for hardwired offsets
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
- jmp LEntry15_16
-
-//----------------------------------------
-
-Entry16_16:
- addl %eax,%edx
- movb (%esi),%al
- sbbl %ecx,%ecx
- addl %ebp,%ebx
- adcl advancetable+4(,%ecx,4),%esi
-
- addl tstep,%edx
- sbbl %ecx,%ecx
- movb %al,1(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry15_16:
- sbbl %ecx,%ecx
- movb %al,2(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry14_16:
- sbbl %ecx,%ecx
- movb %al,3(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry13_16:
- sbbl %ecx,%ecx
- movb %al,4(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry12_16:
- sbbl %ecx,%ecx
- movb %al,5(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry11_16:
- sbbl %ecx,%ecx
- movb %al,6(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry10_16:
- sbbl %ecx,%ecx
- movb %al,7(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry9_16:
- sbbl %ecx,%ecx
- movb %al,8(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry8_16:
- sbbl %ecx,%ecx
- movb %al,9(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry7_16:
- sbbl %ecx,%ecx
- movb %al,10(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry6_16:
- sbbl %ecx,%ecx
- movb %al,11(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry5_16:
- sbbl %ecx,%ecx
- movb %al,12(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
- addl tstep,%edx
-LEntry4_16:
- sbbl %ecx,%ecx
- movb %al,13(%edi)
- addl %ebp,%ebx
- movb (%esi),%al
- adcl advancetable+4(,%ecx,4),%esi
-LEntry3_16:
- movb %al,14(%edi)
- movb (%esi),%al
-LEntry2_16:
-
-LEndSpan:
-
-//
-// clear s/z, t/z, 1/z from FP stack
-//
- fstp %st(0)
- fstp %st(0)
- fstp %st(0)
-
- movl pspantemp,%ebx // restore spans pointer
- movl espan_t_pnext(%ebx),%ebx // point to next span
- testl %ebx,%ebx // any more spans?
- movb %al,15(%edi)
- jnz LSpanLoop // more spans
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-//----------------------------------------------------------------------
-// 8-bpp horizontal span z drawing codefor polygons, with no transparency.
-//
-// Assumes there is at least one span in pzspans, and that every span
-// contains at least one pixel
-//----------------------------------------------------------------------
-
- .text
-
-// z-clamp on a non-negative gradient span
-LClamp:
- movl $0x40000000,%edx
- xorl %ebx,%ebx
- fstp %st(0)
- jmp LZDraw
-
-// z-clamp on a negative gradient span
-LClampNeg:
- movl $0x40000000,%edx
- xorl %ebx,%ebx
- fstp %st(0)
- jmp LZDrawNeg
-
-
-#define pzspans 4+16
-
-.globl C(D_DrawZSpans)
-C(D_DrawZSpans):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
- flds C(d_zistepu)
- movl C(d_zistepu),%eax
- movl pzspans(%esp),%esi
- testl %eax,%eax
- jz LFNegSpan
-
- fmuls Float2ToThe31nd
- fistpl izistep // note: we are relying on FP exceptions being turned
- // off here to avoid range problems
- movl izistep,%ebx // remains loaded for all spans
-
-LFSpanLoop:
-// set up the initial 1/z value
- fildl espan_t_v(%esi)
- fildl espan_t_u(%esi)
- movl espan_t_v(%esi),%ecx
- movl C(d_pzbuffer),%edi
- fmuls C(d_zistepu)
- fxch %st(1)
- fmuls C(d_zistepv)
- fxch %st(1)
- fadds C(d_ziorigin)
- imull C(d_zrowbytes),%ecx
- faddp %st(0),%st(1)
-
-// clamp if z is nearer than 2 (1/z > 0.5)
- fcoms float_point5
- addl %ecx,%edi
- movl espan_t_u(%esi),%edx
- addl %edx,%edx // word count
- movl espan_t_count(%esi),%ecx
- addl %edx,%edi // pdest = &pdestspan[scans->u];
- pushl %esi // preserve spans pointer
- fnstsw %ax
- testb $0x45,%ah
- jz LClamp
-
- fmuls Float2ToThe31nd
- fistpl izi // note: we are relying on FP exceptions being turned
- // off here to avoid problems when the span is closer
- // than 1/(2**31)
- movl izi,%edx
-
-// at this point:
-// %ebx = izistep
-// %ecx = count
-// %edx = izi
-// %edi = pdest
-
-LZDraw:
-
-// do a single pixel up front, if necessary to dword align the destination
- testl $2,%edi
- jz LFMiddle
- movl %edx,%eax
- addl %ebx,%edx
- shrl $16,%eax
- decl %ecx
- movw %ax,(%edi)
- addl $2,%edi
-
-// do middle a pair of aligned dwords at a time
-LFMiddle:
- pushl %ecx
- shrl $1,%ecx // count / 2
- jz LFLast // no aligned dwords to do
- shrl $1,%ecx // (count / 2) / 2
- jnc LFMiddleLoop // even number of aligned dwords to do
-
- movl %edx,%eax
- addl %ebx,%edx
- shrl $16,%eax
- movl %edx,%esi
- addl %ebx,%edx
- andl $0xFFFF0000,%esi
- orl %esi,%eax
- movl %eax,(%edi)
- addl $4,%edi
- andl %ecx,%ecx
- jz LFLast
-
-LFMiddleLoop:
- movl %edx,%eax
- addl %ebx,%edx
- shrl $16,%eax
- movl %edx,%esi
- addl %ebx,%edx
- andl $0xFFFF0000,%esi
- orl %esi,%eax
- movl %edx,%ebp
- movl %eax,(%edi)
- addl %ebx,%edx
- shrl $16,%ebp
- movl %edx,%esi
- addl %ebx,%edx
- andl $0xFFFF0000,%esi
- orl %esi,%ebp
- movl %ebp,4(%edi) // FIXME: eliminate register contention
- addl $8,%edi
-
- decl %ecx
- jnz LFMiddleLoop
-
-LFLast:
- popl %ecx // retrieve count
- popl %esi // retrieve span pointer
-
-// do the last, unaligned pixel, if there is one
- andl $1,%ecx // is there an odd pixel left to do?
- jz LFSpanDone // no
- shrl $16,%edx
- movw %dx,(%edi) // do the final pixel's z
-
-LFSpanDone:
- movl espan_t_pnext(%esi),%esi
- testl %esi,%esi
- jnz LFSpanLoop
-
- jmp LFDone
-
-LFNegSpan:
- fmuls FloatMinus2ToThe31nd
- fistpl izistep // note: we are relying on FP exceptions being turned
- // off here to avoid range problems
- movl izistep,%ebx // remains loaded for all spans
-
-LFNegSpanLoop:
-// set up the initial 1/z value
- fildl espan_t_v(%esi)
- fildl espan_t_u(%esi)
- movl espan_t_v(%esi),%ecx
- movl C(d_pzbuffer),%edi
- fmuls C(d_zistepu)
- fxch %st(1)
- fmuls C(d_zistepv)
- fxch %st(1)
- fadds C(d_ziorigin)
- imull C(d_zrowbytes),%ecx
- faddp %st(0),%st(1)
-
-// clamp if z is nearer than 2 (1/z > 0.5)
- fcoms float_point5
- addl %ecx,%edi
- movl espan_t_u(%esi),%edx
- addl %edx,%edx // word count
- movl espan_t_count(%esi),%ecx
- addl %edx,%edi // pdest = &pdestspan[scans->u];
- pushl %esi // preserve spans pointer
- fnstsw %ax
- testb $0x45,%ah
- jz LClampNeg
-
- fmuls Float2ToThe31nd
- fistpl izi // note: we are relying on FP exceptions being turned
- // off here to avoid problems when the span is closer
- // than 1/(2**31)
- movl izi,%edx
-
-// at this point:
-// %ebx = izistep
-// %ecx = count
-// %edx = izi
-// %edi = pdest
-
-LZDrawNeg:
-
-// do a single pixel up front, if necessary to dword align the destination
- testl $2,%edi
- jz LFNegMiddle
- movl %edx,%eax
- subl %ebx,%edx
- shrl $16,%eax
- decl %ecx
- movw %ax,(%edi)
- addl $2,%edi
-
-// do middle a pair of aligned dwords at a time
-LFNegMiddle:
- pushl %ecx
- shrl $1,%ecx // count / 2
- jz LFNegLast // no aligned dwords to do
- shrl $1,%ecx // (count / 2) / 2
- jnc LFNegMiddleLoop // even number of aligned dwords to do
-
- movl %edx,%eax
- subl %ebx,%edx
- shrl $16,%eax
- movl %edx,%esi
- subl %ebx,%edx
- andl $0xFFFF0000,%esi
- orl %esi,%eax
- movl %eax,(%edi)
- addl $4,%edi
- andl %ecx,%ecx
- jz LFNegLast
-
-LFNegMiddleLoop:
- movl %edx,%eax
- subl %ebx,%edx
- shrl $16,%eax
- movl %edx,%esi
- subl %ebx,%edx
- andl $0xFFFF0000,%esi
- orl %esi,%eax
- movl %edx,%ebp
- movl %eax,(%edi)
- subl %ebx,%edx
- shrl $16,%ebp
- movl %edx,%esi
- subl %ebx,%edx
- andl $0xFFFF0000,%esi
- orl %esi,%ebp
- movl %ebp,4(%edi) // FIXME: eliminate register contention
- addl $8,%edi
-
- decl %ecx
- jnz LFNegMiddleLoop
-
-LFNegLast:
- popl %ecx // retrieve count
- popl %esi // retrieve span pointer
-
-// do the last, unaligned pixel, if there is one
- andl $1,%ecx // is there an odd pixel left to do?
- jz LFNegSpanDone // no
- shrl $16,%edx
- movw %dx,(%edi) // do the final pixel's z
-
-LFNegSpanDone:
- movl espan_t_pnext(%esi),%esi
- testl %esi,%esi
- jnz LFNegSpanLoop
-
-LFDone:
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-#endif // id386
-
--- a/linux/r_drawa.s
+++ /dev/null
@@ -1,817 +1,0 @@
-//
-// r_drawa.s
-// x86 assembly-language edge clipping and emission code
-//
-
-#include "qasm.h"
-#include "d_ifacea.h"
-
-#if id386
-
-// !!! if these are changed, they must be changed in r_draw.c too !!!
-#define FULLY_CLIPPED_CACHED 0x80000000
-#define FRAMECOUNT_MASK 0x7FFFFFFF
-
- .data
-
-Ld0: .single 0.0
-Ld1: .single 0.0
-Lstack: .long 0
-Lfp_near_clip: .single NEAR_CLIP
-Lceilv0: .long 0
-Lv: .long 0
-Lu0: .long 0
-Lv0: .long 0
-Lzi0: .long 0
-
- .text
-
-//----------------------------------------------------------------------
-// edge clipping code
-//----------------------------------------------------------------------
-
-#define pv0 4+12
-#define pv1 8+12
-#define clip 12+12
-
- .align 4
-.globl C(R_ClipEdge)
-C(R_ClipEdge):
- pushl %esi // preserve register variables
- pushl %edi
- pushl %ebx
- movl %esp,Lstack // for clearing the stack later
-
-// float d0, d1, f;
-// mvertex_t clipvert;
-
- movl clip(%esp),%ebx
- movl pv0(%esp),%esi
- movl pv1(%esp),%edx
-
-// if (clip)
-// {
- testl %ebx,%ebx
- jz Lemit
-
-// do
-// {
-
-Lcliploop:
-
-// d0 = DotProduct (pv0->position, clip->normal) - clip->dist;
-// d1 = DotProduct (pv1->position, clip->normal) - clip->dist;
- flds mv_position+0(%esi)
- fmuls cp_normal+0(%ebx)
- flds mv_position+4(%esi)
- fmuls cp_normal+4(%ebx)
- flds mv_position+8(%esi)
- fmuls cp_normal+8(%ebx)
- fxch %st(1)
- faddp %st(0),%st(2) // d0mul2 | d0add0
-
- flds mv_position+0(%edx)
- fmuls cp_normal+0(%ebx)
- flds mv_position+4(%edx)
- fmuls cp_normal+4(%ebx)
- flds mv_position+8(%edx)
- fmuls cp_normal+8(%ebx)
- fxch %st(1)
- faddp %st(0),%st(2) // d1mul2 | d1add0 | d0mul2 | d0add0
- fxch %st(3) // d0add0 | d1add0 | d0mul2 | d1mul2
-
- faddp %st(0),%st(2) // d1add0 | dot0 | d1mul2
- faddp %st(0),%st(2) // dot0 | dot1
-
- fsubs cp_dist(%ebx) // d0 | dot1
- fxch %st(1) // dot1 | d0
- fsubs cp_dist(%ebx) // d1 | d0
- fxch %st(1)
- fstps Ld0
- fstps Ld1
-
-// if (d0 >= 0)
-// {
- movl Ld0,%eax
- movl Ld1,%ecx
- orl %eax,%ecx
- js Lp2
-
-// both points are unclipped
-
-Lcontinue:
-
-//
-// R_ClipEdge (&clipvert, pv1, clip->next);
-// return;
-// }
-// } while ((clip = clip->next) != NULL);
- movl cp_next(%ebx),%ebx
- testl %ebx,%ebx
- jnz Lcliploop
-
-// }
-
-//// add the edge
-// R_EmitEdge (pv0, pv1);
-Lemit:
-
-//
-// set integer rounding to ceil mode, set to single precision
-//
-// FIXME: do away with by manually extracting integers from floats?
-// FIXME: set less often
- fldcw ceil_cw
-
-// edge_t *edge, *pcheck;
-// int u_check;
-// float u, u_step;
-// vec3_t local, transformed;
-// float *world;
-// int v, v2, ceilv0;
-// float scale, lzi0, u0, v0;
-// int side;
-
-// if (r_lastvertvalid)
-// {
- cmpl $0,C(r_lastvertvalid)
- jz LCalcFirst
-
-// u0 = r_u1;
-// v0 = r_v1;
-// lzi0 = r_lzi1;
-// ceilv0 = r_ceilv1;
- movl C(r_lzi1),%eax
- movl C(r_u1),%ecx
- movl %eax,Lzi0
- movl %ecx,Lu0
- movl C(r_v1),%ecx
- movl C(r_ceilv1),%eax
- movl %ecx,Lv0
- movl %eax,Lceilv0
- jmp LCalcSecond
-
-// }
-
-LCalcFirst:
-
-// else
-// {
-// world = &pv0->position[0];
-
- call LTransformAndProject // v0 | lzi0 | u0
-
- fsts Lv0
- fxch %st(2) // u0 | lzi0 | v0
- fstps Lu0 // lzi0 | v0
- fstps Lzi0 // v0
-
-// ceilv0 = (int)(v0 - 2000) + 2000; // ceil(v0);
- fistpl Lceilv0
-
-// }
-
-LCalcSecond:
-
-// world = &pv1->position[0];
- movl %edx,%esi
-
- call LTransformAndProject // v1 | lzi1 | u1
-
- flds Lu0 // u0 | v1 | lzi1 | u1
- fxch %st(3) // u1 | v1 | lzi1 | u0
- flds Lzi0 // lzi0 | u1 | v1 | lzi1 | u0
- fxch %st(3) // lzi1 | u1 | v1 | lzi0 | u0
- flds Lv0 // v0 | lzi1 | u1 | v1 | lzi0 | u0
- fxch %st(3) // v1 | lzi1 | u1 | v0 | lzi0 | u0
-
-// r_ceilv1 = (int)(r_v1 - 2000) + 2000; // ceil(r_v1);
- fistl C(r_ceilv1)
-
- fldcw single_cw // put back normal floating-point state
-
- fsts C(r_v1)
- fxch %st(4) // lzi0 | lzi1 | u1 | v0 | v1 | u0
-
-// if (r_lzi1 > lzi0)
-// lzi0 = r_lzi1;
- fcom %st(1)
- fnstsw %ax
- testb $1,%ah
- jz LP0
- fstp %st(0)
- fld %st(0)
-LP0:
-
- fxch %st(1) // lzi1 | lzi0 | u1 | v0 | v1 | u0
- fstps C(r_lzi1) // lzi0 | u1 | v0 | v1 | u0
- fxch %st(1)
- fsts C(r_u1)
- fxch %st(1)
-
-// if (lzi0 > r_nearzi) // for mipmap finding
-// r_nearzi = lzi0;
- fcoms C(r_nearzi)
- fnstsw %ax
- testb $0x45,%ah
- jnz LP1
- fsts C(r_nearzi)
-LP1:
-
-// // for right edges, all we want is the effect on 1/z
-// if (r_nearzionly)
-// return;
- movl C(r_nearzionly),%eax
- testl %eax,%eax
- jz LP2
-LPop5AndDone:
- movl C(cacheoffset),%eax
- movl C(r_framecount),%edx
- cmpl $0x7FFFFFFF,%eax
- jz LDoPop
- andl $(FRAMECOUNT_MASK),%edx
- orl $(FULLY_CLIPPED_CACHED),%edx
- movl %edx,C(cacheoffset)
-
-LDoPop:
- fstp %st(0) // u1 | v0 | v1 | u0
- fstp %st(0) // v0 | v1 | u0
- fstp %st(0) // v1 | u0
- fstp %st(0) // u0
- fstp %st(0)
- jmp Ldone
-
-LP2:
-
-// // create the edge
-// if (ceilv0 == r_ceilv1)
-// return; // horizontal edge
- movl Lceilv0,%ebx
- movl C(edge_p),%edi
- movl C(r_ceilv1),%ecx
- movl %edi,%edx
- movl C(r_pedge),%esi
- addl $(et_size),%edx
- cmpl %ecx,%ebx
- jz LPop5AndDone
-
- movl C(r_pedge),%eax
- movl %eax,et_owner(%edi)
-
-// side = ceilv0 > r_ceilv1;
-//
-// edge->nearzi = lzi0;
- fstps et_nearzi(%edi) // u1 | v0 | v1 | u0
-
-// if (side == 1)
-// {
- jc LSide0
-
-LSide1:
-
-// // leading edge (go from p2 to p1)
-
-// u_step = ((u0 - r_u1) / (v0 - r_v1));
- fsubrp %st(0),%st(3) // v0 | v1 | u0-u1
- fsub %st(1),%st(0) // v0-v1 | v1 | u0-u1
- fdivrp %st(0),%st(2) // v1 | ustep
-
-// r_emitted = 1;
- movl $1,C(r_emitted)
-
-// edge = edge_p++;
- movl %edx,C(edge_p)
-
-// pretouch next edge
- movl (%edx),%eax
-
-// v2 = ceilv0 - 1;
-// v = r_ceilv1;
- movl %ecx,%eax
- leal -1(%ebx),%ecx
- movl %eax,%ebx
-
-// edge->surfs[0] = 0;
-// edge->surfs[1] = surface_p - surfaces;
- movl C(surface_p),%eax
- movl C(surfaces),%esi
- subl %edx,%edx
- subl %esi,%eax
- shrl $(SURF_T_SHIFT),%eax
- movl %edx,et_surfs(%edi)
- movl %eax,et_surfs+2(%edi)
-
- subl %esi,%esi
-
-// u = r_u1 + ((float)v - r_v1) * u_step;
- movl %ebx,Lv
- fildl Lv // v | v1 | ustep
- fsubp %st(0),%st(1) // v-v1 | ustep
- fmul %st(1),%st(0) // (v-v1)*ustep | ustep
- fadds C(r_u1) // u | ustep
-
- jmp LSideDone
-
-// }
-
-LSide0:
-
-// else
-// {
-// // trailing edge (go from p1 to p2)
-
-// u_step = ((r_u1 - u0) / (r_v1 - v0));
- fsub %st(3),%st(0) // u1-u0 | v0 | v1 | u0
- fxch %st(2) // v1 | v0 | u1-u0 | u0
- fsub %st(1),%st(0) // v1-v0 | v0 | u1-u0 | u0
- fdivrp %st(0),%st(2) // v0 | ustep | u0
-
-// r_emitted = 1;
- movl $1,C(r_emitted)
-
-// edge = edge_p++;
- movl %edx,C(edge_p)
-
-// pretouch next edge
- movl (%edx),%eax
-
-// v = ceilv0;
-// v2 = r_ceilv1 - 1;
- decl %ecx
-
-// edge->surfs[0] = surface_p - surfaces;
-// edge->surfs[1] = 0;
- movl C(surface_p),%eax
- movl C(surfaces),%esi
- subl %edx,%edx
- subl %esi,%eax
- shrl $(SURF_T_SHIFT),%eax
- movl %edx,et_surfs+2(%edi)
- movl %eax,et_surfs(%edi)
-
- movl $1,%esi
-
-// u = u0 + ((float)v - v0) * u_step;
- movl %ebx,Lv
- fildl Lv // v | v0 | ustep | u0
- fsubp %st(0),%st(1) // v-v0 | ustep | u0
- fmul %st(1),%st(0) // (v-v0)*ustep | ustep | u0
- faddp %st(0),%st(2) // ustep | u
- fxch %st(1) // u | ustep
-
-// }
-
-LSideDone:
-
-// edge->u_step = u_step*0x100000;
-// edge->u = u*0x100000 + 0xFFFFF;
-
- fmuls fp_1m // u*0x100000 | ustep
- fxch %st(1) // ustep | u*0x100000
- fmuls fp_1m // ustep*0x100000 | u*0x100000
- fxch %st(1) // u*0x100000 | ustep*0x100000
- fadds fp_1m_minus_1 // u*0x100000 + 0xFFFFF | ustep*0x100000
- fxch %st(1) // ustep*0x100000 | u*0x100000 + 0xFFFFF
- fistpl et_u_step(%edi) // u*0x100000 + 0xFFFFF
- fistpl et_u(%edi)
-
-// // we need to do this to avoid stepping off the edges if a very nearly
-// // horizontal edge is less than epsilon above a scan, and numeric error
-// // causes it to incorrectly extend to the scan, and the extension of the
-// // line goes off the edge of the screen
-// // FIXME: is this actually needed?
-// if (edge->u < r_refdef.vrect_x_adj_shift20)
-// edge->u = r_refdef.vrect_x_adj_shift20;
-// if (edge->u > r_refdef.vrectright_adj_shift20)
-// edge->u = r_refdef.vrectright_adj_shift20;
- movl et_u(%edi),%eax
- movl C(r_refdef)+rd_vrect_x_adj_shift20,%edx
- cmpl %edx,%eax
- jl LP4
- movl C(r_refdef)+rd_vrectright_adj_shift20,%edx
- cmpl %edx,%eax
- jng LP5
-LP4:
- movl %edx,et_u(%edi)
- movl %edx,%eax
-LP5:
-
-// // sort the edge in normally
-// u_check = edge->u;
-//
-// if (edge->surfs[0])
-// u_check++; // sort trailers after leaders
- addl %esi,%eax
-
-// if (!newedges[v] || newedges[v]->u >= u_check)
-// {
- movl C(newedges)(,%ebx,4),%esi
- testl %esi,%esi
- jz LDoFirst
- cmpl %eax,et_u(%esi)
- jl LNotFirst
-LDoFirst:
-
-// edge->next = newedges[v];
-// newedges[v] = edge;
- movl %esi,et_next(%edi)
- movl %edi,C(newedges)(,%ebx,4)
-
- jmp LSetRemove
-
-// }
-
-LNotFirst:
-
-// else
-// {
-// pcheck = newedges[v];
-//
-// while (pcheck->next && pcheck->next->u < u_check)
-// pcheck = pcheck->next;
-LFindInsertLoop:
- movl %esi,%edx
- movl et_next(%esi),%esi
- testl %esi,%esi
- jz LInsertFound
- cmpl %eax,et_u(%esi)
- jl LFindInsertLoop
-
-LInsertFound:
-
-// edge->next = pcheck->next;
-// pcheck->next = edge;
- movl %esi,et_next(%edi)
- movl %edi,et_next(%edx)
-
-// }
-
-LSetRemove:
-
-// edge->nextremove = removeedges[v2];
-// removeedges[v2] = edge;
- movl C(removeedges)(,%ecx,4),%eax
- movl %edi,C(removeedges)(,%ecx,4)
- movl %eax,et_nextremove(%edi)
-
-Ldone:
- movl Lstack,%esp // clear temporary variables from stack
-
- popl %ebx // restore register variables
- popl %edi
- popl %esi
- ret
-
-// at least one point is clipped
-
-Lp2:
- testl %eax,%eax
- jns Lp1
-
-// else
-// {
-// // point 0 is clipped
-
-// if (d1 < 0)
-// {
- movl Ld1,%eax
- testl %eax,%eax
- jns Lp3
-
-// // both points are clipped
-// // we do cache fully clipped edges
-// if (!leftclipped)
- movl C(r_leftclipped),%eax
- movl C(r_pedge),%ecx
- testl %eax,%eax
- jnz Ldone
-
-// r_pedge->framecount = r_framecount;
- movl C(r_framecount),%eax
- andl $(FRAMECOUNT_MASK),%eax
- orl $(FULLY_CLIPPED_CACHED),%eax
- movl %eax,C(cacheoffset)
-
-// return;
- jmp Ldone
-
-// }
-
-Lp1:
-
-// // point 0 is unclipped
-// if (d1 >= 0)
-// {
-// // both points are unclipped
-// continue;
-
-// // only point 1 is clipped
-
-// f = d0 / (d0 - d1);
- flds Ld0
- flds Ld1
- fsubr %st(1),%st(0)
-
-// // we don't cache partially clipped edges
- movl $0x7FFFFFFF,C(cacheoffset)
-
- fdivrp %st(0),%st(1)
-
- subl $(mv_size),%esp // allocate space for clipvert
-
-// clipvert.position[0] = pv0->position[0] +
-// f * (pv1->position[0] - pv0->position[0]);
-// clipvert.position[1] = pv0->position[1] +
-// f * (pv1->position[1] - pv0->position[1]);
-// clipvert.position[2] = pv0->position[2] +
-// f * (pv1->position[2] - pv0->position[2]);
- flds mv_position+8(%edx)
- fsubs mv_position+8(%esi)
- flds mv_position+4(%edx)
- fsubs mv_position+4(%esi)
- flds mv_position+0(%edx)
- fsubs mv_position+0(%esi) // 0 | 1 | 2
-
-// replace pv1 with the clip point
- movl %esp,%edx
- movl cp_leftedge(%ebx),%eax
- testb %al,%al
-
- fmul %st(3),%st(0)
- fxch %st(1) // 1 | 0 | 2
- fmul %st(3),%st(0)
- fxch %st(2) // 2 | 0 | 1
- fmulp %st(0),%st(3) // 0 | 1 | 2
- fadds mv_position+0(%esi)
- fxch %st(1) // 1 | 0 | 2
- fadds mv_position+4(%esi)
- fxch %st(2) // 2 | 0 | 1
- fadds mv_position+8(%esi)
- fxch %st(1) // 0 | 2 | 1
- fstps mv_position+0(%esp) // 2 | 1
- fstps mv_position+8(%esp) // 1
- fstps mv_position+4(%esp)
-
-// if (clip->leftedge)
-// {
- jz Ltestright
-
-// r_leftclipped = true;
-// r_leftexit = clipvert;
- movl $1,C(r_leftclipped)
- movl mv_position+0(%esp),%eax
- movl %eax,C(r_leftexit)+mv_position+0
- movl mv_position+4(%esp),%eax
- movl %eax,C(r_leftexit)+mv_position+4
- movl mv_position+8(%esp),%eax
- movl %eax,C(r_leftexit)+mv_position+8
-
- jmp Lcontinue
-
-// }
-
-Ltestright:
-// else if (clip->rightedge)
-// {
- testb %ah,%ah
- jz Lcontinue
-
-// r_rightclipped = true;
-// r_rightexit = clipvert;
- movl $1,C(r_rightclipped)
- movl mv_position+0(%esp),%eax
- movl %eax,C(r_rightexit)+mv_position+0
- movl mv_position+4(%esp),%eax
- movl %eax,C(r_rightexit)+mv_position+4
- movl mv_position+8(%esp),%eax
- movl %eax,C(r_rightexit)+mv_position+8
-
-// }
-//
-// R_ClipEdge (pv0, &clipvert, clip->next);
-// return;
-// }
- jmp Lcontinue
-
-// }
-
-Lp3:
-
-// // only point 0 is clipped
-// r_lastvertvalid = false;
-
- movl $0,C(r_lastvertvalid)
-
-// f = d0 / (d0 - d1);
- flds Ld0
- flds Ld1
- fsubr %st(1),%st(0)
-
-// // we don't cache partially clipped edges
- movl $0x7FFFFFFF,C(cacheoffset)
-
- fdivrp %st(0),%st(1)
-
- subl $(mv_size),%esp // allocate space for clipvert
-
-// clipvert.position[0] = pv0->position[0] +
-// f * (pv1->position[0] - pv0->position[0]);
-// clipvert.position[1] = pv0->position[1] +
-// f * (pv1->position[1] - pv0->position[1]);
-// clipvert.position[2] = pv0->position[2] +
-// f * (pv1->position[2] - pv0->position[2]);
- flds mv_position+8(%edx)
- fsubs mv_position+8(%esi)
- flds mv_position+4(%edx)
- fsubs mv_position+4(%esi)
- flds mv_position+0(%edx)
- fsubs mv_position+0(%esi) // 0 | 1 | 2
-
- movl cp_leftedge(%ebx),%eax
- testb %al,%al
-
- fmul %st(3),%st(0)
- fxch %st(1) // 1 | 0 | 2
- fmul %st(3),%st(0)
- fxch %st(2) // 2 | 0 | 1
- fmulp %st(0),%st(3) // 0 | 1 | 2
- fadds mv_position+0(%esi)
- fxch %st(1) // 1 | 0 | 2
- fadds mv_position+4(%esi)
- fxch %st(2) // 2 | 0 | 1
- fadds mv_position+8(%esi)
- fxch %st(1) // 0 | 2 | 1
- fstps mv_position+0(%esp) // 2 | 1
- fstps mv_position+8(%esp) // 1
- fstps mv_position+4(%esp)
-
-// replace pv0 with the clip point
- movl %esp,%esi
-
-// if (clip->leftedge)
-// {
- jz Ltestright2
-
-// r_leftclipped = true;
-// r_leftenter = clipvert;
- movl $1,C(r_leftclipped)
- movl mv_position+0(%esp),%eax
- movl %eax,C(r_leftenter)+mv_position+0
- movl mv_position+4(%esp),%eax
- movl %eax,C(r_leftenter)+mv_position+4
- movl mv_position+8(%esp),%eax
- movl %eax,C(r_leftenter)+mv_position+8
-
- jmp Lcontinue
-
-// }
-
-Ltestright2:
-// else if (clip->rightedge)
-// {
- testb %ah,%ah
- jz Lcontinue
-
-// r_rightclipped = true;
-// r_rightenter = clipvert;
- movl $1,C(r_rightclipped)
- movl mv_position+0(%esp),%eax
- movl %eax,C(r_rightenter)+mv_position+0
- movl mv_position+4(%esp),%eax
- movl %eax,C(r_rightenter)+mv_position+4
- movl mv_position+8(%esp),%eax
- movl %eax,C(r_rightenter)+mv_position+8
-
-// }
- jmp Lcontinue
-
-// %esi = vec3_t point to transform and project
-// %edx preserved
-LTransformAndProject:
-
-// // transform and project
-// VectorSubtract (world, modelorg, local);
- flds mv_position+0(%esi)
- fsubs C(modelorg)+0
- flds mv_position+4(%esi)
- fsubs C(modelorg)+4
- flds mv_position+8(%esi)
- fsubs C(modelorg)+8
- fxch %st(2) // local[0] | local[1] | local[2]
-
-// TransformVector (local, transformed);
-//
-// if (transformed[2] < NEAR_CLIP)
-// transformed[2] = NEAR_CLIP;
-//
-// lzi0 = 1.0 / transformed[2];
- fld %st(0) // local[0] | local[0] | local[1] | local[2]
- fmuls C(vpn)+0 // zm0 | local[0] | local[1] | local[2]
- fld %st(1) // local[0] | zm0 | local[0] | local[1] |
- // local[2]
- fmuls C(vright)+0 // xm0 | zm0 | local[0] | local[1] | local[2]
- fxch %st(2) // local[0] | zm0 | xm0 | local[1] | local[2]
- fmuls C(vup)+0 // ym0 | zm0 | xm0 | local[1] | local[2]
- fld %st(3) // local[1] | ym0 | zm0 | xm0 | local[1] |
- // local[2]
- fmuls C(vpn)+4 // zm1 | ym0 | zm0 | xm0 | local[1] |
- // local[2]
- fld %st(4) // local[1] | zm1 | ym0 | zm0 | xm0 |
- // local[1] | local[2]
- fmuls C(vright)+4 // xm1 | zm1 | ym0 | zm0 | xm0 |
- // local[1] | local[2]
- fxch %st(5) // local[1] | zm1 | ym0 | zm0 | xm0 |
- // xm1 | local[2]
- fmuls C(vup)+4 // ym1 | zm1 | ym0 | zm0 | xm0 |
- // xm1 | local[2]
- fxch %st(1) // zm1 | ym1 | ym0 | zm0 | xm0 |
- // xm1 | local[2]
- faddp %st(0),%st(3) // ym1 | ym0 | zm2 | xm0 | xm1 | local[2]
- fxch %st(3) // xm0 | ym0 | zm2 | ym1 | xm1 | local[2]
- faddp %st(0),%st(4) // ym0 | zm2 | ym1 | xm2 | local[2]
- faddp %st(0),%st(2) // zm2 | ym2 | xm2 | local[2]
- fld %st(3) // local[2] | zm2 | ym2 | xm2 | local[2]
- fmuls C(vpn)+8 // zm3 | zm2 | ym2 | xm2 | local[2]
- fld %st(4) // local[2] | zm3 | zm2 | ym2 | xm2 | local[2]
- fmuls C(vright)+8 // xm3 | zm3 | zm2 | ym2 | xm2 | local[2]
- fxch %st(5) // local[2] | zm3 | zm2 | ym2 | xm2 | xm3
- fmuls C(vup)+8 // ym3 | zm3 | zm2 | ym2 | xm2 | xm3
- fxch %st(1) // zm3 | ym3 | zm2 | ym2 | xm2 | xm3
- faddp %st(0),%st(2) // ym3 | zm4 | ym2 | xm2 | xm3
- fxch %st(4) // xm3 | zm4 | ym2 | xm2 | ym3
- faddp %st(0),%st(3) // zm4 | ym2 | xm4 | ym3
- fxch %st(1) // ym2 | zm4 | xm4 | ym3
- faddp %st(0),%st(3) // zm4 | xm4 | ym4
-
- fcoms Lfp_near_clip
- fnstsw %ax
- testb $1,%ah
- jz LNoClip
- fstp %st(0)
- flds Lfp_near_clip
-
-LNoClip:
-
- fdivrs float_1 // lzi0 | x | y
- fxch %st(1) // x | lzi0 | y
-
-// // FIXME: build x/yscale into transform?
-// scale = xscale * lzi0;
-// u0 = (xcenter + scale*transformed[0]);
- flds C(xscale) // xscale | x | lzi0 | y
- fmul %st(2),%st(0) // scale | x | lzi0 | y
- fmulp %st(0),%st(1) // scale*x | lzi0 | y
- fadds C(xcenter) // u0 | lzi0 | y
-
-// if (u0 < r_refdef.fvrectx_adj)
-// u0 = r_refdef.fvrectx_adj;
-// if (u0 > r_refdef.fvrectright_adj)
-// u0 = r_refdef.fvrectright_adj;
-// FIXME: use integer compares of floats?
- fcoms C(r_refdef)+rd_fvrectx_adj
- fnstsw %ax
- testb $1,%ah
- jz LClampP0
- fstp %st(0)
- flds C(r_refdef)+rd_fvrectx_adj
-LClampP0:
- fcoms C(r_refdef)+rd_fvrectright_adj
- fnstsw %ax
- testb $0x45,%ah
- jnz LClampP1
- fstp %st(0)
- flds C(r_refdef)+rd_fvrectright_adj
-LClampP1:
-
- fld %st(1) // lzi0 | u0 | lzi0 | y
-
-// scale = yscale * lzi0;
-// v0 = (ycenter - scale*transformed[1]);
- fmuls C(yscale) // scale | u0 | lzi0 | y
- fmulp %st(0),%st(3) // u0 | lzi0 | scale*y
- fxch %st(2) // scale*y | lzi0 | u0
- fsubrs C(ycenter) // v0 | lzi0 | u0
-
-// if (v0 < r_refdef.fvrecty_adj)
-// v0 = r_refdef.fvrecty_adj;
-// if (v0 > r_refdef.fvrectbottom_adj)
-// v0 = r_refdef.fvrectbottom_adj;
-// FIXME: use integer compares of floats?
- fcoms C(r_refdef)+rd_fvrecty_adj
- fnstsw %ax
- testb $1,%ah
- jz LClampP2
- fstp %st(0)
- flds C(r_refdef)+rd_fvrecty_adj
-LClampP2:
- fcoms C(r_refdef)+rd_fvrectbottom_adj
- fnstsw %ax
- testb $0x45,%ah
- jnz LClampP3
- fstp %st(0)
- flds C(r_refdef)+rd_fvrectbottom_adj
-LClampP3:
- ret
-
-#endif // id386
-
--- a/linux/r_edgea.s
+++ /dev/null
@@ -1,729 +1,0 @@
-//
-// r_edgea.s
-// x86 assembly-language edge-processing code.
-//
-
-#include "qasm.h"
-
-#if id386
-
- .data
-Ltemp: .long 0
-float_1_div_0100000h: .long 0x35800000 // 1.0/(float)0x100000
-float_point_999: .single 0.999
-float_1_point_001: .single 1.001
-
- .text
-
-//--------------------------------------------------------------------
-
-#define edgestoadd 4+8 // note odd stack offsets because of interleaving
-#define edgelist 8+12 // with pushes
-
-.globl C(R_EdgeCodeStart)
-C(R_EdgeCodeStart):
-
-.globl C(R_InsertNewEdges)
-C(R_InsertNewEdges):
- pushl %edi
- pushl %esi // preserve register variables
- movl edgestoadd(%esp),%edx
- pushl %ebx
- movl edgelist(%esp),%ecx
-
-LDoNextEdge:
- movl et_u(%edx),%eax
- movl %edx,%edi
-
-LContinueSearch:
- movl et_u(%ecx),%ebx
- movl et_next(%ecx),%esi
- cmpl %ebx,%eax
- jle LAddedge
- movl et_u(%esi),%ebx
- movl et_next(%esi),%ecx
- cmpl %ebx,%eax
- jle LAddedge2
- movl et_u(%ecx),%ebx
- movl et_next(%ecx),%esi
- cmpl %ebx,%eax
- jle LAddedge
- movl et_u(%esi),%ebx
- movl et_next(%esi),%ecx
- cmpl %ebx,%eax
- jg LContinueSearch
-
-LAddedge2:
- movl et_next(%edx),%edx
- movl et_prev(%esi),%ebx
- movl %esi,et_next(%edi)
- movl %ebx,et_prev(%edi)
- movl %edi,et_next(%ebx)
- movl %edi,et_prev(%esi)
- movl %esi,%ecx
-
- cmpl $0,%edx
- jnz LDoNextEdge
- jmp LDone
-
- .align 4
-LAddedge:
- movl et_next(%edx),%edx
- movl et_prev(%ecx),%ebx
- movl %ecx,et_next(%edi)
- movl %ebx,et_prev(%edi)
- movl %edi,et_next(%ebx)
- movl %edi,et_prev(%ecx)
-
- cmpl $0,%edx
- jnz LDoNextEdge
-
-LDone:
- popl %ebx // restore register variables
- popl %esi
- popl %edi
-
- ret
-
-//--------------------------------------------------------------------
-
-#define predge 4+4
-
-.globl C(R_RemoveEdges)
-C(R_RemoveEdges):
- pushl %ebx
- movl predge(%esp),%eax
-
-Lre_loop:
- movl et_next(%eax),%ecx
- movl et_nextremove(%eax),%ebx
- movl et_prev(%eax),%edx
- testl %ebx,%ebx
- movl %edx,et_prev(%ecx)
- jz Lre_done
- movl %ecx,et_next(%edx)
-
- movl et_next(%ebx),%ecx
- movl et_prev(%ebx),%edx
- movl et_nextremove(%ebx),%eax
- movl %edx,et_prev(%ecx)
- testl %eax,%eax
- movl %ecx,et_next(%edx)
- jnz Lre_loop
-
- popl %ebx
- ret
-
-Lre_done:
- movl %ecx,et_next(%edx)
- popl %ebx
-
- ret
-
-//--------------------------------------------------------------------
-
-#define pedgelist 4+4 // note odd stack offset because of interleaving
- // with pushes
-
-.globl C(R_StepActiveU)
-C(R_StepActiveU):
- pushl %edi
- movl pedgelist(%esp),%edx
- pushl %esi // preserve register variables
- pushl %ebx
-
- movl et_prev(%edx),%esi
-
-LNewEdge:
- movl et_u(%esi),%edi
-
-LNextEdge:
- movl et_u(%edx),%eax
- movl et_u_step(%edx),%ebx
- addl %ebx,%eax
- movl et_next(%edx),%esi
- movl %eax,et_u(%edx)
- cmpl %edi,%eax
- jl LPushBack
-
- movl et_u(%esi),%edi
- movl et_u_step(%esi),%ebx
- addl %ebx,%edi
- movl et_next(%esi),%edx
- movl %edi,et_u(%esi)
- cmpl %eax,%edi
- jl LPushBack2
-
- movl et_u(%edx),%eax
- movl et_u_step(%edx),%ebx
- addl %ebx,%eax
- movl et_next(%edx),%esi
- movl %eax,et_u(%edx)
- cmpl %edi,%eax
- jl LPushBack
-
- movl et_u(%esi),%edi
- movl et_u_step(%esi),%ebx
- addl %ebx,%edi
- movl et_next(%esi),%edx
- movl %edi,et_u(%esi)
- cmpl %eax,%edi
- jnl LNextEdge
-
-LPushBack2:
- movl %edx,%ebx
- movl %edi,%eax
- movl %esi,%edx
- movl %ebx,%esi
-
-LPushBack:
-// push it back to keep it sorted
- movl et_prev(%edx),%ecx
- movl et_next(%edx),%ebx
-
-// done if the -1 in edge_aftertail triggered this
- cmpl $(C(edge_aftertail)),%edx
- jz LUDone
-
-// pull the edge out of the edge list
- movl et_prev(%ecx),%edi
- movl %ecx,et_prev(%esi)
- movl %ebx,et_next(%ecx)
-
-// find out where the edge goes in the edge list
-LPushBackLoop:
- movl et_prev(%edi),%ecx
- movl et_u(%edi),%ebx
- cmpl %ebx,%eax
- jnl LPushBackFound
-
- movl et_prev(%ecx),%edi
- movl et_u(%ecx),%ebx
- cmpl %ebx,%eax
- jl LPushBackLoop
-
- movl %ecx,%edi
-
-// put the edge back into the edge list
-LPushBackFound:
- movl et_next(%edi),%ebx
- movl %edi,et_prev(%edx)
- movl %ebx,et_next(%edx)
- movl %edx,et_next(%edi)
- movl %edx,et_prev(%ebx)
-
- movl %esi,%edx
- movl et_prev(%esi),%esi
-
- cmpl $(C(edge_tail)),%edx
- jnz LNewEdge
-
-LUDone:
- popl %ebx // restore register variables
- popl %esi
- popl %edi
-
- ret
-
-//--------------------------------------------------------------------
-
-#define surf 4 // note this is loaded before any pushes
-
- .align 4
-TrailingEdge:
- movl st_spanstate(%esi),%eax // check for edge inversion
- decl %eax
- jnz LInverted
-
- movl %eax,st_spanstate(%esi)
- movl st_insubmodel(%esi),%ecx
- movl 0x12345678,%edx // surfaces[1].st_next
-LPatch0:
- movl C(r_bmodelactive),%eax
- subl %ecx,%eax
- cmpl %esi,%edx
- movl %eax,C(r_bmodelactive)
- jnz LNoEmit // surface isn't on top, just remove
-
-// emit a span (current top going away)
- movl et_u(%ebx),%eax
- shrl $20,%eax // iu = integral pixel u
- movl st_last_u(%esi),%edx
- movl st_next(%esi),%ecx
- cmpl %edx,%eax
- jle LNoEmit2 // iu <= surf->last_u, so nothing to emit
-
- movl %eax,st_last_u(%ecx) // surf->next->last_u = iu;
- subl %edx,%eax
- movl %edx,espan_t_u(%ebp) // span->u = surf->last_u;
-
- movl %eax,espan_t_count(%ebp) // span->count = iu - span->u;
- movl C(current_iv),%eax
- movl %eax,espan_t_v(%ebp) // span->v = current_iv;
- movl st_spans(%esi),%eax
- movl %eax,espan_t_pnext(%ebp) // span->pnext = surf->spans;
- movl %ebp,st_spans(%esi) // surf->spans = span;
- addl $(espan_t_size),%ebp
-
- movl st_next(%esi),%edx // remove the surface from the surface
- movl st_prev(%esi),%esi // stack
-
- movl %edx,st_next(%esi)
- movl %esi,st_prev(%edx)
- ret
-
-LNoEmit2:
- movl %eax,st_last_u(%ecx) // surf->next->last_u = iu;
- movl st_next(%esi),%edx // remove the surface from the surface
- movl st_prev(%esi),%esi // stack
-
- movl %edx,st_next(%esi)
- movl %esi,st_prev(%edx)
- ret
-
-LNoEmit:
- movl st_next(%esi),%edx // remove the surface from the surface
- movl st_prev(%esi),%esi // stack
-
- movl %edx,st_next(%esi)
- movl %esi,st_prev(%edx)
- ret
-
-LInverted:
- movl %eax,st_spanstate(%esi)
- ret
-
-//--------------------------------------------------------------------
-
-// trailing edge only
-Lgs_trailing:
- pushl $Lgs_nextedge
- jmp TrailingEdge
-
-
-.globl C(R_GenerateSpans)
-C(R_GenerateSpans):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-// clear active surfaces to just the background surface
- movl C(surfaces),%eax
- movl C(edge_head_u_shift20),%edx
- addl $(st_size),%eax
-// %ebp = span_p throughout
- movl C(span_p),%ebp
-
- movl $0,C(r_bmodelactive)
-
- movl %eax,st_next(%eax)
- movl %eax,st_prev(%eax)
- movl %edx,st_last_u(%eax)
- movl C(edge_head)+et_next,%ebx // edge=edge_head.next
-
-// generate spans
- cmpl $(C(edge_tail)),%ebx // done if empty list
- jz Lgs_lastspan
-
-Lgs_edgeloop:
-
- movl et_surfs(%ebx),%edi
- movl C(surfaces),%eax
- movl %edi,%esi
- andl $0xFFFF0000,%edi
- andl $0xFFFF,%esi
- jz Lgs_leading // not a trailing edge
-
-// it has a left surface, so a surface is going away for this span
- shll $(SURF_T_SHIFT),%esi
- addl %eax,%esi
- testl %edi,%edi
- jz Lgs_trailing
-
-// both leading and trailing
- call TrailingEdge
- movl C(surfaces),%eax
-
-// ---------------------------------------------------------------
-// handle a leading edge
-// ---------------------------------------------------------------
-
-Lgs_leading:
- shrl $16-SURF_T_SHIFT,%edi
- movl C(surfaces),%eax
- addl %eax,%edi
- movl 0x12345678,%esi // surf2 = surfaces[1].next;
-LPatch2:
- movl st_spanstate(%edi),%edx
- movl st_insubmodel(%edi),%eax
- testl %eax,%eax
- jnz Lbmodel_leading
-
-// handle a leading non-bmodel edge
-
-// don't start a span if this is an inverted span, with the end edge preceding
-// the start edge (that is, we've already seen the end edge)
- testl %edx,%edx
- jnz Lxl_done
-
-
-// if (surf->key < surf2->key)
-// goto newtop;
- incl %edx
- movl st_key(%edi),%eax
- movl %edx,st_spanstate(%edi)
- movl st_key(%esi),%ecx
- cmpl %ecx,%eax
- jl Lnewtop
-
-// main sorting loop to search through surface stack until insertion point
-// found. Always terminates because background surface is sentinel
-// do
-// {
-// surf2 = surf2->next;
-// } while (surf->key >= surf2->key);
-Lsortloopnb:
- movl st_next(%esi),%esi
- movl st_key(%esi),%ecx
- cmpl %ecx,%eax
- jge Lsortloopnb
-
- jmp LInsertAndExit
-
-
-// handle a leading bmodel edge
- .align 4
-Lbmodel_leading:
-
-// don't start a span if this is an inverted span, with the end edge preceding
-// the start edge (that is, we've already seen the end edge)
- testl %edx,%edx
- jnz Lxl_done
-
- movl C(r_bmodelactive),%ecx
- incl %edx
- incl %ecx
- movl %edx,st_spanstate(%edi)
- movl %ecx,C(r_bmodelactive)
-
-// if (surf->key < surf2->key)
-// goto newtop;
- movl st_key(%edi),%eax
- movl st_key(%esi),%ecx
- cmpl %ecx,%eax
- jl Lnewtop
-
-// if ((surf->key == surf2->key) && surf->insubmodel)
-// {
- jz Lzcheck_for_newtop
-
-// main sorting loop to search through surface stack until insertion point
-// found. Always terminates because background surface is sentinel
-// do
-// {
-// surf2 = surf2->next;
-// } while (surf->key > surf2->key);
-Lsortloop:
- movl st_next(%esi),%esi
- movl st_key(%esi),%ecx
- cmpl %ecx,%eax
- jg Lsortloop
-
- jne LInsertAndExit
-
-// Do 1/z sorting to see if we've arrived in the right position
- movl et_u(%ebx),%eax
- subl $0xFFFFF,%eax
- movl %eax,Ltemp
- fildl Ltemp
-
- fmuls float_1_div_0100000h // fu = (float)(edge->u - 0xFFFFF) *
- // (1.0 / 0x100000);
-
- fld %st(0) // fu | fu
- fmuls st_d_zistepu(%edi) // fu*surf->d_zistepu | fu
- flds C(fv) // fv | fu*surf->d_zistepu | fu
- fmuls st_d_zistepv(%edi) // fv*surf->d_zistepv | fu*surf->d_zistepu | fu
- fxch %st(1) // fu*surf->d_zistepu | fv*surf->d_zistepv | fu
- fadds st_d_ziorigin(%edi) // fu*surf->d_zistepu + surf->d_ziorigin |
- // fv*surf->d_zistepv | fu
-
- flds st_d_zistepu(%esi) // surf2->d_zistepu |
- // fu*surf->d_zistepu + surf->d_ziorigin |
- // fv*surf->d_zistepv | fu
- fmul %st(3),%st(0) // fu*surf2->d_zistepu |
- // fu*surf->d_zistepu + surf->d_ziorigin |
- // fv*surf->d_zistepv | fu
- fxch %st(1) // fu*surf->d_zistepu + surf->d_ziorigin |
- // fu*surf2->d_zistepu |
- // fv*surf->d_zistepv | fu
- faddp %st(0),%st(2) // fu*surf2->d_zistepu | newzi | fu
-
- flds C(fv) // fv | fu*surf2->d_zistepu | newzi | fu
- fmuls st_d_zistepv(%esi) // fv*surf2->d_zistepv |
- // fu*surf2->d_zistepu | newzi | fu
- fld %st(2) // newzi | fv*surf2->d_zistepv |
- // fu*surf2->d_zistepu | newzi | fu
- fmuls float_point_999 // newzibottom | fv*surf2->d_zistepv |
- // fu*surf2->d_zistepu | newzi | fu
-
- fxch %st(2) // fu*surf2->d_zistepu | fv*surf2->d_zistepv |
- // newzibottom | newzi | fu
- fadds st_d_ziorigin(%esi) // fu*surf2->d_zistepu + surf2->d_ziorigin |
- // fv*surf2->d_zistepv | newzibottom | newzi |
- // fu
- faddp %st(0),%st(1) // testzi | newzibottom | newzi | fu
- fxch %st(1) // newzibottom | testzi | newzi | fu
-
-// if (newzibottom >= testzi)
-// goto Lgotposition;
-
- fcomp %st(1) // testzi | newzi | fu
-
- fxch %st(1) // newzi | testzi | fu
- fmuls float_1_point_001 // newzitop | testzi | fu
- fxch %st(1) // testzi | newzitop | fu
-
- fnstsw %ax
- testb $0x01,%ah
- jz Lgotposition_fpop3
-
-// if (newzitop >= testzi)
-// {
-
- fcomp %st(1) // newzitop | fu
- fnstsw %ax
- testb $0x45,%ah
- jz Lsortloop_fpop2
-
-// if (surf->d_zistepu >= surf2->d_zistepu)
-// goto newtop;
-
- flds st_d_zistepu(%edi) // surf->d_zistepu | newzitop| fu
- fcomps st_d_zistepu(%esi) // newzitop | fu
- fnstsw %ax
- testb $0x01,%ah
- jz Lgotposition_fpop2
-
- fstp %st(0) // clear the FPstack
- fstp %st(0)
- movl st_key(%edi),%eax
- jmp Lsortloop
-
-
-Lgotposition_fpop3:
- fstp %st(0)
-Lgotposition_fpop2:
- fstp %st(0)
- fstp %st(0)
- jmp LInsertAndExit
-
-
-// emit a span (obscures current top)
-
-Lnewtop_fpop3:
- fstp %st(0)
-Lnewtop_fpop2:
- fstp %st(0)
- fstp %st(0)
- movl st_key(%edi),%eax // reload the sorting key
-
-Lnewtop:
- movl et_u(%ebx),%eax
- movl st_last_u(%esi),%edx
- shrl $20,%eax // iu = integral pixel u
- movl %eax,st_last_u(%edi) // surf->last_u = iu;
- cmpl %edx,%eax
- jle LInsertAndExit // iu <= surf->last_u, so nothing to emit
-
- subl %edx,%eax
- movl %edx,espan_t_u(%ebp) // span->u = surf->last_u;
-
- movl %eax,espan_t_count(%ebp) // span->count = iu - span->u;
- movl C(current_iv),%eax
- movl %eax,espan_t_v(%ebp) // span->v = current_iv;
- movl st_spans(%esi),%eax
- movl %eax,espan_t_pnext(%ebp) // span->pnext = surf->spans;
- movl %ebp,st_spans(%esi) // surf->spans = span;
- addl $(espan_t_size),%ebp
-
-LInsertAndExit:
-// insert before surf2
- movl %esi,st_next(%edi) // surf->next = surf2;
- movl st_prev(%esi),%eax
- movl %eax,st_prev(%edi) // surf->prev = surf2->prev;
- movl %edi,st_prev(%esi) // surf2->prev = surf;
- movl %edi,st_next(%eax) // surf2->prev->next = surf;
-
-// ---------------------------------------------------------------
-// leading edge done
-// ---------------------------------------------------------------
-
-// ---------------------------------------------------------------
-// see if there are any more edges
-// ---------------------------------------------------------------
-
-Lgs_nextedge:
- movl et_next(%ebx),%ebx
- cmpl $(C(edge_tail)),%ebx
- jnz Lgs_edgeloop
-
-// clean up at the right edge
-Lgs_lastspan:
-
-// now that we've reached the right edge of the screen, we're done with any
-// unfinished surfaces, so emit a span for whatever's on top
- movl 0x12345678,%esi // surfaces[1].st_next
-LPatch3:
- movl C(edge_tail_u_shift20),%eax
- xorl %ecx,%ecx
- movl st_last_u(%esi),%edx
- subl %edx,%eax
- jle Lgs_resetspanstate
-
- movl %edx,espan_t_u(%ebp)
- movl %eax,espan_t_count(%ebp)
- movl C(current_iv),%eax
- movl %eax,espan_t_v(%ebp)
- movl st_spans(%esi),%eax
- movl %eax,espan_t_pnext(%ebp)
- movl %ebp,st_spans(%esi)
- addl $(espan_t_size),%ebp
-
-// reset spanstate for all surfaces in the surface stack
-Lgs_resetspanstate:
- movl %ecx,st_spanstate(%esi)
- movl st_next(%esi),%esi
- cmpl $0x12345678,%esi // &surfaces[1]
-LPatch4:
- jnz Lgs_resetspanstate
-
-// store the final span_p
- movl %ebp,C(span_p)
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-
-// ---------------------------------------------------------------
-// 1/z sorting for bmodels in the same leaf
-// ---------------------------------------------------------------
- .align 4
-Lxl_done:
- incl %edx
- movl %edx,st_spanstate(%edi)
-
- jmp Lgs_nextedge
-
-
- .align 4
-Lzcheck_for_newtop:
- movl et_u(%ebx),%eax
- subl $0xFFFFF,%eax
- movl %eax,Ltemp
- fildl Ltemp
-
- fmuls float_1_div_0100000h // fu = (float)(edge->u - 0xFFFFF) *
- // (1.0 / 0x100000);
-
- fld %st(0) // fu | fu
- fmuls st_d_zistepu(%edi) // fu*surf->d_zistepu | fu
- flds C(fv) // fv | fu*surf->d_zistepu | fu
- fmuls st_d_zistepv(%edi) // fv*surf->d_zistepv | fu*surf->d_zistepu | fu
- fxch %st(1) // fu*surf->d_zistepu | fv*surf->d_zistepv | fu
- fadds st_d_ziorigin(%edi) // fu*surf->d_zistepu + surf->d_ziorigin |
- // fv*surf->d_zistepv | fu
-
- flds st_d_zistepu(%esi) // surf2->d_zistepu |
- // fu*surf->d_zistepu + surf->d_ziorigin |
- // fv*surf->d_zistepv | fu
- fmul %st(3),%st(0) // fu*surf2->d_zistepu |
- // fu*surf->d_zistepu + surf->d_ziorigin |
- // fv*surf->d_zistepv | fu
- fxch %st(1) // fu*surf->d_zistepu + surf->d_ziorigin |
- // fu*surf2->d_zistepu |
- // fv*surf->d_zistepv | fu
- faddp %st(0),%st(2) // fu*surf2->d_zistepu | newzi | fu
-
- flds C(fv) // fv | fu*surf2->d_zistepu | newzi | fu
- fmuls st_d_zistepv(%esi) // fv*surf2->d_zistepv |
- // fu*surf2->d_zistepu | newzi | fu
- fld %st(2) // newzi | fv*surf2->d_zistepv |
- // fu*surf2->d_zistepu | newzi | fu
- fmuls float_point_999 // newzibottom | fv*surf2->d_zistepv |
- // fu*surf2->d_zistepu | newzi | fu
-
- fxch %st(2) // fu*surf2->d_zistepu | fv*surf2->d_zistepv |
- // newzibottom | newzi | fu
- fadds st_d_ziorigin(%esi) // fu*surf2->d_zistepu + surf2->d_ziorigin |
- // fv*surf2->d_zistepv | newzibottom | newzi |
- // fu
- faddp %st(0),%st(1) // testzi | newzibottom | newzi | fu
- fxch %st(1) // newzibottom | testzi | newzi | fu
-
-// if (newzibottom >= testzi)
-// goto newtop;
-
- fcomp %st(1) // testzi | newzi | fu
-
- fxch %st(1) // newzi | testzi | fu
- fmuls float_1_point_001 // newzitop | testzi | fu
- fxch %st(1) // testzi | newzitop | fu
-
- fnstsw %ax
- testb $0x01,%ah
- jz Lnewtop_fpop3
-
-// if (newzitop >= testzi)
-// {
-
- fcomp %st(1) // newzitop | fu
- fnstsw %ax
- testb $0x45,%ah
- jz Lsortloop_fpop2
-
-// if (surf->d_zistepu >= surf2->d_zistepu)
-// goto newtop;
-
- flds st_d_zistepu(%edi) // surf->d_zistepu | newzitop | fu
- fcomps st_d_zistepu(%esi) // newzitop | fu
- fnstsw %ax
- testb $0x01,%ah
- jz Lnewtop_fpop2
-
-Lsortloop_fpop2:
- fstp %st(0) // clear the FP stack
- fstp %st(0)
- movl st_key(%edi),%eax
- jmp Lsortloop
-
-
-.globl C(R_EdgeCodeEnd)
-C(R_EdgeCodeEnd):
-
-
-//----------------------------------------------------------------------
-// Surface array address code patching routine
-//----------------------------------------------------------------------
-
- .align 4
-.globl C(R_SurfacePatch)
-C(R_SurfacePatch):
-
- movl C(surfaces),%eax
- addl $(st_size),%eax
- movl %eax,LPatch4-4
-
- addl $(st_next),%eax
- movl %eax,LPatch0-4
- movl %eax,LPatch2-4
- movl %eax,LPatch3-4
-
- ret
-
-#endif // id386
-
--- a/linux/r_scana.s
+++ /dev/null
@@ -1,68 +1,0 @@
-//
-// d_scana.s
-// x86 assembly-language turbulent texture mapping code
-//
-
-#include "qasm.h"
-#include "d_ifacea.h"
-
-#if id386
-
- .data
-
- .text
-
-//----------------------------------------------------------------------
-// turbulent texture mapping code
-//----------------------------------------------------------------------
-
- .align 4
-.globl C(D_DrawTurbulent8Span)
-C(D_DrawTurbulent8Span):
- pushl %ebp // preserve caller's stack frame pointer
- pushl %esi // preserve register variables
- pushl %edi
- pushl %ebx
-
- movl C(r_turb_s),%esi
- movl C(r_turb_t),%ecx
- movl C(r_turb_pdest),%edi
- movl C(r_turb_spancount),%ebx
-
-Llp:
- movl %ecx,%eax
- movl %esi,%edx
- sarl $16,%eax
- movl C(r_turb_turb),%ebp
- sarl $16,%edx
- andl $(CYCLE-1),%eax
- andl $(CYCLE-1),%edx
- movl (%ebp,%eax,4),%eax
- movl (%ebp,%edx,4),%edx
- addl %esi,%eax
- sarl $16,%eax
- addl %ecx,%edx
- sarl $16,%edx
- andl $(TURB_TEX_SIZE-1),%eax
- andl $(TURB_TEX_SIZE-1),%edx
- shll $6,%edx
- movl C(r_turb_pbase),%ebp
- addl %eax,%edx
- incl %edi
- addl C(r_turb_sstep),%esi
- addl C(r_turb_tstep),%ecx
- movb (%ebp,%edx,1),%dl
- decl %ebx
- movb %dl,-1(%edi)
- jnz Llp
-
- movl %edi,C(r_turb_pdest)
-
- popl %ebx // restore register variables
- popl %edi
- popl %esi
- popl %ebp // restore caller's stack frame pointer
- ret
-
-#endif // id386
-
--- a/linux/r_spr8.s
+++ /dev/null
@@ -1,879 +1,0 @@
-//
-// d_spr8.s
-// x86 assembly-language horizontal 8-bpp transparent span-drawing code.
-//
-
-#include "qasm.h"
-
-#if id386
-
-//----------------------------------------------------------------------
-// 8-bpp horizontal span drawing code for polygons, with transparency.
-//----------------------------------------------------------------------
-
- .text
-
-// out-of-line, rarely-needed clamping code
-
-LClampHigh0:
- movl C(bbextents),%esi
- jmp LClampReentry0
-LClampHighOrLow0:
- jg LClampHigh0
- xorl %esi,%esi
- jmp LClampReentry0
-
-LClampHigh1:
- movl C(bbextentt),%edx
- jmp LClampReentry1
-LClampHighOrLow1:
- jg LClampHigh1
- xorl %edx,%edx
- jmp LClampReentry1
-
-LClampLow2:
- movl $2048,%ebp
- jmp LClampReentry2
-LClampHigh2:
- movl C(bbextents),%ebp
- jmp LClampReentry2
-
-LClampLow3:
- movl $2048,%ecx
- jmp LClampReentry3
-LClampHigh3:
- movl C(bbextentt),%ecx
- jmp LClampReentry3
-
-LClampLow4:
- movl $2048,%eax
- jmp LClampReentry4
-LClampHigh4:
- movl C(bbextents),%eax
- jmp LClampReentry4
-
-LClampLow5:
- movl $2048,%ebx
- jmp LClampReentry5
-LClampHigh5:
- movl C(bbextentt),%ebx
- jmp LClampReentry5
-
-
-#define pspans 4+16
-
- .align 4
-.globl C(D_SpriteDrawSpans)
-C(D_SpriteDrawSpans):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-//
-// set up scaled-by-8 steps, for 8-long segments; also set up cacheblock
-// and span list pointers, and 1/z step in 0.32 fixed-point
-//
-// FIXME: any overlap from rearranging?
- flds C(d_sdivzstepu)
- fmuls fp_8
- movl C(cacheblock),%edx
- flds C(d_tdivzstepu)
- fmuls fp_8
- movl pspans(%esp),%ebx // point to the first span descriptor
- flds C(d_zistepu)
- fmuls fp_8
- movl %edx,pbase // pbase = cacheblock
- flds C(d_zistepu)
- fmuls fp_64kx64k
- fxch %st(3)
- fstps sdivz8stepu
- fstps zi8stepu
- fstps tdivz8stepu
- fistpl izistep
- movl izistep,%eax
- rorl $16,%eax // put upper 16 bits in low word
- movl sspan_t_count(%ebx),%ecx
- movl %eax,izistep
-
- cmpl $0,%ecx
- jle LNextSpan
-
-LSpanLoop:
-
-//
-// set up the initial s/z, t/z, and 1/z on the FP stack, and generate the
-// initial s and t values
-//
-// FIXME: pipeline FILD?
- fildl sspan_t_v(%ebx)
- fildl sspan_t_u(%ebx)
-
- fld %st(1) // dv | du | dv
- fmuls C(d_sdivzstepv) // dv*d_sdivzstepv | du | dv
- fld %st(1) // du | dv*d_sdivzstepv | du | dv
- fmuls C(d_sdivzstepu) // du*d_sdivzstepu | dv*d_sdivzstepv | du | dv
- fld %st(2) // du | du*d_sdivzstepu | dv*d_sdivzstepv | du | dv
- fmuls C(d_tdivzstepu) // du*d_tdivzstepu | du*d_sdivzstepu |
- // dv*d_sdivzstepv | du | dv
- fxch %st(1) // du*d_sdivzstepu | du*d_tdivzstepu |
- // dv*d_sdivzstepv | du | dv
- faddp %st(0),%st(2) // du*d_tdivzstepu |
- // du*d_sdivzstepu + dv*d_sdivzstepv | du | dv
- fxch %st(1) // du*d_sdivzstepu + dv*d_sdivzstepv |
- // du*d_tdivzstepu | du | dv
- fld %st(3) // dv | du*d_sdivzstepu + dv*d_sdivzstepv |
- // du*d_tdivzstepu | du | dv
- fmuls C(d_tdivzstepv) // dv*d_tdivzstepv |
- // du*d_sdivzstepu + dv*d_sdivzstepv |
- // du*d_tdivzstepu | du | dv
- fxch %st(1) // du*d_sdivzstepu + dv*d_sdivzstepv |
- // dv*d_tdivzstepv | du*d_tdivzstepu | du | dv
- fadds C(d_sdivzorigin) // sdivz = d_sdivzorigin + dv*d_sdivzstepv +
- // du*d_sdivzstepu; stays in %st(2) at end
- fxch %st(4) // dv | dv*d_tdivzstepv | du*d_tdivzstepu | du |
- // s/z
- fmuls C(d_zistepv) // dv*d_zistepv | dv*d_tdivzstepv |
- // du*d_tdivzstepu | du | s/z
- fxch %st(1) // dv*d_tdivzstepv | dv*d_zistepv |
- // du*d_tdivzstepu | du | s/z
- faddp %st(0),%st(2) // dv*d_zistepv |
- // dv*d_tdivzstepv + du*d_tdivzstepu | du | s/z
- fxch %st(2) // du | dv*d_tdivzstepv + du*d_tdivzstepu |
- // dv*d_zistepv | s/z
- fmuls C(d_zistepu) // du*d_zistepu |
- // dv*d_tdivzstepv + du*d_tdivzstepu |
- // dv*d_zistepv | s/z
- fxch %st(1) // dv*d_tdivzstepv + du*d_tdivzstepu |
- // du*d_zistepu | dv*d_zistepv | s/z
- fadds C(d_tdivzorigin) // tdivz = d_tdivzorigin + dv*d_tdivzstepv +
- // du*d_tdivzstepu; stays in %st(1) at end
- fxch %st(2) // dv*d_zistepv | du*d_zistepu | t/z | s/z
- faddp %st(0),%st(1) // dv*d_zistepv + du*d_zistepu | t/z | s/z
-
- flds fp_64k // fp_64k | dv*d_zistepv + du*d_zistepu | t/z | s/z
- fxch %st(1) // dv*d_zistepv + du*d_zistepu | fp_64k | t/z | s/z
- fadds C(d_ziorigin) // zi = d_ziorigin + dv*d_zistepv +
- // du*d_zistepu; stays in %st(0) at end
- // 1/z | fp_64k | t/z | s/z
-
- fld %st(0) // FIXME: get rid of stall on FMUL?
- fmuls fp_64kx64k
- fxch %st(1)
-
-//
-// calculate and clamp s & t
-//
- fdivr %st(0),%st(2) // 1/z | z*64k | t/z | s/z
- fxch %st(1)
-
- fistpl izi // 0.32 fixed-point 1/z
- movl izi,%ebp
-
-//
-// set pz to point to the first z-buffer pixel in the span
-//
- rorl $16,%ebp // put upper 16 bits in low word
- movl sspan_t_v(%ebx),%eax
- movl %ebp,izi
- movl sspan_t_u(%ebx),%ebp
- imull C(d_zrowbytes)
- shll $1,%ebp // a word per pixel
- addl C(d_pzbuffer),%eax
- addl %ebp,%eax
- movl %eax,pz
-
-//
-// point %edi to the first pixel in the span
-//
- movl C(d_viewbuffer),%ebp
- movl sspan_t_v(%ebx),%eax
- pushl %ebx // preserve spans pointer
- movl C(tadjust),%edx
- movl C(sadjust),%esi
- movl C(d_scantable)(,%eax,4),%edi // v * screenwidth
- addl %ebp,%edi
- movl sspan_t_u(%ebx),%ebp
- addl %ebp,%edi // pdest = &pdestspan[scans->u];
-
-//
-// now start the FDIV for the end of the span
-//
- cmpl $8,%ecx
- ja LSetupNotLast1
-
- decl %ecx
- jz LCleanup1 // if only one pixel, no need to start an FDIV
- movl %ecx,spancountminus1
-
-// finish up the s and t calcs
- fxch %st(1) // z*64k | 1/z | t/z | s/z
-
- fld %st(0) // z*64k | z*64k | 1/z | t/z | s/z
- fmul %st(4),%st(0) // s | z*64k | 1/z | t/z | s/z
- fxch %st(1) // z*64k | s | 1/z | t/z | s/z
- fmul %st(3),%st(0) // t | s | 1/z | t/z | s/z
- fxch %st(1) // s | t | 1/z | t/z | s/z
- fistpl s // 1/z | t | t/z | s/z
- fistpl t // 1/z | t/z | s/z
-
- fildl spancountminus1
-
- flds C(d_tdivzstepu) // _d_tdivzstepu | spancountminus1
- flds C(d_zistepu) // _d_zistepu | _d_tdivzstepu | spancountminus1
- fmul %st(2),%st(0) // _d_zistepu*scm1 | _d_tdivzstepu | scm1
- fxch %st(1) // _d_tdivzstepu | _d_zistepu*scm1 | scm1
- fmul %st(2),%st(0) // _d_tdivzstepu*scm1 | _d_zistepu*scm1 | scm1
- fxch %st(2) // scm1 | _d_zistepu*scm1 | _d_tdivzstepu*scm1
- fmuls C(d_sdivzstepu) // _d_sdivzstepu*scm1 | _d_zistepu*scm1 |
- // _d_tdivzstepu*scm1
- fxch %st(1) // _d_zistepu*scm1 | _d_sdivzstepu*scm1 |
- // _d_tdivzstepu*scm1
- faddp %st(0),%st(3) // _d_sdivzstepu*scm1 | _d_tdivzstepu*scm1
- fxch %st(1) // _d_tdivzstepu*scm1 | _d_sdivzstepu*scm1
- faddp %st(0),%st(3) // _d_sdivzstepu*scm1
- faddp %st(0),%st(3)
-
- flds fp_64k
- fdiv %st(1),%st(0) // this is what we've gone to all this trouble to
- // overlap
- jmp LFDIVInFlight1
-
-LCleanup1:
-// finish up the s and t calcs
- fxch %st(1) // z*64k | 1/z | t/z | s/z
-
- fld %st(0) // z*64k | z*64k | 1/z | t/z | s/z
- fmul %st(4),%st(0) // s | z*64k | 1/z | t/z | s/z
- fxch %st(1) // z*64k | s | 1/z | t/z | s/z
- fmul %st(3),%st(0) // t | s | 1/z | t/z | s/z
- fxch %st(1) // s | t | 1/z | t/z | s/z
- fistpl s // 1/z | t | t/z | s/z
- fistpl t // 1/z | t/z | s/z
- jmp LFDIVInFlight1
-
- .align 4
-LSetupNotLast1:
-// finish up the s and t calcs
- fxch %st(1) // z*64k | 1/z | t/z | s/z
-
- fld %st(0) // z*64k | z*64k | 1/z | t/z | s/z
- fmul %st(4),%st(0) // s | z*64k | 1/z | t/z | s/z
- fxch %st(1) // z*64k | s | 1/z | t/z | s/z
- fmul %st(3),%st(0) // t | s | 1/z | t/z | s/z
- fxch %st(1) // s | t | 1/z | t/z | s/z
- fistpl s // 1/z | t | t/z | s/z
- fistpl t // 1/z | t/z | s/z
-
- fadds zi8stepu
- fxch %st(2)
- fadds sdivz8stepu
- fxch %st(2)
- flds tdivz8stepu
- faddp %st(0),%st(2)
- flds fp_64k
- fdiv %st(1),%st(0) // z = 1/1/z
- // this is what we've gone to all this trouble to
- // overlap
-LFDIVInFlight1:
-
- addl s,%esi
- addl t,%edx
- movl C(bbextents),%ebx
- movl C(bbextentt),%ebp
- cmpl %ebx,%esi
- ja LClampHighOrLow0
-LClampReentry0:
- movl %esi,s
- movl pbase,%ebx
- shll $16,%esi
- cmpl %ebp,%edx
- movl %esi,sfracf
- ja LClampHighOrLow1
-LClampReentry1:
- movl %edx,t
- movl s,%esi // sfrac = scans->sfrac;
- shll $16,%edx
- movl t,%eax // tfrac = scans->tfrac;
- sarl $16,%esi
- movl %edx,tfracf
-
-//
-// calculate the texture starting address
-//
- sarl $16,%eax
- addl %ebx,%esi
- imull C(cachewidth),%eax // (tfrac >> 16) * cachewidth
- addl %eax,%esi // psource = pbase + (sfrac >> 16) +
- // ((tfrac >> 16) * cachewidth);
-
-//
-// determine whether last span or not
-//
- cmpl $8,%ecx
- jna LLastSegment
-
-//
-// not the last segment; do full 8-wide segment
-//
-LNotLastSegment:
-
-//
-// advance s/z, t/z, and 1/z, and calculate s & t at end of span and steps to
-// get there
-//
-
-// pick up after the FDIV that was left in flight previously
-
- fld %st(0) // duplicate it
- fmul %st(4),%st(0) // s = s/z * z
- fxch %st(1)
- fmul %st(3),%st(0) // t = t/z * z
- fxch %st(1)
- fistpl snext
- fistpl tnext
- movl snext,%eax
- movl tnext,%edx
-
- subl $8,%ecx // count off this segments' pixels
- movl C(sadjust),%ebp
- pushl %ecx // remember count of remaining pixels
- movl C(tadjust),%ecx
-
- addl %eax,%ebp
- addl %edx,%ecx
-
- movl C(bbextents),%eax
- movl C(bbextentt),%edx
-
- cmpl $2048,%ebp
- jl LClampLow2
- cmpl %eax,%ebp
- ja LClampHigh2
-LClampReentry2:
-
- cmpl $2048,%ecx
- jl LClampLow3
- cmpl %edx,%ecx
- ja LClampHigh3
-LClampReentry3:
-
- movl %ebp,snext
- movl %ecx,tnext
-
- subl s,%ebp
- subl t,%ecx
-
-//
-// set up advancetable
-//
- movl %ecx,%eax
- movl %ebp,%edx
- sarl $19,%edx // sstep >>= 16;
- movl C(cachewidth),%ebx
- sarl $19,%eax // tstep >>= 16;
- jz LIsZero
- imull %ebx,%eax // (tstep >> 16) * cachewidth;
-LIsZero:
- addl %edx,%eax // add in sstep
- // (tstep >> 16) * cachewidth + (sstep >> 16);
- movl tfracf,%edx
- movl %eax,advancetable+4 // advance base in t
- addl %ebx,%eax // ((tstep >> 16) + 1) * cachewidth +
- // (sstep >> 16);
- shll $13,%ebp // left-justify sstep fractional part
- movl %ebp,sstep
- movl sfracf,%ebx
- shll $13,%ecx // left-justify tstep fractional part
- movl %eax,advancetable // advance extra in t
- movl %ecx,tstep
-
- movl pz,%ecx
- movl izi,%ebp
-
- cmpw (%ecx),%bp
- jl Lp1
- movb (%esi),%al // get first source texel
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp1
- movw %bp,(%ecx)
- movb %al,(%edi) // store first dest pixel
-Lp1:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx // advance tfrac fractional part by tstep frac
-
- sbbl %eax,%eax // turn tstep carry into -1 (0 if none)
- addl sstep,%ebx // advance sfrac fractional part by sstep frac
- adcl advancetable+4(,%eax,4),%esi // point to next source texel
-
- cmpw 2(%ecx),%bp
- jl Lp2
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp2
- movw %bp,2(%ecx)
- movb %al,1(%edi)
-Lp2:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- cmpw 4(%ecx),%bp
- jl Lp3
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp3
- movw %bp,4(%ecx)
- movb %al,2(%edi)
-Lp3:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- cmpw 6(%ecx),%bp
- jl Lp4
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp4
- movw %bp,6(%ecx)
- movb %al,3(%edi)
-Lp4:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- cmpw 8(%ecx),%bp
- jl Lp5
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp5
- movw %bp,8(%ecx)
- movb %al,4(%edi)
-Lp5:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-//
-// start FDIV for end of next segment in flight, so it can overlap
-//
- popl %eax
- cmpl $8,%eax // more than one segment after this?
- ja LSetupNotLast2 // yes
-
- decl %eax
- jz LFDIVInFlight2 // if only one pixel, no need to start an FDIV
- movl %eax,spancountminus1
- fildl spancountminus1
-
- flds C(d_zistepu) // _d_zistepu | spancountminus1
- fmul %st(1),%st(0) // _d_zistepu*scm1 | scm1
- flds C(d_tdivzstepu) // _d_tdivzstepu | _d_zistepu*scm1 | scm1
- fmul %st(2),%st(0) // _d_tdivzstepu*scm1 | _d_zistepu*scm1 | scm1
- fxch %st(1) // _d_zistepu*scm1 | _d_tdivzstepu*scm1 | scm1
- faddp %st(0),%st(3) // _d_tdivzstepu*scm1 | scm1
- fxch %st(1) // scm1 | _d_tdivzstepu*scm1
- fmuls C(d_sdivzstepu) // _d_sdivzstepu*scm1 | _d_tdivzstepu*scm1
- fxch %st(1) // _d_tdivzstepu*scm1 | _d_sdivzstepu*scm1
- faddp %st(0),%st(3) // _d_sdivzstepu*scm1
- flds fp_64k // 64k | _d_sdivzstepu*scm1
- fxch %st(1) // _d_sdivzstepu*scm1 | 64k
- faddp %st(0),%st(4) // 64k
-
- fdiv %st(1),%st(0) // this is what we've gone to all this trouble to
- // overlap
- jmp LFDIVInFlight2
-
- .align 4
-LSetupNotLast2:
- fadds zi8stepu
- fxch %st(2)
- fadds sdivz8stepu
- fxch %st(2)
- flds tdivz8stepu
- faddp %st(0),%st(2)
- flds fp_64k
- fdiv %st(1),%st(0) // z = 1/1/z
- // this is what we've gone to all this trouble to
- // overlap
-LFDIVInFlight2:
- pushl %eax
-
- cmpw 10(%ecx),%bp
- jl Lp6
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp6
- movw %bp,10(%ecx)
- movb %al,5(%edi)
-Lp6:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- cmpw 12(%ecx),%bp
- jl Lp7
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp7
- movw %bp,12(%ecx)
- movb %al,6(%edi)
-Lp7:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- cmpw 14(%ecx),%bp
- jl Lp8
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp8
- movw %bp,14(%ecx)
- movb %al,7(%edi)
-Lp8:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
- addl $8,%edi
- addl $16,%ecx
- movl %edx,tfracf
- movl snext,%edx
- movl %ebx,sfracf
- movl tnext,%ebx
- movl %edx,s
- movl %ebx,t
-
- movl %ecx,pz
- movl %ebp,izi
-
- popl %ecx // retrieve count
-
-//
-// determine whether last span or not
-//
- cmpl $8,%ecx // are there multiple segments remaining?
- ja LNotLastSegment // yes
-
-//
-// last segment of scan
-//
-LLastSegment:
-
-//
-// advance s/z, t/z, and 1/z, and calculate s & t at end of span and steps to
-// get there. The number of pixels left is variable, and we want to land on the
-// last pixel, not step one past it, so we can't run into arithmetic problems
-//
- testl %ecx,%ecx
- jz LNoSteps // just draw the last pixel and we're done
-
-// pick up after the FDIV that was left in flight previously
-
-
- fld %st(0) // duplicate it
- fmul %st(4),%st(0) // s = s/z * z
- fxch %st(1)
- fmul %st(3),%st(0) // t = t/z * z
- fxch %st(1)
- fistpl snext
- fistpl tnext
-
- movl C(tadjust),%ebx
- movl C(sadjust),%eax
-
- addl snext,%eax
- addl tnext,%ebx
-
- movl C(bbextents),%ebp
- movl C(bbextentt),%edx
-
- cmpl $2048,%eax
- jl LClampLow4
- cmpl %ebp,%eax
- ja LClampHigh4
-LClampReentry4:
- movl %eax,snext
-
- cmpl $2048,%ebx
- jl LClampLow5
- cmpl %edx,%ebx
- ja LClampHigh5
-LClampReentry5:
-
- cmpl $1,%ecx // don't bother
- je LOnlyOneStep // if two pixels in segment, there's only one step,
- // of the segment length
- subl s,%eax
- subl t,%ebx
-
- addl %eax,%eax // convert to 15.17 format so multiply by 1.31
- addl %ebx,%ebx // reciprocal yields 16.48
- imull reciprocal_table-8(,%ecx,4) // sstep = (snext - s) / (spancount-1)
- movl %edx,%ebp
-
- movl %ebx,%eax
- imull reciprocal_table-8(,%ecx,4) // tstep = (tnext - t) / (spancount-1)
-
-LSetEntryvec:
-//
-// set up advancetable
-//
- movl spr8entryvec_table(,%ecx,4),%ebx
- movl %edx,%eax
- pushl %ebx // entry point into code for RET later
- movl %ebp,%ecx
- sarl $16,%ecx // sstep >>= 16;
- movl C(cachewidth),%ebx
- sarl $16,%edx // tstep >>= 16;
- jz LIsZeroLast
- imull %ebx,%edx // (tstep >> 16) * cachewidth;
-LIsZeroLast:
- addl %ecx,%edx // add in sstep
- // (tstep >> 16) * cachewidth + (sstep >> 16);
- movl tfracf,%ecx
- movl %edx,advancetable+4 // advance base in t
- addl %ebx,%edx // ((tstep >> 16) + 1) * cachewidth +
- // (sstep >> 16);
- shll $16,%ebp // left-justify sstep fractional part
- movl sfracf,%ebx
- shll $16,%eax // left-justify tstep fractional part
- movl %edx,advancetable // advance extra in t
-
- movl %eax,tstep
- movl %ebp,sstep
- movl %ecx,%edx
-
- movl pz,%ecx
- movl izi,%ebp
-
- ret // jump to the number-of-pixels handler
-
-//----------------------------------------
-
-LNoSteps:
- movl pz,%ecx
- subl $7,%edi // adjust for hardwired offset
- subl $14,%ecx
- jmp LEndSpan
-
-
-LOnlyOneStep:
- subl s,%eax
- subl t,%ebx
- movl %eax,%ebp
- movl %ebx,%edx
- jmp LSetEntryvec
-
-//----------------------------------------
-
-.globl Spr8Entry2_8
-Spr8Entry2_8:
- subl $6,%edi // adjust for hardwired offsets
- subl $12,%ecx
- movb (%esi),%al
- jmp LLEntry2_8
-
-//----------------------------------------
-
-.globl Spr8Entry3_8
-Spr8Entry3_8:
- subl $5,%edi // adjust for hardwired offsets
- subl $10,%ecx
- jmp LLEntry3_8
-
-//----------------------------------------
-
-.globl Spr8Entry4_8
-Spr8Entry4_8:
- subl $4,%edi // adjust for hardwired offsets
- subl $8,%ecx
- jmp LLEntry4_8
-
-//----------------------------------------
-
-.globl Spr8Entry5_8
-Spr8Entry5_8:
- subl $3,%edi // adjust for hardwired offsets
- subl $6,%ecx
- jmp LLEntry5_8
-
-//----------------------------------------
-
-.globl Spr8Entry6_8
-Spr8Entry6_8:
- subl $2,%edi // adjust for hardwired offsets
- subl $4,%ecx
- jmp LLEntry6_8
-
-//----------------------------------------
-
-.globl Spr8Entry7_8
-Spr8Entry7_8:
- decl %edi // adjust for hardwired offsets
- subl $2,%ecx
- jmp LLEntry7_8
-
-//----------------------------------------
-
-.globl Spr8Entry8_8
-Spr8Entry8_8:
- cmpw (%ecx),%bp
- jl Lp9
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp9
- movw %bp,(%ecx)
- movb %al,(%edi)
-Lp9:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-LLEntry7_8:
- cmpw 2(%ecx),%bp
- jl Lp10
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp10
- movw %bp,2(%ecx)
- movb %al,1(%edi)
-Lp10:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-LLEntry6_8:
- cmpw 4(%ecx),%bp
- jl Lp11
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp11
- movw %bp,4(%ecx)
- movb %al,2(%edi)
-Lp11:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-LLEntry5_8:
- cmpw 6(%ecx),%bp
- jl Lp12
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp12
- movw %bp,6(%ecx)
- movb %al,3(%edi)
-Lp12:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-LLEntry4_8:
- cmpw 8(%ecx),%bp
- jl Lp13
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp13
- movw %bp,8(%ecx)
- movb %al,4(%edi)
-Lp13:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-LLEntry3_8:
- cmpw 10(%ecx),%bp
- jl Lp14
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp14
- movw %bp,10(%ecx)
- movb %al,5(%edi)
-Lp14:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-LLEntry2_8:
- cmpw 12(%ecx),%bp
- jl Lp15
- movb (%esi),%al
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp15
- movw %bp,12(%ecx)
- movb %al,6(%edi)
-Lp15:
- addl izistep,%ebp
- adcl $0,%ebp
- addl tstep,%edx
- sbbl %eax,%eax
- addl sstep,%ebx
- adcl advancetable+4(,%eax,4),%esi
-
-LEndSpan:
- cmpw 14(%ecx),%bp
- jl Lp16
- movb (%esi),%al // load first texel in segment
- cmpb $(TRANSPARENT_COLOR),%al
- jz Lp16
- movw %bp,14(%ecx)
- movb %al,7(%edi)
-Lp16:
-
-//
-// clear s/z, t/z, 1/z from FP stack
-//
- fstp %st(0)
- fstp %st(0)
- fstp %st(0)
-
- popl %ebx // restore spans pointer
-LNextSpan:
- addl $(sspan_t_size),%ebx // point to next span
- movl sspan_t_count(%ebx),%ecx
- cmpl $0,%ecx // any more spans?
- jg LSpanLoop // yes
- jz LNextSpan // yes, but this one's empty
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-#endif // id386
--- a/linux/r_surf8.s
+++ /dev/null
@@ -1,762 +1,0 @@
-//
-// surf8.s
-// x86 assembly-language 8 bpp surface block drawing code.
-//
-
-#include "qasm.h"
-
-#if id386
-
- .data
-
-sb_v: .long 0
-
- .text
-
- .align 4
-.globl C(R_Surf8Start)
-C(R_Surf8Start):
-
-//----------------------------------------------------------------------
-// Surface block drawer for mip level 0
-//----------------------------------------------------------------------
-
- .align 4
-.globl C(R_DrawSurfaceBlock8_mip0)
-C(R_DrawSurfaceBlock8_mip0):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-// for (v=0 ; v<numvblocks ; v++)
-// {
- movl C(r_lightptr),%ebx
- movl C(r_numvblocks),%eax
-
- movl %eax,sb_v
- movl C(prowdestbase),%edi
-
- movl C(pbasesource),%esi
-
-Lv_loop_mip0:
-
-// lightleft = lightptr[0];
-// lightright = lightptr[1];
-// lightdelta = (lightleft - lightright) & 0xFFFFF;
- movl (%ebx),%eax // lightleft
- movl 4(%ebx),%edx // lightright
-
- movl %eax,%ebp
- movl C(r_lightwidth),%ecx
-
- movl %edx,C(lightright)
- subl %edx,%ebp
-
- andl $0xFFFFF,%ebp
- leal (%ebx,%ecx,4),%ebx
-
-// lightptr += lightwidth;
- movl %ebx,C(r_lightptr)
-
-// lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
-// lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
-// lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
-// 0xF0000000;
- movl 4(%ebx),%ecx // lightptr[1]
- movl (%ebx),%ebx // lightptr[0]
-
- subl %eax,%ebx
- subl %edx,%ecx
-
- sarl $4,%ecx
- orl $0xF0000000,%ebp
-
- sarl $4,%ebx
- movl %ecx,C(lightrightstep)
-
- subl %ecx,%ebx
- andl $0xFFFFF,%ebx
-
- orl $0xF0000000,%ebx
- subl %ecx,%ecx // high word must be 0 in loop for addressing
-
- movl %ebx,C(lightdeltastep)
- subl %ebx,%ebx // high word must be 0 in loop for addressing
-
-Lblockloop8_mip0:
- movl %ebp,C(lightdelta)
- movb 14(%esi),%cl
-
- sarl $4,%ebp
- movb %dh,%bh
-
- movb 15(%esi),%bl
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch0:
- movb 13(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch1:
- movb 12(%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- addl %ebp,%edx
- movb 0x12345678(%ebx),%ah
-LBPatch2:
-
- movb 11(%esi),%bl
- movb 0x12345678(%ecx),%al
-LBPatch3:
-
- movb 10(%esi),%cl
- movl %eax,12(%edi)
-
- movb %dh,%bh
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch4:
- movb 9(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch5:
- movb 8(%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- addl %ebp,%edx
- movb 0x12345678(%ebx),%ah
-LBPatch6:
-
- movb 7(%esi),%bl
- movb 0x12345678(%ecx),%al
-LBPatch7:
-
- movb 6(%esi),%cl
- movl %eax,8(%edi)
-
- movb %dh,%bh
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch8:
- movb 5(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch9:
- movb 4(%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- addl %ebp,%edx
- movb 0x12345678(%ebx),%ah
-LBPatch10:
-
- movb 3(%esi),%bl
- movb 0x12345678(%ecx),%al
-LBPatch11:
-
- movb 2(%esi),%cl
- movl %eax,4(%edi)
-
- movb %dh,%bh
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch12:
- movb 1(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch13:
- movb (%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- movb 0x12345678(%ebx),%ah
-LBPatch14:
- movl C(lightright),%edx
-
- movb 0x12345678(%ecx),%al
-LBPatch15:
- movl C(lightdelta),%ebp
-
- movl %eax,(%edi)
-
- addl C(sourcetstep),%esi
- addl C(surfrowbytes),%edi
-
- addl C(lightrightstep),%edx
- addl C(lightdeltastep),%ebp
-
- movl %edx,C(lightright)
- jc Lblockloop8_mip0
-
-// if (pbasesource >= r_sourcemax)
-// pbasesource -= stepback;
-
- cmpl C(r_sourcemax),%esi
- jb LSkip_mip0
- subl C(r_stepback),%esi
-LSkip_mip0:
-
- movl C(r_lightptr),%ebx
- decl sb_v
-
- jnz Lv_loop_mip0
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-
-//----------------------------------------------------------------------
-// Surface block drawer for mip level 1
-//----------------------------------------------------------------------
-
- .align 4
-.globl C(R_DrawSurfaceBlock8_mip1)
-C(R_DrawSurfaceBlock8_mip1):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-// for (v=0 ; v<numvblocks ; v++)
-// {
- movl C(r_lightptr),%ebx
- movl C(r_numvblocks),%eax
-
- movl %eax,sb_v
- movl C(prowdestbase),%edi
-
- movl C(pbasesource),%esi
-
-Lv_loop_mip1:
-
-// lightleft = lightptr[0];
-// lightright = lightptr[1];
-// lightdelta = (lightleft - lightright) & 0xFFFFF;
- movl (%ebx),%eax // lightleft
- movl 4(%ebx),%edx // lightright
-
- movl %eax,%ebp
- movl C(r_lightwidth),%ecx
-
- movl %edx,C(lightright)
- subl %edx,%ebp
-
- andl $0xFFFFF,%ebp
- leal (%ebx,%ecx,4),%ebx
-
-// lightptr += lightwidth;
- movl %ebx,C(r_lightptr)
-
-// lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
-// lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
-// lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
-// 0xF0000000;
- movl 4(%ebx),%ecx // lightptr[1]
- movl (%ebx),%ebx // lightptr[0]
-
- subl %eax,%ebx
- subl %edx,%ecx
-
- sarl $3,%ecx
- orl $0x70000000,%ebp
-
- sarl $3,%ebx
- movl %ecx,C(lightrightstep)
-
- subl %ecx,%ebx
- andl $0xFFFFF,%ebx
-
- orl $0xF0000000,%ebx
- subl %ecx,%ecx // high word must be 0 in loop for addressing
-
- movl %ebx,C(lightdeltastep)
- subl %ebx,%ebx // high word must be 0 in loop for addressing
-
-Lblockloop8_mip1:
- movl %ebp,C(lightdelta)
- movb 6(%esi),%cl
-
- sarl $3,%ebp
- movb %dh,%bh
-
- movb 7(%esi),%bl
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch22:
- movb 5(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch23:
- movb 4(%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- addl %ebp,%edx
- movb 0x12345678(%ebx),%ah
-LBPatch24:
-
- movb 3(%esi),%bl
- movb 0x12345678(%ecx),%al
-LBPatch25:
-
- movb 2(%esi),%cl
- movl %eax,4(%edi)
-
- movb %dh,%bh
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch26:
- movb 1(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch27:
- movb (%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- movb 0x12345678(%ebx),%ah
-LBPatch28:
- movl C(lightright),%edx
-
- movb 0x12345678(%ecx),%al
-LBPatch29:
- movl C(lightdelta),%ebp
-
- movl %eax,(%edi)
- movl C(sourcetstep),%eax
-
- addl %eax,%esi
- movl C(surfrowbytes),%eax
-
- addl %eax,%edi
- movl C(lightrightstep),%eax
-
- addl %eax,%edx
- movl C(lightdeltastep),%eax
-
- addl %eax,%ebp
- movl %edx,C(lightright)
-
- jc Lblockloop8_mip1
-
-// if (pbasesource >= r_sourcemax)
-// pbasesource -= stepback;
-
- cmpl C(r_sourcemax),%esi
- jb LSkip_mip1
- subl C(r_stepback),%esi
-LSkip_mip1:
-
- movl C(r_lightptr),%ebx
- decl sb_v
-
- jnz Lv_loop_mip1
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-
-//----------------------------------------------------------------------
-// Surface block drawer for mip level 2
-//----------------------------------------------------------------------
-
- .align 4
-.globl C(R_DrawSurfaceBlock8_mip2)
-C(R_DrawSurfaceBlock8_mip2):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-// for (v=0 ; v<numvblocks ; v++)
-// {
- movl C(r_lightptr),%ebx
- movl C(r_numvblocks),%eax
-
- movl %eax,sb_v
- movl C(prowdestbase),%edi
-
- movl C(pbasesource),%esi
-
-Lv_loop_mip2:
-
-// lightleft = lightptr[0];
-// lightright = lightptr[1];
-// lightdelta = (lightleft - lightright) & 0xFFFFF;
- movl (%ebx),%eax // lightleft
- movl 4(%ebx),%edx // lightright
-
- movl %eax,%ebp
- movl C(r_lightwidth),%ecx
-
- movl %edx,C(lightright)
- subl %edx,%ebp
-
- andl $0xFFFFF,%ebp
- leal (%ebx,%ecx,4),%ebx
-
-// lightptr += lightwidth;
- movl %ebx,C(r_lightptr)
-
-// lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
-// lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
-// lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
-// 0xF0000000;
- movl 4(%ebx),%ecx // lightptr[1]
- movl (%ebx),%ebx // lightptr[0]
-
- subl %eax,%ebx
- subl %edx,%ecx
-
- sarl $2,%ecx
- orl $0x30000000,%ebp
-
- sarl $2,%ebx
- movl %ecx,C(lightrightstep)
-
- subl %ecx,%ebx
-
- andl $0xFFFFF,%ebx
-
- orl $0xF0000000,%ebx
- subl %ecx,%ecx // high word must be 0 in loop for addressing
-
- movl %ebx,C(lightdeltastep)
- subl %ebx,%ebx // high word must be 0 in loop for addressing
-
-Lblockloop8_mip2:
- movl %ebp,C(lightdelta)
- movb 2(%esi),%cl
-
- sarl $2,%ebp
- movb %dh,%bh
-
- movb 3(%esi),%bl
- addl %ebp,%edx
-
- movb %dh,%ch
- addl %ebp,%edx
-
- movb 0x12345678(%ebx),%ah
-LBPatch18:
- movb 1(%esi),%bl
-
- movb 0x12345678(%ecx),%al
-LBPatch19:
- movb (%esi),%cl
-
- movb %dh,%bh
- addl %ebp,%edx
-
- rorl $16,%eax
- movb %dh,%ch
-
- movb 0x12345678(%ebx),%ah
-LBPatch20:
- movl C(lightright),%edx
-
- movb 0x12345678(%ecx),%al
-LBPatch21:
- movl C(lightdelta),%ebp
-
- movl %eax,(%edi)
- movl C(sourcetstep),%eax
-
- addl %eax,%esi
- movl C(surfrowbytes),%eax
-
- addl %eax,%edi
- movl C(lightrightstep),%eax
-
- addl %eax,%edx
- movl C(lightdeltastep),%eax
-
- addl %eax,%ebp
- movl %edx,C(lightright)
-
- jc Lblockloop8_mip2
-
-// if (pbasesource >= r_sourcemax)
-// pbasesource -= stepback;
-
- cmpl C(r_sourcemax),%esi
- jb LSkip_mip2
- subl C(r_stepback),%esi
-LSkip_mip2:
-
- movl C(r_lightptr),%ebx
- decl sb_v
-
- jnz Lv_loop_mip2
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-
-//----------------------------------------------------------------------
-// Surface block drawer for mip level 3
-//----------------------------------------------------------------------
-
- .align 4
-.globl C(R_DrawSurfaceBlock8_mip3)
-C(R_DrawSurfaceBlock8_mip3):
- pushl %ebp // preserve caller's stack frame
- pushl %edi
- pushl %esi // preserve register variables
- pushl %ebx
-
-// for (v=0 ; v<numvblocks ; v++)
-// {
- movl C(r_lightptr),%ebx
- movl C(r_numvblocks),%eax
-
- movl %eax,sb_v
- movl C(prowdestbase),%edi
-
- movl C(pbasesource),%esi
-
-Lv_loop_mip3:
-
-// lightleft = lightptr[0];
-// lightright = lightptr[1];
-// lightdelta = (lightleft - lightright) & 0xFFFFF;
- movl (%ebx),%eax // lightleft
- movl 4(%ebx),%edx // lightright
-
- movl %eax,%ebp
- movl C(r_lightwidth),%ecx
-
- movl %edx,C(lightright)
- subl %edx,%ebp
-
- andl $0xFFFFF,%ebp
- leal (%ebx,%ecx,4),%ebx
-
- movl %ebp,C(lightdelta)
-// lightptr += lightwidth;
- movl %ebx,C(r_lightptr)
-
-// lightleftstep = (lightptr[0] - lightleft) >> blockdivshift;
-// lightrightstep = (lightptr[1] - lightright) >> blockdivshift;
-// lightdeltastep = ((lightleftstep - lightrightstep) & 0xFFFFF) |
-// 0xF0000000;
- movl 4(%ebx),%ecx // lightptr[1]
- movl (%ebx),%ebx // lightptr[0]
-
- subl %eax,%ebx
- subl %edx,%ecx
-
- sarl $1,%ecx
-
- sarl $1,%ebx
- movl %ecx,C(lightrightstep)
-
- subl %ecx,%ebx
- andl $0xFFFFF,%ebx
-
- sarl $1,%ebp
- orl $0xF0000000,%ebx
-
- movl %ebx,C(lightdeltastep)
- subl %ebx,%ebx // high word must be 0 in loop for addressing
-
- movb 1(%esi),%bl
- subl %ecx,%ecx // high word must be 0 in loop for addressing
-
- movb %dh,%bh
- movb (%esi),%cl
-
- addl %ebp,%edx
- movb %dh,%ch
-
- movb 0x12345678(%ebx),%al
-LBPatch16:
- movl C(lightright),%edx
-
- movb %al,1(%edi)
- movb 0x12345678(%ecx),%al
-LBPatch17:
-
- movb %al,(%edi)
- movl C(sourcetstep),%eax
-
- addl %eax,%esi
- movl C(surfrowbytes),%eax
-
- addl %eax,%edi
- movl C(lightdeltastep),%eax
-
- movl C(lightdelta),%ebp
- movb (%esi),%cl
-
- addl %eax,%ebp
- movl C(lightrightstep),%eax
-
- sarl $1,%ebp
- addl %eax,%edx
-
- movb %dh,%bh
- movb 1(%esi),%bl
-
- addl %ebp,%edx
- movb %dh,%ch
-
- movb 0x12345678(%ebx),%al
-LBPatch30:
- movl C(sourcetstep),%edx
-
- movb %al,1(%edi)
- movb 0x12345678(%ecx),%al
-LBPatch31:
-
- movb %al,(%edi)
- movl C(surfrowbytes),%ebp
-
- addl %edx,%esi
- addl %ebp,%edi
-
-// if (pbasesource >= r_sourcemax)
-// pbasesource -= stepback;
-
- cmpl C(r_sourcemax),%esi
- jb LSkip_mip3
- subl C(r_stepback),%esi
-LSkip_mip3:
-
- movl C(r_lightptr),%ebx
- decl sb_v
-
- jnz Lv_loop_mip3
-
- popl %ebx // restore register variables
- popl %esi
- popl %edi
- popl %ebp // restore the caller's stack frame
- ret
-
-
-.globl C(R_Surf8End)
-C(R_Surf8End):
-
-//----------------------------------------------------------------------
-// Code patching routines
-//----------------------------------------------------------------------
- .data
-
- .align 4
-LPatchTable8:
- .long LBPatch0-4
- .long LBPatch1-4
- .long LBPatch2-4
- .long LBPatch3-4
- .long LBPatch4-4
- .long LBPatch5-4
- .long LBPatch6-4
- .long LBPatch7-4
- .long LBPatch8-4
- .long LBPatch9-4
- .long LBPatch10-4
- .long LBPatch11-4
- .long LBPatch12-4
- .long LBPatch13-4
- .long LBPatch14-4
- .long LBPatch15-4
- .long LBPatch16-4
- .long LBPatch17-4
- .long LBPatch18-4
- .long LBPatch19-4
- .long LBPatch20-4
- .long LBPatch21-4
- .long LBPatch22-4
- .long LBPatch23-4
- .long LBPatch24-4
- .long LBPatch25-4
- .long LBPatch26-4
- .long LBPatch27-4
- .long LBPatch28-4
- .long LBPatch29-4
- .long LBPatch30-4
- .long LBPatch31-4
-
- .text
-
- .align 4
-.globl C(R_Surf8Patch)
-C(R_Surf8Patch):
- pushl %ebx
-
- movl C(colormap),%eax
- movl $LPatchTable8,%ebx
- movl $32,%ecx
-LPatchLoop8:
- movl (%ebx),%edx
- addl $4,%ebx
- movl %eax,(%edx)
- decl %ecx
- jnz LPatchLoop8
-
- popl %ebx
-
- ret
-
-#endif // id386
--- a/linux/r_varsa.s
+++ /dev/null
@@ -1,223 +1,0 @@
-//
-// r_varsa.s
-//
-
-#include "qasm.h"
-#include "d_ifacea.h"
-
-#if id386
-
- .data
-
-//-------------------------------------------------------
-// ASM-only variables
-//-------------------------------------------------------
-.globl float_1, float_particle_z_clip, float_point5
-.globl float_minus_1, float_0
-float_0: .single 0.0
-float_1: .single 1.0
-float_minus_1: .single -1.0
-float_particle_z_clip: .single PARTICLE_Z_CLIP
-float_point5: .single 0.5
-
-.globl fp_16, fp_64k, fp_1m, fp_64kx64k
-.globl fp_1m_minus_1
-.globl fp_8
-fp_1m: .single 1048576.0
-fp_1m_minus_1: .single 1048575.0
-fp_64k: .single 65536.0
-fp_8: .single 8.0
-fp_16: .single 16.0
-fp_64kx64k: .long 0x4f000000 // (float)0x8000*0x10000
-
-
-.globl FloatZero, Float2ToThe31nd, FloatMinus2ToThe31nd
-FloatZero: .long 0
-Float2ToThe31nd: .long 0x4f000000
-FloatMinus2ToThe31nd: .long 0xcf000000
-
-.globl C(r_bmodelactive)
-C(r_bmodelactive): .long 0
-
-//-------------------------------------------------------
-// global refresh variables
-//-------------------------------------------------------
-
-// FIXME: put all refresh variables into one contiguous block. Make into one
-// big structure, like cl or sv?
-
- .align 4
-.globl C(d_sdivzstepu)
-.globl C(d_tdivzstepu)
-.globl C(d_zistepu)
-.globl C(d_sdivzstepv)
-.globl C(d_tdivzstepv)
-.globl C(d_zistepv)
-.globl C(d_sdivzorigin)
-.globl C(d_tdivzorigin)
-.globl C(d_ziorigin)
-C(d_sdivzstepu): .single 0
-C(d_tdivzstepu): .single 0
-C(d_zistepu): .single 0
-C(d_sdivzstepv): .single 0
-C(d_tdivzstepv): .single 0
-C(d_zistepv): .single 0
-C(d_sdivzorigin): .single 0
-C(d_tdivzorigin): .single 0
-C(d_ziorigin): .single 0
-
-.globl C(sadjust)
-.globl C(tadjust)
-.globl C(bbextents)
-.globl C(bbextentt)
-C(sadjust): .long 0
-C(tadjust): .long 0
-C(bbextents): .long 0
-C(bbextentt): .long 0
-
-.globl C(cacheblock)
-.globl C(d_viewbuffer)
-.globl C(cachewidth)
-.globl C(d_pzbuffer)
-.globl C(d_zrowbytes)
-.globl C(d_zwidth)
-C(cacheblock): .long 0
-C(cachewidth): .long 0
-C(d_viewbuffer): .long 0
-C(d_pzbuffer): .long 0
-C(d_zrowbytes): .long 0
-C(d_zwidth): .long 0
-
-
-//-------------------------------------------------------
-// ASM-only variables
-//-------------------------------------------------------
-.globl izi
-izi: .long 0
-
-.globl pbase, s, t, sfracf, tfracf, snext, tnext
-.globl spancountminus1, zi16stepu, sdivz16stepu, tdivz16stepu
-.globl zi8stepu, sdivz8stepu, tdivz8stepu, pz
-s: .long 0
-t: .long 0
-snext: .long 0
-tnext: .long 0
-sfracf: .long 0
-tfracf: .long 0
-pbase: .long 0
-zi8stepu: .long 0
-sdivz8stepu: .long 0
-tdivz8stepu: .long 0
-zi16stepu: .long 0
-sdivz16stepu: .long 0
-tdivz16stepu: .long 0
-spancountminus1: .long 0
-pz: .long 0
-
-.globl izistep
-izistep: .long 0
-
-//-------------------------------------------------------
-// local variables for d_draw16.s
-//-------------------------------------------------------
-
-.globl reciprocal_table_16, entryvec_table_16
-// 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13,
-// 1/14, and 1/15 in 0.32 form
-reciprocal_table_16: .long 0x40000000, 0x2aaaaaaa, 0x20000000
- .long 0x19999999, 0x15555555, 0x12492492
- .long 0x10000000, 0xe38e38e, 0xccccccc, 0xba2e8ba
- .long 0xaaaaaaa, 0x9d89d89, 0x9249249, 0x8888888
-
-#ifndef NeXT
- .extern Entry2_16
- .extern Entry3_16
- .extern Entry4_16
- .extern Entry5_16
- .extern Entry6_16
- .extern Entry7_16
- .extern Entry8_16
- .extern Entry9_16
- .extern Entry10_16
- .extern Entry11_16
- .extern Entry12_16
- .extern Entry13_16
- .extern Entry14_16
- .extern Entry15_16
- .extern Entry16_16
-#endif
-
-entryvec_table_16: .long 0, Entry2_16, Entry3_16, Entry4_16
- .long Entry5_16, Entry6_16, Entry7_16, Entry8_16
- .long Entry9_16, Entry10_16, Entry11_16, Entry12_16
- .long Entry13_16, Entry14_16, Entry15_16, Entry16_16
-
-//-------------------------------------------------------
-// local variables for d_parta.s
-//-------------------------------------------------------
-.globl DP_Count, DP_u, DP_v, DP_32768, DP_Color, DP_Pix, DP_EntryTable
-DP_Count: .long 0
-DP_u: .long 0
-DP_v: .long 0
-DP_32768: .single 32768.0
-DP_Color: .long 0
-DP_Pix: .long 0
-
-
-#if 0
- .extern DP_1x1
- .extern DP_2x2
- .extern DP_3x3
- .extern DP_4x4
-
-DP_EntryTable: .long DP_1x1, DP_2x2, DP_3x3, DP_4x4
-#endif
-
-//
-// advancetable is 8 bytes, but points to the middle of that range so negative
-// offsets will work
-//
-.globl advancetable, sstep, tstep, pspantemp, counttemp, jumptemp
-advancetable: .long 0, 0
-sstep: .long 0
-tstep: .long 0
-
-pspantemp: .long 0
-counttemp: .long 0
-jumptemp: .long 0
-
-// 1/2, 1/3, 1/4, 1/5, 1/6, and 1/7 in 0.32 form
-.globl reciprocal_table, entryvec_table
-reciprocal_table: .long 0x40000000, 0x2aaaaaaa, 0x20000000
- .long 0x19999999, 0x15555555, 0x12492492
-
-#if 0
- .extern Entry2_8
- .extern Entry3_8
- .extern Entry4_8
- .extern Entry5_8
- .extern Entry6_8
- .extern Entry7_8
- .extern Entry8_8
-
-entryvec_table: .long 0, Entry2_8, Entry3_8, Entry4_8
- .long Entry5_8, Entry6_8, Entry7_8, Entry8_8
-#endif
-
-#ifndef NeXT
- .extern Spr8Entry2_8
- .extern Spr8Entry3_8
- .extern Spr8Entry4_8
- .extern Spr8Entry5_8
- .extern Spr8Entry6_8
- .extern Spr8Entry7_8
- .extern Spr8Entry8_8
-#endif
-
-.globl spr8entryvec_table
-spr8entryvec_table: .long 0, Spr8Entry2_8, Spr8Entry3_8, Spr8Entry4_8
- .long Spr8Entry5_8, Spr8Entry6_8, Spr8Entry7_8, Spr8Entry8_8
-
-#endif // id386
-
-
--- a/linux/rw_in_svgalib.c
+++ /dev/null
@@ -1,374 +1,0 @@
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/vt.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <signal.h>
-#include <sys/mman.h>
-
-#include <asm/io.h>
-
-#include "vga.h"
-#include "vgakeyboard.h"
-#include "vgamouse.h"
-
-#include "../ref_soft/r_local.h"
-#include "../client/keys.h"
-#include "../linux/rw_linux.h"
-
-/*****************************************************************************/
-/* KEYBOARD */
-/*****************************************************************************/
-
-static unsigned char scantokey[128];
-Key_Event_fp_t Key_Event_fp;
-
-static void keyhandler(int scancode, int state)
-{
- int sc;
-
- sc = scancode & 0x7f;
-//ri.Con_Printf(PRINT_ALL, "scancode=%x (%d%s)\n", scancode, sc, scancode&0x80?"+128":"");
- Key_Event_fp(scantokey[sc], state == KEY_EVENTPRESS);
-}
-
-void KBD_Init(Key_Event_fp_t fp)
-{
- int i;
-
- Key_Event_fp = fp;
-
- for (i=0 ; i<128 ; i++)
- scantokey[i] = ' ';
-
- scantokey[ 1] = K_ESCAPE;
- scantokey[ 2] = '1';
- scantokey[ 3] = '2';
- scantokey[ 4] = '3';
- scantokey[ 5] = '4';
- scantokey[ 6] = '5';
- scantokey[ 7] = '6';
- scantokey[ 8] = '7';
- scantokey[ 9] = '8';
- scantokey[ 10] = '9';
- scantokey[ 11] = '0';
- scantokey[ 12] = '-';
- scantokey[ 13] = '=';
- scantokey[ 14] = K_BACKSPACE;
- scantokey[ 15] = K_TAB;
- scantokey[ 16] = 'q';
- scantokey[ 17] = 'w';
- scantokey[ 18] = 'e';
- scantokey[ 19] = 'r';
- scantokey[ 20] = 't';
- scantokey[ 21] = 'y';
- scantokey[ 22] = 'u';
- scantokey[ 23] = 'i';
- scantokey[ 24] = 'o';
- scantokey[ 25] = 'p';
- scantokey[ 26] = '[';
- scantokey[ 27] = ']';
- scantokey[ 28] = K_ENTER;
- scantokey[ 29] = K_CTRL; //left
- scantokey[ 30] = 'a';
- scantokey[ 31] = 's';
- scantokey[ 32] = 'd';
- scantokey[ 33] = 'f';
- scantokey[ 34] = 'g';
- scantokey[ 35] = 'h';
- scantokey[ 36] = 'j';
- scantokey[ 37] = 'k';
- scantokey[ 38] = 'l';
- scantokey[ 39] = ';';
- scantokey[ 40] = '\'';
- scantokey[ 41] = '`';
- scantokey[ 42] = K_SHIFT; //left
- scantokey[ 43] = '\\';
- scantokey[ 44] = 'z';
- scantokey[ 45] = 'x';
- scantokey[ 46] = 'c';
- scantokey[ 47] = 'v';
- scantokey[ 48] = 'b';
- scantokey[ 49] = 'n';
- scantokey[ 50] = 'm';
- scantokey[ 51] = ',';
- scantokey[ 52] = '.';
- scantokey[ 53] = '/';
- scantokey[ 54] = K_SHIFT; //right
- scantokey[ 55] = '*'; //keypad
- scantokey[ 56] = K_ALT; //left
- scantokey[ 57] = ' ';
- // 58 caps lock
- scantokey[ 59] = K_F1;
- scantokey[ 60] = K_F2;
- scantokey[ 61] = K_F3;
- scantokey[ 62] = K_F4;
- scantokey[ 63] = K_F5;
- scantokey[ 64] = K_F6;
- scantokey[ 65] = K_F7;
- scantokey[ 66] = K_F8;
- scantokey[ 67] = K_F9;
- scantokey[ 68] = K_F10;
- // 69 numlock
- // 70 scrollock
- scantokey[ 71] = K_KP_HOME;
- scantokey[ 72] = K_KP_UPARROW;
- scantokey[ 73] = K_KP_PGUP;
- scantokey[ 74] = K_KP_MINUS;
- scantokey[ 75] = K_KP_LEFTARROW;
- scantokey[ 76] = K_KP_5;
- scantokey[ 77] = K_KP_RIGHTARROW;
- scantokey[ 79] = K_KP_END;
- scantokey[ 78] = K_KP_PLUS;
- scantokey[ 80] = K_KP_DOWNARROW;
- scantokey[ 81] = K_KP_PGDN;
- scantokey[ 82] = K_KP_INS;
- scantokey[ 83] = K_KP_DEL;
- // 84 to 86 not used
- scantokey[ 87] = K_F11;
- scantokey[ 88] = K_F12;
- // 89 to 95 not used
- scantokey[ 96] = K_KP_ENTER; //keypad enter
- scantokey[ 97] = K_CTRL; //right
- scantokey[ 98] = K_KP_SLASH;
- scantokey[ 99] = K_F12; // print screen, bind to screenshot by default
- scantokey[100] = K_ALT; // right
-
- scantokey[101] = K_PAUSE; // break
- scantokey[102] = K_HOME;
- scantokey[103] = K_UPARROW;
- scantokey[104] = K_PGUP;
- scantokey[105] = K_LEFTARROW;
- scantokey[106] = K_RIGHTARROW;
- scantokey[107] = K_END;
- scantokey[108] = K_DOWNARROW;
- scantokey[109] = K_PGDN;
- scantokey[110] = K_INS;
- scantokey[111] = K_DEL;
-
- scantokey[119] = K_PAUSE;
-
- if (keyboard_init())
- Sys_Error("keyboard_init() failed");
- keyboard_seteventhandler(keyhandler);
- keyboard_translatekeys(DONT_CATCH_CTRLC);
-}
-
-void KBD_Update(void)
-{
- while (keyboard_update())
- ;
-}
-
-void KBD_Close(void)
-{
- keyboard_close();
-}
-
-/*****************************************************************************/
-/* MOUSE */
-/*****************************************************************************/
-
-// this is inside the renderer shared lib, so these are called from vid_so
-
-static qboolean UseMouse = true;
-
-static int mouserate = MOUSE_DEFAULTSAMPLERATE;
-
-static int mouse_buttons;
-static int mouse_buttonstate;
-static int mouse_oldbuttonstate;
-static float mouse_x, mouse_y;
-static float old_mouse_x, old_mouse_y;
-static int mx, my;
-
-static cvar_t *m_filter;
-static cvar_t *in_mouse;
-
-static cvar_t *mdev;
-static cvar_t *mrate;
-
-static qboolean mlooking;
-
-// state struct passed in Init
-static in_state_t *in_state;
-
-static cvar_t *sensitivity;
-static cvar_t *lookstrafe;
-static cvar_t *m_side;
-static cvar_t *m_yaw;
-static cvar_t *m_pitch;
-static cvar_t *m_forward;
-static cvar_t *freelook;
-
-static void Force_CenterView_f (void)
-{
- in_state->viewangles[PITCH] = 0;
-}
-
-static void RW_IN_MLookDown (void)
-{
- mlooking = true;
-}
-
-static void RW_IN_MLookUp (void)
-{
- mlooking = false;
- in_state->IN_CenterView_fp ();
-}
-
-static void mousehandler(int buttonstate, int dx, int dy)
-{
- mouse_buttonstate = buttonstate;
- mx += dx;
- my += dy;
-}
-
-void RW_IN_Init(in_state_t *in_state_p)
-{
- int mtype;
- int i;
-
- in_state = in_state_p;
-
- // mouse variables
- m_filter = ri.Cvar_Get ("m_filter", "0", 0);
- in_mouse = ri.Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
- freelook = ri.Cvar_Get( "freelook", "0", 0 );
- lookstrafe = ri.Cvar_Get ("lookstrafe", "0", 0);
- sensitivity = ri.Cvar_Get ("sensitivity", "3", 0);
- m_pitch = ri.Cvar_Get ("m_pitch", "0.022", 0);
- m_yaw = ri.Cvar_Get ("m_yaw", "0.022", 0);
- m_forward = ri.Cvar_Get ("m_forward", "1", 0);
- m_side = ri.Cvar_Get ("m_side", "0.8", 0);
-
- ri.Cmd_AddCommand ("+mlook", RW_IN_MLookDown);
- ri.Cmd_AddCommand ("-mlook", RW_IN_MLookUp);
-
- ri.Cmd_AddCommand ("force_centerview", Force_CenterView_f);
-
- mouse_buttons = 3;
-
- mtype = vga_getmousetype();
-
- mdev = ri.Cvar_Get ("mdev", "/dev/mouse", 0);
- mrate = ri.Cvar_Get ("mrate", "1200", 0);
-
-// printf("Mouse: dev=%s,type=%s,speed=%d\n",
-// mousedev, mice[mtype].name, mouserate);
-
- if (mouse_init(mdev->string, mtype, (int)mrate->value))
- {
- ri.Con_Printf(PRINT_ALL, "No mouse found\n");
- UseMouse = false;
- }
- else
- mouse_seteventhandler(mousehandler);
-}
-
-void RW_IN_Shutdown(void)
-{
- mouse_close();
-}
-
-/*
-===========
-IN_Commands
-===========
-*/
-void RW_IN_Commands (void)
-{
- if (!UseMouse)
- return;
-
- // poll mouse values
- mouse_update();
-
- // perform button actions
- if ((mouse_buttonstate & MOUSE_LEFTBUTTON) &&
- !(mouse_oldbuttonstate & MOUSE_LEFTBUTTON))
- in_state->Key_Event_fp (K_MOUSE1, true);
- else if (!(mouse_buttonstate & MOUSE_LEFTBUTTON) &&
- (mouse_oldbuttonstate & MOUSE_LEFTBUTTON))
- in_state->Key_Event_fp (K_MOUSE1, false);
-
- if ((mouse_buttonstate & MOUSE_RIGHTBUTTON) &&
- !(mouse_oldbuttonstate & MOUSE_RIGHTBUTTON))
- in_state->Key_Event_fp (K_MOUSE2, true);
- else if (!(mouse_buttonstate & MOUSE_RIGHTBUTTON) &&
- (mouse_oldbuttonstate & MOUSE_RIGHTBUTTON))
- in_state->Key_Event_fp (K_MOUSE2, false);
-
- if ((mouse_buttonstate & MOUSE_MIDDLEBUTTON) &&
- !(mouse_oldbuttonstate & MOUSE_MIDDLEBUTTON))
- Key_Event_fp (K_MOUSE3, true);
- else if (!(mouse_buttonstate & MOUSE_MIDDLEBUTTON) &&
- (mouse_oldbuttonstate & MOUSE_MIDDLEBUTTON))
- in_state->Key_Event_fp (K_MOUSE3, false);
-
- mouse_oldbuttonstate = mouse_buttonstate;
-}
-
-/*
-===========
-IN_Move
-===========
-*/
-void RW_IN_Move (usercmd_t *cmd)
-{
- if (!UseMouse)
- return;
-
- // poll mouse values
- mouse_update();
-
- if (m_filter->value)
- {
- mouse_x = (mx + old_mouse_x) * 0.5;
- mouse_y = (my + old_mouse_y) * 0.5;
- }
- else
- {
- mouse_x = mx;
- mouse_y = my;
- }
- old_mouse_x = mx;
- old_mouse_y = my;
-
- if (!mx && !my)
- return;
-
- mx = my = 0; // clear for next update
-
- mouse_x *= sensitivity->value;
- mouse_y *= sensitivity->value;
-
-// add mouse X/Y movement to cmd
- if ( (*in_state->in_strafe_state & 1) ||
- (lookstrafe->value && mlooking ))
- cmd->sidemove += m_side->value * mouse_x;
- else
- in_state->viewangles[YAW] -= m_yaw->value * mouse_x;
-
- if ( (mlooking || freelook->value) &&
- !(*in_state->in_strafe_state & 1))
- {
- in_state->viewangles[PITCH] += m_pitch->value * mouse_y;
- }
- else
- {
- cmd->forwardmove -= m_forward->value * mouse_y;
- }
-}
-
-void RW_IN_Frame (void)
-{
-}
-
-void RW_IN_Activate(void)
-{
-}
-
-
-
--- a/linux/rw_linux.h
+++ /dev/null
@@ -1,16 +1,0 @@
-
-
-typedef void (*Key_Event_fp_t)(int key, qboolean down);
-
-extern void (*KBD_Update_fp)(void);
-extern void (*KBD_Init_fp)(Key_Event_fp_t fp);
-extern void (*KBD_Close_fp)(void);
-
-typedef struct in_state {
- // Pointers to functions back in client, set by vid_so
- void (*IN_CenterView_fp)(void);
- Key_Event_fp_t Key_Event_fp;
- vec_t *viewangles;
- int *in_strafe_state;
-} in_state_t;
-
--- a/linux/rw_svgalib.c
+++ /dev/null
@@ -1,311 +1,0 @@
-/*
-** RW_SVGALBI.C
-**
-** This file contains ALL Linux specific stuff having to do with the
-** software refresh. When a port is being made the following functions
-** must be implemented by the port:
-**
-** SWimp_EndFrame
-** SWimp_Init
-** SWimp_InitGraphics
-** SWimp_SetPalette
-** SWimp_Shutdown
-** SWimp_SwitchFullscreen
-*/
-
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/vt.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <signal.h>
-#include <sys/mman.h>
-
-#include <asm/io.h>
-
-#include "vga.h"
-#include "vgakeyboard.h"
-#include "vgamouse.h"
-
-#include "../ref_soft/r_local.h"
-#include "../client/keys.h"
-#include "../linux/rw_linux.h"
-
-/*****************************************************************************/
-
-int VGA_width, VGA_height, VGA_rowbytes, VGA_bufferrowbytes, VGA_planar;
-byte *VGA_pagebase;
-char *framebuffer_ptr;
-
-void VGA_UpdatePlanarScreen (void *srcbuffer);
-
-int num_modes;
-vga_modeinfo *modes;
-int current_mode;
-
-// Console variables that we need to access from this module
-
-/*****************************************************************************/
-
-void VID_InitModes(void)
-{
-
-int i;
-
- // get complete information on all modes
-
- num_modes = vga_lastmodenumber()+1;
- modes = malloc(num_modes * sizeof(vga_modeinfo));
- for (i=0 ; i<num_modes ; i++)
- {
- if (vga_hasmode(i))
- memcpy(&modes[i], vga_getmodeinfo(i), sizeof (vga_modeinfo));
- else
- modes[i].width = 0; // means not available
- }
-
- // filter for modes i don't support
-
- for (i=0 ; i<num_modes ; i++)
- {
- if (modes[i].bytesperpixel != 1 && modes[i].colors != 256)
- modes[i].width = 0;
- }
-
- for (i = 0; i < num_modes; i++)
- if (modes[i].width)
- ri.Con_Printf(PRINT_ALL, "mode %d: %d %d\n", modes[i].width, modes[i].height);
-
-}
-
-/*
-** SWimp_Init
-**
-** This routine is responsible for initializing the implementation
-** specific stuff in a software rendering subsystem.
-*/
-int SWimp_Init( void *hInstance, void *wndProc )
-{
- vga_init();
-
- VID_InitModes();
-
- return true;
-}
-
-int get_mode(int width, int height)
-{
-
- int i;
- int ok, match;
-
- for (i=0 ; i<num_modes ; i++)
- if (modes[i].width &&
- modes[i].width == width && modes[i].height == height)
- break;
- if (i==num_modes)
- return -1; // not found
-
- return i;
-}
-
-/*
-** SWimp_InitGraphics
-**
-** This initializes the software refresh's implementation specific
-** graphics subsystem. In the case of Windows it creates DIB or
-** DDRAW surfaces.
-**
-** The necessary width and height parameters are grabbed from
-** vid.width and vid.height.
-*/
-static qboolean SWimp_InitGraphics( qboolean fullscreen )
-{
- int bsize, zsize, tsize;
-
- SWimp_Shutdown();
-
- current_mode = get_mode(vid.width, vid.height);
-
- if (current_mode < 0) {
- ri.Con_Printf (PRINT_ALL, "Mode %d %d not found\n", vid.width, vid.height);
- return false; // mode not found
- }
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (vid.width, vid.height);
-
- ri.Con_Printf (PRINT_ALL, "Setting VGAMode: %d\n", current_mode );
-
-// Cvar_SetValue ("vid_mode", (float)modenum);
-
- VGA_width = modes[current_mode].width;
- VGA_height = modes[current_mode].height;
- VGA_planar = modes[current_mode].bytesperpixel == 0;
- VGA_rowbytes = modes[current_mode].linewidth;
-
- vid.rowbytes = modes[current_mode].linewidth;
-
- if (VGA_planar) {
- VGA_bufferrowbytes = modes[current_mode].linewidth * 4;
- vid.rowbytes = modes[current_mode].linewidth*4;
- }
-
-// get goin'
-
- vga_setmode(current_mode);
-
- VGA_pagebase = framebuffer_ptr = (char *) vga_getgraphmem();
-// if (vga_setlinearaddressing()>0)
-// framebuffer_ptr = (char *) vga_getgraphmem();
- if (!framebuffer_ptr)
- Sys_Error("This mode isn't hapnin'\n");
-
- vga_setpage(0);
-
- vid.buffer = malloc(vid.rowbytes * vid.height);
- if (!vid.buffer)
- Sys_Error("Unabled to alloc vid.buffer!\n");
-
- return true;
-}
-
-/*
-** SWimp_EndFrame
-**
-** This does an implementation specific copy from the backbuffer to the
-** front buffer. In the Win32 case it uses BitBlt or BltFast depending
-** on whether we're using DIB sections/GDI or DDRAW.
-*/
-void SWimp_EndFrame (void)
-{
- if (!vga_oktowrite())
- return; // can't update screen if it's not active
-
-// if (vid_waitforrefresh.value)
-// vga_waitretrace();
-
- if (VGA_planar)
- VGA_UpdatePlanarScreen (vid.buffer);
-
- else {
- int total = vid.rowbytes * vid.height;
- int offset;
-
- for (offset=0;offset<total;offset+=0x10000) {
- vga_setpage(offset/0x10000);
- memcpy(framebuffer_ptr,
- vid.buffer + offset,
- ((total-offset>0x10000)?0x10000:(total-offset)));
- }
- }
-}
-
-/*
-** SWimp_SetMode
-*/
-rserr_t SWimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
- rserr_t retval = rserr_ok;
-
- ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( pwidth, pheight, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d\n", *pwidth, *pheight);
-
- if ( !SWimp_InitGraphics( false ) ) {
- // failed to set a valid mode in windowed mode
- return rserr_invalid_mode;
- }
-
- R_GammaCorrectAndSetPalette( ( const unsigned char * ) d_8to24table );
-
- return retval;
-}
-
-/*
-** SWimp_SetPalette
-**
-** System specific palette setting routine. A NULL palette means
-** to use the existing palette. The palette is expected to be in
-** a padded 4-byte xRGB format.
-*/
-void SWimp_SetPalette( const unsigned char *palette )
-{
- static int tmppal[256*3];
- const unsigned char *pal;
- int *tp;
- int i;
-
- if ( !palette )
- palette = ( const unsigned char * ) sw_state.currentpalette;
-
- if (vga_getcolors() == 256)
- {
- tp = tmppal;
- pal = palette;
-
- for (i=0 ; i < 256 ; i++, pal += 4, tp += 3) {
- tp[0] = pal[0] >> 2;
- tp[1] = pal[1] >> 2;
- tp[2] = pal[2] >> 2;
- }
-
- if (vga_oktowrite())
- vga_setpalvec(0, 256, tmppal);
- }
-}
-
-/*
-** SWimp_Shutdown
-**
-** System specific graphics subsystem shutdown routine. Destroys
-** DIBs or DDRAW surfaces as appropriate.
-*/
-void SWimp_Shutdown( void )
-{
- if (vid.buffer) {
- free(vid.buffer);
- vid.buffer = NULL;
- }
- vga_setmode(TEXT);
-}
-
-/*
-** SWimp_AppActivate
-*/
-void SWimp_AppActivate( qboolean active )
-{
-}
-
-//===============================================================================
-
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-
- int r;
- unsigned long addr;
- int psize = getpagesize();
-
- addr = (startaddr & ~(psize-1)) - psize;
-
-// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
-// addr, startaddr+length, length);
-
- r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
-
- if (r < 0)
- Sys_Error("Protection change failed\n");
-}
-
--- a/linux/rw_x11.c
+++ /dev/null
@@ -1,1093 +1,0 @@
-/*
-** RW_X11.C
-**
-** This file contains ALL Linux specific stuff having to do with the
-** software refresh. When a port is being made the following functions
-** must be implemented by the port:
-**
-** SWimp_EndFrame
-** SWimp_Init
-** SWimp_InitGraphics
-** SWimp_SetPalette
-** SWimp_Shutdown
-** SWimp_SwitchFullscreen
-*/
-
-#include <ctype.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/keysym.h>
-#include <X11/extensions/XShm.h>
-
-#include "../ref_soft/r_local.h"
-#include "../client/keys.h"
-#include "../linux/rw_linux.h"
-
-/*****************************************************************************/
-
-static qboolean doShm;
-static Display *x_disp;
-static Colormap x_cmap;
-static Window x_win;
-static GC x_gc;
-static Visual *x_vis;
-static XVisualInfo *x_visinfo;
-//static XImage *x_image;
-
-#define STD_EVENT_MASK (StructureNotifyMask | KeyPressMask \
- | KeyReleaseMask | ExposureMask | PointerMotionMask | \
- ButtonPressMask | ButtonReleaseMask)
-
-static int x_shmeventtype;
-//static XShmSegmentInfo x_shminfo;
-
-static qboolean oktodraw = false;
-static qboolean X11_active = false;
-
-int XShmQueryExtension(Display *);
-int XShmGetEventBase(Display *);
-
-int current_framebuffer;
-static XImage *x_framebuffer[2] = { 0, 0 };
-static XShmSegmentInfo x_shminfo[2];
-
-struct
-{
- int key;
- int down;
-} keyq[64];
-int keyq_head=0;
-int keyq_tail=0;
-
-int config_notify=0;
-int config_notify_width;
-int config_notify_height;
-
-typedef unsigned short PIXEL;
-
-// Console variables that we need to access from this module
-
-/*****************************************************************************/
-/* MOUSE */
-/*****************************************************************************/
-
-// this is inside the renderer shared lib, so these are called from vid_so
-
-static qboolean mouse_avail;
-static int mouse_buttonstate;
-static int mouse_oldbuttonstate;
-static int mouse_x, mouse_y;
-static int old_mouse_x, old_mouse_y;
-static int mx, my;
-static float old_windowed_mouse;
-static int p_mouse_x, p_mouse_y;
-
-static cvar_t *_windowed_mouse;
-static cvar_t *m_filter;
-static cvar_t *in_mouse;
-
-static qboolean mlooking;
-
-// state struct passed in Init
-static in_state_t *in_state;
-
-static cvar_t *sensitivity;
-static cvar_t *lookstrafe;
-static cvar_t *m_side;
-static cvar_t *m_yaw;
-static cvar_t *m_pitch;
-static cvar_t *m_forward;
-static cvar_t *freelook;
-
-static void Force_CenterView_f (void)
-{
- in_state->viewangles[PITCH] = 0;
-}
-
-static void RW_IN_MLookDown (void)
-{
- mlooking = true;
-}
-
-static void RW_IN_MLookUp (void)
-{
- mlooking = false;
- in_state->IN_CenterView_fp ();
-}
-
-void RW_IN_Init(in_state_t *in_state_p)
-{
- int mtype;
- int i;
-
- in_state = in_state_p;
-
- // mouse variables
- _windowed_mouse = ri.Cvar_Get ("_windowed_mouse", "0", CVAR_ARCHIVE);
- m_filter = ri.Cvar_Get ("m_filter", "0", 0);
- in_mouse = ri.Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
- freelook = ri.Cvar_Get( "freelook", "0", 0 );
- lookstrafe = ri.Cvar_Get ("lookstrafe", "0", 0);
- sensitivity = ri.Cvar_Get ("sensitivity", "3", 0);
- m_pitch = ri.Cvar_Get ("m_pitch", "0.022", 0);
- m_yaw = ri.Cvar_Get ("m_yaw", "0.022", 0);
- m_forward = ri.Cvar_Get ("m_forward", "1", 0);
- m_side = ri.Cvar_Get ("m_side", "0.8", 0);
-
- ri.Cmd_AddCommand ("+mlook", RW_IN_MLookDown);
- ri.Cmd_AddCommand ("-mlook", RW_IN_MLookUp);
-
- ri.Cmd_AddCommand ("force_centerview", Force_CenterView_f);
-
- mouse_x = mouse_y = 0.0;
- mouse_avail = true;
-}
-
-void RW_IN_Shutdown(void)
-{
- mouse_avail = false;
-}
-
-/*
-===========
-IN_Commands
-===========
-*/
-void RW_IN_Commands (void)
-{
- int i;
-
- if (!mouse_avail)
- return;
-
- for (i=0 ; i<3 ; i++) {
- if ( (mouse_buttonstate & (1<<i)) && !(mouse_oldbuttonstate & (1<<i)) )
- in_state->Key_Event_fp (K_MOUSE1 + i, true);
-
- if ( !(mouse_buttonstate & (1<<i)) && (mouse_oldbuttonstate & (1<<i)) )
- in_state->Key_Event_fp (K_MOUSE1 + i, false);
- }
- mouse_oldbuttonstate = mouse_buttonstate;
-}
-
-/*
-===========
-IN_Move
-===========
-*/
-void RW_IN_Move (usercmd_t *cmd)
-{
- if (!mouse_avail)
- return;
-
- if (m_filter->value)
- {
- mouse_x = (mx + old_mouse_x) * 0.5;
- mouse_y = (my + old_mouse_y) * 0.5;
- } else {
- mouse_x = mx;
- mouse_y = my;
- }
-
- old_mouse_x = mx;
- old_mouse_y = my;
-
- if (!mouse_x && !mouse_y)
- return;
-
- mouse_x *= sensitivity->value;
- mouse_y *= sensitivity->value;
-
-// add mouse X/Y movement to cmd
- if ( (*in_state->in_strafe_state & 1) ||
- (lookstrafe->value && mlooking ))
- cmd->sidemove += m_side->value * mouse_x;
- else
- in_state->viewangles[YAW] -= m_yaw->value * mouse_x;
-
- if ( (mlooking || freelook->value) &&
- !(*in_state->in_strafe_state & 1))
- {
- in_state->viewangles[PITCH] += m_pitch->value * mouse_y;
- }
- else
- {
- cmd->forwardmove -= m_forward->value * mouse_y;
- }
- mx = my = 0;
-}
-
-void RW_IN_Frame (void)
-{
-}
-
-void RW_IN_Activate(void)
-{
-}
-
-/*****************************************************************************/
-
-static PIXEL st2d_8to16table[256];
-static int shiftmask_fl=0;
-static long r_shift,g_shift,b_shift;
-static unsigned long r_mask,g_mask,b_mask;
-
-void shiftmask_init()
-{
- unsigned int x;
- r_mask=x_vis->red_mask;
- g_mask=x_vis->green_mask;
- b_mask=x_vis->blue_mask;
- for(r_shift=-8,x=1;x<r_mask;x=x<<1)r_shift++;
- for(g_shift=-8,x=1;x<g_mask;x=x<<1)g_shift++;
- for(b_shift=-8,x=1;x<b_mask;x=x<<1)b_shift++;
- shiftmask_fl=1;
-}
-
-PIXEL xlib_rgb(int r,int g,int b)
-{
- PIXEL p;
- if(shiftmask_fl==0) shiftmask_init();
- p=0;
-
- if(r_shift>0) {
- p=(r<<(r_shift))&r_mask;
- } else if(r_shift<0) {
- p=(r>>(-r_shift))&r_mask;
- } else p|=(r&r_mask);
-
- if(g_shift>0) {
- p|=(g<<(g_shift))&g_mask;
- } else if(g_shift<0) {
- p|=(g>>(-g_shift))&g_mask;
- } else p|=(g&g_mask);
-
- if(b_shift>0) {
- p|=(b<<(b_shift))&b_mask;
- } else if(b_shift<0) {
- p|=(b>>(-b_shift))&b_mask;
- } else p|=(b&b_mask);
-
- return p;
-}
-
-void st2_fixup( XImage *framebuf, int x, int y, int width, int height)
-{
- int xi,yi;
- unsigned char *src;
- PIXEL *dest;
-
- if( (x<0)||(y<0) )return;
-
- for (yi = y; yi < (y+height); yi++) {
- src = &framebuf->data [yi * framebuf->bytes_per_line];
- dest = (PIXEL*)src;
- for(xi = (x+width-1); xi >= x; xi -= 8) {
- dest[xi ] = st2d_8to16table[src[xi ]];
- dest[xi-1] = st2d_8to16table[src[xi-1]];
- dest[xi-2] = st2d_8to16table[src[xi-2]];
- dest[xi-3] = st2d_8to16table[src[xi-3]];
- dest[xi-4] = st2d_8to16table[src[xi-4]];
- dest[xi-5] = st2d_8to16table[src[xi-5]];
- dest[xi-6] = st2d_8to16table[src[xi-6]];
- dest[xi-7] = st2d_8to16table[src[xi-7]];
- }
- }
-}
-
-// ========================================================================
-// 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;
-}
-
-void ResetFrameBuffer(void)
-{
- int mem;
- int pwidth;
-
- if (x_framebuffer[0])
- {
- free(x_framebuffer[0]->data);
- free(x_framebuffer[0]);
- }
-
-// alloc an extra line in case we want to wrap, and allocate the z-buffer
- pwidth = x_visinfo->depth / 8;
- if (pwidth == 3) pwidth = 4;
- mem = ((vid.width*pwidth+7)&~7) * vid.height;
-
- x_framebuffer[0] = XCreateImage( x_disp,
- x_vis,
- x_visinfo->depth,
- ZPixmap,
- 0,
- malloc(mem),
- vid.width, vid.height,
- 32,
- 0);
-
- if (!x_framebuffer[0])
- Sys_Error("VID: XCreateImage failed\n");
-
- vid.buffer = (byte*) (x_framebuffer[0]);
-}
-
-void ResetSharedFrameBuffers(void)
-{
- int size;
- int key;
- int minsize = getpagesize();
- int frm;
-
- for (frm=0 ; frm<2 ; frm++)
- {
- // free up old frame buffer memory
- if (x_framebuffer[frm])
- {
- XShmDetach(x_disp, &x_shminfo[frm]);
- free(x_framebuffer[frm]);
- shmdt(x_shminfo[frm].shmaddr);
- }
-
- // create the image
- x_framebuffer[frm] = XShmCreateImage( x_disp,
- x_vis,
- x_visinfo->depth,
- ZPixmap,
- 0,
- &x_shminfo[frm],
- vid.width,
- vid.height );
-
- // grab shared memory
-
- size = x_framebuffer[frm]->bytes_per_line
- * x_framebuffer[frm]->height;
- if (size < minsize)
- Sys_Error("VID: Window must use at least %d bytes\n", minsize);
-
- key = random();
- x_shminfo[frm].shmid = shmget((key_t)key, size, IPC_CREAT|0777);
- if (x_shminfo[frm].shmid==-1)
- Sys_Error("VID: Could not get any shared memory\n");
-
- // attach to the shared memory segment
- x_shminfo[frm].shmaddr =
- (void *) shmat(x_shminfo[frm].shmid, 0, 0);
-
- ri.Con_Printf(PRINT_ALL,
- "MITSHM shared memory (id=%d, addr=0x%lx)\n",
- x_shminfo[frm].shmid,
- (long) x_shminfo[frm].shmaddr);
-
- x_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
-
- // get the X server to attach to it
-
- if (!XShmAttach(x_disp, &x_shminfo[frm]))
- Sys_Error("VID: XShmAttach() failed\n");
- XSync(x_disp, 0);
- shmctl(x_shminfo[frm].shmid, IPC_RMID, 0);
- }
-
-}
-
-// ========================================================================
-// Tragic death handler
-// ========================================================================
-
-void TragicDeath(int signal_num)
-{
- XAutoRepeatOn(x_disp);
- XCloseDisplay(x_disp);
- Sys_Error("This death brought to you by the number %d\n", signal_num);
-}
-
-int XLateKey(XKeyEvent *ev)
-{
-
- int key;
- char buf[64];
- KeySym keysym;
-
- key = 0;
-
- XLookupString(ev, buf, sizeof buf, &keysym, 0);
-
- switch(keysym)
- {
- case XK_KP_Page_Up: key = K_KP_PGUP; break;
- case XK_Page_Up: key = K_PGUP; break;
-
- case XK_KP_Page_Down: key = K_KP_PGDN; break;
- case XK_Page_Down: key = K_PGDN; break;
-
- case XK_KP_Home: key = K_KP_HOME; break;
- case XK_Home: key = K_HOME; break;
-
- case XK_KP_End: key = K_KP_END; break;
- case XK_End: key = K_END; break;
-
- case XK_KP_Left: key = K_KP_LEFTARROW; break;
- case XK_Left: key = K_LEFTARROW; break;
-
- case XK_KP_Right: key = K_KP_RIGHTARROW; break;
- case XK_Right: key = K_RIGHTARROW; break;
-
- case XK_KP_Down: key = K_KP_DOWNARROW; break;
- case XK_Down: key = K_DOWNARROW; break;
-
- case XK_KP_Up: 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;
-
- case XK_BackSpace: key = K_BACKSPACE; break;
-
- case XK_KP_Delete: 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: 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;
-
-#if 0
- case 0x021: key = '1';break;/* [!] */
- case 0x040: key = '2';break;/* [@] */
- case 0x023: key = '3';break;/* [#] */
- case 0x024: key = '4';break;/* [$] */
- case 0x025: key = '5';break;/* [%] */
- case 0x05e: key = '6';break;/* [^] */
- case 0x026: key = '7';break;/* [&] */
- case 0x02a: key = '8';break;/* [*] */
- case 0x028: key = '9';;break;/* [(] */
- case 0x029: key = '0';break;/* [)] */
- case 0x05f: key = '-';break;/* [_] */
- case 0x02b: key = '=';break;/* [+] */
- case 0x07c: key = '\'';break;/* [|] */
- case 0x07d: key = '[';break;/* [}] */
- case 0x07b: key = ']';break;/* [{] */
- case 0x022: key = '\'';break;/* ["] */
- case 0x03a: key = ';';break;/* [:] */
- case 0x03f: key = '/';break;/* [?] */
- case 0x03e: key = '.';break;/* [>] */
- case 0x03c: key = ',';break;/* [<] */
-#endif
-
- default:
- key = *(unsigned char*)buf;
- if (key >= 'A' && key <= 'Z')
- key = key - 'A' + 'a';
- break;
- }
-
- return key;
-}
-
-void GetEvent(void)
-{
- XEvent x_event;
- int b;
-
- XNextEvent(x_disp, &x_event);
- switch(x_event.type) {
- case KeyPress:
- keyq[keyq_head].key = XLateKey(&x_event.xkey);
- keyq[keyq_head].down = true;
- keyq_head = (keyq_head + 1) & 63;
- break;
- case KeyRelease:
- keyq[keyq_head].key = XLateKey(&x_event.xkey);
- keyq[keyq_head].down = false;
- keyq_head = (keyq_head + 1) & 63;
- break;
-
- case MotionNotify:
- if (_windowed_mouse->value) {
- mx += ((int)x_event.xmotion.x - (int)(vid.width/2));
- my += ((int)x_event.xmotion.y - (int)(vid.height/2));
-
- /* move the mouse to the window center again */
- XSelectInput(x_disp,x_win, STD_EVENT_MASK & ~PointerMotionMask);
- XWarpPointer(x_disp,None,x_win,0,0,0,0,
- (vid.width/2),(vid.height/2));
- XSelectInput(x_disp,x_win, STD_EVENT_MASK);
- } else {
- mx = ((int)x_event.xmotion.x - (int)p_mouse_x);
- my = ((int)x_event.xmotion.y - (int)p_mouse_y);
- p_mouse_x=x_event.xmotion.x;
- p_mouse_y=x_event.xmotion.y;
- }
- break;
-
- case ButtonPress:
- b=-1;
- if (x_event.xbutton.button == 1)
- b = 0;
- else if (x_event.xbutton.button == 2)
- b = 2;
- else if (x_event.xbutton.button == 3)
- b = 1;
- if (b>=0)
- mouse_buttonstate |= 1<<b;
- break;
-
- case ButtonRelease:
- b=-1;
- if (x_event.xbutton.button == 1)
- b = 0;
- else if (x_event.xbutton.button == 2)
- b = 2;
- else if (x_event.xbutton.button == 3)
- b = 1;
- if (b>=0)
- mouse_buttonstate &= ~(1<<b);
- break;
-
- case ConfigureNotify:
- config_notify_width = x_event.xconfigure.width;
- config_notify_height = x_event.xconfigure.height;
- config_notify = 1;
- break;
-
- default:
- if (doShm && x_event.type == x_shmeventtype)
- oktodraw = true;
- }
-
- if (old_windowed_mouse != _windowed_mouse->value) {
- old_windowed_mouse = _windowed_mouse->value;
-
- if (!_windowed_mouse->value) {
- /* ungrab the pointer */
- XUngrabPointer(x_disp,CurrentTime);
- } else {
- /* grab the pointer */
- XGrabPointer(x_disp,x_win,True,0,GrabModeAsync,
- GrabModeAsync,x_win,None,CurrentTime);
- }
- }
-}
-
-/*****************************************************************************/
-
-/*
-** SWimp_Init
-**
-** This routine is responsible for initializing the implementation
-** specific stuff in a software rendering subsystem.
-*/
-int SWimp_Init( void *hInstance, void *wndProc )
-{
-// open the display
- x_disp = XOpenDisplay(0);
- if (!x_disp)
- {
- if (getenv("DISPLAY"))
- Sys_Error("VID: Could not open display [%s]\n",
- getenv("DISPLAY"));
- else
- Sys_Error("VID: Could not open local display\n");
- }
-
-// catch signals so i can turn on auto-repeat
-
- {
- struct sigaction sa;
- sigaction(SIGINT, 0, &sa);
- sa.sa_handler = TragicDeath;
- sigaction(SIGINT, &sa, 0);
- sigaction(SIGTERM, &sa, 0);
- }
-
- return true;
-}
-
-/*
-** SWimp_InitGraphics
-**
-** This initializes the software refresh's implementation specific
-** graphics subsystem. In the case of Windows it creates DIB or
-** DDRAW surfaces.
-**
-** The necessary width and height parameters are grabbed from
-** vid.width and vid.height.
-*/
-static qboolean SWimp_InitGraphics( qboolean fullscreen )
-{
- int pnum, i;
- XVisualInfo template;
- int num_visuals;
- int template_mask;
-
- srandom(getpid());
-
- // free resources in use
- SWimp_Shutdown ();
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (vid.width, vid.height);
-
- XAutoRepeatOff(x_disp);
-
-// for debugging only
- XSynchronize(x_disp, True);
-
-// check for command-line window size
- template_mask = 0;
-
-#if 0
-// specify a visual id
- if ((pnum=COM_CheckParm("-visualid")))
- {
- if (pnum >= com_argc-1)
- Sys_Error("VID: -visualid <id#>\n");
- template.visualid = Q_atoi(com_argv[pnum+1]);
- template_mask = VisualIDMask;
- }
-
-// If not specified, use default visual
- else
-#endif
- {
- int screen;
- screen = XDefaultScreen(x_disp);
- template.visualid =
- XVisualIDFromVisual(XDefaultVisual(x_disp, screen));
- template_mask = VisualIDMask;
- }
-
-// pick a visual- warn if more than one was available
- x_visinfo = XGetVisualInfo(x_disp, template_mask, &template, &num_visuals);
- if (num_visuals > 1)
- {
- printf("Found more than one visual id at depth %d:\n", template.depth);
- for (i=0 ; i<num_visuals ; i++)
- printf(" -visualid %d\n", (int)(x_visinfo[i].visualid));
- }
- else if (num_visuals == 0)
- {
- if (template_mask == VisualIDMask)
- Sys_Error("VID: Bad visual id %d\n", template.visualid);
- else
- Sys_Error("VID: No visuals at depth %d\n", template.depth);
- }
-
-#if 0
- if (verbose)
- {
- printf("Using visualid %d:\n", (int)(x_visinfo->visualid));
- printf(" screen %d\n", x_visinfo->screen);
- printf(" red_mask 0x%x\n", (int)(x_visinfo->red_mask));
- printf(" green_mask 0x%x\n", (int)(x_visinfo->green_mask));
- printf(" blue_mask 0x%x\n", (int)(x_visinfo->blue_mask));
- printf(" colormap_size %d\n", x_visinfo->colormap_size);
- printf(" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
- }
-#endif
-
- x_vis = x_visinfo->visual;
-
-// setup attributes for main window
- {
- int attribmask = CWEventMask | CWColormap | CWBorderPixel;
- XSetWindowAttributes attribs;
- Colormap tmpcmap;
-
- tmpcmap = XCreateColormap(x_disp, XRootWindow(x_disp,
- x_visinfo->screen), x_vis, AllocNone);
-
- attribs.event_mask = STD_EVENT_MASK;
- attribs.border_pixel = 0;
- attribs.colormap = tmpcmap;
-
-// create the main window
- x_win = XCreateWindow( x_disp,
- XRootWindow(x_disp, x_visinfo->screen),
- 0, 0, // x, y
- vid.width, vid.height,
- 0, // borderwidth
- x_visinfo->depth,
- InputOutput,
- x_vis,
- attribmask,
- &attribs );
- XStoreName(x_disp, x_win, "Quake II");
-
- if (x_visinfo->class != TrueColor)
- XFreeColormap(x_disp, tmpcmap);
- }
-
- if (x_visinfo->depth == 8)
- {
- // create and upload the palette
- if (x_visinfo->class == PseudoColor)
- {
- x_cmap = XCreateColormap(x_disp, x_win, x_vis, AllocAll);
- XSetWindowColormap(x_disp, x_win, x_cmap);
- }
-
- }
-
-// inviso cursor
- XDefineCursor(x_disp, x_win, CreateNullCursor(x_disp, x_win));
-
-// create the GC
- {
- XGCValues xgcvalues;
- int valuemask = GCGraphicsExposures;
- xgcvalues.graphics_exposures = False;
- x_gc = XCreateGC(x_disp, x_win, valuemask, &xgcvalues );
- }
-
-// map the window
- XMapWindow(x_disp, x_win);
-
-// wait for first exposure event
- {
- XEvent event;
- do
- {
- XNextEvent(x_disp, &event);
- if (event.type == Expose && !event.xexpose.count)
- oktodraw = true;
- } while (!oktodraw);
- }
-// now safe to draw
-
-// even if MITSHM is available, make sure it's a local connection
- if (XShmQueryExtension(x_disp))
- {
- char *displayname;
- doShm = true;
- displayname = (char *) getenv("DISPLAY");
- if (displayname)
- {
- char *d = displayname;
- while (*d && (*d != ':')) d++;
- if (*d) *d = 0;
- if (!(!strcasecmp(displayname, "unix") || !*displayname))
- doShm = false;
- }
- }
-
- if (doShm)
- {
- x_shmeventtype = XShmGetEventBase(x_disp) + ShmCompletion;
- ResetSharedFrameBuffers();
- }
- else
- ResetFrameBuffer();
-
- current_framebuffer = 0;
- vid.rowbytes = x_framebuffer[0]->bytes_per_line;
- vid.buffer = x_framebuffer[0]->data;
-
-// XSynchronize(x_disp, False);
-
- X11_active = true;
-
- return true;
-}
-
-/*
-** SWimp_EndFrame
-**
-** This does an implementation specific copy from the backbuffer to the
-** front buffer. In the Win32 case it uses BitBlt or BltFast depending
-** on whether we're using DIB sections/GDI or DDRAW.
-*/
-void SWimp_EndFrame (void)
-{
-// if the window changes dimension, skip this frame
-#if 0
- if (config_notify)
- {
- fprintf(stderr, "config notify\n");
- config_notify = 0;
- vid.width = config_notify_width & ~7;
- vid.height = config_notify_height;
- if (doShm)
- ResetSharedFrameBuffers();
- else
- ResetFrameBuffer();
- vid.rowbytes = x_framebuffer[0]->bytes_per_line;
- vid.buffer = x_framebuffer[current_framebuffer]->data;
- vid.recalc_refdef = 1; // force a surface cache flush
- Con_CheckResize();
- Con_Clear_f();
- return;
- }
-#endif
-
- if (doShm)
- {
-
- if (x_visinfo->depth != 8)
- st2_fixup( x_framebuffer[current_framebuffer],
- 0, 0, vid.width, vid.height);
- if (!XShmPutImage(x_disp, x_win, x_gc,
- x_framebuffer[current_framebuffer], 0, 0,
- 0, 0, vid.width, vid.height, True))
- Sys_Error("VID_Update: XShmPutImage failed\n");
- oktodraw = false;
- while (!oktodraw)
- GetEvent();
- current_framebuffer = !current_framebuffer;
- vid.buffer = x_framebuffer[current_framebuffer]->data;
- XSync(x_disp, False);
- }
- else
- {
- if (x_visinfo->depth != 8)
- st2_fixup( x_framebuffer[current_framebuffer],
- 0, 0, vid.width, vid.height);
- XPutImage(x_disp, x_win, x_gc, x_framebuffer[0],
- 0, 0, 0, 0, vid.width, vid.height);
- XSync(x_disp, False);
- }
-}
-
-/*
-** SWimp_SetMode
-*/
-rserr_t SWimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
- rserr_t retval = rserr_ok;
-
- ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( pwidth, pheight, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d\n", *pwidth, *pheight);
-
- if ( !SWimp_InitGraphics( false ) ) {
- // failed to set a valid mode in windowed mode
- return rserr_invalid_mode;
- }
-
- R_GammaCorrectAndSetPalette( ( const unsigned char * ) d_8to24table );
-
- return retval;
-}
-
-/*
-** SWimp_SetPalette
-**
-** System specific palette setting routine. A NULL palette means
-** to use the existing palette. The palette is expected to be in
-** a padded 4-byte xRGB format.
-*/
-void SWimp_SetPalette( const unsigned char *palette )
-{
- int i;
- XColor colors[256];
-
- if (!X11_active)
- return;
-
- if ( !palette )
- palette = ( const unsigned char * ) sw_state.currentpalette;
-
- for(i=0;i<256;i++)
- st2d_8to16table[i]= xlib_rgb(palette[i*4],
- palette[i*4+1],palette[i*4+2]);
-
- if (x_visinfo->class == PseudoColor && x_visinfo->depth == 8)
- {
- for (i=0 ; i<256 ; i++)
- {
- colors[i].pixel = i;
- colors[i].flags = DoRed|DoGreen|DoBlue;
- colors[i].red = palette[i*4] * 257;
- colors[i].green = palette[i*4+1] * 257;
- colors[i].blue = palette[i*4+2] * 257;
- }
- XStoreColors(x_disp, x_cmap, colors, 256);
- }
-}
-
-/*
-** SWimp_Shutdown
-**
-** System specific graphics subsystem shutdown routine. Destroys
-** DIBs or DDRAW surfaces as appropriate.
-*/
-void SWimp_Shutdown( void )
-{
- int i;
-
- if (!X11_active)
- return;
-
- if (doShm) {
- for (i = 0; i < 2; i++)
- if (x_framebuffer[i]) {
- XShmDetach(x_disp, &x_shminfo[i]);
- free(x_framebuffer[i]);
- shmdt(x_shminfo[i].shmaddr);
- x_framebuffer[i] = NULL;
- }
- } else if (x_framebuffer[0]) {
- free(x_framebuffer[0]->data);
- free(x_framebuffer[0]);
- x_framebuffer[0] = NULL;
- }
-
- XDestroyWindow( x_disp, x_win );
-
- XAutoRepeatOn(x_disp);
-// XCloseDisplay(x_disp);
-
- X11_active = false;
-}
-
-/*
-** SWimp_AppActivate
-*/
-void SWimp_AppActivate( qboolean active )
-{
-}
-
-//===============================================================================
-
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-
- int r;
- unsigned long addr;
- int psize = getpagesize();
-
- addr = (startaddr & ~(psize-1)) - psize;
-
-// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
-// addr, startaddr+length, length);
-
- r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
-
- if (r < 0)
- Sys_Error("Protection change failed\n");
-
-}
-
-/*****************************************************************************/
-/* KEYBOARD */
-/*****************************************************************************/
-
-Key_Event_fp_t Key_Event_fp;
-
-void KBD_Init(Key_Event_fp_t fp)
-{
- Key_Event_fp = fp;
-}
-
-void KBD_Update(void)
-{
-// get events from x server
- if (x_disp)
- {
- while (XPending(x_disp))
- GetEvent();
- while (keyq_head != keyq_tail)
- {
- Key_Event_fp(keyq[keyq_tail].key, keyq[keyq_tail].down);
- keyq_tail = (keyq_tail + 1) & 63;
- }
- }
-}
-
-void KBD_Close(void)
-{
-}
-
-
--- a/linux/snd_linux.c
+++ /dev/null
@@ -1,266 +1,0 @@
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/shm.h>
-#include <sys/wait.h>
-#include <linux/soundcard.h>
-#include <stdio.h>
-
-#include "../client/client.h"
-#include "../client/snd_loc.h"
-
-int audio_fd;
-int snd_inited;
-
-cvar_t *sndbits;
-cvar_t *sndspeed;
-cvar_t *sndchannels;
-cvar_t *snddevice;
-
-static int tryrates[] = { 11025, 22051, 44100, 8000 };
-
-qboolean SNDDMA_Init(void)
-{
-
- int rc;
- int fmt;
- int tmp;
- int i;
- char *s;
- struct audio_buf_info info;
- int caps;
- extern uid_t saved_euid;
-
- if (snd_inited)
- return;
-
- if (!snddevice) {
- sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE);
- sndspeed = Cvar_Get("sndspeed", "0", CVAR_ARCHIVE);
- sndchannels = Cvar_Get("sndchannels", "2", CVAR_ARCHIVE);
- snddevice = Cvar_Get("snddevice", "/dev/dsp", CVAR_ARCHIVE);
- }
-
-// open /dev/dsp, confirm capability to mmap, and get size of dma buffer
-
- if (!audio_fd) {
- seteuid(saved_euid);
-
- audio_fd = open(snddevice->string, O_RDWR);
-
- seteuid(getuid());
-
- if (audio_fd < 0)
- {
- perror(snddevice->string);
- Com_Printf("Could not open %s\n", snddevice->string);
- return 0;
- }
- }
-
- rc = ioctl(audio_fd, SNDCTL_DSP_RESET, 0);
- if (rc < 0)
- {
- perror(snddevice->string);
- Com_Printf("Could not reset %s\n", snddevice->string);
- close(audio_fd);
- 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;
- }
-
- if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1)
- {
- perror("GETOSPACE");
- Com_Printf("Um, can't do GETOSPACE?\n");
- close(audio_fd);
- return 0;
- }
-
-// 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 ; i<sizeof(tryrates)/4 ; i++)
- if (!ioctl(audio_fd, SNDCTL_DSP_SPEED, &tryrates[i])) break;
- dma.speed = tryrates[i];
- }
-
- dma.channels = (int)sndchannels->value;
- if (dma.channels < 1 || dma.channels > 2)
- dma.channels = 2;
-
- dma.samples = info.fragstotal * info.fragsize / (dma.samplebits/8);
- dma.submission_chunk = 1;
-
-// memory map the dma buffer
-
- if (!dma.buffer)
- dma.buffer = (unsigned char *) mmap(NULL, info.fragstotal
- * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0);
- if (!dma.buffer)
- {
- perror(snddevice->string);
- Com_Printf("Could not mmap %s\n", snddevice->string);
- close(audio_fd);
- return 0;
- }
-
- 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;
- }
-
-// 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;
- }
-
- dma.samplepos = 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;
- }
-// dma.samplepos = (count.bytes / (dma.samplebits / 8)) & (dma.samples-1);
-// fprintf(stderr, "%d \r", count.ptr);
- dma.samplepos = count.ptr / (dma.samplebits / 8);
-
- return dma.samplepos;
-
-}
-
-void SNDDMA_Shutdown(void)
-{
-#if 0
- if (snd_inited)
- {
- close(audio_fd);
- snd_inited = 0;
- }
-#endif
-}
-
-/*
-==============
-SNDDMA_Submit
-
-Send sound to device if buffer isn't really the dma buffer
-===============
-*/
-void SNDDMA_Submit(void)
-{
-}
-
-void SNDDMA_BeginPainting (void)
-{
-}
-
--- a/linux/snd_mixa.s
+++ /dev/null
@@ -1,193 +1,0 @@
-//
-// snd_mixa.s
-// x86 assembly-language sound code
-//
-
-#include "qasm.h"
-
-#if id386
-
- .text
-
-//----------------------------------------------------------------------
-// 8-bit sound-mixing code
-//----------------------------------------------------------------------
-
-#define ch 4+16
-#define sc 8+16
-#define count 12+16
-
-.globl C(S_PaintChannelFrom8)
-C(S_PaintChannelFrom8):
- pushl %esi // preserve register variables
- pushl %edi
- pushl %ebx
- pushl %ebp
-
-// int data;
-// short *lscale, *rscale;
-// unsigned char *sfx;
-// int i;
-
- movl ch(%esp),%ebx
- movl sc(%esp),%esi
-
-// if (ch->leftvol > 255)
-// ch->leftvol = 255;
-// if (ch->rightvol > 255)
-// ch->rightvol = 255;
- movl ch_leftvol(%ebx),%eax
- movl ch_rightvol(%ebx),%edx
- cmpl $255,%eax
- jna LLeftSet
- movl $255,%eax
-LLeftSet:
- cmpl $255,%edx
- jna LRightSet
- movl $255,%edx
-LRightSet:
-
-// lscale = snd_scaletable[ch->leftvol >> 3];
-// rscale = snd_scaletable[ch->rightvol >> 3];
-// sfx = (signed char *)sc->data + ch->pos;
-// ch->pos += count;
- andl $0xF8,%eax
- addl $(sfxc_data),%esi
- andl $0xF8,%edx
- movl ch_pos(%ebx),%edi
- movl count(%esp),%ecx
- addl %edi,%esi
- shll $7,%eax
- addl %ecx,%edi
- shll $7,%edx
- movl %edi,ch_pos(%ebx)
- addl $(C(snd_scaletable)),%eax
- addl $(C(snd_scaletable)),%edx
- subl %ebx,%ebx
- movb -1(%esi,%ecx,1),%bl
-
- testl $1,%ecx
- jz LMix8Loop
-
- movl (%eax,%ebx,4),%edi
- movl (%edx,%ebx,4),%ebp
- addl C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size),%edi
- addl C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size),%ebp
- movl %edi,C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size)
- movl %ebp,C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size)
- movb -2(%esi,%ecx,1),%bl
-
- decl %ecx
- jz LDone
-
-// for (i=0 ; i<count ; i++)
-// {
-LMix8Loop:
-
-// data = sfx[i];
-// paintbuffer[i].left += lscale[data];
-// paintbuffer[i].right += rscale[data];
- movl (%eax,%ebx,4),%edi
- movl (%edx,%ebx,4),%ebp
- addl C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size),%edi
- addl C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size),%ebp
- movb -2(%esi,%ecx,1),%bl
- movl %edi,C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size)
- movl %ebp,C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size)
-
- movl (%eax,%ebx,4),%edi
- movl (%edx,%ebx,4),%ebp
- movb -3(%esi,%ecx,1),%bl
- addl C(paintbuffer)+psp_left-psp_size*2(,%ecx,psp_size),%edi
- addl C(paintbuffer)+psp_right-psp_size*2(,%ecx,psp_size),%ebp
- movl %edi,C(paintbuffer)+psp_left-psp_size*2(,%ecx,psp_size)
- movl %ebp,C(paintbuffer)+psp_right-psp_size*2(,%ecx,psp_size)
-
-// }
- subl $2,%ecx
- jnz LMix8Loop
-
-LDone:
- popl %ebp
- popl %ebx
- popl %edi
- popl %esi
-
- ret
-
-
-//----------------------------------------------------------------------
-// Transfer of stereo buffer to 16-bit DMA buffer code
-//----------------------------------------------------------------------
-
-.globl C(S_WriteLinearBlastStereo16)
-C(S_WriteLinearBlastStereo16):
- pushl %edi
- pushl %ebx
-
-// int i;
-// int val;
- movl C(snd_linear_count),%ecx
- movl C(snd_p),%ebx
- movl C(snd_out),%edi
-
-// for (i=0 ; i<snd_linear_count ; i+=2)
-// {
-LWLBLoopTop:
-
-// val = (snd_p[i]*snd_vol)>>8;
-// if (val > 0x7fff)
-// snd_out[i] = 0x7fff;
-// else if (val < (short)0x8000)
-// snd_out[i] = (short)0x8000;
-// else
-// snd_out[i] = val;
- movl -8(%ebx,%ecx,4),%eax
- sarl $8,%eax
- cmpl $0x7FFF,%eax
- jg LClampHigh
- cmpl $0xFFFF8000,%eax
- jnl LClampDone
- movl $0xFFFF8000,%eax
- jmp LClampDone
-LClampHigh:
- movl $0x7FFF,%eax
-LClampDone:
-
-// val = (snd_p[i+1]*snd_vol)>>8;
-// if (val > 0x7fff)
-// snd_out[i+1] = 0x7fff;
-// else if (val < (short)0x8000)
-// snd_out[i+1] = (short)0x8000;
-// else
-// snd_out[i+1] = val;
- movl -4(%ebx,%ecx,4),%edx
- sarl $8,%edx
- cmpl $0x7FFF,%edx
- jg LClampHigh2
- cmpl $0xFFFF8000,%edx
- jnl LClampDone2
- movl $0xFFFF8000,%edx
- jmp LClampDone2
-LClampHigh2:
- movl $0x7FFF,%edx
-LClampDone2:
- shll $16,%edx
- andl $0xFFFF,%eax
- orl %eax,%edx
- movl %edx,-4(%edi,%ecx,2)
-
-// }
- subl $2,%ecx
- jnz LWLBLoopTop
-
-// snd_p += snd_linear_count;
-
- popl %ebx
- popl %edi
-
- ret
-
-
-#endif // id386
-
--- a/linux/sys_dosa.s
+++ /dev/null
@@ -1,94 +1,0 @@
-//
-// sys_dosa.s
-// x86 assembly-language DOS-dependent routines.
-
-#include "qasm.h"
-
-
- .data
-
- .align 4
-fpenv:
- .long 0, 0, 0, 0, 0, 0, 0, 0
-
- .text
-
-.globl C(MaskExceptions)
-C(MaskExceptions):
- fnstenv fpenv
- orl $0x3F,fpenv
- fldenv fpenv
-
- ret
-
-#if 0
-.globl C(unmaskexceptions)
-C(unmaskexceptions):
- fnstenv fpenv
- andl $0xFFFFFFE0,fpenv
- fldenv fpenv
-
- ret
-#endif
-
- .data
-
- .align 4
-.globl ceil_cw, single_cw, full_cw, cw, pushed_cw
-ceil_cw: .long 0
-single_cw: .long 0
-full_cw: .long 0
-cw: .long 0
-pushed_cw: .long 0
-
- .text
-
-.globl C(Sys_LowFPPrecision)
-C(Sys_LowFPPrecision):
- fldcw single_cw
-
- ret
-
-.globl C(Sys_HighFPPrecision)
-C(Sys_HighFPPrecision):
- fldcw full_cw
-
- ret
-
-.globl C(Sys_PushFPCW_SetHigh)
-C(Sys_PushFPCW_SetHigh):
- fnstcw pushed_cw
- fldcw full_cw
-
- ret
-
-.globl C(Sys_PopFPCW)
-C(Sys_PopFPCW):
- fldcw pushed_cw
-
- ret
-
-.globl C(Sys_SetFPCW)
-C(Sys_SetFPCW):
- fnstcw cw
- movl cw,%eax
-#if id386
- andb $0xF0,%ah
- orb $0x03,%ah // round mode, 64-bit precision
-#endif
- movl %eax,full_cw
-
-#if id386
- andb $0xF0,%ah
- orb $0x0C,%ah // chop mode, single precision
-#endif
- movl %eax,single_cw
-
-#if id386
- andb $0xF0,%ah
- orb $0x08,%ah // ceil mode, single precision
-#endif
- movl %eax,ceil_cw
-
- ret
-
--- a/linux/sys_linux.c
+++ /dev/null
@@ -1,379 +1,0 @@
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <mntent.h>
-
-#include <dlfcn.h>
-
-#include "../qcommon/qcommon.h"
-
-#include "../linux/rw_linux.h"
-
-cvar_t *nostdout;
-
-unsigned sys_frame_time;
-
-uid_t saved_euid;
-qboolean stdin_active = true;
-
-// =======================================================================
-// General routines
-// =======================================================================
-
-void Sys_ConsoleOutput (char *string)
-{
- if (nostdout && nostdout->value)
- return;
-
- fputs(string, stdout);
-}
-
-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");
-
- if (nostdout && nostdout->value)
- return;
-
- 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);
- }
-}
-
-void Sys_Quit (void)
-{
- CL_Shutdown ();
- Qcommon_Shutdown ();
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
- _exit(0);
-}
-
-void Sys_Init(void)
-{
-#if id386
-// Sys_SetFPCW();
-#endif
-}
-
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
- char string[1024];
-
-// change stdin to non blocking
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-
- CL_Shutdown ();
- Qcommon_Shutdown ();
-
- va_start (argptr,error);
- vsprintf (string,error,argptr);
- va_end (argptr);
- fprintf(stderr, "Error: %s\n", string);
-
- _exit (1);
-
-}
-
-void Sys_Warn (char *warning, ...)
-{
- va_list argptr;
- char string[1024];
-
- va_start (argptr,warning);
- vsprintf (string,warning,argptr);
- va_end (argptr);
- fprintf(stderr, "Warning: %s", string);
-}
-
-/*
-============
-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)
-{
-// Sys_Warn("floating point exception\n");
- signal(SIGFPE, floating_point_exception_handler);
-}
-
-char *Sys_ConsoleInput(void)
-{
- static char text[256];
- int len;
- fd_set fdset;
- struct timeval timeout;
-
- if (!dedicated || !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 = false;
- return NULL;
- }
-
- if (len < 1)
- return NULL;
- text[len-1] = 0; // rip off the /n and terminate
-
- return text;
-}
-
-/*****************************************************************************/
-
-static void *game_library;
-
-/*
-=================
-Sys_UnloadGame
-=================
-*/
-void Sys_UnloadGame (void)
-{
- if (game_library)
- dlclose (game_library);
- game_library = NULL;
-}
-
-/*
-=================
-Sys_GetGameAPI
-
-Loads the game dll
-=================
-*/
-void *Sys_GetGameAPI (void *parms)
-{
- void *(*GetGameAPI) (void *);
-
- char name[MAX_OSPATH];
- char curpath[MAX_OSPATH];
- char *path;
-#ifdef __i386__
- const char *gamename = "gamei386.so";
-#elif defined __alpha__
- const char *gamename = "gameaxp.so";
-#else
-#error Unknown arch
-#endif
-
- setreuid(getuid(), getuid());
- setegid(getgid());
-
- if (game_library)
- Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
-
- getcwd(curpath, sizeof(curpath));
-
- Com_Printf("------- Loading %s -------", gamename);
-
- // now run through the search paths
- path = NULL;
- while (1)
- {
- path = FS_NextPath (path);
- if (!path)
- return NULL; // couldn't find one anywhere
- sprintf (name, "%s/%s/%s", curpath, path, gamename);
- game_library = dlopen (name, RTLD_NOW );
- if (game_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n",name);
- break;
- }
- }
-
- GetGameAPI = (void *)dlsym (game_library, "GetGameAPI");
- if (!GetGameAPI)
- {
- Sys_UnloadGame ();
- return NULL;
- }
-
- return GetGameAPI (parms);
-}
-
-/*****************************************************************************/
-
-void Sys_AppActivate (void)
-{
-}
-
-void Sys_SendKeyEvents (void)
-{
-#ifndef DEDICATED_ONLY
- if (KBD_Update_fp)
- KBD_Update_fp();
-#endif
-
- // grab frame time
- sys_frame_time = Sys_Milliseconds();
-}
-
-/*****************************************************************************/
-
-char *Sys_GetClipboardData(void)
-{
- return NULL;
-}
-
-int main (int argc, char **argv)
-{
- int time, oldtime, newtime;
-
- // go back to real user for config loads
- saved_euid = geteuid();
- seteuid(getuid());
-
- Qcommon_Init(argc, argv);
-
- fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-
- nostdout = Cvar_Get("nostdout", "0", 0);
- if (!nostdout->value) {
- fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-// printf ("Linux Quake -- Version %0.3f\n", LINUX_VERSION);
- }
-
- oldtime = Sys_Milliseconds ();
- while (1)
- {
-// find time spent rendering last frame
- do {
- newtime = Sys_Milliseconds ();
- time = newtime - oldtime;
- } while (time < 1);
- Qcommon_Frame (time);
- oldtime = newtime;
- }
-
-}
-
-void Sys_CopyProtect(void)
-{
- FILE *mnt;
- struct mntent *ent;
- char path[MAX_OSPATH];
- struct stat st;
- qboolean found_cd = false;
-
- static qboolean checked = false;
-
- if (checked)
- return;
-
- if ((mnt = setmntent("/etc/mtab", "r")) == NULL)
- Com_Error(ERR_FATAL, "Can't read mount table to determine mounted cd location.");
-
- while ((ent = getmntent(mnt)) != NULL) {
- if (strcmp(ent->mnt_type, "iso9660") == 0) {
- // found a cd file system
- found_cd = true;
- sprintf(path, "%s/%s", ent->mnt_dir, "install/data/quake2.exe");
- if (stat(path, &st) == 0) {
- // found it
- checked = true;
- endmntent(mnt);
- return;
- }
- sprintf(path, "%s/%s", ent->mnt_dir, "Install/Data/quake2.exe");
- if (stat(path, &st) == 0) {
- // found it
- checked = true;
- endmntent(mnt);
- return;
- }
- sprintf(path, "%s/%s", ent->mnt_dir, "quake2.exe");
- if (stat(path, &st) == 0) {
- // found it
- checked = true;
- endmntent(mnt);
- return;
- }
- }
- }
- endmntent(mnt);
-
- if (found_cd)
- Com_Error (ERR_FATAL, "Could not find a Quake2 CD in your CD drive.");
- Com_Error (ERR_FATAL, "Unable to find a mounted iso9660 file system.\n"
- "You must mount the Quake2 CD in a cdrom drive in order to play.");
-}
-
-#if 0
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-
- int r;
- unsigned long addr;
- int psize = getpagesize();
-
- addr = (startaddr & ~(psize-1)) - psize;
-
-// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
-// addr, startaddr+length, length);
-
- r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
-
- if (r < 0)
- Sys_Error("Protection change failed\n");
-
-}
-
-#endif
--- a/linux/vid_menu.c
+++ /dev/null
@@ -1,437 +1,0 @@
-#include "../client/client.h"
-#include "../client/qmenu.h"
-
-#define REF_SOFT 0
-#define REF_SOFTX11 1
-#define REF_OPENGL 2
-
-extern cvar_t *vid_ref;
-extern cvar_t *vid_fullscreen;
-extern cvar_t *vid_gamma;
-extern cvar_t *scr_viewsize;
-
-static cvar_t *gl_mode;
-static cvar_t *gl_driver;
-static cvar_t *gl_picmip;
-static cvar_t *gl_ext_palettedtexture;
-
-static cvar_t *sw_mode;
-static cvar_t *sw_stipplealpha;
-
-static cvar_t *_windowed_mouse;
-
-extern void M_ForceMenuOff( void );
-
-/*
-====================================================================
-
-MENU INTERACTION
-
-====================================================================
-*/
-#define SOFTWARE_MENU 0
-#define OPENGL_MENU 1
-
-static menuframework_s s_software_menu;
-static menuframework_s s_opengl_menu;
-static menuframework_s *s_current_menu;
-static int s_current_menu_index;
-
-static menulist_s s_mode_list[2];
-static menulist_s s_ref_list[2];
-static menuslider_s s_tq_slider;
-static menuslider_s s_screensize_slider[2];
-static menuslider_s s_brightness_slider[2];
-static menulist_s s_fs_box[2];
-static menulist_s s_stipple_box;
-static menulist_s s_paletted_texture_box;
-static menulist_s s_windowed_mouse;
-static menuaction_s s_apply_action[2];
-static menuaction_s s_defaults_action[2];
-
-static void DriverCallback( void *unused )
-{
- s_ref_list[!s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue;
-
- if ( s_ref_list[s_current_menu_index].curvalue < 2 )
- {
- s_current_menu = &s_software_menu;
- s_current_menu_index = 0;
- }
- else
- {
- s_current_menu = &s_opengl_menu;
- s_current_menu_index = 1;
- }
-
-}
-
-static void ScreenSizeCallback( void *s )
-{
- menuslider_s *slider = ( menuslider_s * ) s;
-
- Cvar_SetValue( "viewsize", slider->curvalue * 10 );
-}
-
-static void BrightnessCallback( void *s )
-{
- menuslider_s *slider = ( menuslider_s * ) s;
-
- if ( s_current_menu_index == 0)
- s_brightness_slider[1].curvalue = s_brightness_slider[0].curvalue;
- else
- s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue;
-
- if ( stricmp( vid_ref->string, "soft" ) == 0 ||
- stricmp( vid_ref->string, "softx" ) == 0 )
- {
- float gamma = ( 0.8 - ( slider->curvalue/10.0 - 0.5 ) ) + 0.5;
-
- Cvar_SetValue( "vid_gamma", gamma );
- }
-}
-
-static void ResetDefaults( void *unused )
-{
- VID_MenuInit();
-}
-
-static void ApplyChanges( void *unused )
-{
- float gamma;
-
- /*
- ** make values consistent
- */
- s_fs_box[!s_current_menu_index].curvalue = s_fs_box[s_current_menu_index].curvalue;
- s_brightness_slider[!s_current_menu_index].curvalue = s_brightness_slider[s_current_menu_index].curvalue;
- s_ref_list[!s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue;
-
- /*
- ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3
- */
- gamma = ( 0.8 - ( s_brightness_slider[s_current_menu_index].curvalue/10.0 - 0.5 ) ) + 0.5;
-
- Cvar_SetValue( "vid_gamma", gamma );
- Cvar_SetValue( "sw_stipplealpha", s_stipple_box.curvalue );
- Cvar_SetValue( "gl_picmip", 3 - s_tq_slider.curvalue );
- Cvar_SetValue( "vid_fullscreen", s_fs_box[s_current_menu_index].curvalue );
- Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue );
- Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue );
- Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue );
- Cvar_SetValue( "_windowed_mouse", s_windowed_mouse.curvalue);
-
- switch ( s_ref_list[s_current_menu_index].curvalue )
- {
- case REF_SOFT:
- Cvar_Set( "vid_ref", "soft" );
- break;
- case REF_SOFTX11:
- Cvar_Set( "vid_ref", "softx" );
- break;
- case REF_OPENGL:
- Cvar_Set( "vid_ref", "gl" );
- Cvar_Set( "gl_driver", "opengl32" );
- break;
- }
-
-#if 0
- /*
- ** update appropriate stuff if we're running OpenGL and gamma
- ** has been modified
- */
- if ( stricmp( vid_ref->string, "gl" ) == 0 )
- {
- if ( vid_gamma->modified )
- {
- vid_ref->modified = true;
- if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 )
- {
- char envbuffer[1024];
- float g;
-
- vid_ref->modified = true;
-
- g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
- Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
- putenv( envbuffer );
-
- vid_gamma->modified = false;
- }
- }
- }
-#endif
-
- M_ForceMenuOff();
-}
-
-/*
-** VID_MenuInit
-*/
-void VID_MenuInit( void )
-{
- static const char *resolutions[] =
- {
- "[320 240 ]",
- "[400 300 ]",
- "[512 384 ]",
- "[640 480 ]",
- "[800 600 ]",
- "[960 720 ]",
- "[1024 768 ]",
- "[1152 864 ]",
- "[1280 1024]",
- "[1600 1200]",
- 0
- };
- static const char *refs[] =
- {
- "[software ]",
- "[software X11 ]",
- "[default OpenGL]",
- 0
- };
- static const char *yesno_names[] =
- {
- "no",
- "yes",
- 0
- };
- int i;
-
- if ( !gl_driver )
- gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
- if ( !gl_picmip )
- gl_picmip = Cvar_Get( "gl_picmip", "0", 0 );
- if ( !gl_mode )
- gl_mode = Cvar_Get( "gl_mode", "3", 0 );
- if ( !sw_mode )
- sw_mode = Cvar_Get( "sw_mode", "0", 0 );
- if ( !gl_ext_palettedtexture )
- gl_ext_palettedtexture = Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE );
-
- if ( !sw_stipplealpha )
- sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE );
-
- if ( !_windowed_mouse)
- _windowed_mouse = Cvar_Get( "_windowed_mouse", "0", CVAR_ARCHIVE );
-
- s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value;
- s_mode_list[OPENGL_MENU].curvalue = gl_mode->value;
-
- if ( !scr_viewsize )
- scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);
-
- s_screensize_slider[SOFTWARE_MENU].curvalue = scr_viewsize->value/10;
- s_screensize_slider[OPENGL_MENU].curvalue = scr_viewsize->value/10;
-
- if ( strcmp( vid_ref->string, "soft" ) == 0)
- {
- s_current_menu_index = SOFTWARE_MENU;
- s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFT;
- }
- else if (strcmp( vid_ref->string, "softx" ) == 0 )
- {
- s_current_menu_index = SOFTWARE_MENU;
- s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFTX11;
- }
- else if ( strcmp( vid_ref->string, "gl" ) == 0 )
- {
- s_current_menu_index = OPENGL_MENU;
- s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
-#if 0
- if ( strcmp( gl_driver->string, "3dfxgl" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_3DFX;
- else if ( strcmp( gl_driver->string, "pvrgl" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_POWERVR;
- else if ( strcmp( gl_driver->string, "opengl32" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
- else
- s_ref_list[s_current_menu_index].curvalue = REF_VERITE;
-#endif
- }
-
- s_software_menu.x = viddef.width * 0.50;
- s_software_menu.nitems = 0;
- s_opengl_menu.x = viddef.width * 0.50;
- s_opengl_menu.nitems = 0;
-
- for ( i = 0; i < 2; i++ )
- {
- s_ref_list[i].generic.type = MTYPE_SPINCONTROL;
- s_ref_list[i].generic.name = "driver";
- s_ref_list[i].generic.x = 0;
- s_ref_list[i].generic.y = 0;
- s_ref_list[i].generic.callback = DriverCallback;
- s_ref_list[i].itemnames = refs;
-
- s_mode_list[i].generic.type = MTYPE_SPINCONTROL;
- s_mode_list[i].generic.name = "video mode";
- s_mode_list[i].generic.x = 0;
- s_mode_list[i].generic.y = 10;
- s_mode_list[i].itemnames = resolutions;
-
- s_screensize_slider[i].generic.type = MTYPE_SLIDER;
- s_screensize_slider[i].generic.x = 0;
- s_screensize_slider[i].generic.y = 20;
- s_screensize_slider[i].generic.name = "screen size";
- s_screensize_slider[i].minvalue = 3;
- s_screensize_slider[i].maxvalue = 12;
- s_screensize_slider[i].generic.callback = ScreenSizeCallback;
-
- s_brightness_slider[i].generic.type = MTYPE_SLIDER;
- s_brightness_slider[i].generic.x = 0;
- s_brightness_slider[i].generic.y = 30;
- s_brightness_slider[i].generic.name = "brightness";
- s_brightness_slider[i].generic.callback = BrightnessCallback;
- s_brightness_slider[i].minvalue = 5;
- s_brightness_slider[i].maxvalue = 13;
- s_brightness_slider[i].curvalue = ( 1.3 - vid_gamma->value + 0.5 ) * 10;
-
- s_fs_box[i].generic.type = MTYPE_SPINCONTROL;
- s_fs_box[i].generic.x = 0;
- s_fs_box[i].generic.y = 40;
- s_fs_box[i].generic.name = "fullscreen";
- s_fs_box[i].itemnames = yesno_names;
- s_fs_box[i].curvalue = vid_fullscreen->value;
-
- s_defaults_action[i].generic.type = MTYPE_ACTION;
- s_defaults_action[i].generic.name = "reset to default";
- s_defaults_action[i].generic.x = 0;
- s_defaults_action[i].generic.y = 90;
- s_defaults_action[i].generic.callback = ResetDefaults;
-
- s_apply_action[i].generic.type = MTYPE_ACTION;
- s_apply_action[i].generic.name = "apply";
- s_apply_action[i].generic.x = 0;
- s_apply_action[i].generic.y = 100;
- s_apply_action[i].generic.callback = ApplyChanges;
- }
-
- s_stipple_box.generic.type = MTYPE_SPINCONTROL;
- s_stipple_box.generic.x = 0;
- s_stipple_box.generic.y = 60;
- s_stipple_box.generic.name = "stipple alpha";
- s_stipple_box.curvalue = sw_stipplealpha->value;
- s_stipple_box.itemnames = yesno_names;
-
- s_windowed_mouse.generic.type = MTYPE_SPINCONTROL;
- s_windowed_mouse.generic.x = 0;
- s_windowed_mouse.generic.y = 72;
- s_windowed_mouse.generic.name = "windowed mouse";
- s_windowed_mouse.curvalue = _windowed_mouse->value;
- s_windowed_mouse.itemnames = yesno_names;
-
- s_tq_slider.generic.type = MTYPE_SLIDER;
- s_tq_slider.generic.x = 0;
- s_tq_slider.generic.y = 60;
- s_tq_slider.generic.name = "texture quality";
- s_tq_slider.minvalue = 0;
- s_tq_slider.maxvalue = 3;
- s_tq_slider.curvalue = 3-gl_picmip->value;
-
- s_paletted_texture_box.generic.type = MTYPE_SPINCONTROL;
- s_paletted_texture_box.generic.x = 0;
- s_paletted_texture_box.generic.y = 70;
- s_paletted_texture_box.generic.name = "8-bit textures";
- s_paletted_texture_box.itemnames = yesno_names;
- s_paletted_texture_box.curvalue = gl_ext_palettedtexture->value;
-
- Menu_AddItem( &s_software_menu, ( void * ) &s_ref_list[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_mode_list[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_screensize_slider[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_brightness_slider[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_fs_box[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_stipple_box );
- Menu_AddItem( &s_software_menu, ( void * ) &s_windowed_mouse );
-
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_ref_list[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_mode_list[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_screensize_slider[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_brightness_slider[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_fs_box[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_tq_slider );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_paletted_texture_box );
-
- Menu_AddItem( &s_software_menu, ( void * ) &s_defaults_action[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_apply_action[SOFTWARE_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_defaults_action[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_apply_action[OPENGL_MENU] );
-
- Menu_Center( &s_software_menu );
- Menu_Center( &s_opengl_menu );
- s_opengl_menu.x -= 8;
- s_software_menu.x -= 8;
-}
-
-/*
-================
-VID_MenuDraw
-================
-*/
-void VID_MenuDraw (void)
-{
- int w, h;
-
- if ( s_current_menu_index == 0 )
- s_current_menu = &s_software_menu;
- else
- s_current_menu = &s_opengl_menu;
-
- /*
- ** draw the banner
- */
- re.DrawGetPicSize( &w, &h, "m_banner_video" );
- re.DrawPic( viddef.width / 2 - w / 2, viddef.height /2 - 110, "m_banner_video" );
-
- /*
- ** move cursor to a reasonable starting position
- */
- Menu_AdjustCursor( s_current_menu, 1 );
-
- /*
- ** draw the menu
- */
- Menu_Draw( s_current_menu );
-}
-
-/*
-================
-VID_MenuKey
-================
-*/
-const char *VID_MenuKey( int key )
-{
- extern void M_PopMenu( void );
-
- menuframework_s *m = s_current_menu;
- static const char *sound = "misc/menu1.wav";
-
- switch ( key )
- {
- case K_ESCAPE:
- M_PopMenu();
- return NULL;
- case K_UPARROW:
- m->cursor--;
- Menu_AdjustCursor( m, -1 );
- break;
- case K_DOWNARROW:
- m->cursor++;
- Menu_AdjustCursor( m, 1 );
- break;
- case K_LEFTARROW:
- Menu_SlideItem( m, -1 );
- break;
- case K_RIGHTARROW:
- Menu_SlideItem( m, 1 );
- break;
- case K_ENTER:
- Menu_SelectItem( m );
- break;
- }
-
- return sound;
-}
-
-
--- a/linux/vid_so.c
+++ /dev/null
@@ -1,489 +1,0 @@
-// Main windowed and fullscreen graphics interface module. This module
-// is used for both the software and OpenGL rendering versions of the
-// Quake refresh engine.
-
-#define SO_FILE "/etc/quake2.conf"
-
-#include <assert.h>
-#include <dlfcn.h> // ELF dl loader
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "../client/client.h"
-
-#include "../linux/rw_linux.h"
-
-// Structure containing functions exported from refresh DLL
-refexport_t re;
-
-// Console variables that we need to access from this module
-cvar_t *vid_gamma;
-cvar_t *vid_ref; // Name of Refresh DLL loaded
-cvar_t *vid_xpos; // X coordinate of window position
-cvar_t *vid_ypos; // Y coordinate of window position
-cvar_t *vid_fullscreen;
-
-// Global variables used internally by this module
-viddef_t viddef; // global video state; used by other modules
-void *reflib_library; // Handle to refresh DLL
-qboolean reflib_active = 0;
-
-#define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
-
-/** KEYBOARD **************************************************************/
-
-void Do_Key_Event(int key, qboolean down);
-
-void (*KBD_Update_fp)(void);
-void (*KBD_Init_fp)(Key_Event_fp_t fp);
-void (*KBD_Close_fp)(void);
-
-/** MOUSE *****************************************************************/
-
-in_state_t in_state;
-
-void (*RW_IN_Init_fp)(in_state_t *in_state_p);
-void (*RW_IN_Shutdown_fp)(void);
-void (*RW_IN_Activate_fp)(qboolean active);
-void (*RW_IN_Commands_fp)(void);
-void (*RW_IN_Move_fp)(usercmd_t *cmd);
-void (*RW_IN_Frame_fp)(void);
-
-void Real_IN_Init (void);
-
-/*
-==========================================================================
-
-DLL GLUE
-
-==========================================================================
-*/
-
-#define MAXPRINTMSG 4096
-void VID_Printf (int print_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
- static qboolean inupdate;
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- if (print_level == PRINT_ALL)
- Com_Printf ("%s", msg);
- else
- Com_DPrintf ("%s", msg);
-}
-
-void VID_Error (int err_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
- static qboolean inupdate;
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- Com_Error (err_level,"%s", msg);
-}
-
-//==========================================================================
-
-/*
-============
-VID_Restart_f
-
-Console command to re-start the video mode and refresh DLL. We do this
-simply by setting the modified flag for the vid_ref variable, which will
-cause the entire video mode and refresh DLL to be reset on the next frame.
-============
-*/
-void VID_Restart_f (void)
-{
- vid_ref->modified = true;
-}
-
-/*
-** VID_GetModeInfo
-*/
-typedef struct vidmode_s
-{
- const char *description;
- int width, height;
- int mode;
-} vidmode_t;
-
-vidmode_t vid_modes[] =
-{
- { "Mode 0: 320x240", 320, 240, 0 },
- { "Mode 1: 400x300", 400, 300, 1 },
- { "Mode 2: 512x384", 512, 384, 2 },
- { "Mode 3: 640x480", 640, 480, 3 },
- { "Mode 4: 800x600", 800, 600, 4 },
- { "Mode 5: 960x720", 960, 720, 5 },
- { "Mode 6: 1024x768", 1024, 768, 6 },
- { "Mode 7: 1152x864", 1152, 864, 7 },
- { "Mode 8: 1280x1024", 1280, 1024, 8 },
- { "Mode 9: 1600x1200", 1600, 1200, 9 }
-};
-
-qboolean VID_GetModeInfo( int *width, int *height, int mode )
-{
- if ( mode < 0 || mode >= VID_NUM_MODES )
- return false;
-
- *width = vid_modes[mode].width;
- *height = vid_modes[mode].height;
-
- return true;
-}
-
-/*
-** VID_NewWindow
-*/
-void VID_NewWindow ( int width, int height)
-{
- viddef.width = width;
- viddef.height = height;
-}
-
-void VID_FreeReflib (void)
-{
- if (reflib_library) {
- if (KBD_Close_fp)
- KBD_Close_fp();
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
- dlclose(reflib_library);
- }
-
- KBD_Init_fp = NULL;
- KBD_Update_fp = NULL;
- KBD_Close_fp = NULL;
- RW_IN_Init_fp = NULL;
- RW_IN_Shutdown_fp = NULL;
- RW_IN_Activate_fp = NULL;
- RW_IN_Commands_fp = NULL;
- RW_IN_Move_fp = NULL;
- RW_IN_Frame_fp = NULL;
-
- memset (&re, 0, sizeof(re));
- reflib_library = NULL;
- reflib_active = false;
-}
-
-/*
-==============
-VID_LoadRefresh
-==============
-*/
-qboolean VID_LoadRefresh( char *name )
-{
- refimport_t ri;
- GetRefAPI_t GetRefAPI;
- char fn[MAX_OSPATH];
- struct stat st;
- extern uid_t saved_euid;
- FILE *fp;
-
- if ( reflib_active )
- {
- if (KBD_Close_fp)
- KBD_Close_fp();
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
- KBD_Close_fp = NULL;
- RW_IN_Shutdown_fp = NULL;
- re.Shutdown();
- VID_FreeReflib ();
- }
-
- Com_Printf( "------- Loading %s -------\n", name );
-
- //regain root
- seteuid(saved_euid);
-
- if ((fp = fopen(SO_FILE, "r")) == NULL) {
- Com_Printf( "LoadLibrary(\"%s\") failed: can't open " SO_FILE " (required for location of ref libraries)\n", name);
- return false;
- }
- fgets(fn, sizeof(fn), fp);
- fclose(fp);
- if (*fn && fn[strlen(fn) - 1] == '\n')
- fn[strlen(fn) - 1] = 0;
-
- strcat(fn, "/");
- strcat(fn, name);
-
- // permission checking
- if (strstr(fn, "softx") == NULL) { // softx doesn't require root
- if (stat(fn, &st) == -1) {
- Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
- return false;
- }
- if (st.st_uid != 0) {
- Com_Printf( "LoadLibrary(\"%s\") failed: ref is not owned by root\n", name);
- return false;
- }
-#if 0
- if ((st.st_mode & 0777) & ~0700) {
- Com_Printf( "LoadLibrary(\"%s\") failed: invalid permissions, must be 700 for security considerations\n", name);
- return false;
- }
-#endif
- } else {
- // softx requires we give up root now
- setreuid(getuid(), getuid());
- setegid(getgid());
- }
-
- if ( ( reflib_library = dlopen( fn, RTLD_NOW ) ) == 0 )
- {
- Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name , dlerror());
- return false;
- }
-
- ri.Cmd_AddCommand = Cmd_AddCommand;
- ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
- ri.Cmd_Argc = Cmd_Argc;
- ri.Cmd_Argv = Cmd_Argv;
- ri.Cmd_ExecuteText = Cbuf_ExecuteText;
- ri.Con_Printf = VID_Printf;
- ri.Sys_Error = VID_Error;
- ri.FS_LoadFile = FS_LoadFile;
- ri.FS_FreeFile = FS_FreeFile;
- ri.FS_Gamedir = FS_Gamedir;
- ri.Cvar_Get = Cvar_Get;
- ri.Cvar_Set = Cvar_Set;
- ri.Cvar_SetValue = Cvar_SetValue;
- ri.Vid_GetModeInfo = VID_GetModeInfo;
- ri.Vid_MenuInit = VID_MenuInit;
- ri.Vid_NewWindow = VID_NewWindow;
-
- if ( ( GetRefAPI = (void *) dlsym( reflib_library, "GetRefAPI" ) ) == 0 )
- Com_Error( ERR_FATAL, "dlsym failed on %s", name );
-
- re = GetRefAPI( ri );
-
- if (re.api_version != API_VERSION)
- {
- VID_FreeReflib ();
- Com_Error (ERR_FATAL, "%s has incompatible api_version", name);
- }
-
- /* Init IN (Mouse) */
- in_state.IN_CenterView_fp = IN_CenterView;
- in_state.Key_Event_fp = Do_Key_Event;
- in_state.viewangles = cl.viewangles;
- in_state.in_strafe_state = &in_strafe.state;
-
- if ((RW_IN_Init_fp = dlsym(reflib_library, "RW_IN_Init")) == NULL ||
- (RW_IN_Shutdown_fp = dlsym(reflib_library, "RW_IN_Shutdown")) == NULL ||
- (RW_IN_Activate_fp = dlsym(reflib_library, "RW_IN_Activate")) == NULL ||
- (RW_IN_Commands_fp = dlsym(reflib_library, "RW_IN_Commands")) == NULL ||
- (RW_IN_Move_fp = dlsym(reflib_library, "RW_IN_Move")) == NULL ||
- (RW_IN_Frame_fp = dlsym(reflib_library, "RW_IN_Frame")) == NULL)
- Sys_Error("No RW_IN functions in REF.\n");
-
- Real_IN_Init();
-
- if ( re.Init( 0, 0 ) == -1 )
- {
- re.Shutdown();
- VID_FreeReflib ();
- return false;
- }
-
- /* Init KBD */
-#if 1
- if ((KBD_Init_fp = dlsym(reflib_library, "KBD_Init")) == NULL ||
- (KBD_Update_fp = dlsym(reflib_library, "KBD_Update")) == NULL ||
- (KBD_Close_fp = dlsym(reflib_library, "KBD_Close")) == NULL)
- Sys_Error("No KBD functions in REF.\n");
-#else
- {
- void KBD_Init(void);
- void KBD_Update(void);
- void KBD_Close(void);
-
- KBD_Init_fp = KBD_Init;
- KBD_Update_fp = KBD_Update;
- KBD_Close_fp = KBD_Close;
- }
-#endif
- KBD_Init_fp(Do_Key_Event);
-
- // give up root now
- setreuid(getuid(), getuid());
- setegid(getgid());
-
- Com_Printf( "------------------------------------\n");
- reflib_active = true;
- return true;
-}
-
-/*
-============
-VID_CheckChanges
-
-This function gets called once just before drawing each frame, and it's sole purpose in life
-is to check to see if any of the video mode parameters have changed, and if they have to
-update the rendering DLL and/or video mode to match.
-============
-*/
-void VID_CheckChanges (void)
-{
- char name[100];
- cvar_t *sw_mode;
-
- if ( vid_ref->modified )
- {
- S_StopAllSounds();
- }
-
- while (vid_ref->modified)
- {
- /*
- ** refresh has changed
- */
- vid_ref->modified = false;
- vid_fullscreen->modified = true;
- cl.refresh_prepped = false;
- cls.disable_screen = true;
-
- sprintf( name, "ref_%s.so", vid_ref->string );
- if ( !VID_LoadRefresh( name ) )
- {
- if ( strcmp (vid_ref->string, "soft") == 0 ||
- strcmp (vid_ref->string, "softx") == 0 ) {
-Com_Printf("Refresh failed\n");
- sw_mode = Cvar_Get( "sw_mode", "0", 0 );
- if (sw_mode->value != 0) {
-Com_Printf("Trying mode 0\n");
- Cvar_SetValue("sw_mode", 0);
- if ( !VID_LoadRefresh( name ) )
- Com_Error (ERR_FATAL, "Couldn't fall back to software refresh!");
- } else
- Com_Error (ERR_FATAL, "Couldn't fall back to software refresh!");
- }
-
- Cvar_Set( "vid_ref", "soft" );
-
- /*
- ** drop the console if we fail to load a refresh
- */
- if ( cls.key_dest != key_console )
- {
- Con_ToggleConsole_f();
- }
- }
- cls.disable_screen = false;
- }
-
-}
-
-/*
-============
-VID_Init
-============
-*/
-void VID_Init (void)
-{
- /* Create the video variables so we know how to start the graphics drivers */
- // if DISPLAY is defined, try X
- if (getenv("DISPLAY"))
- vid_ref = Cvar_Get ("vid_ref", "softx", CVAR_ARCHIVE);
- else
- vid_ref = Cvar_Get ("vid_ref", "soft", CVAR_ARCHIVE);
- vid_xpos = Cvar_Get ("vid_xpos", "3", CVAR_ARCHIVE);
- vid_ypos = Cvar_Get ("vid_ypos", "22", CVAR_ARCHIVE);
- vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE);
- vid_gamma = Cvar_Get( "vid_gamma", "1", CVAR_ARCHIVE );
-
- /* Add some console commands that we want to handle */
- Cmd_AddCommand ("vid_restart", VID_Restart_f);
-
- /* Disable the 3Dfx splash screen */
- putenv("FX_GLIDE_NO_SPLASH=0");
-
- /* Start the graphics mode and load refresh DLL */
- VID_CheckChanges();
-}
-
-/*
-============
-VID_Shutdown
-============
-*/
-void VID_Shutdown (void)
-{
- if ( reflib_active )
- {
- if (KBD_Close_fp)
- KBD_Close_fp();
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
- KBD_Close_fp = NULL;
- RW_IN_Shutdown_fp = NULL;
- re.Shutdown ();
- VID_FreeReflib ();
- }
-}
-
-
-/*****************************************************************************/
-/* INPUT */
-/*****************************************************************************/
-
-cvar_t *in_joystick;
-
-// This if fake, it's acutally done by the Refresh load
-void IN_Init (void)
-{
- in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE);
-}
-
-void Real_IN_Init (void)
-{
- if (RW_IN_Init_fp)
- RW_IN_Init_fp(&in_state);
-}
-
-void IN_Shutdown (void)
-{
- if (RW_IN_Shutdown_fp)
- RW_IN_Shutdown_fp();
-}
-
-void IN_Commands (void)
-{
- if (RW_IN_Commands_fp)
- RW_IN_Commands_fp();
-}
-
-void IN_Move (usercmd_t *cmd)
-{
- if (RW_IN_Move_fp)
- RW_IN_Move_fp(cmd);
-}
-
-void IN_Frame (void)
-{
- if (RW_IN_Frame_fp)
- RW_IN_Frame_fp();
-}
-
-void IN_Activate (qboolean active)
-{
- if (RW_IN_Activate_fp)
- RW_IN_Activate_fp(active);
-}
-
-void Do_Key_Event(int key, qboolean down)
-{
- Key_Event(key, down, Sys_Milliseconds());
-}
-
--- a/makefile
+++ /dev/null
@@ -1,259 +1,0 @@
-
-CFLAGS = -Wall -c -g -DNO_PRIVATE
-LDFLAGS = -sectcreate __ICON __header rhapsody/QuakeWorld.iconheader -segprot __ICON r r -sectcreate __ICON app rhapsody/QuakeWorld.tiff -framework AppKit -framework Foundation
-ODIR = rhapsody/output
-
-EXEBASE = QuakeWorld
-EXE = $(ODIR)/$(EXEBASE)
-all: $(EXE)
-
-_next:
- make "CFLAGS = -Wall -c -g -DNO_PRIVATE" "ODIR = rhapsody/output"
-
-_nextopt:
- make "CFLAGS = -O2 -c -g -DNO_PRIVATE" "ODIR = rhapsody/output"
-
-_irix:
- make "CFLAGS = -c -Ofast=ip32_10k -Xcpluscomm -DNO_PRIVATE" "LDFLAGS = -Ofast=ip32_10k -lm" "ODIR = irix"
-
-_osf:
- make "CFLAGS = -c -O4 -DNO_PRIVATE" "LDFLAGS = -lm" "ODIR = osf"
-
-clean:
- rm -f $(ODIR)/*.o $(EXE)
-
-REF_SOFT_SYSTEM_FILES = $(ODIR)/r_next.o
-
-REF_SOFT_FILES = $(ODIR)/d_polyse.o $(ODIR)/d_scan.o $(ODIR)/draw.o $(ODIR)/model.o $(ODIR)/r_aclip.o $(ODIR)/r_alias.o $(ODIR)/r_bsp.o $(ODIR)/r_draw.o $(ODIR)/r_edge.o $(ODIR)/r_efrag.o $(ODIR)/r_inter.o $(ODIR)/r_light.o $(ODIR)/r_main.o $(ODIR)/r_misc.o $(ODIR)/r_part.o $(ODIR)/r_sky.o $(ODIR)/r_sprite.o $(ODIR)/r_surf.o $(REF_SOFT_SYSTEM_FILES)
-
-CLIENT_SYSTEM_FILES = $(ODIR)/in_next.o $(ODIR)/cd_null.o $(ODIR)/snd_next.o $(ODIR)/vid_null.o
-SOUND_FILES = $(ODIR)/snd_dma.o $(ODIR)/snd_mix.o $(ODIR)/snd_mem.o
-CLIENT_FILES = $(ODIR)/cl_demo.o $(ODIR)/cl_ents.o $(ODIR)/cl_input.o $(ODIR)/cl_main.o $(ODIR)/cl_parse.o $(ODIR)/cl_pred.o $(ODIR)/cl_tent.o $(ODIR)/console.o $(ODIR)/keys.o $(ODIR)/menu.o $(ODIR)/sbar.o $(ODIR)/screen.o $(ODIR)/view.o $(SOUND_FILES) $(CLIENT_SYSTEM_FILES) $(REF_SOFT_FILES)
-#CLIENT_FILES = $(ODIR)/cl_null.o
-
-
-SERVER_FILES = $(ODIR)/pr_cmds.o $(ODIR)/pr_edict.o $(ODIR)/pr_exec.o $(ODIR)/sv_ccmds.o $(ODIR)/sv_ents.o $(ODIR)/sv_init.o $(ODIR)/sv_main.o $(ODIR)/sv_move.o $(ODIR)/sv_phys.o $(ODIR)/sv_send.o $(ODIR)/sv_user.o $(ODIR)/world.o
-#SERVER_FILES = $(ODIR)/sv_null.o
-
-
-QCOMMON_SYSTEM_FILES = $(ODIR)/net_udp.o $(ODIR)/sys_next.o
-QCOMMON_FILES = $(ODIR)/cmd.o $(ODIR)/cmodel.o $(ODIR)/common.o $(ODIR)/crc.o $(ODIR)/cvar.o $(ODIR)/files.o $(ODIR)/mathlib.o $(ODIR)/net_chan.o $(ODIR)/pmove.o $(QCOMMON_SYSTEM_FILES)
-
-$(EXE): $(CLIENT_FILES) $(SERVER_FILES) $(QCOMMON_FILES)
- cc -o $(EXE) $(CLIENT_FILES) $(SERVER_FILES) $(QCOMMON_FILES) $(LDFLAGS)
-
-#===========================================================================
-
-$(ODIR)/cl_null.o : client/cl_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_demo.o : client/cl_demo.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cl_ents.o : client/cl_ents.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cl_input.o : client/cl_input.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cl_main.o : client/cl_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cl_parse.o : client/cl_parse.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cl_pred.o : client/cl_pred.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cl_tent.o : client/cl_tent.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/console.o : client/console.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/keys.o : client/keys.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/menu.o : client/menu.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sbar.o : client/sbar.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/screen.o : client/screen.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/view.o : client/view.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_dma.o : client/snd_dma.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/snd_mix.o : client/snd_mix.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/snd_mem.o : client/snd_mem.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cd_null.o : client/cd_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/in_null.o : client/in_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/snd_null.o : client/snd_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/vid_null.o : client/vid_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/in_next.o : rhapsody/in_next.m
- cc $(CFLAGS) -o $@ $?
-$(ODIR)/snd_next.o : rhapsody/snd_next.m
- cc $(CFLAGS) -o $@ $?
-
-#===========================================================================
-
-$(ODIR)/sv_null.o : server/sv_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/pr_cmds.o : server/pr_cmds.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/pr_edict.o : server/pr_edict.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/pr_exec.o : server/pr_exec.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_ccmds.o : server/sv_ccmds.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_ents.o : server/sv_ents.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_init.o : server/sv_init.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_main.o : server/sv_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_move.o : server/sv_move.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_phys.o : server/sv_phys.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_send.o : server/sv_send.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sv_user.o : server/sv_user.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/world.o : server/world.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#===========================================================================
-
-$(ODIR)/d_polyse.o : ref_soft/d_polyse.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/d_scan.o : ref_soft/d_scan.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/draw.o : ref_soft/draw.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/model.o : ref_soft/model.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_aclip.o : ref_soft/r_aclip.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_alias.o : ref_soft/r_alias.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_bsp.o : ref_soft/r_bsp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_draw.o : ref_soft/r_draw.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_edge.o : ref_soft/r_edge.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_efrag.o : ref_soft/r_efrag.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_inter.o : ref_soft/r_inter.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_light.o : ref_soft/r_light.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_main.o : ref_soft/r_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_misc.o : ref_soft/r_misc.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_part.o : ref_soft/r_part.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_sky.o : ref_soft/r_sky.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_sprite.o : ref_soft/r_sprite.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/r_surf.o : ref_soft/r_surf.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_next.o : rhapsody/r_next.m
- cc $(CFLAGS) -o $@ $?
-
-#===========================================================================
-
-$(ODIR)/cmd.o : qcommon/cmd.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cmodel.o : qcommon/cmodel.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/common.o : qcommon/common.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/crc.o : qcommon/crc.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/cvar.o : qcommon/cvar.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/files.o : qcommon/files.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/mathlib.o : qcommon/mathlib.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/net_chan.o : qcommon/net_chan.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/net_udp.o : qcommon/net_udp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/pmove.o : qcommon/pmove.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sys_null.o : qcommon/sys_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-$(ODIR)/sys_next.o : rhapsody/sys_next.m
- cc $(CFLAGS) -o $@ $?
--- a/makezip
+++ /dev/null
@@ -1,2 +1,0 @@
-zip -9 -r code .
-
--- a/makezip.bat
+++ /dev/null
@@ -1,1 +1,0 @@
-zip -9 -r -D -X code .
--- a/null/cd_null.c
+++ /dev/null
@@ -1,31 +1,0 @@
-#include "../client/client.h"
-
-void CDAudio_Play(int track, qboolean looping)
-{
-}
-
-
-void CDAudio_Stop(void)
-{
-}
-
-
-void CDAudio_Resume(void)
-{
-}
-
-
-void CDAudio_Update(void)
-{
-}
-
-
-int CDAudio_Init(void)
-{
- return 0;
-}
-
-
-void CDAudio_Shutdown(void)
-{
-}
--- a/null/cl_null.c
+++ /dev/null
@@ -1,55 +1,0 @@
-
-// cl_null.c -- this file can stub out the entire client system
-// for pure dedicated servers
-
-#include "../qcommon/qcommon.h"
-
-void Key_Bind_Null_f(void)
-{
-}
-
-void CL_Init (void)
-{
-}
-
-void CL_Drop (void)
-{
-}
-
-void CL_Shutdown (void)
-{
-}
-
-void CL_Frame (int msec)
-{
-}
-
-void Con_Print (char *text)
-{
-}
-
-void Cmd_ForwardToServer (void)
-{
- char *cmd;
-
- cmd = Cmd_Argv(0);
- Com_Printf ("Unknown command \"%s\"\n", cmd);
-}
-
-void SCR_DebugGraph (float value, int color)
-{
-}
-
-void SCR_BeginLoadingPlaque (void)
-{
-}
-
-void SCR_EndLoadingPlaque (void)
-{
-}
-
-void Key_Init (void)
-{
- Cmd_AddCommand ("bind", Key_Bind_Null_f);
-}
-
--- a/null/glimp_null.c
+++ /dev/null
@@ -1,34 +1,0 @@
-#include "../ref_gl/gl_local.h"
-
-void GLimp_BeginFrame( float camera_separation )
-{
-}
-
-void GLimp_EndFrame( void )
-{
-}
-
-int GLimp_Init( void *hinstance, void *hWnd )
-{
-}
-
-void GLimp_Shutdown( void )
-{
-}
-
-int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
-}
-
-void GLimp_AppActivate( qboolean active )
-{
-}
-
-void GLimp_EnableLogging( qboolean enable )
-{
-}
-
-void GLimp_LogNewFrame( void )
-{
-}
-
--- a/null/in_null.c
+++ /dev/null
@@ -1,36 +1,0 @@
-// in_null.c -- for systems without a mouse
-
-#include "../client/client.h"
-
-void IN_Init (void)
-{
-}
-
-void IN_Shutdown (void)
-{
-}
-
-void IN_Commands (void)
-{
-}
-
-void IN_Frame (void)
-{
-}
-
-void IN_Move (usercmd_t *cmd)
-{
-}
-
-void IN_Activate (qboolean active)
-{
-}
-
-void IN_ActivateMouse (void)
-{
-}
-
-void IN_DeactivateMouse (void)
-{
-}
-
--- a/null/snddma_null.c
+++ /dev/null
@@ -1,28 +1,0 @@
-
-// snddma_null.c
-// all other sound mixing is portable
-
-#include "../client/client.h"
-#include "../client/snd_loc.h"
-
-qboolean SNDDMA_Init(void)
-{
- return false;
-}
-
-int SNDDMA_GetDMAPos(void)
-{
- return 0;
-}
-
-void SNDDMA_Shutdown(void)
-{
-}
-
-void SNDDMA_BeginPainting (void)
-{
-}
-
-void SNDDMA_Submit(void)
-{
-}
--- a/null/swimp_null.c
+++ /dev/null
@@ -1,30 +1,0 @@
-#include "../ref_soft/r_local.h"
-
-void SWimp_BeginFrame( float camera_separation )
-{
-}
-
-void SWimp_EndFrame (void)
-{
-}
-
-int SWimp_Init( void *hInstance, void *wndProc )
-{
-}
-
-void SWimp_SetPalette( const unsigned char *palette)
-{
-}
-
-void SWimp_Shutdown( void )
-{
-}
-
-rserr_t SWimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
-}
-
-void SWimp_AppActivate( qboolean active )
-{
-}
-
--- a/null/sys_null.c
+++ /dev/null
@@ -1,127 +1,0 @@
-// sys_null.h -- null system driver to aid porting efforts
-
-#include "../qcommon/qcommon.h"
-#include "errno.h"
-
-int curtime;
-
-unsigned sys_frame_time;
-
-
-void Sys_mkdir (char *path)
-{
-}
-
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
-
- printf ("Sys_Error: ");
- va_start (argptr,error);
- vprintf (error,argptr);
- va_end (argptr);
- printf ("\n");
-
- exit (1);
-}
-
-void Sys_Quit (void)
-{
- exit (0);
-}
-
-void Sys_UnloadGame (void)
-{
-}
-
-void *Sys_GetGameAPI (void *parms)
-{
- return NULL;
-}
-
-char *Sys_ConsoleInput (void)
-{
- return NULL;
-}
-
-void Sys_ConsoleOutput (char *string)
-{
-}
-
-void Sys_SendKeyEvents (void)
-{
-}
-
-void Sys_AppActivate (void)
-{
-}
-
-void Sys_CopyProtect (void)
-{
-}
-
-char *Sys_GetClipboardData( void )
-{
- return NULL;
-}
-
-void *Hunk_Begin (int maxsize)
-{
- return NULL;
-}
-
-void *Hunk_Alloc (int size)
-{
- return NULL;
-}
-
-void Hunk_Free (void *buf)
-{
-}
-
-int Hunk_End (void)
-{
- return 0;
-}
-
-int Sys_Milliseconds (void)
-{
- return 0;
-}
-
-void Sys_Mkdir (char *path)
-{
-}
-
-char *Sys_FindFirst (char *path, unsigned musthave, unsigned canthave)
-{
- return NULL;
-}
-
-char *Sys_FindNext (unsigned musthave, unsigned canthave)
-{
- return NULL;
-}
-
-void Sys_FindClose (void)
-{
-}
-
-void Sys_Init (void)
-{
-}
-
-
-//=============================================================================
-
-void main (int argc, char **argv)
-{
- Qcommon_Init (argc, argv);
-
- while (1)
- {
- Qcommon_Frame (0.1);
- }
-}
-
-
--- a/null/vid_null.c
+++ /dev/null
@@ -1,145 +1,0 @@
-// vid_null.c -- null video driver to aid porting efforts
-// this assumes that one of the refs is statically linked to the executable
-
-#include "../client/client.h"
-
-viddef_t viddef; // global video state
-
-refexport_t re;
-
-refexport_t GetRefAPI (refimport_t rimp);
-
-/*
-==========================================================================
-
-DIRECT LINK GLUE
-
-==========================================================================
-*/
-
-#define MAXPRINTMSG 4096
-void VID_Printf (int print_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- if (print_level == PRINT_ALL)
- Com_Printf ("%s", msg);
- else
- Com_DPrintf ("%s", msg);
-}
-
-void VID_Error (int err_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- Com_Error (err_level, "%s", msg);
-}
-
-void VID_NewWindow (int width, int height)
-{
- viddef.width = width;
- viddef.height = height;
-}
-
-/*
-** VID_GetModeInfo
-*/
-typedef struct vidmode_s
-{
- const char *description;
- int width, height;
- int mode;
-} vidmode_t;
-
-vidmode_t vid_modes[] =
-{
- { "Mode 0: 320x240", 320, 240, 0 },
- { "Mode 1: 400x300", 400, 300, 1 },
- { "Mode 2: 512x384", 512, 384, 2 },
- { "Mode 3: 640x480", 640, 480, 3 },
- { "Mode 4: 800x600", 800, 600, 4 },
- { "Mode 5: 960x720", 960, 720, 5 },
- { "Mode 6: 1024x768", 1024, 768, 6 },
- { "Mode 7: 1152x864", 1152, 864, 7 },
- { "Mode 8: 1280x960", 1280, 960, 8 },
- { "Mode 9: 1600x1200", 1600, 1200, 9 }
-};
-#define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
-
-qboolean VID_GetModeInfo( int *width, int *height, int mode )
-{
- if ( mode < 0 || mode >= VID_NUM_MODES )
- return false;
-
- *width = vid_modes[mode].width;
- *height = vid_modes[mode].height;
-
- return true;
-}
-
-
-void VID_Init (void)
-{
- refimport_t ri;
-
- viddef.width = 320;
- viddef.height = 240;
-
- ri.Cmd_AddCommand = Cmd_AddCommand;
- ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
- ri.Cmd_Argc = Cmd_Argc;
- ri.Cmd_Argv = Cmd_Argv;
- ri.Cmd_ExecuteText = Cbuf_ExecuteText;
- ri.Con_Printf = VID_Printf;
- ri.Sys_Error = VID_Error;
- ri.FS_LoadFile = FS_LoadFile;
- ri.FS_FreeFile = FS_FreeFile;
- ri.FS_Gamedir = FS_Gamedir;
- ri.Vid_NewWindow = VID_NewWindow;
- ri.Cvar_Get = Cvar_Get;
- ri.Cvar_Set = Cvar_Set;
- ri.Cvar_SetValue = Cvar_SetValue;
- ri.Vid_GetModeInfo = VID_GetModeInfo;
-
- re = GetRefAPI(ri);
-
- if (re.api_version != API_VERSION)
- Com_Error (ERR_FATAL, "Re has incompatible api_version");
-
- // call the init function
- if (re.Init (NULL, NULL) == -1)
- Com_Error (ERR_FATAL, "Couldn't start refresh");
-}
-
-void VID_Shutdown (void)
-{
- if (re.Shutdown)
- re.Shutdown ();
-}
-
-void VID_CheckChanges (void)
-{
-}
-
-void VID_MenuInit (void)
-{
-}
-
-void VID_MenuDraw (void)
-{
-}
-
-const char *VID_MenuKey( int k)
-{
- return NULL;
-}
--- a/quake2.001
+++ /dev/null
@@ -1,2061 +1,0 @@
-# Microsoft Developer Studio Project File - Name="quake2" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-# TARGTYPE "Win32 (ALPHA) Application" 0x0601
-
-CFG=quake2 - Win32 Debug Alpha
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "quake2.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "quake2.mak" CFG="quake2 - Win32 Debug Alpha"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "quake2 - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "quake2 - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE "quake2 - Win32 Debug Alpha" (based on "Win32 (ALPHA) Application")
-!MESSAGE "quake2 - Win32 Release Alpha" (based on "Win32 (ALPHA) Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\release"
-# PROP Intermediate_Dir ".\release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MT /W4 /GX /Zd /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /machine:I386
-# SUBTRACT LINK32 /incremental:yes /debug /nodefaultlib
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\debug"
-# PROP Intermediate_Dir ".\debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MTd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c
-# SUBTRACT CPP /Gy
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /incremental:no /map /debug /machine:I386
-# SUBTRACT LINK32 /nodefaultlib
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "quake2__"
-# PROP BASE Intermediate_Dir "quake2__"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\DebugAxp"
-# PROP Intermediate_Dir ".\DebugAxp"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-CPP=cl.exe
-# ADD BASE CPP /nologo /Gt0 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c
-# SUBTRACT BASE CPP /Gy
-# ADD CPP /nologo /QA21164 /MTd /Gt0 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-# SUBTRACT CPP /Fr
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:ALPHA
-# SUBTRACT BASE LINK32 /nodefaultlib
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /debug /machine:ALPHA
-# SUBTRACT LINK32 /nodefaultlib
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "quake2__"
-# PROP BASE Intermediate_Dir "quake2__"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ReleaseAXP"
-# PROP Intermediate_Dir ".\ReleaseAXP"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-CPP=cl.exe
-# ADD BASE CPP /nologo /Gt0 /W3 /GX /Zd /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /QA21164 /MT /Gt0 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-# SUBTRACT CPP /Z<none> /Fr
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:ALPHA
-# SUBTRACT BASE LINK32 /debug /nodefaultlib
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /machine:ALPHA
-# SUBTRACT LINK32 /debug /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "quake2 - Win32 Release"
-# Name "quake2 - Win32 Debug"
-# Name "quake2 - Win32 Debug Alpha"
-# Name "quake2 - Win32 Release Alpha"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\win32\cd_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CD_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CD_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_cin.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_CI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_CI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_ents.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_EN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_EN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_fx.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_FX=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_FX=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_input.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_IN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_IN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_inv.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_INV=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_INV=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_main.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_MA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_MA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_newfx.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_NE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_NE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_parse.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_PA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_PA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_pred.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_PR=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_PR=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_scrn.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_SC=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_SC=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_tent.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_TE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_TE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_view.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_VI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_VI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\cmd.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CMD_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CMD_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\cmodel.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CMODE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CMODE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\common.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_COMMO=\
- ".\client\anorms.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_COMMO=\
- ".\client\anorms.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\conproc.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CONPR=\
- ".\win32\conproc.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CONPR=\
- ".\win32\conproc.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\console.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CONSO=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CONSO=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\crc.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CRC_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CRC_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\cvar.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CVAR_=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CVAR_=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\files.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_FILES=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_FILES=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\in_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_IN_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_IN_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\keys.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_KEYS_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_KEYS_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\m_flash.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_M_FLA=\
- ".\game\q_shared.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_M_FLA=\
- ".\game\q_shared.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\md4.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\menu.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_MENU_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_MENU_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\net_chan.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_NET_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_NET_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\net_wins.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_NET_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_NET_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\pmove.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_PMOVE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_PMOVE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\q_shared.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHA=\
- ".\game\q_shared.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_Q_SHA=\
- ".\game\q_shared.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\q_shwin.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHW=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_Q_SHW=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\qmenu.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_QMENU=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_QMENU=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_dma.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_mem.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_mix.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_MI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_MI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\snd_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_W=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_W=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_ccmds.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_CC=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_CC=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_ents.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_EN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_EN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_game.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_GA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_GA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_init.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_IN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_IN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_main.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_MA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_MA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_send.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_SE=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_SE=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_user.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_US=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_US=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_world.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_WO=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_WO=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\sys_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SYS_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\conproc.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SYS_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\conproc.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\vid_dll.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_VID_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_VID_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\vid_menu.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_VID_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_VID_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\x86.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_X86_C=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_X86_C=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\client\anorms.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\bspfile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cdaudio.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\client.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\conproc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\console.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\game.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\input.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\keys.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\q_shared.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\qcommon.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\qfiles.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\qmenu.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\ref.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\screen.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\server.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_loc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\sound.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\vid.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\winquake.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\win32\q2.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\q2.rc
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
binary files a/quake2.bce /dev/null differ
binary files a/quake2.bcp /dev/null differ
--- a/quake2.dsp
+++ /dev/null
@@ -1,2050 +1,0 @@
-# Microsoft Developer Studio Project File - Name="quake2" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-# TARGTYPE "Win32 (ALPHA) Application" 0x0601
-
-CFG=quake2 - Win32 Debug Alpha
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "quake2.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "quake2.mak" CFG="quake2 - Win32 Debug Alpha"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "quake2 - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "quake2 - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE "quake2 - Win32 Debug Alpha" (based on "Win32 (ALPHA) Application")
-!MESSAGE "quake2 - Win32 Release Alpha" (based on "Win32 (ALPHA) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\release"
-# PROP Intermediate_Dir ".\release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MT /W4 /GX /Zd /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /machine:I386
-# SUBTRACT LINK32 /incremental:yes /debug /nodefaultlib
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\debug"
-# PROP Intermediate_Dir ".\debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /incremental:no /map /debug /machine:I386
-# SUBTRACT LINK32 /nodefaultlib
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "quake2__"
-# PROP BASE Intermediate_Dir "quake2__"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\DebugAxp"
-# PROP Intermediate_Dir ".\DebugAxp"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /Gt0 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c
-# SUBTRACT BASE CPP /Gy
-# ADD CPP /nologo /QA21164 /MTd /Gt0 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-# SUBTRACT CPP /Fr
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:ALPHA
-# SUBTRACT BASE LINK32 /nodefaultlib
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /debug /machine:ALPHA
-# SUBTRACT LINK32 /nodefaultlib
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "quake2__"
-# PROP BASE Intermediate_Dir "quake2__"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ReleaseAXP"
-# PROP Intermediate_Dir ".\ReleaseAXP"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /Gt0 /W3 /GX /Zd /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /QA21164 /MT /Gt0 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-# SUBTRACT CPP /Z<none> /Fr
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:ALPHA
-# SUBTRACT BASE LINK32 /debug /nodefaultlib
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /machine:ALPHA
-# SUBTRACT LINK32 /debug /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "quake2 - Win32 Release"
-# Name "quake2 - Win32 Debug"
-# Name "quake2 - Win32 Debug Alpha"
-# Name "quake2 - Win32 Release Alpha"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\win32\cd_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CD_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CD_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_cin.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_CI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_CI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_ents.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_EN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_EN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_fx.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_FX=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_FX=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_input.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_IN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_IN=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_inv.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_INV=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_INV=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_main.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_MA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_MA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_newfx.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_NE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_NE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_parse.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_PA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_PA=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_pred.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_PR=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_PR=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_scrn.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_SC=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_SC=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_tent.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_TE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_TE=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cl_view.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CL_VI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CL_VI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\cmd.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CMD_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CMD_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\cmodel.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CMODE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CMODE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\common.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_COMMO=\
- ".\client\anorms.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_COMMO=\
- ".\client\anorms.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\conproc.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CONPR=\
- ".\win32\conproc.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CONPR=\
- ".\win32\conproc.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\console.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CONSO=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CONSO=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\crc.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CRC_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CRC_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\cvar.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_CVAR_=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_CVAR_=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\files.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_FILES=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_FILES=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\in_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_IN_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_IN_WI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\keys.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_KEYS_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_KEYS_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\m_flash.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_M_FLA=\
- ".\game\q_shared.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_M_FLA=\
- ".\game\q_shared.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\md4.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\menu.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_MENU_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_MENU_=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\net_chan.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_NET_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_NET_C=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\net_wins.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_NET_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_NET_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\pmove.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_PMOVE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_PMOVE=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\q_shared.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHA=\
- ".\game\q_shared.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_Q_SHA=\
- ".\game\q_shared.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\q_shwin.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHW=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_Q_SHW=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\qmenu.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_QMENU=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_QMENU=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_dma.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_mem.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_mix.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_MI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_MI=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\snd_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SND_W=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SND_W=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_ccmds.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_CC=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_CC=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_ents.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_EN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_EN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_game.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_GA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_GA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_init.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_IN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_IN=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_main.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_MA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_MA=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_send.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_SE=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_SE=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_user.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_US=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_US=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\sv_world.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SV_WO=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SV_WO=\
- ".\game\game.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\sys_win.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_SYS_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\conproc.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_SYS_W=\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\conproc.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\vid_dll.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_VID_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_VID_D=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\vid_menu.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_VID_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_VID_M=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\qmenu.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\x86.c
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug Alpha"
-
-DEP_CPP_X86_C=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Release Alpha"
-
-DEP_CPP_X86_C=\
- ".\client\cdaudio.h"\
- ".\client\client.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\game\q_shared.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\client\anorms.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\bspfile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\cdaudio.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\client.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\conproc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\console.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\game.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\input.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\keys.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\game\q_shared.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\qcommon.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qcommon\qfiles.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\qmenu.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\ref.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\screen.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\server\server.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\snd_loc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\sound.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\client\vid.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\winquake.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\win32\q2.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32\q2.rc
-# End Source File
-# End Group
-# End Target
-# End Project
--- a/quake2.dsw
+++ /dev/null
@@ -1,77 +1,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "ctf"=.\ctf\ctf.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "game"=.\game\game.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "quake2"=.\quake2.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "ref_gl"=.\ref_gl\ref_gl.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "ref_soft"=.\ref_soft\ref_soft.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
--- a/quake2.mak
+++ /dev/null
@@ -1,4593 +1,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-!IF "$(CFG)" == ""
-CFG=ref_soft - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to ref_soft - Win32 Debug.
-!ENDIF
-
-!IF "$(CFG)" != "quake2 - Win32 Release" && "$(CFG)" != "quake2 - Win32 Debug"\
- && "$(CFG)" != "ref_soft - Win32 Release" && "$(CFG)" !=\
- "ref_soft - Win32 Debug" && "$(CFG)" != "ref_gl - Win32 Release" && "$(CFG)" !=\
- "ref_gl - Win32 Debug" && "$(CFG)" != "game - Win32 Release" && "$(CFG)" !=\
- "game - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "quake2.mak" CFG="ref_soft - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "quake2 - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "quake2 - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE "ref_soft - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_soft - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "game - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "game - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "ref_soft - Win32 Debug"
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-OUTDIR=.\Release
-INTDIR=.\Release
-
-ALL : "$(OUTDIR)\quake2.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\cd_win.obj"
- -@erase "$(INTDIR)\cl_demo.obj"
- -@erase "$(INTDIR)\cl_ents.obj"
- -@erase "$(INTDIR)\cl_fx.obj"
- -@erase "$(INTDIR)\cl_input.obj"
- -@erase "$(INTDIR)\cl_main.obj"
- -@erase "$(INTDIR)\cl_parse.obj"
- -@erase "$(INTDIR)\cl_tent.obj"
- -@erase "$(INTDIR)\cmd.obj"
- -@erase "$(INTDIR)\cmodel.obj"
- -@erase "$(INTDIR)\common.obj"
- -@erase "$(INTDIR)\console.obj"
- -@erase "$(INTDIR)\crc.obj"
- -@erase "$(INTDIR)\cvar.obj"
- -@erase "$(INTDIR)\files.obj"
- -@erase "$(INTDIR)\in_win.obj"
- -@erase "$(INTDIR)\keys.obj"
- -@erase "$(INTDIR)\menu.obj"
- -@erase "$(INTDIR)\net_chan.obj"
- -@erase "$(INTDIR)\net_wins.obj"
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\sbar2.obj"
- -@erase "$(INTDIR)\scr_cin.obj"
- -@erase "$(INTDIR)\screen.obj"
- -@erase "$(INTDIR)\snd_dma.obj"
- -@erase "$(INTDIR)\snd_mem.obj"
- -@erase "$(INTDIR)\snd_mix.obj"
- -@erase "$(INTDIR)\snd_win.obj"
- -@erase "$(INTDIR)\sv_ccmds.obj"
- -@erase "$(INTDIR)\sv_ents.obj"
- -@erase "$(INTDIR)\sv_game.obj"
- -@erase "$(INTDIR)\sv_init.obj"
- -@erase "$(INTDIR)\sv_main.obj"
- -@erase "$(INTDIR)\sv_move.obj"
- -@erase "$(INTDIR)\sv_phys.obj"
- -@erase "$(INTDIR)\sv_send.obj"
- -@erase "$(INTDIR)\sv_user.obj"
- -@erase "$(INTDIR)\sv_world.obj"
- -@erase "$(INTDIR)\sys_win.obj"
- -@erase "$(INTDIR)\vid_dll.obj"
- -@erase "$(INTDIR)\view.obj"
- -@erase "$(OUTDIR)\quake2.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /G5 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/quake2.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\Release/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/quake2.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# SUBTRACT LINK32 /incremental:yes /nodefaultlib
-LINK32_FLAGS=winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib\
- winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\
- uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no\
- /pdb:"$(OUTDIR)/quake2.pdb" /machine:I386 /out:"$(OUTDIR)/quake2.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cd_win.obj" \
- "$(INTDIR)\cl_demo.obj" \
- "$(INTDIR)\cl_ents.obj" \
- "$(INTDIR)\cl_fx.obj" \
- "$(INTDIR)\cl_input.obj" \
- "$(INTDIR)\cl_main.obj" \
- "$(INTDIR)\cl_parse.obj" \
- "$(INTDIR)\cl_tent.obj" \
- "$(INTDIR)\cmd.obj" \
- "$(INTDIR)\cmodel.obj" \
- "$(INTDIR)\common.obj" \
- "$(INTDIR)\console.obj" \
- "$(INTDIR)\crc.obj" \
- "$(INTDIR)\cvar.obj" \
- "$(INTDIR)\files.obj" \
- "$(INTDIR)\in_win.obj" \
- "$(INTDIR)\keys.obj" \
- "$(INTDIR)\menu.obj" \
- "$(INTDIR)\net_chan.obj" \
- "$(INTDIR)\net_wins.obj" \
- "$(INTDIR)\q_shared.obj" \
- "$(INTDIR)\sbar2.obj" \
- "$(INTDIR)\scr_cin.obj" \
- "$(INTDIR)\screen.obj" \
- "$(INTDIR)\snd_dma.obj" \
- "$(INTDIR)\snd_mem.obj" \
- "$(INTDIR)\snd_mix.obj" \
- "$(INTDIR)\snd_win.obj" \
- "$(INTDIR)\sv_ccmds.obj" \
- "$(INTDIR)\sv_ents.obj" \
- "$(INTDIR)\sv_game.obj" \
- "$(INTDIR)\sv_init.obj" \
- "$(INTDIR)\sv_main.obj" \
- "$(INTDIR)\sv_move.obj" \
- "$(INTDIR)\sv_phys.obj" \
- "$(INTDIR)\sv_send.obj" \
- "$(INTDIR)\sv_user.obj" \
- "$(INTDIR)\sv_world.obj" \
- "$(INTDIR)\sys_win.obj" \
- "$(INTDIR)\vid_dll.obj" \
- "$(INTDIR)\view.obj"
-
-"$(OUTDIR)\quake2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-OUTDIR=.\Debug
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\quake2.exe" "$(OUTDIR)\quake2.bsc"
-
-CLEAN :
- -@erase "$(INTDIR)\cd_win.obj"
- -@erase "$(INTDIR)\cd_win.sbr"
- -@erase "$(INTDIR)\cl_demo.obj"
- -@erase "$(INTDIR)\cl_demo.sbr"
- -@erase "$(INTDIR)\cl_ents.obj"
- -@erase "$(INTDIR)\cl_ents.sbr"
- -@erase "$(INTDIR)\cl_fx.obj"
- -@erase "$(INTDIR)\cl_fx.sbr"
- -@erase "$(INTDIR)\cl_input.obj"
- -@erase "$(INTDIR)\cl_input.sbr"
- -@erase "$(INTDIR)\cl_main.obj"
- -@erase "$(INTDIR)\cl_main.sbr"
- -@erase "$(INTDIR)\cl_parse.obj"
- -@erase "$(INTDIR)\cl_parse.sbr"
- -@erase "$(INTDIR)\cl_tent.obj"
- -@erase "$(INTDIR)\cl_tent.sbr"
- -@erase "$(INTDIR)\cmd.obj"
- -@erase "$(INTDIR)\cmd.sbr"
- -@erase "$(INTDIR)\cmodel.obj"
- -@erase "$(INTDIR)\cmodel.sbr"
- -@erase "$(INTDIR)\common.obj"
- -@erase "$(INTDIR)\common.sbr"
- -@erase "$(INTDIR)\console.obj"
- -@erase "$(INTDIR)\console.sbr"
- -@erase "$(INTDIR)\crc.obj"
- -@erase "$(INTDIR)\crc.sbr"
- -@erase "$(INTDIR)\cvar.obj"
- -@erase "$(INTDIR)\cvar.sbr"
- -@erase "$(INTDIR)\files.obj"
- -@erase "$(INTDIR)\files.sbr"
- -@erase "$(INTDIR)\in_win.obj"
- -@erase "$(INTDIR)\in_win.sbr"
- -@erase "$(INTDIR)\keys.obj"
- -@erase "$(INTDIR)\keys.sbr"
- -@erase "$(INTDIR)\menu.obj"
- -@erase "$(INTDIR)\menu.sbr"
- -@erase "$(INTDIR)\net_chan.obj"
- -@erase "$(INTDIR)\net_chan.sbr"
- -@erase "$(INTDIR)\net_wins.obj"
- -@erase "$(INTDIR)\net_wins.sbr"
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\q_shared.sbr"
- -@erase "$(INTDIR)\sbar2.obj"
- -@erase "$(INTDIR)\sbar2.sbr"
- -@erase "$(INTDIR)\scr_cin.obj"
- -@erase "$(INTDIR)\scr_cin.sbr"
- -@erase "$(INTDIR)\screen.obj"
- -@erase "$(INTDIR)\screen.sbr"
- -@erase "$(INTDIR)\snd_dma.obj"
- -@erase "$(INTDIR)\snd_dma.sbr"
- -@erase "$(INTDIR)\snd_mem.obj"
- -@erase "$(INTDIR)\snd_mem.sbr"
- -@erase "$(INTDIR)\snd_mix.obj"
- -@erase "$(INTDIR)\snd_mix.sbr"
- -@erase "$(INTDIR)\snd_win.obj"
- -@erase "$(INTDIR)\snd_win.sbr"
- -@erase "$(INTDIR)\sv_ccmds.obj"
- -@erase "$(INTDIR)\sv_ccmds.sbr"
- -@erase "$(INTDIR)\sv_ents.obj"
- -@erase "$(INTDIR)\sv_ents.sbr"
- -@erase "$(INTDIR)\sv_game.obj"
- -@erase "$(INTDIR)\sv_game.sbr"
- -@erase "$(INTDIR)\sv_init.obj"
- -@erase "$(INTDIR)\sv_init.sbr"
- -@erase "$(INTDIR)\sv_main.obj"
- -@erase "$(INTDIR)\sv_main.sbr"
- -@erase "$(INTDIR)\sv_move.obj"
- -@erase "$(INTDIR)\sv_move.sbr"
- -@erase "$(INTDIR)\sv_phys.obj"
- -@erase "$(INTDIR)\sv_phys.sbr"
- -@erase "$(INTDIR)\sv_send.obj"
- -@erase "$(INTDIR)\sv_send.sbr"
- -@erase "$(INTDIR)\sv_user.obj"
- -@erase "$(INTDIR)\sv_user.sbr"
- -@erase "$(INTDIR)\sv_world.obj"
- -@erase "$(INTDIR)\sv_world.sbr"
- -@erase "$(INTDIR)\sys_win.obj"
- -@erase "$(INTDIR)\sys_win.sbr"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(INTDIR)\vid_dll.obj"
- -@erase "$(INTDIR)\vid_dll.sbr"
- -@erase "$(INTDIR)\view.obj"
- -@erase "$(INTDIR)\view.sbr"
- -@erase "$(OUTDIR)\quake2.bsc"
- -@erase "$(OUTDIR)\quake2.exe"
- -@erase "$(OUTDIR)\quake2.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /c
-# SUBTRACT CPP /Gy
-CPP_PROJ=/nologo /G5 /MLd /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
- /FR"$(INTDIR)/" /Fp"$(INTDIR)/quake2.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/"\
- /c
-CPP_OBJS=.\Debug/
-CPP_SBRS=.\Debug/
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/quake2.bsc"
-BSC32_SBRS= \
- "$(INTDIR)\cd_win.sbr" \
- "$(INTDIR)\cl_demo.sbr" \
- "$(INTDIR)\cl_ents.sbr" \
- "$(INTDIR)\cl_fx.sbr" \
- "$(INTDIR)\cl_input.sbr" \
- "$(INTDIR)\cl_main.sbr" \
- "$(INTDIR)\cl_parse.sbr" \
- "$(INTDIR)\cl_tent.sbr" \
- "$(INTDIR)\cmd.sbr" \
- "$(INTDIR)\cmodel.sbr" \
- "$(INTDIR)\common.sbr" \
- "$(INTDIR)\console.sbr" \
- "$(INTDIR)\crc.sbr" \
- "$(INTDIR)\cvar.sbr" \
- "$(INTDIR)\files.sbr" \
- "$(INTDIR)\in_win.sbr" \
- "$(INTDIR)\keys.sbr" \
- "$(INTDIR)\menu.sbr" \
- "$(INTDIR)\net_chan.sbr" \
- "$(INTDIR)\net_wins.sbr" \
- "$(INTDIR)\q_shared.sbr" \
- "$(INTDIR)\sbar2.sbr" \
- "$(INTDIR)\scr_cin.sbr" \
- "$(INTDIR)\screen.sbr" \
- "$(INTDIR)\snd_dma.sbr" \
- "$(INTDIR)\snd_mem.sbr" \
- "$(INTDIR)\snd_mix.sbr" \
- "$(INTDIR)\snd_win.sbr" \
- "$(INTDIR)\sv_ccmds.sbr" \
- "$(INTDIR)\sv_ents.sbr" \
- "$(INTDIR)\sv_game.sbr" \
- "$(INTDIR)\sv_init.sbr" \
- "$(INTDIR)\sv_main.sbr" \
- "$(INTDIR)\sv_move.sbr" \
- "$(INTDIR)\sv_phys.sbr" \
- "$(INTDIR)\sv_send.sbr" \
- "$(INTDIR)\sv_user.sbr" \
- "$(INTDIR)\sv_world.sbr" \
- "$(INTDIR)\sys_win.sbr" \
- "$(INTDIR)\vid_dll.sbr" \
- "$(INTDIR)\view.sbr"
-
-"$(OUTDIR)\quake2.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
- $(BSC32) @<<
- $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
-# ADD LINK32 winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386
-# SUBTRACT LINK32 /nodefaultlib
-LINK32_FLAGS=winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib\
- winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\
- uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no\
- /pdb:"$(OUTDIR)/quake2.pdb" /debug /machine:I386 /out:"$(OUTDIR)/quake2.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cd_win.obj" \
- "$(INTDIR)\cl_demo.obj" \
- "$(INTDIR)\cl_ents.obj" \
- "$(INTDIR)\cl_fx.obj" \
- "$(INTDIR)\cl_input.obj" \
- "$(INTDIR)\cl_main.obj" \
- "$(INTDIR)\cl_parse.obj" \
- "$(INTDIR)\cl_tent.obj" \
- "$(INTDIR)\cmd.obj" \
- "$(INTDIR)\cmodel.obj" \
- "$(INTDIR)\common.obj" \
- "$(INTDIR)\console.obj" \
- "$(INTDIR)\crc.obj" \
- "$(INTDIR)\cvar.obj" \
- "$(INTDIR)\files.obj" \
- "$(INTDIR)\in_win.obj" \
- "$(INTDIR)\keys.obj" \
- "$(INTDIR)\menu.obj" \
- "$(INTDIR)\net_chan.obj" \
- "$(INTDIR)\net_wins.obj" \
- "$(INTDIR)\q_shared.obj" \
- "$(INTDIR)\sbar2.obj" \
- "$(INTDIR)\scr_cin.obj" \
- "$(INTDIR)\screen.obj" \
- "$(INTDIR)\snd_dma.obj" \
- "$(INTDIR)\snd_mem.obj" \
- "$(INTDIR)\snd_mix.obj" \
- "$(INTDIR)\snd_win.obj" \
- "$(INTDIR)\sv_ccmds.obj" \
- "$(INTDIR)\sv_ents.obj" \
- "$(INTDIR)\sv_game.obj" \
- "$(INTDIR)\sv_init.obj" \
- "$(INTDIR)\sv_main.obj" \
- "$(INTDIR)\sv_move.obj" \
- "$(INTDIR)\sv_phys.obj" \
- "$(INTDIR)\sv_send.obj" \
- "$(INTDIR)\sv_user.obj" \
- "$(INTDIR)\sv_world.obj" \
- "$(INTDIR)\sys_win.obj" \
- "$(INTDIR)\vid_dll.obj" \
- "$(INTDIR)\view.obj"
-
-"$(OUTDIR)\quake2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ref_soft\ref_soft"
-# PROP BASE Intermediate_Dir "ref_soft\ref_soft"
-# PROP BASE Target_Dir "ref_soft"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "ref_soft\Release"
-# PROP Target_Dir "ref_soft"
-OUTDIR=.\Release
-INTDIR=.\ref_soft\Release
-
-ALL : "$(OUTDIR)\ref_soft.dll"
-
-CLEAN :
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\r_aclip.obj"
- -@erase "$(INTDIR)\r_alias.obj"
- -@erase "$(INTDIR)\r_bsp.obj"
- -@erase "$(INTDIR)\r_draw.obj"
- -@erase "$(INTDIR)\r_edge.obj"
- -@erase "$(INTDIR)\r_image.obj"
- -@erase "$(INTDIR)\r_inter.obj"
- -@erase "$(INTDIR)\r_light.obj"
- -@erase "$(INTDIR)\r_main.obj"
- -@erase "$(INTDIR)\r_misc.obj"
- -@erase "$(INTDIR)\r_model.obj"
- -@erase "$(INTDIR)\r_part.obj"
- -@erase "$(INTDIR)\r_poly.obj"
- -@erase "$(INTDIR)\r_polyse.obj"
- -@erase "$(INTDIR)\r_rast.obj"
- -@erase "$(INTDIR)\r_scan.obj"
- -@erase "$(INTDIR)\r_sprite.obj"
- -@erase "$(INTDIR)\r_surf.obj"
- -@erase "$(INTDIR)\rw_ddraw.obj"
- -@erase "$(INTDIR)\rw_dib.obj"
- -@erase "$(INTDIR)\rw_imp.obj"
- -@erase "$(OUTDIR)\ref_soft.dll"
- -@erase "$(OUTDIR)\ref_soft.exp"
- -@erase "$(OUTDIR)\ref_soft.lib"
- -@erase ".\Release\r_aclipa.obj"
- -@erase ".\Release\r_draw16.obj"
- -@erase ".\Release\r_drawa.obj"
- -@erase ".\Release\r_edgea.obj"
- -@erase ".\Release\r_scana.obj"
- -@erase ".\Release\r_spr8.obj"
- -@erase ".\Release\r_surf8.obj"
- -@erase ".\Release\r_varsa.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /G5 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/ref_soft.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\ref_soft\Release/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ref_soft.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /nodefaultlib:"libc"
-# SUBTRACT LINK32 /nodefaultlib
-LINK32_FLAGS=winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)/ref_soft.pdb" /machine:I386 /nodefaultlib:"libc"\
- /def:".\ref_soft\ref_soft.def" /out:"$(OUTDIR)/ref_soft.dll"\
- /implib:"$(OUTDIR)/ref_soft.lib"
-DEF_FILE= \
- ".\ref_soft\ref_soft.def"
-LINK32_OBJS= \
- "$(INTDIR)\q_shared.obj" \
- "$(INTDIR)\r_aclip.obj" \
- "$(INTDIR)\r_alias.obj" \
- "$(INTDIR)\r_bsp.obj" \
- "$(INTDIR)\r_draw.obj" \
- "$(INTDIR)\r_edge.obj" \
- "$(INTDIR)\r_image.obj" \
- "$(INTDIR)\r_inter.obj" \
- "$(INTDIR)\r_light.obj" \
- "$(INTDIR)\r_main.obj" \
- "$(INTDIR)\r_misc.obj" \
- "$(INTDIR)\r_model.obj" \
- "$(INTDIR)\r_part.obj" \
- "$(INTDIR)\r_poly.obj" \
- "$(INTDIR)\r_polyse.obj" \
- "$(INTDIR)\r_rast.obj" \
- "$(INTDIR)\r_scan.obj" \
- "$(INTDIR)\r_sprite.obj" \
- "$(INTDIR)\r_surf.obj" \
- "$(INTDIR)\rw_ddraw.obj" \
- "$(INTDIR)\rw_dib.obj" \
- "$(INTDIR)\rw_imp.obj" \
- ".\Release\r_aclipa.obj" \
- ".\Release\r_draw16.obj" \
- ".\Release\r_drawa.obj" \
- ".\Release\r_edgea.obj" \
- ".\Release\r_scana.obj" \
- ".\Release\r_spr8.obj" \
- ".\Release\r_surf8.obj" \
- ".\Release\r_varsa.obj"
-
-"$(OUTDIR)\ref_soft.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ref_soft\ref_soft"
-# PROP BASE Intermediate_Dir "ref_soft\ref_soft"
-# PROP BASE Target_Dir "ref_soft"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "ref_soft\Debug"
-# PROP Target_Dir "ref_soft"
-OUTDIR=.\Debug
-INTDIR=.\ref_soft\Debug
-
-ALL : "$(OUTDIR)\ref_soft.dll"
-
-CLEAN :
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\r_aclip.obj"
- -@erase "$(INTDIR)\r_alias.obj"
- -@erase "$(INTDIR)\r_bsp.obj"
- -@erase "$(INTDIR)\r_draw.obj"
- -@erase "$(INTDIR)\r_edge.obj"
- -@erase "$(INTDIR)\r_image.obj"
- -@erase "$(INTDIR)\r_inter.obj"
- -@erase "$(INTDIR)\r_light.obj"
- -@erase "$(INTDIR)\r_main.obj"
- -@erase "$(INTDIR)\r_misc.obj"
- -@erase "$(INTDIR)\r_model.obj"
- -@erase "$(INTDIR)\r_part.obj"
- -@erase "$(INTDIR)\r_poly.obj"
- -@erase "$(INTDIR)\r_polyse.obj"
- -@erase "$(INTDIR)\r_rast.obj"
- -@erase "$(INTDIR)\r_scan.obj"
- -@erase "$(INTDIR)\r_sprite.obj"
- -@erase "$(INTDIR)\r_surf.obj"
- -@erase "$(INTDIR)\rw_ddraw.obj"
- -@erase "$(INTDIR)\rw_dib.obj"
- -@erase "$(INTDIR)\rw_imp.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\ref_soft.dll"
- -@erase "$(OUTDIR)\ref_soft.exp"
- -@erase "$(OUTDIR)\ref_soft.lib"
- -@erase "$(OUTDIR)\ref_soft.pdb"
- -@erase ".\Debug\r_aclipa.obj"
- -@erase ".\Debug\r_draw16.obj"
- -@erase ".\Debug\r_drawa.obj"
- -@erase ".\Debug\r_edgea.obj"
- -@erase ".\Debug\r_scana.obj"
- -@erase ".\Debug\r_spr8.obj"
- -@erase ".\Debug\r_surf8.obj"
- -@erase ".\Debug\r_varsa.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\
- "_WINDOWS" /Fp"$(INTDIR)/ref_soft.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-CPP_OBJS=.\ref_soft\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ref_soft.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386 /nodefaultlib:"libc"
-# SUBTRACT LINK32 /nodefaultlib
-LINK32_FLAGS=winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)/ref_soft.pdb" /debug /machine:I386 /nodefaultlib:"libc"\
- /def:".\ref_soft\ref_soft.def" /out:"$(OUTDIR)/ref_soft.dll"\
- /implib:"$(OUTDIR)/ref_soft.lib"
-DEF_FILE= \
- ".\ref_soft\ref_soft.def"
-LINK32_OBJS= \
- "$(INTDIR)\q_shared.obj" \
- "$(INTDIR)\r_aclip.obj" \
- "$(INTDIR)\r_alias.obj" \
- "$(INTDIR)\r_bsp.obj" \
- "$(INTDIR)\r_draw.obj" \
- "$(INTDIR)\r_edge.obj" \
- "$(INTDIR)\r_image.obj" \
- "$(INTDIR)\r_inter.obj" \
- "$(INTDIR)\r_light.obj" \
- "$(INTDIR)\r_main.obj" \
- "$(INTDIR)\r_misc.obj" \
- "$(INTDIR)\r_model.obj" \
- "$(INTDIR)\r_part.obj" \
- "$(INTDIR)\r_poly.obj" \
- "$(INTDIR)\r_polyse.obj" \
- "$(INTDIR)\r_rast.obj" \
- "$(INTDIR)\r_scan.obj" \
- "$(INTDIR)\r_sprite.obj" \
- "$(INTDIR)\r_surf.obj" \
- "$(INTDIR)\rw_ddraw.obj" \
- "$(INTDIR)\rw_dib.obj" \
- "$(INTDIR)\rw_imp.obj" \
- ".\Debug\r_aclipa.obj" \
- ".\Debug\r_draw16.obj" \
- ".\Debug\r_drawa.obj" \
- ".\Debug\r_edgea.obj" \
- ".\Debug\r_scana.obj" \
- ".\Debug\r_spr8.obj" \
- ".\Debug\r_surf8.obj" \
- ".\Debug\r_varsa.obj"
-
-"$(OUTDIR)\ref_soft.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ref_gl\ref_gl__"
-# PROP BASE Intermediate_Dir "ref_gl\ref_gl__"
-# PROP BASE Target_Dir "ref_gl"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "ref_gl\Release"
-# PROP Target_Dir "ref_gl"
-OUTDIR=.\Release
-INTDIR=.\ref_gl\Release
-
-ALL : "$(OUTDIR)\ref_gl.dll"
-
-CLEAN :
- -@erase "$(INTDIR)\gl_draw.obj"
- -@erase "$(INTDIR)\gl_inter.obj"
- -@erase "$(INTDIR)\gl_light.obj"
- -@erase "$(INTDIR)\gl_mesh.obj"
- -@erase "$(INTDIR)\gl_model.obj"
- -@erase "$(INTDIR)\gl_rmain.obj"
- -@erase "$(INTDIR)\gl_rmisc.obj"
- -@erase "$(INTDIR)\gl_rsurf.obj"
- -@erase "$(INTDIR)\gl_textr.obj"
- -@erase "$(INTDIR)\gl_warp.obj"
- -@erase "$(INTDIR)\glw_imp.obj"
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\qgl_win.obj"
- -@erase "$(OUTDIR)\ref_gl.dll"
- -@erase "$(OUTDIR)\ref_gl.exp"
- -@erase "$(OUTDIR)\ref_gl.lib"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /G5 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/ref_gl.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\ref_gl\Release/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ref_gl.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 winmm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-LINK32_FLAGS=winmm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib\
- winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\
- uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll\
- /incremental:no /pdb:"$(OUTDIR)/ref_gl.pdb" /machine:I386\
- /def:".\ref_gl\ref_gl.def" /out:"$(OUTDIR)/ref_gl.dll"\
- /implib:"$(OUTDIR)/ref_gl.lib"
-DEF_FILE= \
- ".\ref_gl\ref_gl.def"
-LINK32_OBJS= \
- "$(INTDIR)\gl_draw.obj" \
- "$(INTDIR)\gl_inter.obj" \
- "$(INTDIR)\gl_light.obj" \
- "$(INTDIR)\gl_mesh.obj" \
- "$(INTDIR)\gl_model.obj" \
- "$(INTDIR)\gl_rmain.obj" \
- "$(INTDIR)\gl_rmisc.obj" \
- "$(INTDIR)\gl_rsurf.obj" \
- "$(INTDIR)\gl_textr.obj" \
- "$(INTDIR)\gl_warp.obj" \
- "$(INTDIR)\glw_imp.obj" \
- "$(INTDIR)\q_shared.obj" \
- "$(INTDIR)\qgl_win.obj"
-
-"$(OUTDIR)\ref_gl.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ref_gl\ref_gl__"
-# PROP BASE Intermediate_Dir "ref_gl\ref_gl__"
-# PROP BASE Target_Dir "ref_gl"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "ref_gl\Debug"
-# PROP Target_Dir "ref_gl"
-OUTDIR=.\Debug
-INTDIR=.\ref_gl\Debug
-
-ALL : "$(OUTDIR)\ref_gl.dll"
-
-CLEAN :
- -@erase "$(INTDIR)\gl_draw.obj"
- -@erase "$(INTDIR)\gl_inter.obj"
- -@erase "$(INTDIR)\gl_light.obj"
- -@erase "$(INTDIR)\gl_mesh.obj"
- -@erase "$(INTDIR)\gl_model.obj"
- -@erase "$(INTDIR)\gl_rmain.obj"
- -@erase "$(INTDIR)\gl_rmisc.obj"
- -@erase "$(INTDIR)\gl_rsurf.obj"
- -@erase "$(INTDIR)\gl_textr.obj"
- -@erase "$(INTDIR)\gl_warp.obj"
- -@erase "$(INTDIR)\glw_imp.obj"
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\qgl_win.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\ref_gl.dll"
- -@erase "$(OUTDIR)\ref_gl.exp"
- -@erase "$(OUTDIR)\ref_gl.lib"
- -@erase "$(OUTDIR)\ref_gl.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\
- "_WINDOWS" /Fp"$(INTDIR)/ref_gl.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-CPP_OBJS=.\ref_gl\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ref_gl.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 winmm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /debug /machine:I386
-LINK32_FLAGS=winmm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib\
- winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\
- uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll\
- /incremental:no /pdb:"$(OUTDIR)/ref_gl.pdb" /debug /machine:I386\
- /def:".\ref_gl\ref_gl.def" /out:"$(OUTDIR)/ref_gl.dll"\
- /implib:"$(OUTDIR)/ref_gl.lib"
-DEF_FILE= \
- ".\ref_gl\ref_gl.def"
-LINK32_OBJS= \
- "$(INTDIR)\gl_draw.obj" \
- "$(INTDIR)\gl_inter.obj" \
- "$(INTDIR)\gl_light.obj" \
- "$(INTDIR)\gl_mesh.obj" \
- "$(INTDIR)\gl_model.obj" \
- "$(INTDIR)\gl_rmain.obj" \
- "$(INTDIR)\gl_rmisc.obj" \
- "$(INTDIR)\gl_rsurf.obj" \
- "$(INTDIR)\gl_textr.obj" \
- "$(INTDIR)\gl_warp.obj" \
- "$(INTDIR)\glw_imp.obj" \
- "$(INTDIR)\q_shared.obj" \
- "$(INTDIR)\qgl_win.obj"
-
-"$(OUTDIR)\ref_gl.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "game - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "game\Release"
-# PROP BASE Intermediate_Dir "game\Release"
-# PROP BASE Target_Dir "game"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "game\Release"
-# PROP Target_Dir "game"
-OUTDIR=.\Release
-INTDIR=.\game\Release
-
-ALL : "$(OUTDIR)\game.dll"
-
-CLEAN :
- -@erase "$(INTDIR)\g_ai.obj"
- -@erase "$(INTDIR)\g_bersrk.obj"
- -@erase "$(INTDIR)\g_brain.obj"
- -@erase "$(INTDIR)\g_chick.obj"
- -@erase "$(INTDIR)\g_client.obj"
- -@erase "$(INTDIR)\g_cmds.obj"
- -@erase "$(INTDIR)\g_combat.obj"
- -@erase "$(INTDIR)\g_flipper.obj"
- -@erase "$(INTDIR)\g_float.obj"
- -@erase "$(INTDIR)\g_flyer.obj"
- -@erase "$(INTDIR)\g_func.obj"
- -@erase "$(INTDIR)\g_gladtr.obj"
- -@erase "$(INTDIR)\g_gunner.obj"
- -@erase "$(INTDIR)\g_hover.obj"
- -@erase "$(INTDIR)\g_inftry.obj"
- -@erase "$(INTDIR)\g_items.obj"
- -@erase "$(INTDIR)\g_main.obj"
- -@erase "$(INTDIR)\g_medic.obj"
- -@erase "$(INTDIR)\g_misc.obj"
- -@erase "$(INTDIR)\g_monster.obj"
- -@erase "$(INTDIR)\g_parasite.obj"
- -@erase "$(INTDIR)\g_player.obj"
- -@erase "$(INTDIR)\g_pmove.obj"
- -@erase "$(INTDIR)\g_ptrail.obj"
- -@erase "$(INTDIR)\g_pview.obj"
- -@erase "$(INTDIR)\g_pweapon.obj"
- -@erase "$(INTDIR)\g_soldier.obj"
- -@erase "$(INTDIR)\g_tank.obj"
- -@erase "$(INTDIR)\g_target.obj"
- -@erase "$(INTDIR)\g_trigger.obj"
- -@erase "$(INTDIR)\g_utils.obj"
- -@erase "$(INTDIR)\g_weapon.obj"
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(OUTDIR)\game.dll"
- -@erase "$(OUTDIR)\game.exp"
- -@erase "$(OUTDIR)\game.lib"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/game.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\game\Release/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /win32
-MTL_PROJ=/nologo /D "NDEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/game.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:0x20000000 /subsystem:windows /dll /machine:I386
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /base:0x20000000 /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)/game.pdb" /machine:I386 /def:".\game\game.def"\
- /out:"$(OUTDIR)/game.dll" /implib:"$(OUTDIR)/game.lib"
-DEF_FILE= \
- ".\game\game.def"
-LINK32_OBJS= \
- "$(INTDIR)\g_ai.obj" \
- "$(INTDIR)\g_bersrk.obj" \
- "$(INTDIR)\g_brain.obj" \
- "$(INTDIR)\g_chick.obj" \
- "$(INTDIR)\g_client.obj" \
- "$(INTDIR)\g_cmds.obj" \
- "$(INTDIR)\g_combat.obj" \
- "$(INTDIR)\g_flipper.obj" \
- "$(INTDIR)\g_float.obj" \
- "$(INTDIR)\g_flyer.obj" \
- "$(INTDIR)\g_func.obj" \
- "$(INTDIR)\g_gladtr.obj" \
- "$(INTDIR)\g_gunner.obj" \
- "$(INTDIR)\g_hover.obj" \
- "$(INTDIR)\g_inftry.obj" \
- "$(INTDIR)\g_items.obj" \
- "$(INTDIR)\g_main.obj" \
- "$(INTDIR)\g_medic.obj" \
- "$(INTDIR)\g_misc.obj" \
- "$(INTDIR)\g_monster.obj" \
- "$(INTDIR)\g_parasite.obj" \
- "$(INTDIR)\g_player.obj" \
- "$(INTDIR)\g_pmove.obj" \
- "$(INTDIR)\g_ptrail.obj" \
- "$(INTDIR)\g_pview.obj" \
- "$(INTDIR)\g_pweapon.obj" \
- "$(INTDIR)\g_soldier.obj" \
- "$(INTDIR)\g_tank.obj" \
- "$(INTDIR)\g_target.obj" \
- "$(INTDIR)\g_trigger.obj" \
- "$(INTDIR)\g_utils.obj" \
- "$(INTDIR)\g_weapon.obj" \
- "$(INTDIR)\q_shared.obj"
-
-"$(OUTDIR)\game.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "game\Debug"
-# PROP BASE Intermediate_Dir "game\Debug"
-# PROP BASE Target_Dir "game"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "game\Debug"
-# PROP Target_Dir "game"
-OUTDIR=.\Debug
-INTDIR=.\game\Debug
-
-ALL : "$(OUTDIR)\game.dll"
-
-CLEAN :
- -@erase "$(INTDIR)\g_ai.obj"
- -@erase "$(INTDIR)\g_bersrk.obj"
- -@erase "$(INTDIR)\g_brain.obj"
- -@erase "$(INTDIR)\g_chick.obj"
- -@erase "$(INTDIR)\g_client.obj"
- -@erase "$(INTDIR)\g_cmds.obj"
- -@erase "$(INTDIR)\g_combat.obj"
- -@erase "$(INTDIR)\g_flipper.obj"
- -@erase "$(INTDIR)\g_float.obj"
- -@erase "$(INTDIR)\g_flyer.obj"
- -@erase "$(INTDIR)\g_func.obj"
- -@erase "$(INTDIR)\g_gladtr.obj"
- -@erase "$(INTDIR)\g_gunner.obj"
- -@erase "$(INTDIR)\g_hover.obj"
- -@erase "$(INTDIR)\g_inftry.obj"
- -@erase "$(INTDIR)\g_items.obj"
- -@erase "$(INTDIR)\g_main.obj"
- -@erase "$(INTDIR)\g_medic.obj"
- -@erase "$(INTDIR)\g_misc.obj"
- -@erase "$(INTDIR)\g_monster.obj"
- -@erase "$(INTDIR)\g_parasite.obj"
- -@erase "$(INTDIR)\g_player.obj"
- -@erase "$(INTDIR)\g_pmove.obj"
- -@erase "$(INTDIR)\g_ptrail.obj"
- -@erase "$(INTDIR)\g_pview.obj"
- -@erase "$(INTDIR)\g_pweapon.obj"
- -@erase "$(INTDIR)\g_soldier.obj"
- -@erase "$(INTDIR)\g_tank.obj"
- -@erase "$(INTDIR)\g_target.obj"
- -@erase "$(INTDIR)\g_trigger.obj"
- -@erase "$(INTDIR)\g_utils.obj"
- -@erase "$(INTDIR)\g_weapon.obj"
- -@erase "$(INTDIR)\q_shared.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\game.dll"
- -@erase "$(OUTDIR)\game.exp"
- -@erase "$(OUTDIR)\game.lib"
- -@erase "$(OUTDIR)\game.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/game.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-CPP_OBJS=.\game\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-MTL=mktyplib.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /win32
-MTL_PROJ=/nologo /D "_DEBUG" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/game.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:0x20000000 /subsystem:windows /dll /incremental:no /debug /machine:I386
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /base:0x20000000 /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)/game.pdb" /debug /machine:I386 /def:".\game\game.def"\
- /out:"$(OUTDIR)/game.dll" /implib:"$(OUTDIR)/game.lib"
-DEF_FILE= \
- ".\game\game.def"
-LINK32_OBJS= \
- "$(INTDIR)\g_ai.obj" \
- "$(INTDIR)\g_bersrk.obj" \
- "$(INTDIR)\g_brain.obj" \
- "$(INTDIR)\g_chick.obj" \
- "$(INTDIR)\g_client.obj" \
- "$(INTDIR)\g_cmds.obj" \
- "$(INTDIR)\g_combat.obj" \
- "$(INTDIR)\g_flipper.obj" \
- "$(INTDIR)\g_float.obj" \
- "$(INTDIR)\g_flyer.obj" \
- "$(INTDIR)\g_func.obj" \
- "$(INTDIR)\g_gladtr.obj" \
- "$(INTDIR)\g_gunner.obj" \
- "$(INTDIR)\g_hover.obj" \
- "$(INTDIR)\g_inftry.obj" \
- "$(INTDIR)\g_items.obj" \
- "$(INTDIR)\g_main.obj" \
- "$(INTDIR)\g_medic.obj" \
- "$(INTDIR)\g_misc.obj" \
- "$(INTDIR)\g_monster.obj" \
- "$(INTDIR)\g_parasite.obj" \
- "$(INTDIR)\g_player.obj" \
- "$(INTDIR)\g_pmove.obj" \
- "$(INTDIR)\g_ptrail.obj" \
- "$(INTDIR)\g_pview.obj" \
- "$(INTDIR)\g_pweapon.obj" \
- "$(INTDIR)\g_soldier.obj" \
- "$(INTDIR)\g_tank.obj" \
- "$(INTDIR)\g_target.obj" \
- "$(INTDIR)\g_trigger.obj" \
- "$(INTDIR)\g_utils.obj" \
- "$(INTDIR)\g_weapon.obj" \
- "$(INTDIR)\q_shared.obj"
-
-"$(OUTDIR)\game.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-################################################################################
-# Begin Target
-
-# Name "quake2 - Win32 Release"
-# Name "quake2 - Win32 Debug"
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\cmodel.c
-DEP_CPP_CMODE=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cmodel.obj" : $(SOURCE) $(DEP_CPP_CMODE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cmodel.obj" : $(SOURCE) $(DEP_CPP_CMODE) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cmodel.sbr" : $(SOURCE) $(DEP_CPP_CMODE) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\common.c
-DEP_CPP_COMMO=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\common.obj" : $(SOURCE) $(DEP_CPP_COMMO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\common.obj" : $(SOURCE) $(DEP_CPP_COMMO) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\common.sbr" : $(SOURCE) $(DEP_CPP_COMMO) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\cvar.c
-DEP_CPP_CVAR_=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cvar.obj" : $(SOURCE) $(DEP_CPP_CVAR_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cvar.obj" : $(SOURCE) $(DEP_CPP_CVAR_) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cvar.sbr" : $(SOURCE) $(DEP_CPP_CVAR_) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\files.c
-DEP_CPP_FILES=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\files.obj" : $(SOURCE) $(DEP_CPP_FILES) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\files.obj" : $(SOURCE) $(DEP_CPP_FILES) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\files.sbr" : $(SOURCE) $(DEP_CPP_FILES) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\net_chan.c
-DEP_CPP_NET_C=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\net_chan.obj" : $(SOURCE) $(DEP_CPP_NET_C) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\net_chan.obj" : $(SOURCE) $(DEP_CPP_NET_C) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\net_chan.sbr" : $(SOURCE) $(DEP_CPP_NET_C) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\cmd.c
-DEP_CPP_CMD_C=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cmd.obj" : $(SOURCE) $(DEP_CPP_CMD_C) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cmd.obj" : $(SOURCE) $(DEP_CPP_CMD_C) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cmd.sbr" : $(SOURCE) $(DEP_CPP_CMD_C) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\view.c
-DEP_CPP_VIEW_=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\view.obj" : $(SOURCE) $(DEP_CPP_VIEW_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\view.obj" : $(SOURCE) $(DEP_CPP_VIEW_) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\view.sbr" : $(SOURCE) $(DEP_CPP_VIEW_) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_demo.c
-DEP_CPP_CL_DE=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_demo.obj" : $(SOURCE) $(DEP_CPP_CL_DE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_demo.obj" : $(SOURCE) $(DEP_CPP_CL_DE) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_demo.sbr" : $(SOURCE) $(DEP_CPP_CL_DE) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_ents.c
-DEP_CPP_CL_EN=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_ents.obj" : $(SOURCE) $(DEP_CPP_CL_EN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_ents.obj" : $(SOURCE) $(DEP_CPP_CL_EN) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_ents.sbr" : $(SOURCE) $(DEP_CPP_CL_EN) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_input.c
-DEP_CPP_CL_IN=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_input.obj" : $(SOURCE) $(DEP_CPP_CL_IN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_input.obj" : $(SOURCE) $(DEP_CPP_CL_IN) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_input.sbr" : $(SOURCE) $(DEP_CPP_CL_IN) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_main.c
-DEP_CPP_CL_MA=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_main.obj" : $(SOURCE) $(DEP_CPP_CL_MA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_main.obj" : $(SOURCE) $(DEP_CPP_CL_MA) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_main.sbr" : $(SOURCE) $(DEP_CPP_CL_MA) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_parse.c
-DEP_CPP_CL_PA=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_parse.obj" : $(SOURCE) $(DEP_CPP_CL_PA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_parse.obj" : $(SOURCE) $(DEP_CPP_CL_PA) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_parse.sbr" : $(SOURCE) $(DEP_CPP_CL_PA) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_tent.c
-DEP_CPP_CL_TE=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_tent.obj" : $(SOURCE) $(DEP_CPP_CL_TE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_tent.obj" : $(SOURCE) $(DEP_CPP_CL_TE) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_tent.sbr" : $(SOURCE) $(DEP_CPP_CL_TE) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\console.c
-DEP_CPP_CONSO=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\console.obj" : $(SOURCE) $(DEP_CPP_CONSO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\console.obj" : $(SOURCE) $(DEP_CPP_CONSO) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\console.sbr" : $(SOURCE) $(DEP_CPP_CONSO) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\keys.c
-DEP_CPP_KEYS_=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\keys.obj" : $(SOURCE) $(DEP_CPP_KEYS_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\keys.obj" : $(SOURCE) $(DEP_CPP_KEYS_) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\keys.sbr" : $(SOURCE) $(DEP_CPP_KEYS_) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\menu.c
-DEP_CPP_MENU_=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\menu.obj" : $(SOURCE) $(DEP_CPP_MENU_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\menu.obj" : $(SOURCE) $(DEP_CPP_MENU_) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\menu.sbr" : $(SOURCE) $(DEP_CPP_MENU_) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\screen.c
-DEP_CPP_SCREE=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\screen.obj" : $(SOURCE) $(DEP_CPP_SCREE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\screen.obj" : $(SOURCE) $(DEP_CPP_SCREE) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\screen.sbr" : $(SOURCE) $(DEP_CPP_SCREE) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\snd_dma.c
-DEP_CPP_SND_D=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
- ".\win32\winquake.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\snd_dma.obj" : $(SOURCE) $(DEP_CPP_SND_D) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\snd_dma.obj" : $(SOURCE) $(DEP_CPP_SND_D) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\snd_dma.sbr" : $(SOURCE) $(DEP_CPP_SND_D) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\snd_mem.c
-DEP_CPP_SND_M=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\snd_mem.obj" : $(SOURCE) $(DEP_CPP_SND_M) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\snd_mem.obj" : $(SOURCE) $(DEP_CPP_SND_M) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\snd_mem.sbr" : $(SOURCE) $(DEP_CPP_SND_M) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\snd_mix.c
-DEP_CPP_SND_MI=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
- ".\win32\winquake.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\snd_mix.obj" : $(SOURCE) $(DEP_CPP_SND_MI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\snd_mix.obj" : $(SOURCE) $(DEP_CPP_SND_MI) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\snd_mix.sbr" : $(SOURCE) $(DEP_CPP_SND_MI) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_ccmds.c
-DEP_CPP_SV_CC=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_ccmds.obj" : $(SOURCE) $(DEP_CPP_SV_CC) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_ccmds.obj" : $(SOURCE) $(DEP_CPP_SV_CC) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_ccmds.sbr" : $(SOURCE) $(DEP_CPP_SV_CC) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_ents.c
-DEP_CPP_SV_EN=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_ents.obj" : $(SOURCE) $(DEP_CPP_SV_EN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_ents.obj" : $(SOURCE) $(DEP_CPP_SV_EN) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_ents.sbr" : $(SOURCE) $(DEP_CPP_SV_EN) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_init.c
-DEP_CPP_SV_IN=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_init.obj" : $(SOURCE) $(DEP_CPP_SV_IN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_init.obj" : $(SOURCE) $(DEP_CPP_SV_IN) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_init.sbr" : $(SOURCE) $(DEP_CPP_SV_IN) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_main.c
-DEP_CPP_SV_MA=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_main.obj" : $(SOURCE) $(DEP_CPP_SV_MA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_main.obj" : $(SOURCE) $(DEP_CPP_SV_MA) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_main.sbr" : $(SOURCE) $(DEP_CPP_SV_MA) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_phys.c
-DEP_CPP_SV_PH=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_phys.obj" : $(SOURCE) $(DEP_CPP_SV_PH) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_phys.obj" : $(SOURCE) $(DEP_CPP_SV_PH) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_phys.sbr" : $(SOURCE) $(DEP_CPP_SV_PH) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_send.c
-DEP_CPP_SV_SE=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_send.obj" : $(SOURCE) $(DEP_CPP_SV_SE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_send.obj" : $(SOURCE) $(DEP_CPP_SV_SE) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_send.sbr" : $(SOURCE) $(DEP_CPP_SV_SE) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_user.c
-DEP_CPP_SV_US=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_user.obj" : $(SOURCE) $(DEP_CPP_SV_US) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_user.obj" : $(SOURCE) $(DEP_CPP_SV_US) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_user.sbr" : $(SOURCE) $(DEP_CPP_SV_US) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\qcommon.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\client.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\server.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\vid_dll.c
-DEP_CPP_VID_D=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
- ".\win32\winquake.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\vid_dll.obj" : $(SOURCE) $(DEP_CPP_VID_D) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\vid_dll.obj" : $(SOURCE) $(DEP_CPP_VID_D) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\vid_dll.sbr" : $(SOURCE) $(DEP_CPP_VID_D) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\in_win.c
-DEP_CPP_IN_WI=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
- ".\win32\winquake.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\in_win.obj" : $(SOURCE) $(DEP_CPP_IN_WI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\in_win.obj" : $(SOURCE) $(DEP_CPP_IN_WI) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\in_win.sbr" : $(SOURCE) $(DEP_CPP_IN_WI) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\net_wins.c
-DEP_CPP_NET_W=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\net_wins.obj" : $(SOURCE) $(DEP_CPP_NET_W) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\net_wins.obj" : $(SOURCE) $(DEP_CPP_NET_W) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\net_wins.sbr" : $(SOURCE) $(DEP_CPP_NET_W) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\snd_win.c
-DEP_CPP_SND_W=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\snd_loc.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
- ".\win32\winquake.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\snd_win.obj" : $(SOURCE) $(DEP_CPP_SND_W) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\snd_win.obj" : $(SOURCE) $(DEP_CPP_SND_W) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\snd_win.sbr" : $(SOURCE) $(DEP_CPP_SND_W) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\sys_win.c
-DEP_CPP_SYS_W=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\winquake.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sys_win.obj" : $(SOURCE) $(DEP_CPP_SYS_W) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sys_win.obj" : $(SOURCE) $(DEP_CPP_SYS_W) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sys_win.sbr" : $(SOURCE) $(DEP_CPP_SYS_W) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\cd_win.c
-DEP_CPP_CD_WI=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cd_win.obj" : $(SOURCE) $(DEP_CPP_CD_WI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cd_win.obj" : $(SOURCE) $(DEP_CPP_CD_WI) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cd_win.sbr" : $(SOURCE) $(DEP_CPP_CD_WI) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\bspfile.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\sbar2.c
-DEP_CPP_SBAR2=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sbar2.obj" : $(SOURCE) $(DEP_CPP_SBAR2) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sbar2.obj" : $(SOURCE) $(DEP_CPP_SBAR2) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sbar2.sbr" : $(SOURCE) $(DEP_CPP_SBAR2) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\ref.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_game.c
-DEP_CPP_SV_GA=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_game.obj" : $(SOURCE) $(DEP_CPP_SV_GA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_game.obj" : $(SOURCE) $(DEP_CPP_SV_GA) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_game.sbr" : $(SOURCE) $(DEP_CPP_SV_GA) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\snd_loc.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_move.c
-DEP_CPP_SV_MO=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_move.obj" : $(SOURCE) $(DEP_CPP_SV_MO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_move.obj" : $(SOURCE) $(DEP_CPP_SV_MO) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_move.sbr" : $(SOURCE) $(DEP_CPP_SV_MO) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\crc.c
-DEP_CPP_CRC_C=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\crc.obj" : $(SOURCE) $(DEP_CPP_CRC_C) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\crc.obj" : $(SOURCE) $(DEP_CPP_CRC_C) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\crc.sbr" : $(SOURCE) $(DEP_CPP_CRC_C) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\cl_fx.c
-DEP_CPP_CL_FX=\
- ".\client\anorms.h"\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\cl_fx.obj" : $(SOURCE) $(DEP_CPP_CL_FX) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\cl_fx.obj" : $(SOURCE) $(DEP_CPP_CL_FX) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\cl_fx.sbr" : $(SOURCE) $(DEP_CPP_CL_FX) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\client\scr_cin.c
-DEP_CPP_SCR_C=\
- ".\client\cdaudio.h"\
- ".\client\console.h"\
- ".\client\input.h"\
- ".\client\keys.h"\
- ".\client\ref.h"\
- ".\client\sbar.h"\
- ".\client\screen.h"\
- ".\client\sound.h"\
- ".\client\vid.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\win32\..\client\client.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\scr_cin.obj" : $(SOURCE) $(DEP_CPP_SCR_C) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\scr_cin.obj" : $(SOURCE) $(DEP_CPP_SCR_C) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\scr_cin.sbr" : $(SOURCE) $(DEP_CPP_SCR_C) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\qfiles.h
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\server\sv_world.c
-DEP_CPP_SV_WO=\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\sv_world.obj" : $(SOURCE) $(DEP_CPP_SV_WO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\sv_world.obj" : $(SOURCE) $(DEP_CPP_SV_WO) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\sv_world.sbr" : $(SOURCE) $(DEP_CPP_SV_WO) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\q_shared.c
-DEP_CPP_Q_SHA=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-!IF "$(CFG)" == "quake2 - Win32 Release"
-
-
-"$(INTDIR)\q_shared.obj" : $(SOURCE) $(DEP_CPP_Q_SHA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "quake2 - Win32 Debug"
-
-
-BuildCmds= \
- $(CPP) $(CPP_PROJ) $(SOURCE) \
-
-
-"$(INTDIR)\q_shared.obj" : $(SOURCE) $(DEP_CPP_Q_SHA) "$(INTDIR)"
- $(BuildCmds)
-
-"$(INTDIR)\q_shared.sbr" : $(SOURCE) $(DEP_CPP_Q_SHA) "$(INTDIR)"
- $(BuildCmds)
-
-!ENDIF
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "ref_soft - Win32 Release"
-# Name "ref_soft - Win32 Debug"
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_aclip.c
-DEP_CPP_R_ACL=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_aclip.obj" : $(SOURCE) $(DEP_CPP_R_ACL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_alias.c
-DEP_CPP_R_ALI=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\anorms.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_alias.obj" : $(SOURCE) $(DEP_CPP_R_ALI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_bsp.c
-DEP_CPP_R_BSP=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_bsp.obj" : $(SOURCE) $(DEP_CPP_R_BSP) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_draw.c
-DEP_CPP_R_DRA=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_draw.obj" : $(SOURCE) $(DEP_CPP_R_DRA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_edge.c
-DEP_CPP_R_EDG=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_edge.obj" : $(SOURCE) $(DEP_CPP_R_EDG) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_inter.c
-DEP_CPP_R_INT=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_inter.obj" : $(SOURCE) $(DEP_CPP_R_INT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_light.c
-DEP_CPP_R_LIG=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_light.obj" : $(SOURCE) $(DEP_CPP_R_LIG) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_main.c
-DEP_CPP_R_MAI=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_main.obj" : $(SOURCE) $(DEP_CPP_R_MAI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_misc.c
-DEP_CPP_R_MIS=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_misc.obj" : $(SOURCE) $(DEP_CPP_R_MIS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_part.c
-DEP_CPP_R_PAR=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_part.obj" : $(SOURCE) $(DEP_CPP_R_PAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_sprite.c
-DEP_CPP_R_SPR=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_sprite.obj" : $(SOURCE) $(DEP_CPP_R_SPR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_surf.c
-DEP_CPP_R_SUR=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_surf.obj" : $(SOURCE) $(DEP_CPP_R_SUR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_aclipa.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_aclipa.asm
-InputName=r_aclipa
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_aclipa.asm
-InputName=r_aclipa
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_drawa.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_drawa.asm
-InputName=r_drawa
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_drawa.asm
-InputName=r_drawa
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_edgea.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_edgea.asm
-InputName=r_edgea
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_edgea.asm
-InputName=r_edgea
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_varsa.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_varsa.asm
-InputName=r_varsa
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_varsa.asm
-InputName=r_varsa
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\ref_soft.def
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_local.h
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_image.c
-DEP_CPP_R_IMA=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_image.obj" : $(SOURCE) $(DEP_CPP_R_IMA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_poly.c
-DEP_CPP_R_POL=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_poly.obj" : $(SOURCE) $(DEP_CPP_R_POL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_polyse.c
-DEP_CPP_R_POLY=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\adivtab.h"\
- ".\ref_soft\r_model.h"\
- ".\ref_soft\rand1k.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_polyse.obj" : $(SOURCE) $(DEP_CPP_R_POLY) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_model.c
-DEP_CPP_R_MOD=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_model.obj" : $(SOURCE) $(DEP_CPP_R_MOD) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_rast.c
-DEP_CPP_R_RAS=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_rast.obj" : $(SOURCE) $(DEP_CPP_R_RAS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_surf8.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_surf8.asm
-InputName=r_surf8
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_surf8.asm
-InputName=r_surf8
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_spr8.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_spr8.asm
-InputName=r_spr8
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_spr8.asm
-InputName=r_spr8
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_scana.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_scana.asm
-InputName=r_scana
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_scana.asm
-InputName=r_scana
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_scan.c
-DEP_CPP_R_SCA=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
-
-
-"$(INTDIR)\r_scan.obj" : $(SOURCE) $(DEP_CPP_R_SCA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_soft\r_draw16.asm
-
-!IF "$(CFG)" == "ref_soft - Win32 Release"
-
-# Begin Custom Build
-OutDir=.\Release
-InputPath=.\ref_soft\r_draw16.asm
-InputName=r_draw16
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "ref_soft - Win32 Debug"
-
-# Begin Custom Build
-OutDir=.\Debug
-InputPath=.\ref_soft\r_draw16.asm
-InputName=r_draw16
-
-"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\rw_dib.c
-DEP_CPP_RW_DI=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
- ".\win32\rw_win.h"\
-
-
-"$(INTDIR)\rw_dib.obj" : $(SOURCE) $(DEP_CPP_RW_DI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\rw_imp.c
-DEP_CPP_RW_IM=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
- ".\win32\rw_win.h"\
-
-
-"$(INTDIR)\rw_imp.obj" : $(SOURCE) $(DEP_CPP_RW_IM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\q_shared.c
-DEP_CPP_Q_SHA=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-"$(INTDIR)\q_shared.obj" : $(SOURCE) $(DEP_CPP_Q_SHA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\rw_ddraw.c
-DEP_CPP_RW_DD=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_soft\r_model.h"\
- ".\win32\..\ref_soft\r_local.h"\
- ".\win32\rw_win.h"\
-
-
-"$(INTDIR)\rw_ddraw.obj" : $(SOURCE) $(DEP_CPP_RW_DD) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "ref_gl - Win32 Release"
-# Name "ref_gl - Win32 Debug"
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_inter.c
-DEP_CPP_GL_IN=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_inter.obj" : $(SOURCE) $(DEP_CPP_GL_IN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_light.c
-DEP_CPP_GL_LI=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_light.obj" : $(SOURCE) $(DEP_CPP_GL_LI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_mesh.c
-DEP_CPP_GL_ME=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\anorms.h"\
- ".\ref_gl\anormtab.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_mesh.obj" : $(SOURCE) $(DEP_CPP_GL_ME) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_model.c
-DEP_CPP_GL_MO=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_model.obj" : $(SOURCE) $(DEP_CPP_GL_MO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_rmain.c
-DEP_CPP_GL_RM=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_rmain.obj" : $(SOURCE) $(DEP_CPP_GL_RM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_rmisc.c
-DEP_CPP_GL_RMI=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_rmisc.obj" : $(SOURCE) $(DEP_CPP_GL_RMI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_rsurf.c
-DEP_CPP_GL_RS=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_rsurf.obj" : $(SOURCE) $(DEP_CPP_GL_RS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_textr.c
-DEP_CPP_GL_TE=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_textr.obj" : $(SOURCE) $(DEP_CPP_GL_TE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_warp.c
-DEP_CPP_GL_WA=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- ".\ref_gl\warpsin.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_warp.obj" : $(SOURCE) $(DEP_CPP_GL_WA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_draw.c
-DEP_CPP_GL_DR=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\gl_draw.obj" : $(SOURCE) $(DEP_CPP_GL_DR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\ref_gl.def
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\ref_gl.h
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\gl_model.h
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\ref_gl\qgl.h
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\qgl_win.c
-DEP_CPP_QGL_W=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- ".\win32\glw_win.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\qgl_win.obj" : $(SOURCE) $(DEP_CPP_QGL_W) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\win32\glw_imp.c
-DEP_CPP_GLW_I=\
- ".\client\ref.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\ref_gl\gl_local.h"\
- ".\ref_gl\gl_model.h"\
- ".\ref_gl\qgl.h"\
- ".\win32\glw_win.h"\
- ".\win32\winquake.h"\
- {$(INCLUDE)}"\gl\gl.h"\
-
-
-"$(INTDIR)\glw_imp.obj" : $(SOURCE) $(DEP_CPP_GLW_I) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\q_shared.c
-DEP_CPP_Q_SHA=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-"$(INTDIR)\q_shared.obj" : $(SOURCE) $(DEP_CPP_Q_SHA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "game - Win32 Release"
-# Name "game - Win32 Debug"
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_ai.c
-DEP_CPP_G_AI_=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_ai.obj" : $(SOURCE) $(DEP_CPP_G_AI_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_bersrk.c
-DEP_CPP_G_BER=\
- ".\game\g_bersrk.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_bersrk.obj" : $(SOURCE) $(DEP_CPP_G_BER) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_bersrk.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_client.c
-DEP_CPP_G_CLI=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_client.obj" : $(SOURCE) $(DEP_CPP_G_CLI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_combat.c
-DEP_CPP_G_COM=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_combat.obj" : $(SOURCE) $(DEP_CPP_G_COM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_func.c
-DEP_CPP_G_FUN=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_func.obj" : $(SOURCE) $(DEP_CPP_G_FUN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_gladtr.c
-DEP_CPP_G_GLA=\
- ".\game\g_gladtr.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_gladtr.obj" : $(SOURCE) $(DEP_CPP_G_GLA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_gladtr.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_gunner.c
-DEP_CPP_G_GUN=\
- ".\game\g_gunner.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_gunner.obj" : $(SOURCE) $(DEP_CPP_G_GUN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_gunner.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_inftry.c
-DEP_CPP_G_INF=\
- ".\game\g_inftry.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_inftry.obj" : $(SOURCE) $(DEP_CPP_G_INF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_inftry.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_items.c
-DEP_CPP_G_ITE=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_items.obj" : $(SOURCE) $(DEP_CPP_G_ITE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_local.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_main.c
-DEP_CPP_G_MAI=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_main.obj" : $(SOURCE) $(DEP_CPP_G_MAI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_misc.c
-DEP_CPP_G_MIS=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_misc.obj" : $(SOURCE) $(DEP_CPP_G_MIS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_monster.c
-DEP_CPP_G_MON=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_monster.obj" : $(SOURCE) $(DEP_CPP_G_MON) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_pmove.c
-DEP_CPP_G_PMO=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_pmove.obj" : $(SOURCE) $(DEP_CPP_G_PMO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_pweapon.c
-DEP_CPP_G_PWE=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_pweapon.obj" : $(SOURCE) $(DEP_CPP_G_PWE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_soldier.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_utils.c
-DEP_CPP_G_UTI=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_utils.obj" : $(SOURCE) $(DEP_CPP_G_UTI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_weapon.c
-DEP_CPP_G_WEA=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_weapon.obj" : $(SOURCE) $(DEP_CPP_G_WEA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_target.c
-DEP_CPP_G_TAR=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_target.obj" : $(SOURCE) $(DEP_CPP_G_TAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_trigger.c
-DEP_CPP_G_TRI=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_trigger.obj" : $(SOURCE) $(DEP_CPP_G_TRI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_tank.c
-DEP_CPP_G_TAN=\
- ".\game\g_local.h"\
- ".\game\g_tank.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_tank.obj" : $(SOURCE) $(DEP_CPP_G_TAN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_soldier.c
-DEP_CPP_G_SOL=\
- ".\game\g_local.h"\
- ".\game\g_soldier.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_soldier.obj" : $(SOURCE) $(DEP_CPP_G_SOL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\game.def
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\game.h
-
-!IF "$(CFG)" == "game - Win32 Release"
-
-!ELSEIF "$(CFG)" == "game - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_medic.c
-DEP_CPP_G_MED=\
- ".\game\g_local.h"\
- ".\game\g_medic.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_medic.obj" : $(SOURCE) $(DEP_CPP_G_MED) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_flipper.c
-DEP_CPP_G_FLI=\
- ".\game\g_flipper.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_flipper.obj" : $(SOURCE) $(DEP_CPP_G_FLI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_chick.c
-DEP_CPP_G_CHI=\
- ".\game\g_chick.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_chick.obj" : $(SOURCE) $(DEP_CPP_G_CHI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_parasite.c
-DEP_CPP_G_PAR=\
- ".\game\g_local.h"\
- ".\game\g_parasite.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_parasite.obj" : $(SOURCE) $(DEP_CPP_G_PAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_flyer.c
-DEP_CPP_G_FLY=\
- ".\game\g_flyer.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_flyer.obj" : $(SOURCE) $(DEP_CPP_G_FLY) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_ptrail.c
-DEP_CPP_G_PTR=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_ptrail.obj" : $(SOURCE) $(DEP_CPP_G_PTR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_hover.c
-DEP_CPP_G_HOV=\
- ".\game\g_hover.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_hover.obj" : $(SOURCE) $(DEP_CPP_G_HOV) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_float.c
-DEP_CPP_G_FLO=\
- ".\game\g_float.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_float.obj" : $(SOURCE) $(DEP_CPP_G_FLO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_brain.c
-DEP_CPP_G_BRA=\
- ".\game\g_brain.h"\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_brain.obj" : $(SOURCE) $(DEP_CPP_G_BRA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_cmds.c
-DEP_CPP_G_CMD=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_cmds.obj" : $(SOURCE) $(DEP_CPP_G_CMD) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_player.c
-DEP_CPP_G_PLA=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_player.obj" : $(SOURCE) $(DEP_CPP_G_PLA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\game\g_pview.c
-DEP_CPP_G_PVI=\
- ".\game\g_local.h"\
- ".\game\game.h"\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
- ".\server\server.h"\
-
-
-"$(INTDIR)\g_pview.obj" : $(SOURCE) $(DEP_CPP_G_PVI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE=.\qcommon\q_shared.c
-DEP_CPP_Q_SHA=\
- ".\qcommon\qcommon.h"\
- ".\qcommon\qfiles.h"\
-
-
-"$(INTDIR)\q_shared.obj" : $(SOURCE) $(DEP_CPP_Q_SHA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
binary files a/quake2.opt /dev/null differ
--- a/quake2.plg
+++ /dev/null
@@ -1,715 +1,0 @@
-<html>
-<body>
-<pre>
-<h1>Build Log</h1>
-<h3>
---------------------Configuration: ctf - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB38.tmp" with contents
-[
-/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR".\debug/" /Fp".\debug/ctf.pch" /YX /Fo".\debug/" /Fd".\debug/" /FD /c
-"D:\quake2\code\ctf\g_ai.c"
-"D:\quake2\code\ctf\g_chase.c"
-"D:\quake2\code\ctf\g_cmds.c"
-"D:\quake2\code\ctf\g_combat.c"
-"D:\quake2\code\ctf\g_ctf.c"
-"D:\quake2\code\ctf\g_func.c"
-"D:\quake2\code\ctf\g_items.c"
-"D:\quake2\code\ctf\g_main.c"
-"D:\quake2\code\ctf\g_misc.c"
-"D:\quake2\code\ctf\g_monster.c"
-"D:\quake2\code\ctf\g_phys.c"
-"D:\quake2\code\ctf\g_save.c"
-"D:\quake2\code\ctf\g_spawn.c"
-"D:\quake2\code\ctf\g_svcmds.c"
-"D:\quake2\code\ctf\g_target.c"
-"D:\quake2\code\ctf\g_trigger.c"
-"D:\quake2\code\ctf\g_utils.c"
-"D:\quake2\code\ctf\g_weapon.c"
-"D:\quake2\code\ctf\m_move.c"
-"D:\quake2\code\ctf\p_client.c"
-"D:\quake2\code\ctf\p_hud.c"
-"D:\quake2\code\ctf\p_menu.c"
-"D:\quake2\code\ctf\p_trail.c"
-"D:\quake2\code\ctf\p_view.c"
-"D:\quake2\code\ctf\p_weapon.c"
-"D:\quake2\code\ctf\q_shared.c"
-]
-Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB38.tmp"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB39.tmp" with contents
-[
-kernel32.lib user32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /pdb:".\debug/gamex86.pdb" /map:".\debug/gamex86.map" /debug /machine:I386 /def:".\ctf.def" /out:".\debug\gamex86.dll" /implib:".\debug/gamex86.lib" /pdbtype:sept
-.\debug\g_ai.obj
-.\debug\g_chase.obj
-.\debug\g_cmds.obj
-.\debug\g_combat.obj
-.\debug\g_ctf.obj
-.\debug\g_func.obj
-.\debug\g_items.obj
-.\debug\g_main.obj
-.\debug\g_misc.obj
-.\debug\g_monster.obj
-.\debug\g_phys.obj
-.\debug\g_save.obj
-.\debug\g_spawn.obj
-.\debug\g_svcmds.obj
-.\debug\g_target.obj
-.\debug\g_trigger.obj
-.\debug\g_utils.obj
-.\debug\g_weapon.obj
-.\debug\m_move.obj
-.\debug\p_client.obj
-.\debug\p_hud.obj
-.\debug\p_menu.obj
-.\debug\p_trail.obj
-.\debug\p_view.obj
-.\debug\p_weapon.obj
-.\debug\q_shared.obj
-]
-Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB39.tmp"
-<h3>Output Window</h3>
-Compiling...
-g_ai.c
-g_chase.c
-g_cmds.c
-g_combat.c
-g_ctf.c
-g_func.c
-g_items.c
-g_main.c
-g_misc.c
-g_monster.c
-g_phys.c
-g_save.c
-g_spawn.c
-g_svcmds.c
-g_target.c
-g_trigger.c
-g_utils.c
-g_weapon.c
-m_move.c
-p_client.c
-p_hud.c
-p_menu.c
-p_trail.c
-p_view.c
-p_weapon.c
-q_shared.c
-Linking...
-LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
- Creating library .\debug/gamex86.lib and object .\debug/gamex86.exp
-
-
-
-<h3>Results</h3>
-gamex86.dll - 0 error(s), 1 warning(s)
-<h3>
---------------------Configuration: game - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB3E.tmp" with contents
-[
-/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "BUILDING_REF_GL" /FR".\debug/" /Fp".\debug/game.pch" /YX /Fo".\debug/" /Fd".\debug/" /FD /c
-"D:\quake2\code\game\g_ai.c"
-"D:\quake2\code\game\g_chase.c"
-"D:\quake2\code\game\g_cmds.c"
-"D:\quake2\code\game\g_combat.c"
-"D:\quake2\code\game\g_func.c"
-"D:\quake2\code\game\g_items.c"
-"D:\quake2\code\game\g_main.c"
-"D:\quake2\code\game\g_misc.c"
-"D:\quake2\code\game\g_monster.c"
-"D:\quake2\code\game\g_phys.c"
-"D:\quake2\code\game\g_save.c"
-"D:\quake2\code\game\g_spawn.c"
-"D:\quake2\code\game\g_svcmds.c"
-"D:\quake2\code\game\g_target.c"
-"D:\quake2\code\game\g_trigger.c"
-"D:\quake2\code\game\g_turret.c"
-"D:\quake2\code\game\g_utils.c"
-"D:\quake2\code\game\g_weapon.c"
-"D:\quake2\code\game\m_actor.c"
-"D:\quake2\code\game\m_berserk.c"
-"D:\quake2\code\game\m_boss2.c"
-"D:\quake2\code\game\m_boss3.c"
-"D:\quake2\code\game\m_boss31.c"
-"D:\quake2\code\game\m_boss32.c"
-"D:\quake2\code\game\m_brain.c"
-"D:\quake2\code\game\m_chick.c"
-"D:\quake2\code\game\m_flash.c"
-"D:\quake2\code\game\m_flipper.c"
-"D:\quake2\code\game\m_float.c"
-"D:\quake2\code\game\m_flyer.c"
-"D:\quake2\code\game\m_gladiator.c"
-"D:\quake2\code\game\m_gunner.c"
-"D:\quake2\code\game\m_hover.c"
-"D:\quake2\code\game\m_infantry.c"
-"D:\quake2\code\game\m_insane.c"
-"D:\quake2\code\game\m_medic.c"
-"D:\quake2\code\game\m_move.c"
-"D:\quake2\code\game\m_mutant.c"
-"D:\quake2\code\game\m_parasite.c"
-"D:\quake2\code\game\m_soldier.c"
-"D:\quake2\code\game\m_supertank.c"
-"D:\quake2\code\game\m_tank.c"
-"D:\quake2\code\game\p_client.c"
-"D:\quake2\code\game\p_hud.c"
-"D:\quake2\code\game\p_trail.c"
-"D:\quake2\code\game\p_view.c"
-"D:\quake2\code\game\p_weapon.c"
-"D:\quake2\code\game\q_shared.c"
-]
-Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB3E.tmp"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB3F.tmp" with contents
-[
-kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"..\debug/gamex86.pdb" /map:".\debug/gamex86.map" /debug /machine:I386 /def:".\game.def" /out:"..\debug\gamex86.dll" /implib:"..\debug/gamex86.lib"
-.\debug\g_ai.obj
-.\debug\g_chase.obj
-.\debug\g_cmds.obj
-.\debug\g_combat.obj
-.\debug\g_func.obj
-.\debug\g_items.obj
-.\debug\g_main.obj
-.\debug\g_misc.obj
-.\debug\g_monster.obj
-.\debug\g_phys.obj
-.\debug\g_save.obj
-.\debug\g_spawn.obj
-.\debug\g_svcmds.obj
-.\debug\g_target.obj
-.\debug\g_trigger.obj
-.\debug\g_turret.obj
-.\debug\g_utils.obj
-.\debug\g_weapon.obj
-.\debug\m_actor.obj
-.\debug\m_berserk.obj
-.\debug\m_boss2.obj
-.\debug\m_boss3.obj
-.\debug\m_boss31.obj
-.\debug\m_boss32.obj
-.\debug\m_brain.obj
-.\debug\m_chick.obj
-.\debug\m_flash.obj
-.\debug\m_flipper.obj
-.\debug\m_float.obj
-.\debug\m_flyer.obj
-.\debug\m_gladiator.obj
-.\debug\m_gunner.obj
-.\debug\m_hover.obj
-.\debug\m_infantry.obj
-.\debug\m_insane.obj
-.\debug\m_medic.obj
-.\debug\m_move.obj
-.\debug\m_mutant.obj
-.\debug\m_parasite.obj
-.\debug\m_soldier.obj
-.\debug\m_supertank.obj
-.\debug\m_tank.obj
-.\debug\p_client.obj
-.\debug\p_hud.obj
-.\debug\p_trail.obj
-.\debug\p_view.obj
-.\debug\p_weapon.obj
-.\debug\q_shared.obj
-]
-Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB3F.tmp"
-<h3>Output Window</h3>
-Compiling...
-g_ai.c
-g_chase.c
-g_cmds.c
-g_combat.c
-g_func.c
-g_items.c
-g_main.c
-g_misc.c
-g_monster.c
-g_phys.c
-g_save.c
-g_spawn.c
-g_svcmds.c
-g_target.c
-g_trigger.c
-g_turret.c
-g_utils.c
-g_weapon.c
-m_actor.c
-m_berserk.c
-m_boss2.c
-m_boss3.c
-m_boss31.c
-m_boss32.c
-m_brain.c
-m_chick.c
-m_flash.c
-m_flipper.c
-m_float.c
-m_flyer.c
-m_gladiator.c
-m_gunner.c
-m_hover.c
-m_infantry.c
-m_insane.c
-m_medic.c
-m_move.c
-m_mutant.c
-m_parasite.c
-m_soldier.c
-m_supertank.c
-m_tank.c
-p_client.c
-p_hud.c
-p_trail.c
-p_view.c
-p_weapon.c
-q_shared.c
-Linking...
-LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
- Creating library ..\debug/gamex86.lib and object ..\debug/gamex86.exp
-
-
-
-<h3>Results</h3>
-gamex86.dll - 0 error(s), 1 warning(s)
-<h3>
---------------------Configuration: quake2 - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating command line "rc.exe /l 0x409 /fo".\debug/q2.res" /i "win32" /d "_DEBUG" "D:\quake2\code\win32\q2.rc""
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB44.tmp" with contents
-[
-/nologo /G5 /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR".\debug/" /Fp".\debug/quake2.pch" /YX /Fo".\debug/" /Fd".\debug/" /FD /c
-"D:\quake2\code\win32\cd_win.c"
-"D:\quake2\code\client\cl_cin.c"
-"D:\quake2\code\client\cl_ents.c"
-"D:\quake2\code\client\cl_fx.c"
-"D:\quake2\code\client\cl_input.c"
-"D:\quake2\code\client\cl_inv.c"
-"D:\quake2\code\client\cl_main.c"
-"D:\quake2\code\client\cl_newfx.c"
-"D:\quake2\code\client\cl_parse.c"
-"D:\quake2\code\client\cl_pred.c"
-"D:\quake2\code\client\cl_scrn.c"
-"D:\quake2\code\client\cl_tent.c"
-"D:\quake2\code\client\cl_view.c"
-"D:\quake2\code\qcommon\cmd.c"
-"D:\quake2\code\qcommon\cmodel.c"
-"D:\quake2\code\qcommon\common.c"
-"D:\quake2\code\win32\conproc.c"
-"D:\quake2\code\client\console.c"
-"D:\quake2\code\qcommon\crc.c"
-"D:\quake2\code\qcommon\cvar.c"
-"D:\quake2\code\qcommon\files.c"
-"D:\quake2\code\win32\in_win.c"
-"D:\quake2\code\client\keys.c"
-"D:\quake2\code\game\m_flash.c"
-"D:\quake2\code\qcommon\md4.c"
-"D:\quake2\code\client\menu.c"
-"D:\quake2\code\qcommon\net_chan.c"
-"D:\quake2\code\win32\net_wins.c"
-"D:\quake2\code\qcommon\pmove.c"
-"D:\quake2\code\game\q_shared.c"
-"D:\quake2\code\win32\q_shwin.c"
-"D:\quake2\code\client\qmenu.c"
-"D:\quake2\code\client\snd_dma.c"
-"D:\quake2\code\client\snd_mem.c"
-"D:\quake2\code\client\snd_mix.c"
-"D:\quake2\code\win32\snd_win.c"
-"D:\quake2\code\server\sv_ccmds.c"
-"D:\quake2\code\server\sv_ents.c"
-"D:\quake2\code\server\sv_game.c"
-"D:\quake2\code\server\sv_init.c"
-"D:\quake2\code\server\sv_main.c"
-"D:\quake2\code\server\sv_send.c"
-"D:\quake2\code\server\sv_user.c"
-"D:\quake2\code\server\sv_world.c"
-"D:\quake2\code\win32\sys_win.c"
-"D:\quake2\code\win32\vid_dll.c"
-"D:\quake2\code\win32\vid_menu.c"
-"D:\quake2\code\client\x86.c"
-]
-Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB44.tmp"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB45.tmp" with contents
-[
-winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /incremental:no /pdb:".\debug/quake2.pdb" /map:".\debug/quake2.map" /debug /machine:I386 /out:".\debug/quake2.exe"
-.\debug\cd_win.obj
-.\debug\cl_cin.obj
-.\debug\cl_ents.obj
-.\debug\cl_fx.obj
-.\debug\cl_input.obj
-.\debug\cl_inv.obj
-.\debug\cl_main.obj
-.\debug\cl_newfx.obj
-.\debug\cl_parse.obj
-.\debug\cl_pred.obj
-.\debug\cl_scrn.obj
-.\debug\cl_tent.obj
-.\debug\cl_view.obj
-.\debug\cmd.obj
-.\debug\cmodel.obj
-.\debug\common.obj
-.\debug\conproc.obj
-.\debug\console.obj
-.\debug\crc.obj
-.\debug\cvar.obj
-.\debug\files.obj
-.\debug\in_win.obj
-.\debug\keys.obj
-.\debug\m_flash.obj
-.\debug\md4.obj
-.\debug\menu.obj
-.\debug\net_chan.obj
-.\debug\net_wins.obj
-.\debug\pmove.obj
-.\debug\q_shared.obj
-.\debug\q_shwin.obj
-.\debug\qmenu.obj
-.\debug\snd_dma.obj
-.\debug\snd_mem.obj
-.\debug\snd_mix.obj
-.\debug\snd_win.obj
-.\debug\sv_ccmds.obj
-.\debug\sv_ents.obj
-.\debug\sv_game.obj
-.\debug\sv_init.obj
-.\debug\sv_main.obj
-.\debug\sv_send.obj
-.\debug\sv_user.obj
-.\debug\sv_world.obj
-.\debug\sys_win.obj
-.\debug\vid_dll.obj
-.\debug\vid_menu.obj
-.\debug\x86.obj
-.\debug\q2.res
-]
-Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB45.tmp"
-<h3>Output Window</h3>
-Compiling resources...
-Compiling...
-cd_win.c
-cl_cin.c
-cl_ents.c
-cl_fx.c
-cl_input.c
-D:\quake2\code\client\cl_input.c(460) : warning C4700: local variable 'buf' used without having been initialized
-cl_inv.c
-cl_main.c
-cl_newfx.c
-cl_parse.c
-cl_pred.c
-cl_scrn.c
-cl_tent.c
-cl_view.c
-cmd.c
-cmodel.c
-common.c
-conproc.c
-console.c
-crc.c
-cvar.c
-files.c
-in_win.c
-d:\quake2\code\win32\in_win.c(555) : warning C4715: 'RawValuePointer' : not all control paths return a value
-keys.c
-m_flash.c
-md4.c
-menu.c
-d:\quake2\code\client\menu.c(3561) : warning C4715: 'PlayerConfig_ScanDirectories' : not all control paths return a value
-net_chan.c
-net_wins.c
-d:\quake2\code\win32\net_wins.c(105) : warning C4715: 'NET_CompareAdr' : not all control paths return a value
-d:\quake2\code\win32\net_wins.c(135) : warning C4715: 'NET_CompareBaseAdr' : not all control paths return a value
-pmove.c
-q_shared.c
-q_shwin.c
-qmenu.c
-snd_dma.c
-snd_mem.c
-snd_mix.c
-snd_win.c
-sv_ccmds.c
-sv_ents.c
-sv_game.c
-sv_init.c
-sv_main.c
-sv_send.c
-sv_user.c
-sv_world.c
-sys_win.c
-vid_dll.c
-vid_menu.c
-x86.c
-Linking...
-LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
-
-
-
-<h3>Results</h3>
-quake2.exe - 0 error(s), 6 warning(s)
-<h3>
---------------------Configuration: ref_gl - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB48.tmp" with contents
-[
-/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR".\debug/" /Fp".\debug/ref_gl.pch" /YX /Fo".\debug/" /Fd".\debug/" /FD /c
-"D:\quake2\code\ref_gl\gl_draw.c"
-"D:\quake2\code\ref_gl\gl_image.c"
-"D:\quake2\code\ref_gl\gl_light.c"
-"D:\quake2\code\ref_gl\gl_mesh.c"
-"D:\quake2\code\ref_gl\gl_model.c"
-"D:\quake2\code\ref_gl\gl_rmain.c"
-"D:\quake2\code\ref_gl\gl_rmisc.c"
-"D:\quake2\code\ref_gl\gl_rsurf.c"
-"D:\quake2\code\ref_gl\gl_warp.c"
-"D:\quake2\code\win32\glw_imp.c"
-"D:\quake2\code\game\q_shared.c"
-"D:\quake2\code\win32\q_shwin.c"
-"D:\quake2\code\win32\qgl_win.c"
-]
-Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB48.tmp"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB49.tmp" with contents
-[
-kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"..\debug/ref_gl.pdb" /map:".\debug/ref_gl.map" /debug /machine:I386 /def:".\ref_gl.def" /out:"..\debug/ref_gl.dll" /implib:"..\debug/ref_gl.lib"
-.\debug\gl_draw.obj
-.\debug\gl_image.obj
-.\debug\gl_light.obj
-.\debug\gl_mesh.obj
-.\debug\gl_model.obj
-.\debug\gl_rmain.obj
-.\debug\gl_rmisc.obj
-.\debug\gl_rsurf.obj
-.\debug\gl_warp.obj
-.\debug\glw_imp.obj
-.\debug\q_shared.obj
-.\debug\q_shwin.obj
-.\debug\qgl_win.obj
-]
-Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB49.tmp"
-<h3>Output Window</h3>
-Compiling...
-gl_draw.c
-gl_image.c
-D:\quake2\code\ref_gl\gl_image.c(1204) : warning C4715: 'GL_Upload8' : not all control paths return a value
-gl_light.c
-gl_mesh.c
-gl_model.c
-gl_rmain.c
-D:\quake2\code\ref_gl\gl_rmain.c(1322) : warning C4715: 'R_Init' : not all control paths return a value
-gl_rmisc.c
-gl_rsurf.c
-gl_warp.c
-glw_imp.c
-q_shared.c
-q_shwin.c
-qgl_win.c
-Linking...
-LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
- Creating library ..\debug/ref_gl.lib and object ..\debug/ref_gl.exp
-
-
-
-<h3>Results</h3>
-ref_gl.dll - 0 error(s), 3 warning(s)
-<h3>
---------------------Configuration: ref_soft - Win32 Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB4E.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_varsa.obj /Zm /Zi .\r_varsa.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB4E.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB4F.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_surf8.obj /Zm /Zi .\r_surf8.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB4F.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB50.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_spr8.obj /Zm /Zi .\r_spr8.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB50.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB51.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_scana.obj /Zm /Zi .\r_scana.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB51.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB52.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_polysa.obj /Zm /Zi .\r_polysa.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB52.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB53.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_edgea.obj /Zm /Zi .\r_edgea.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB53.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB54.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_drawa.obj /Zm /Zi .\r_drawa.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB54.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB55.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_draw16.obj /Zm /Zi .\r_draw16.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB55.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB56.bat" with contents
-[
-@echo off
-ml /c /Cp /coff /Fo.\..\debug\r_aclipa.obj /Zm /Zi .\r_aclipa.asm
-]
-Creating command line "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB56.bat"
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB57.tmp" with contents
-[
-/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR".\debug/" /Fp".\debug/ref_soft.pch" /YX /Fo".\debug/" /Fd".\debug/" /FD /c
-"D:\quake2\code\game\q_shared.c"
-"D:\quake2\code\win32\q_shwin.c"
-"D:\quake2\code\ref_soft\r_aclip.c"
-"D:\quake2\code\ref_soft\r_alias.c"
-"D:\quake2\code\ref_soft\r_bsp.c"
-"D:\quake2\code\ref_soft\r_draw.c"
-"D:\quake2\code\ref_soft\r_edge.c"
-"D:\quake2\code\ref_soft\r_image.c"
-"D:\quake2\code\ref_soft\r_light.c"
-"D:\quake2\code\ref_soft\r_main.c"
-"D:\quake2\code\ref_soft\r_misc.c"
-"D:\quake2\code\ref_soft\r_model.c"
-"D:\quake2\code\ref_soft\r_part.c"
-"D:\quake2\code\ref_soft\r_poly.c"
-"D:\quake2\code\ref_soft\r_polyse.c"
-"D:\quake2\code\ref_soft\r_rast.c"
-"D:\quake2\code\ref_soft\r_scan.c"
-"D:\quake2\code\ref_soft\r_sprite.c"
-"D:\quake2\code\ref_soft\r_surf.c"
-"D:\quake2\code\win32\rw_ddraw.c"
-"D:\quake2\code\win32\rw_dib.c"
-"D:\quake2\code\win32\rw_imp.c"
-]
-Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB57.tmp"
-Performing Custom Build Step on .\r_varsa.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_varsa.asm
-Performing Custom Build Step on .\r_surf8.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_surf8.asm
-Performing Custom Build Step on .\r_spr8.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_spr8.asm
-Performing Custom Build Step on .\r_scana.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_scana.asm
-Performing Custom Build Step on .\r_polysa.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_polysa.asm
-Performing Custom Build Step on .\r_edgea.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_edgea.asm
-Performing Custom Build Step on .\r_drawa.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_drawa.asm
-Performing Custom Build Step on .\r_draw16.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_draw16.asm
-Performing Custom Build Step on .\r_aclipa.asm
-Microsoft (R) Macro Assembler Version 6.15.8803
-Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
-
- Assembling: .\r_aclipa.asm
-Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB58.tmp" with contents
-[
-kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"..\debug/ref_soft.pdb" /map:".\debug/ref_soft.map" /debug /machine:I386 /nodefaultlib:"libc" /def:".\ref_soft.def" /out:"..\debug/ref_soft.dll" /implib:"..\debug/ref_soft.lib"
-.\debug\q_shared.obj
-.\debug\q_shwin.obj
-.\debug\r_aclip.obj
-.\debug\r_alias.obj
-.\debug\r_bsp.obj
-.\debug\r_draw.obj
-.\debug\r_edge.obj
-.\debug\r_image.obj
-.\debug\r_light.obj
-.\debug\r_main.obj
-.\debug\r_misc.obj
-.\debug\r_model.obj
-.\debug\r_part.obj
-.\debug\r_poly.obj
-.\debug\r_polyse.obj
-.\debug\r_rast.obj
-.\debug\r_scan.obj
-.\debug\r_sprite.obj
-.\debug\r_surf.obj
-.\debug\rw_ddraw.obj
-.\debug\rw_dib.obj
-.\debug\rw_imp.obj
-\quake2\code\debug\r_aclipa.obj
-\quake2\code\debug\r_draw16.obj
-\quake2\code\debug\r_drawa.obj
-\quake2\code\debug\r_edgea.obj
-\quake2\code\debug\r_polysa.obj
-\quake2\code\debug\r_scana.obj
-\quake2\code\debug\r_spr8.obj
-\quake2\code\debug\r_surf8.obj
-\quake2\code\debug\r_varsa.obj
-]
-Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPB58.tmp"
-<h3>Output Window</h3>
-Compiling...
-q_shared.c
-q_shwin.c
-r_aclip.c
-r_alias.c
-r_bsp.c
-r_draw.c
-r_edge.c
-r_image.c
-r_light.c
-r_main.c
-r_misc.c
-r_model.c
-r_part.c
-r_poly.c
-r_polyse.c
-r_rast.c
-r_scan.c
-r_sprite.c
-r_surf.c
-rw_ddraw.c
-rw_dib.c
-rw_imp.c
-Linking...
-LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
- Creating library ..\debug/ref_soft.lib and object ..\debug/ref_soft.exp
-
-
-
-<h3>Results</h3>
-ref_soft.dll - 0 error(s), 1 warning(s)
-</pre>
-</body>
-</html>
--- a/ref_gl/anorms.h
+++ /dev/null
@@ -1,181 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-{-0.525731, 0.000000, 0.850651},
-{-0.442863, 0.238856, 0.864188},
-{-0.295242, 0.000000, 0.955423},
-{-0.309017, 0.500000, 0.809017},
-{-0.162460, 0.262866, 0.951056},
-{0.000000, 0.000000, 1.000000},
-{0.000000, 0.850651, 0.525731},
-{-0.147621, 0.716567, 0.681718},
-{0.147621, 0.716567, 0.681718},
-{0.000000, 0.525731, 0.850651},
-{0.309017, 0.500000, 0.809017},
-{0.525731, 0.000000, 0.850651},
-{0.295242, 0.000000, 0.955423},
-{0.442863, 0.238856, 0.864188},
-{0.162460, 0.262866, 0.951056},
-{-0.681718, 0.147621, 0.716567},
-{-0.809017, 0.309017, 0.500000},
-{-0.587785, 0.425325, 0.688191},
-{-0.850651, 0.525731, 0.000000},
-{-0.864188, 0.442863, 0.238856},
-{-0.716567, 0.681718, 0.147621},
-{-0.688191, 0.587785, 0.425325},
-{-0.500000, 0.809017, 0.309017},
-{-0.238856, 0.864188, 0.442863},
-{-0.425325, 0.688191, 0.587785},
-{-0.716567, 0.681718, -0.147621},
-{-0.500000, 0.809017, -0.309017},
-{-0.525731, 0.850651, 0.000000},
-{0.000000, 0.850651, -0.525731},
-{-0.238856, 0.864188, -0.442863},
-{0.000000, 0.955423, -0.295242},
-{-0.262866, 0.951056, -0.162460},
-{0.000000, 1.000000, 0.000000},
-{0.000000, 0.955423, 0.295242},
-{-0.262866, 0.951056, 0.162460},
-{0.238856, 0.864188, 0.442863},
-{0.262866, 0.951056, 0.162460},
-{0.500000, 0.809017, 0.309017},
-{0.238856, 0.864188, -0.442863},
-{0.262866, 0.951056, -0.162460},
-{0.500000, 0.809017, -0.309017},
-{0.850651, 0.525731, 0.000000},
-{0.716567, 0.681718, 0.147621},
-{0.716567, 0.681718, -0.147621},
-{0.525731, 0.850651, 0.000000},
-{0.425325, 0.688191, 0.587785},
-{0.864188, 0.442863, 0.238856},
-{0.688191, 0.587785, 0.425325},
-{0.809017, 0.309017, 0.500000},
-{0.681718, 0.147621, 0.716567},
-{0.587785, 0.425325, 0.688191},
-{0.955423, 0.295242, 0.000000},
-{1.000000, 0.000000, 0.000000},
-{0.951056, 0.162460, 0.262866},
-{0.850651, -0.525731, 0.000000},
-{0.955423, -0.295242, 0.000000},
-{0.864188, -0.442863, 0.238856},
-{0.951056, -0.162460, 0.262866},
-{0.809017, -0.309017, 0.500000},
-{0.681718, -0.147621, 0.716567},
-{0.850651, 0.000000, 0.525731},
-{0.864188, 0.442863, -0.238856},
-{0.809017, 0.309017, -0.500000},
-{0.951056, 0.162460, -0.262866},
-{0.525731, 0.000000, -0.850651},
-{0.681718, 0.147621, -0.716567},
-{0.681718, -0.147621, -0.716567},
-{0.850651, 0.000000, -0.525731},
-{0.809017, -0.309017, -0.500000},
-{0.864188, -0.442863, -0.238856},
-{0.951056, -0.162460, -0.262866},
-{0.147621, 0.716567, -0.681718},
-{0.309017, 0.500000, -0.809017},
-{0.425325, 0.688191, -0.587785},
-{0.442863, 0.238856, -0.864188},
-{0.587785, 0.425325, -0.688191},
-{0.688191, 0.587785, -0.425325},
-{-0.147621, 0.716567, -0.681718},
-{-0.309017, 0.500000, -0.809017},
-{0.000000, 0.525731, -0.850651},
-{-0.525731, 0.000000, -0.850651},
-{-0.442863, 0.238856, -0.864188},
-{-0.295242, 0.000000, -0.955423},
-{-0.162460, 0.262866, -0.951056},
-{0.000000, 0.000000, -1.000000},
-{0.295242, 0.000000, -0.955423},
-{0.162460, 0.262866, -0.951056},
-{-0.442863, -0.238856, -0.864188},
-{-0.309017, -0.500000, -0.809017},
-{-0.162460, -0.262866, -0.951056},
-{0.000000, -0.850651, -0.525731},
-{-0.147621, -0.716567, -0.681718},
-{0.147621, -0.716567, -0.681718},
-{0.000000, -0.525731, -0.850651},
-{0.309017, -0.500000, -0.809017},
-{0.442863, -0.238856, -0.864188},
-{0.162460, -0.262866, -0.951056},
-{0.238856, -0.864188, -0.442863},
-{0.500000, -0.809017, -0.309017},
-{0.425325, -0.688191, -0.587785},
-{0.716567, -0.681718, -0.147621},
-{0.688191, -0.587785, -0.425325},
-{0.587785, -0.425325, -0.688191},
-{0.000000, -0.955423, -0.295242},
-{0.000000, -1.000000, 0.000000},
-{0.262866, -0.951056, -0.162460},
-{0.000000, -0.850651, 0.525731},
-{0.000000, -0.955423, 0.295242},
-{0.238856, -0.864188, 0.442863},
-{0.262866, -0.951056, 0.162460},
-{0.500000, -0.809017, 0.309017},
-{0.716567, -0.681718, 0.147621},
-{0.525731, -0.850651, 0.000000},
-{-0.238856, -0.864188, -0.442863},
-{-0.500000, -0.809017, -0.309017},
-{-0.262866, -0.951056, -0.162460},
-{-0.850651, -0.525731, 0.000000},
-{-0.716567, -0.681718, -0.147621},
-{-0.716567, -0.681718, 0.147621},
-{-0.525731, -0.850651, 0.000000},
-{-0.500000, -0.809017, 0.309017},
-{-0.238856, -0.864188, 0.442863},
-{-0.262866, -0.951056, 0.162460},
-{-0.864188, -0.442863, 0.238856},
-{-0.809017, -0.309017, 0.500000},
-{-0.688191, -0.587785, 0.425325},
-{-0.681718, -0.147621, 0.716567},
-{-0.442863, -0.238856, 0.864188},
-{-0.587785, -0.425325, 0.688191},
-{-0.309017, -0.500000, 0.809017},
-{-0.147621, -0.716567, 0.681718},
-{-0.425325, -0.688191, 0.587785},
-{-0.162460, -0.262866, 0.951056},
-{0.442863, -0.238856, 0.864188},
-{0.162460, -0.262866, 0.951056},
-{0.309017, -0.500000, 0.809017},
-{0.147621, -0.716567, 0.681718},
-{0.000000, -0.525731, 0.850651},
-{0.425325, -0.688191, 0.587785},
-{0.587785, -0.425325, 0.688191},
-{0.688191, -0.587785, 0.425325},
-{-0.955423, 0.295242, 0.000000},
-{-0.951056, 0.162460, 0.262866},
-{-1.000000, 0.000000, 0.000000},
-{-0.850651, 0.000000, 0.525731},
-{-0.955423, -0.295242, 0.000000},
-{-0.951056, -0.162460, 0.262866},
-{-0.864188, 0.442863, -0.238856},
-{-0.951056, 0.162460, -0.262866},
-{-0.809017, 0.309017, -0.500000},
-{-0.864188, -0.442863, -0.238856},
-{-0.951056, -0.162460, -0.262866},
-{-0.809017, -0.309017, -0.500000},
-{-0.681718, 0.147621, -0.716567},
-{-0.681718, -0.147621, -0.716567},
-{-0.850651, 0.000000, -0.525731},
-{-0.688191, 0.587785, -0.425325},
-{-0.587785, 0.425325, -0.688191},
-{-0.425325, 0.688191, -0.587785},
-{-0.425325, -0.688191, -0.587785},
-{-0.587785, -0.425325, -0.688191},
-{-0.688191, -0.587785, -0.425325},
--- a/ref_gl/anormtab.h
+++ /dev/null
@@ -1,37 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-{
-{1.23,1.30,1.47,1.35,1.56,1.71,1.37,1.38,1.59,1.60,1.79,1.97,1.88,1.92,1.79,1.02,0.93,1.07,0.82,0.87,0.88,0.94,0.96,1.14,1.11,0.82,0.83,0.89,0.89,0.86,0.94,0.91,1.00,1.21,0.98,1.48,1.30,1.57,0.96,1.07,1.14,1.60,1.61,1.40,1.37,1.72,1.78,1.79,1.93,1.99,1.90,1.68,1.71,1.86,1.60,1.68,1.78,1.86,1.93,1.99,1.97,1.44,1.22,1.49,0.93,0.99,0.99,1.23,1.22,1.44,1.49,0.89,0.89,0.97,0.91,0.98,1.19,0.82,0.76,0.82,0.71,0.72,0.73,0.76,0.79,0.86,0.83,0.72,0.76,0.76,0.89,0.82,0.89,0.82,0.89,0.91,0.83,0.96,1.14,0.97,1.40,1.19,0.98,0.94,1.00,1.07,1.37,1.21,1.48,1.30,1.57,1.61,1.37,0.86,0.83,0.91,0.82,0.82,0.88,0.89,0.96,1.14,0.98,0.87,0.93,0.94,1.02,1.30,1.07,1.35,1.38,1.11,1.56,1.92,1.79,1.79,1.59,1.60,1.72,1.90,1.79,0.80,0.85,0.79,0.93,0.80,0.85,0.77,0.74,0.72,0.77,0.74,0.72,0.70,0.70,0.71,0.76,0.73,0.79,0.79,0.73,0.76,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.26,1.26,1.48,1.23,1.50,1.71,1.14,1.19,1.38,1.46,1.64,1.94,1.87,1.84,1.71,1.02,0.92,1.00,0.79,0.85,0.84,0.91,0.90,0.98,0.99,0.77,0.77,0.83,0.82,0.79,0.86,0.84,0.92,0.99,0.91,1.24,1.03,1.33,0.88,0.94,0.97,1.41,1.39,1.18,1.11,1.51,1.61,1.59,1.80,1.91,1.76,1.54,1.65,1.76,1.70,1.70,1.85,1.85,1.97,1.99,1.93,1.28,1.09,1.39,0.92,0.97,0.99,1.18,1.26,1.52,1.48,0.83,0.85,0.90,0.88,0.93,1.00,0.77,0.73,0.78,0.72,0.71,0.74,0.75,0.79,0.86,0.81,0.75,0.81,0.79,0.96,0.88,0.94,0.86,0.93,0.92,0.85,1.08,1.33,1.05,1.55,1.31,1.01,1.05,1.27,1.31,1.60,1.47,1.70,1.54,1.76,1.76,1.57,0.93,0.90,0.99,0.88,0.88,0.95,0.97,1.11,1.39,1.20,0.92,0.97,1.01,1.10,1.39,1.22,1.51,1.58,1.32,1.64,1.97,1.85,1.91,1.77,1.74,1.88,1.99,1.91,0.79,0.86,0.80,0.94,0.84,0.88,0.74,0.74,0.71,0.82,0.77,0.76,0.70,0.73,0.72,0.73,0.70,0.74,0.85,0.77,0.82,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.34,1.27,1.53,1.17,1.46,1.71,0.98,1.05,1.20,1.34,1.48,1.86,1.82,1.71,1.62,1.09,0.94,0.99,0.79,0.85,0.82,0.90,0.87,0.93,0.96,0.76,0.74,0.79,0.76,0.74,0.79,0.78,0.85,0.92,0.85,1.00,0.93,1.06,0.81,0.86,0.89,1.16,1.12,0.97,0.95,1.28,1.38,1.35,1.60,1.77,1.57,1.33,1.50,1.58,1.69,1.63,1.82,1.74,1.91,1.92,1.80,1.04,0.97,1.21,0.90,0.93,0.97,1.05,1.21,1.48,1.37,0.77,0.80,0.84,0.85,0.88,0.92,0.73,0.71,0.74,0.74,0.71,0.75,0.73,0.79,0.84,0.78,0.79,0.86,0.81,1.05,0.94,0.99,0.90,0.95,0.92,0.86,1.24,1.44,1.14,1.59,1.34,1.02,1.27,1.50,1.49,1.80,1.69,1.86,1.72,1.87,1.80,1.69,1.00,0.98,1.23,0.95,0.96,1.09,1.16,1.37,1.63,1.46,0.99,1.10,1.25,1.24,1.51,1.41,1.67,1.77,1.55,1.72,1.95,1.89,1.98,1.91,1.86,1.97,1.99,1.94,0.81,0.89,0.85,0.98,0.90,0.94,0.75,0.78,0.73,0.89,0.83,0.82,0.72,0.77,0.76,0.72,0.70,0.71,0.91,0.83,0.89,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.46,1.34,1.60,1.16,1.46,1.71,0.94,0.99,1.05,1.26,1.33,1.74,1.76,1.57,1.54,1.23,0.98,1.05,0.83,0.89,0.84,0.92,0.87,0.91,0.96,0.78,0.74,0.79,0.72,0.72,0.75,0.76,0.80,0.88,0.83,0.94,0.87,0.95,0.76,0.80,0.82,0.97,0.96,0.89,0.88,1.08,1.11,1.10,1.37,1.59,1.37,1.07,1.27,1.34,1.57,1.45,1.69,1.55,1.77,1.79,1.60,0.93,0.90,0.99,0.86,0.87,0.93,0.96,1.07,1.35,1.18,0.73,0.76,0.77,0.81,0.82,0.85,0.70,0.71,0.72,0.78,0.73,0.77,0.73,0.79,0.82,0.76,0.83,0.90,0.84,1.18,0.98,1.03,0.92,0.95,0.90,0.86,1.32,1.45,1.15,1.53,1.27,0.99,1.42,1.65,1.58,1.93,1.83,1.94,1.81,1.88,1.74,1.70,1.19,1.17,1.44,1.11,1.15,1.36,1.41,1.61,1.81,1.67,1.22,1.34,1.50,1.42,1.65,1.61,1.82,1.91,1.75,1.80,1.89,1.89,1.98,1.99,1.94,1.98,1.92,1.87,0.86,0.95,0.92,1.14,0.98,1.03,0.79,0.84,0.77,0.97,0.90,0.89,0.76,0.82,0.82,0.74,0.72,0.71,0.98,0.89,0.97,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.60,1.44,1.68,1.22,1.49,1.71,0.93,0.99,0.99,1.23,1.22,1.60,1.68,1.44,1.49,1.40,1.14,1.19,0.89,0.96,0.89,0.97,0.89,0.91,0.98,0.82,0.76,0.82,0.71,0.72,0.73,0.76,0.79,0.86,0.83,0.91,0.83,0.89,0.72,0.76,0.76,0.89,0.89,0.82,0.82,0.98,0.96,0.97,1.14,1.40,1.19,0.94,1.00,1.07,1.37,1.21,1.48,1.30,1.57,1.61,1.37,0.86,0.83,0.91,0.82,0.82,0.88,0.89,0.96,1.14,0.98,0.70,0.72,0.73,0.77,0.76,0.79,0.70,0.72,0.71,0.82,0.77,0.80,0.74,0.79,0.80,0.74,0.87,0.93,0.85,1.23,1.02,1.02,0.93,0.93,0.87,0.85,1.30,1.35,1.07,1.38,1.11,0.94,1.47,1.71,1.56,1.97,1.88,1.92,1.79,1.79,1.59,1.60,1.30,1.35,1.56,1.37,1.38,1.59,1.60,1.79,1.92,1.79,1.48,1.57,1.72,1.61,1.78,1.79,1.93,1.99,1.90,1.86,1.78,1.86,1.93,1.99,1.97,1.90,1.79,1.72,0.94,1.07,1.00,1.37,1.21,1.30,0.86,0.91,0.83,1.14,0.98,0.96,0.82,0.88,0.89,0.79,0.76,0.73,1.07,0.94,1.11,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.74,1.57,1.76,1.33,1.54,1.71,0.94,1.05,0.99,1.26,1.16,1.46,1.60,1.34,1.46,1.59,1.37,1.37,0.97,1.11,0.96,1.10,0.95,0.94,1.08,0.89,0.82,0.88,0.72,0.76,0.75,0.80,0.80,0.88,0.87,0.91,0.83,0.87,0.72,0.76,0.74,0.83,0.84,0.78,0.79,0.96,0.89,0.92,0.98,1.23,1.05,0.86,0.92,0.95,1.11,0.98,1.22,1.03,1.34,1.42,1.14,0.79,0.77,0.84,0.78,0.76,0.82,0.82,0.89,0.97,0.90,0.70,0.71,0.71,0.73,0.72,0.74,0.73,0.76,0.72,0.86,0.81,0.82,0.76,0.79,0.77,0.73,0.90,0.95,0.86,1.18,1.03,0.98,0.92,0.90,0.83,0.84,1.19,1.17,0.98,1.15,0.97,0.89,1.42,1.65,1.44,1.93,1.83,1.81,1.67,1.61,1.36,1.41,1.32,1.45,1.58,1.57,1.53,1.74,1.70,1.88,1.94,1.81,1.69,1.77,1.87,1.79,1.89,1.92,1.98,1.99,1.98,1.89,1.65,1.80,1.82,1.91,1.94,1.75,1.61,1.50,1.07,1.34,1.27,1.60,1.45,1.55,0.93,0.99,0.90,1.35,1.18,1.07,0.87,0.93,0.96,0.85,0.82,0.77,1.15,0.99,1.27,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.86,1.71,1.82,1.48,1.62,1.71,0.98,1.20,1.05,1.34,1.17,1.34,1.53,1.27,1.46,1.77,1.60,1.57,1.16,1.38,1.12,1.35,1.06,1.00,1.28,0.97,0.89,0.95,0.76,0.81,0.79,0.86,0.85,0.92,0.93,0.93,0.85,0.87,0.74,0.78,0.74,0.79,0.82,0.76,0.79,0.96,0.85,0.90,0.94,1.09,0.99,0.81,0.85,0.89,0.95,0.90,0.99,0.94,1.10,1.24,0.98,0.75,0.73,0.78,0.74,0.72,0.77,0.76,0.82,0.89,0.83,0.73,0.71,0.71,0.71,0.70,0.72,0.77,0.80,0.74,0.90,0.85,0.84,0.78,0.79,0.75,0.73,0.92,0.95,0.86,1.05,0.99,0.94,0.90,0.86,0.79,0.81,1.00,0.98,0.91,0.96,0.89,0.83,1.27,1.50,1.23,1.80,1.69,1.63,1.46,1.37,1.09,1.16,1.24,1.44,1.49,1.69,1.59,1.80,1.69,1.87,1.86,1.72,1.82,1.91,1.94,1.92,1.95,1.99,1.98,1.91,1.97,1.89,1.51,1.72,1.67,1.77,1.86,1.55,1.41,1.25,1.33,1.58,1.50,1.80,1.63,1.74,1.04,1.21,0.97,1.48,1.37,1.21,0.93,0.97,1.05,0.92,0.88,0.84,1.14,1.02,1.34,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.94,1.84,1.87,1.64,1.71,1.71,1.14,1.38,1.19,1.46,1.23,1.26,1.48,1.26,1.50,1.91,1.80,1.76,1.41,1.61,1.39,1.59,1.33,1.24,1.51,1.18,0.97,1.11,0.82,0.88,0.86,0.94,0.92,0.99,1.03,0.98,0.91,0.90,0.79,0.84,0.77,0.79,0.84,0.77,0.83,0.99,0.85,0.91,0.92,1.02,1.00,0.79,0.80,0.86,0.88,0.84,0.92,0.88,0.97,1.10,0.94,0.74,0.71,0.74,0.72,0.70,0.73,0.72,0.76,0.82,0.77,0.77,0.73,0.74,0.71,0.70,0.73,0.83,0.85,0.78,0.92,0.88,0.86,0.81,0.79,0.74,0.75,0.92,0.93,0.85,0.96,0.94,0.88,0.86,0.81,0.75,0.79,0.93,0.90,0.85,0.88,0.82,0.77,1.05,1.27,0.99,1.60,1.47,1.39,1.20,1.11,0.95,0.97,1.08,1.33,1.31,1.70,1.55,1.76,1.57,1.76,1.70,1.54,1.85,1.97,1.91,1.99,1.97,1.99,1.91,1.77,1.88,1.85,1.39,1.64,1.51,1.58,1.74,1.32,1.22,1.01,1.54,1.76,1.65,1.93,1.70,1.85,1.28,1.39,1.09,1.52,1.48,1.26,0.97,0.99,1.18,1.00,0.93,0.90,1.05,1.01,1.31,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.97,1.92,1.88,1.79,1.79,1.71,1.37,1.59,1.38,1.60,1.35,1.23,1.47,1.30,1.56,1.99,1.93,1.90,1.60,1.78,1.61,1.79,1.57,1.48,1.72,1.40,1.14,1.37,0.89,0.96,0.94,1.07,1.00,1.21,1.30,1.14,0.98,0.96,0.86,0.91,0.83,0.82,0.88,0.82,0.89,1.11,0.87,0.94,0.93,1.02,1.07,0.80,0.79,0.85,0.82,0.80,0.87,0.85,0.93,1.02,0.93,0.77,0.72,0.74,0.71,0.70,0.70,0.71,0.72,0.77,0.74,0.82,0.76,0.79,0.72,0.73,0.76,0.89,0.89,0.82,0.93,0.91,0.86,0.83,0.79,0.73,0.76,0.91,0.89,0.83,0.89,0.89,0.82,0.82,0.76,0.72,0.76,0.86,0.83,0.79,0.82,0.76,0.73,0.94,1.00,0.91,1.37,1.21,1.14,0.98,0.96,0.88,0.89,0.96,1.14,1.07,1.60,1.40,1.61,1.37,1.57,1.48,1.30,1.78,1.93,1.79,1.99,1.92,1.90,1.79,1.59,1.72,1.79,1.30,1.56,1.35,1.38,1.60,1.11,1.07,0.94,1.68,1.86,1.71,1.97,1.68,1.86,1.44,1.49,1.22,1.44,1.49,1.22,0.99,0.99,1.23,1.19,0.98,0.97,0.97,0.98,1.19,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.94,1.97,1.87,1.91,1.85,1.71,1.60,1.77,1.58,1.74,1.51,1.26,1.48,1.39,1.64,1.99,1.97,1.99,1.70,1.85,1.76,1.91,1.76,1.70,1.88,1.55,1.33,1.57,0.96,1.08,1.05,1.31,1.27,1.47,1.54,1.39,1.20,1.11,0.93,0.99,0.90,0.88,0.95,0.88,0.97,1.32,0.92,1.01,0.97,1.10,1.22,0.84,0.80,0.88,0.79,0.79,0.85,0.86,0.92,1.02,0.94,0.82,0.76,0.77,0.72,0.73,0.70,0.72,0.71,0.74,0.74,0.88,0.81,0.85,0.75,0.77,0.82,0.94,0.93,0.86,0.92,0.92,0.86,0.85,0.79,0.74,0.79,0.88,0.85,0.81,0.82,0.83,0.77,0.78,0.73,0.71,0.75,0.79,0.77,0.74,0.77,0.73,0.70,0.86,0.92,0.84,1.14,0.99,0.98,0.91,0.90,0.84,0.83,0.88,0.97,0.94,1.41,1.18,1.39,1.11,1.33,1.24,1.03,1.61,1.80,1.59,1.91,1.84,1.76,1.64,1.38,1.51,1.71,1.26,1.50,1.23,1.19,1.46,0.99,1.00,0.91,1.70,1.85,1.65,1.93,1.54,1.76,1.52,1.48,1.26,1.28,1.39,1.09,0.99,0.97,1.18,1.31,1.01,1.05,0.90,0.93,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.86,1.95,1.82,1.98,1.89,1.71,1.80,1.91,1.77,1.86,1.67,1.34,1.53,1.51,1.72,1.92,1.91,1.99,1.69,1.82,1.80,1.94,1.87,1.86,1.97,1.59,1.44,1.69,1.05,1.24,1.27,1.49,1.50,1.69,1.72,1.63,1.46,1.37,1.00,1.23,0.98,0.95,1.09,0.96,1.16,1.55,0.99,1.25,1.10,1.24,1.41,0.90,0.85,0.94,0.79,0.81,0.85,0.89,0.94,1.09,0.98,0.89,0.82,0.83,0.74,0.77,0.72,0.76,0.73,0.75,0.78,0.94,0.86,0.91,0.79,0.83,0.89,0.99,0.95,0.90,0.90,0.92,0.84,0.86,0.79,0.75,0.81,0.85,0.80,0.78,0.76,0.77,0.73,0.74,0.71,0.71,0.73,0.74,0.74,0.71,0.76,0.72,0.70,0.79,0.85,0.78,0.98,0.92,0.93,0.85,0.87,0.82,0.79,0.81,0.89,0.86,1.16,0.97,1.12,0.95,1.06,1.00,0.93,1.38,1.60,1.35,1.77,1.71,1.57,1.48,1.20,1.28,1.62,1.27,1.46,1.17,1.05,1.34,0.96,0.99,0.90,1.63,1.74,1.50,1.80,1.33,1.58,1.48,1.37,1.21,1.04,1.21,0.97,0.97,0.93,1.05,1.34,1.02,1.14,0.84,0.88,0.92,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.74,1.89,1.76,1.98,1.89,1.71,1.93,1.99,1.91,1.94,1.82,1.46,1.60,1.65,1.80,1.79,1.77,1.92,1.57,1.69,1.74,1.87,1.88,1.94,1.98,1.53,1.45,1.70,1.18,1.32,1.42,1.58,1.65,1.83,1.81,1.81,1.67,1.61,1.19,1.44,1.17,1.11,1.36,1.15,1.41,1.75,1.22,1.50,1.34,1.42,1.61,0.98,0.92,1.03,0.83,0.86,0.89,0.95,0.98,1.23,1.14,0.97,0.89,0.90,0.78,0.82,0.76,0.82,0.77,0.79,0.84,0.98,0.90,0.98,0.83,0.89,0.97,1.03,0.95,0.92,0.86,0.90,0.82,0.86,0.79,0.77,0.84,0.81,0.76,0.76,0.72,0.73,0.70,0.72,0.71,0.73,0.73,0.72,0.74,0.71,0.78,0.74,0.72,0.75,0.80,0.76,0.94,0.88,0.91,0.83,0.87,0.84,0.79,0.76,0.82,0.80,0.97,0.89,0.96,0.88,0.95,0.94,0.87,1.11,1.37,1.10,1.59,1.57,1.37,1.33,1.05,1.08,1.54,1.34,1.46,1.16,0.99,1.26,0.96,1.05,0.92,1.45,1.55,1.27,1.60,1.07,1.34,1.35,1.18,1.07,0.93,0.99,0.90,0.93,0.87,0.96,1.27,0.99,1.15,0.77,0.82,0.85,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.60,1.78,1.68,1.93,1.86,1.71,1.97,1.99,1.99,1.97,1.93,1.60,1.68,1.78,1.86,1.61,1.57,1.79,1.37,1.48,1.59,1.72,1.79,1.92,1.90,1.38,1.35,1.60,1.23,1.30,1.47,1.56,1.71,1.88,1.79,1.92,1.79,1.79,1.30,1.56,1.35,1.37,1.59,1.38,1.60,1.90,1.48,1.72,1.57,1.61,1.79,1.21,1.00,1.30,0.89,0.94,0.96,1.07,1.14,1.40,1.37,1.14,0.96,0.98,0.82,0.88,0.82,0.89,0.83,0.86,0.91,1.02,0.93,1.07,0.87,0.94,1.11,1.02,0.93,0.93,0.82,0.87,0.80,0.85,0.79,0.80,0.85,0.77,0.72,0.74,0.71,0.70,0.70,0.71,0.72,0.77,0.74,0.72,0.76,0.73,0.82,0.79,0.76,0.73,0.79,0.76,0.93,0.86,0.91,0.83,0.89,0.89,0.82,0.72,0.76,0.76,0.89,0.82,0.89,0.82,0.89,0.91,0.83,0.96,1.14,0.97,1.40,1.44,1.19,1.22,0.99,0.98,1.49,1.44,1.49,1.22,0.99,1.23,0.98,1.19,0.97,1.21,1.30,1.00,1.37,0.94,1.07,1.14,0.98,0.96,0.86,0.91,0.83,0.88,0.82,0.89,1.11,0.94,1.07,0.73,0.76,0.79,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.46,1.65,1.60,1.82,1.80,1.71,1.93,1.91,1.99,1.94,1.98,1.74,1.76,1.89,1.89,1.42,1.34,1.61,1.11,1.22,1.36,1.50,1.61,1.81,1.75,1.15,1.17,1.41,1.18,1.19,1.42,1.44,1.65,1.83,1.67,1.94,1.81,1.88,1.32,1.58,1.45,1.57,1.74,1.53,1.70,1.98,1.69,1.87,1.77,1.79,1.92,1.45,1.27,1.55,0.97,1.07,1.11,1.34,1.37,1.59,1.60,1.35,1.07,1.18,0.86,0.93,0.87,0.96,0.90,0.93,0.99,1.03,0.95,1.15,0.90,0.99,1.27,0.98,0.90,0.92,0.78,0.83,0.77,0.84,0.79,0.82,0.86,0.73,0.71,0.73,0.72,0.70,0.73,0.72,0.76,0.81,0.76,0.76,0.82,0.77,0.89,0.85,0.82,0.75,0.80,0.80,0.94,0.88,0.94,0.87,0.95,0.96,0.88,0.72,0.74,0.76,0.83,0.78,0.84,0.79,0.87,0.91,0.83,0.89,0.98,0.92,1.23,1.34,1.05,1.16,0.99,0.96,1.46,1.57,1.54,1.33,1.05,1.26,1.08,1.37,1.10,0.98,1.03,0.92,1.14,0.86,0.95,0.97,0.90,0.89,0.79,0.84,0.77,0.82,0.76,0.82,0.97,0.89,0.98,0.71,0.72,0.74,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.34,1.51,1.53,1.67,1.72,1.71,1.80,1.77,1.91,1.86,1.98,1.86,1.82,1.95,1.89,1.24,1.10,1.41,0.95,0.99,1.09,1.25,1.37,1.63,1.55,0.96,0.98,1.16,1.05,1.00,1.27,1.23,1.50,1.69,1.46,1.86,1.72,1.87,1.24,1.49,1.44,1.69,1.80,1.59,1.69,1.97,1.82,1.94,1.91,1.92,1.99,1.63,1.50,1.74,1.16,1.33,1.38,1.58,1.60,1.77,1.80,1.48,1.21,1.37,0.90,0.97,0.93,1.05,0.97,1.04,1.21,0.99,0.95,1.14,0.92,1.02,1.34,0.94,0.86,0.90,0.74,0.79,0.75,0.81,0.79,0.84,0.86,0.71,0.71,0.73,0.76,0.73,0.77,0.74,0.80,0.85,0.78,0.81,0.89,0.84,0.97,0.92,0.88,0.79,0.85,0.86,0.98,0.92,1.00,0.93,1.06,1.12,0.95,0.74,0.74,0.78,0.79,0.76,0.82,0.79,0.87,0.93,0.85,0.85,0.94,0.90,1.09,1.27,0.99,1.17,1.05,0.96,1.46,1.71,1.62,1.48,1.20,1.34,1.28,1.57,1.35,0.90,0.94,0.85,0.98,0.81,0.89,0.89,0.83,0.82,0.75,0.78,0.73,0.77,0.72,0.76,0.89,0.83,0.91,0.71,0.70,0.72,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
-{1.26,1.39,1.48,1.51,1.64,1.71,1.60,1.58,1.77,1.74,1.91,1.94,1.87,1.97,1.85,1.10,0.97,1.22,0.88,0.92,0.95,1.01,1.11,1.39,1.32,0.88,0.90,0.97,0.96,0.93,1.05,0.99,1.27,1.47,1.20,1.70,1.54,1.76,1.08,1.31,1.33,1.70,1.76,1.55,1.57,1.88,1.85,1.91,1.97,1.99,1.99,1.70,1.65,1.85,1.41,1.54,1.61,1.76,1.80,1.91,1.93,1.52,1.26,1.48,0.92,0.99,0.97,1.18,1.09,1.28,1.39,0.94,0.93,1.05,0.92,1.01,1.31,0.88,0.81,0.86,0.72,0.75,0.74,0.79,0.79,0.86,0.85,0.71,0.73,0.75,0.82,0.77,0.83,0.78,0.85,0.88,0.81,0.88,0.97,0.90,1.18,1.00,0.93,0.86,0.92,0.94,1.14,0.99,1.24,1.03,1.33,1.39,1.11,0.79,0.77,0.84,0.79,0.77,0.84,0.83,0.90,0.98,0.91,0.85,0.92,0.91,1.02,1.26,1.00,1.23,1.19,0.99,1.50,1.84,1.71,1.64,1.38,1.46,1.51,1.76,1.59,0.84,0.88,0.80,0.94,0.79,0.86,0.82,0.77,0.76,0.74,0.74,0.71,0.73,0.70,0.72,0.82,0.77,0.85,0.74,0.70,0.73,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00}
-}
--- a/ref_gl/gl_draw.c
+++ /dev/null
@@ -1,415 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-// draw.c
-
-#include "gl_local.h"
-
-image_t *draw_chars;
-
-extern qboolean scrap_dirty;
-void Scrap_Upload (void);
-
-
-/*
-===============
-Draw_InitLocal
-===============
-*/
-void Draw_InitLocal (void)
-{
- // load console characters (don't bilerp characters)
- draw_chars = GL_FindImage ("pics/conchars.pcx", it_pic);
- GL_Bind( draw_chars->texnum );
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-}
-
-
-
-/*
-================
-Draw_Char
-
-Draws one 8*8 graphics character with 0 being transparent.
-It can be clipped to the top of the screen to allow the console to be
-smoothly scrolled off.
-================
-*/
-void Draw_Char (int x, int y, int num)
-{
- int row, col;
- float frow, fcol, size;
-
- num &= 255;
-
- if ( (num&127) == 32 )
- return; // space
-
- if (y <= -8)
- return; // totally off screen
-
- row = num>>4;
- col = num&15;
-
- frow = row*0.0625;
- fcol = col*0.0625;
- size = 0.0625;
-
- GL_Bind (draw_chars->texnum);
-
- qglBegin (GL_QUADS);
- qglTexCoord2f (fcol, frow);
- qglVertex2f (x, y);
- qglTexCoord2f (fcol + size, frow);
- qglVertex2f (x+8, y);
- qglTexCoord2f (fcol + size, frow + size);
- qglVertex2f (x+8, y+8);
- qglTexCoord2f (fcol, frow + size);
- qglVertex2f (x, y+8);
- qglEnd ();
-}
-
-/*
-=============
-Draw_FindPic
-=============
-*/
-image_t *Draw_FindPic (char *name)
-{
- image_t *gl;
- char fullname[MAX_QPATH];
-
- if (name[0] != '/' && name[0] != '\\')
- {
- Com_sprintf (fullname, sizeof(fullname), "pics/%s.pcx", name);
- gl = GL_FindImage (fullname, it_pic);
- }
- else
- gl = GL_FindImage (name+1, it_pic);
-
- return gl;
-}
-
-/*
-=============
-Draw_GetPicSize
-=============
-*/
-void Draw_GetPicSize (int *w, int *h, char *pic)
-{
- image_t *gl;
-
- gl = Draw_FindPic (pic);
- if (!gl)
- {
- *w = *h = -1;
- return;
- }
- *w = gl->width;
- *h = gl->height;
-}
-
-/*
-=============
-Draw_StretchPic
-=============
-*/
-void Draw_StretchPic (int x, int y, int w, int h, char *pic)
-{
- image_t *gl;
-
- gl = Draw_FindPic (pic);
- if (!gl)
- {
- ri.Con_Printf (PRINT_ALL, "Can't find pic: %s\n", pic);
- return;
- }
-
- if (scrap_dirty)
- Scrap_Upload ();
-
- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !gl->has_alpha)
- qglDisable (GL_ALPHA_TEST);
-
- GL_Bind (gl->texnum);
- qglBegin (GL_QUADS);
- qglTexCoord2f (gl->sl, gl->tl);
- qglVertex2f (x, y);
- qglTexCoord2f (gl->sh, gl->tl);
- qglVertex2f (x+w, y);
- qglTexCoord2f (gl->sh, gl->th);
- qglVertex2f (x+w, y+h);
- qglTexCoord2f (gl->sl, gl->th);
- qglVertex2f (x, y+h);
- qglEnd ();
-
- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !gl->has_alpha)
- qglEnable (GL_ALPHA_TEST);
-}
-
-
-/*
-=============
-Draw_Pic
-=============
-*/
-void Draw_Pic (int x, int y, char *pic)
-{
- image_t *gl;
-
- gl = Draw_FindPic (pic);
- if (!gl)
- {
- ri.Con_Printf (PRINT_ALL, "Can't find pic: %s\n", pic);
- return;
- }
- if (scrap_dirty)
- Scrap_Upload ();
-
- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !gl->has_alpha)
- qglDisable (GL_ALPHA_TEST);
-
- GL_Bind (gl->texnum);
- qglBegin (GL_QUADS);
- qglTexCoord2f (gl->sl, gl->tl);
- qglVertex2f (x, y);
- qglTexCoord2f (gl->sh, gl->tl);
- qglVertex2f (x+gl->width, y);
- qglTexCoord2f (gl->sh, gl->th);
- qglVertex2f (x+gl->width, y+gl->height);
- qglTexCoord2f (gl->sl, gl->th);
- qglVertex2f (x, y+gl->height);
- qglEnd ();
-
- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !gl->has_alpha)
- qglEnable (GL_ALPHA_TEST);
-}
-
-/*
-=============
-Draw_TileClear
-
-This repeats a 64*64 tile graphic to fill the screen around a sized down
-refresh window.
-=============
-*/
-void Draw_TileClear (int x, int y, int w, int h, char *pic)
-{
- image_t *image;
-
- image = Draw_FindPic (pic);
- if (!image)
- {
- ri.Con_Printf (PRINT_ALL, "Can't find pic: %s\n", pic);
- return;
- }
-
- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !image->has_alpha)
- qglDisable (GL_ALPHA_TEST);
-
- GL_Bind (image->texnum);
- qglBegin (GL_QUADS);
- qglTexCoord2f (x/64.0, y/64.0);
- qglVertex2f (x, y);
- qglTexCoord2f ( (x+w)/64.0, y/64.0);
- qglVertex2f (x+w, y);
- qglTexCoord2f ( (x+w)/64.0, (y+h)/64.0);
- qglVertex2f (x+w, y+h);
- qglTexCoord2f ( x/64.0, (y+h)/64.0 );
- qglVertex2f (x, y+h);
- qglEnd ();
-
- if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) ) && !image->has_alpha)
- qglEnable (GL_ALPHA_TEST);
-}
-
-
-/*
-=============
-Draw_Fill
-
-Fills a box of pixels with a single color
-=============
-*/
-void Draw_Fill (int x, int y, int w, int h, int c)
-{
- union
- {
- unsigned c;
- byte v[4];
- } color;
-
- if ( (unsigned)c > 255)
- ri.Sys_Error (ERR_FATAL, "Draw_Fill: bad color");
-
- qglDisable (GL_TEXTURE_2D);
-
- color.c = d_8to24table[c];
- qglColor3f (color.v[0]/255.0,
- color.v[1]/255.0,
- color.v[2]/255.0);
-
- qglBegin (GL_QUADS);
-
- qglVertex2f (x,y);
- qglVertex2f (x+w, y);
- qglVertex2f (x+w, y+h);
- qglVertex2f (x, y+h);
-
- qglEnd ();
- qglColor3f (1,1,1);
- qglEnable (GL_TEXTURE_2D);
-}
-
-//=============================================================================
-
-/*
-================
-Draw_FadeScreen
-
-================
-*/
-void Draw_FadeScreen (void)
-{
- qglEnable (GL_BLEND);
- qglDisable (GL_TEXTURE_2D);
- qglColor4f (0, 0, 0, 0.8);
- qglBegin (GL_QUADS);
-
- qglVertex2f (0,0);
- qglVertex2f (vid.width, 0);
- qglVertex2f (vid.width, vid.height);
- qglVertex2f (0, vid.height);
-
- qglEnd ();
- qglColor4f (1,1,1,1);
- qglEnable (GL_TEXTURE_2D);
- qglDisable (GL_BLEND);
-}
-
-
-//====================================================================
-
-
-/*
-=============
-Draw_StretchRaw
-=============
-*/
-extern unsigned r_rawpalette[256];
-
-void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data)
-{
- unsigned image32[256*256];
- unsigned char image8[256*256];
- int i, j, trows;
- byte *source;
- int frac, fracstep;
- float hscale;
- int row;
- float t;
-
- GL_Bind (0);
-
- if (rows<=256)
- {
- hscale = 1;
- trows = rows;
- }
- else
- {
- hscale = rows/256.0;
- trows = 256;
- }
- t = rows*hscale / 256;
-
- if ( !qglColorTableEXT )
- {
- unsigned *dest;
-
- for (i=0 ; i<trows ; i++)
- {
- row = (int)(i*hscale);
- if (row > rows)
- break;
- source = data + cols*row;
- dest = &image32[i*256];
- fracstep = cols*0x10000/256;
- frac = fracstep >> 1;
- for (j=0 ; j<256 ; j++)
- {
- dest[j] = r_rawpalette[source[frac>>16]];
- frac += fracstep;
- }
- }
-
- qglTexImage2D (GL_TEXTURE_2D, 0, gl_tex_solid_format, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, image32);
- }
- else
- {
- unsigned char *dest;
-
- for (i=0 ; i<trows ; i++)
- {
- row = (int)(i*hscale);
- if (row > rows)
- break;
- source = data + cols*row;
- dest = &image8[i*256];
- fracstep = cols*0x10000/256;
- frac = fracstep >> 1;
- for (j=0 ; j<256 ; j++)
- {
- dest[j] = source[frac>>16];
- frac += fracstep;
- }
- }
-
- qglTexImage2D( GL_TEXTURE_2D,
- 0,
- GL_COLOR_INDEX8_EXT,
- 256, 256,
- 0,
- GL_COLOR_INDEX,
- GL_UNSIGNED_BYTE,
- image8 );
- }
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- if ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) )
- qglDisable (GL_ALPHA_TEST);
-
- qglBegin (GL_QUADS);
- qglTexCoord2f (0, 0);
- qglVertex2f (x, y);
- qglTexCoord2f (1, 0);
- qglVertex2f (x+w, y);
- qglTexCoord2f (1, t);
- qglVertex2f (x+w, y+h);
- qglTexCoord2f (0, t);
- qglVertex2f (x, y+h);
- qglEnd ();
-
- if ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( gl_config.renderer & GL_RENDERER_RENDITION ) )
- qglEnable (GL_ALPHA_TEST);
-}
-
--- a/ref_gl/gl_image.c
+++ /dev/null
@@ -1,1571 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "gl_local.h"
-
-image_t gltextures[MAX_GLTEXTURES];
-int numgltextures;
-int base_textureid; // gltextures[i] = base_textureid+i
-
-static byte intensitytable[256];
-static unsigned char gammatable[256];
-
-cvar_t *intensity;
-
-unsigned d_8to24table[256];
-
-qboolean GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean is_sky );
-qboolean GL_Upload32 (unsigned *data, int width, int height, qboolean mipmap);
-
-
-int gl_solid_format = 3;
-int gl_alpha_format = 4;
-
-int gl_tex_solid_format = 3;
-int gl_tex_alpha_format = 4;
-
-int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST;
-int gl_filter_max = GL_LINEAR;
-
-void GL_SetTexturePalette( unsigned palette[256] )
-{
- int i;
- unsigned char temptable[768];
-
- for ( i = 0; i < 256; i++ )
- {
- temptable[i*3+0] = ( palette[i] >> 0 ) & 0xff;
- temptable[i*3+1] = ( palette[i] >> 8 ) & 0xff;
- temptable[i*3+2] = ( palette[i] >> 16 ) & 0xff;
- }
-
- if ( qglColorTableEXT && gl_ext_palettedtexture->value )
- {
- qglColorTableEXT( GL_SHARED_TEXTURE_PALETTE_EXT,
- GL_RGB,
- 256,
- GL_RGB,
- GL_UNSIGNED_BYTE,
- temptable );
- }
-}
-
-void GL_EnableMultitexture( qboolean enable )
-{
- if ( !qglSelectTextureSGIS )
- return;
-
- if ( enable )
- {
- GL_SelectTexture( GL_TEXTURE1_SGIS );
- qglEnable( GL_TEXTURE_2D );
- GL_TexEnv( GL_REPLACE );
- }
- else
- {
- GL_SelectTexture( GL_TEXTURE1_SGIS );
- qglDisable( GL_TEXTURE_2D );
- GL_TexEnv( GL_REPLACE );
- }
- GL_SelectTexture( GL_TEXTURE0_SGIS );
- GL_TexEnv( GL_REPLACE );
-}
-
-void GL_SelectTexture( GLenum texture )
-{
- int tmu;
-
- if ( !qglSelectTextureSGIS )
- return;
-
- if ( texture == GL_TEXTURE0_SGIS )
- tmu = 0;
- else
- tmu = 1;
-
- if ( tmu == gl_state.currenttmu )
- return;
-
- gl_state.currenttmu = tmu;
-
- if ( tmu == 0 )
- qglSelectTextureSGIS( GL_TEXTURE0_SGIS );
- else
- qglSelectTextureSGIS( GL_TEXTURE1_SGIS );
-}
-
-void GL_TexEnv( GLenum mode )
-{
- static int lastmodes[2] = { -1, -1 };
-
- if ( mode != lastmodes[gl_state.currenttmu] )
- {
- qglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode );
- lastmodes[gl_state.currenttmu] = mode;
- }
-}
-
-void GL_Bind (int texnum)
-{
- extern image_t *draw_chars;
-
- if (gl_nobind->value && draw_chars) // performance evaluation option
- texnum = draw_chars->texnum;
- if ( gl_state.currenttextures[gl_state.currenttmu] == texnum)
- return;
- gl_state.currenttextures[gl_state.currenttmu] = texnum;
- qglBindTexture (GL_TEXTURE_2D, texnum);
-}
-
-void GL_MBind( GLenum target, int texnum )
-{
- GL_SelectTexture( target );
- if ( target == GL_TEXTURE0_SGIS )
- {
- if ( gl_state.currenttextures[0] == texnum )
- return;
- }
- else
- {
- if ( gl_state.currenttextures[1] == texnum )
- return;
- }
- GL_Bind( texnum );
-}
-
-typedef struct
-{
- char *name;
- int minimize, maximize;
-} glmode_t;
-
-glmode_t modes[] = {
- {"GL_NEAREST", GL_NEAREST, GL_NEAREST},
- {"GL_LINEAR", GL_LINEAR, GL_LINEAR},
- {"GL_NEAREST_MIPMAP_NEAREST", GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST},
- {"GL_LINEAR_MIPMAP_NEAREST", GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR},
- {"GL_NEAREST_MIPMAP_LINEAR", GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST},
- {"GL_LINEAR_MIPMAP_LINEAR", GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR}
-};
-
-#define NUM_GL_MODES (sizeof(modes) / sizeof (glmode_t))
-
-typedef struct
-{
- char *name;
- int mode;
-} gltmode_t;
-
-gltmode_t gl_alpha_modes[] = {
- {"default", 4},
- {"GL_RGBA", GL_RGBA},
- {"GL_RGBA8", GL_RGBA8},
- {"GL_RGB5_A1", GL_RGB5_A1},
- {"GL_RGBA4", GL_RGBA4},
- {"GL_RGBA2", GL_RGBA2},
-};
-
-#define NUM_GL_ALPHA_MODES (sizeof(gl_alpha_modes) / sizeof (gltmode_t))
-
-gltmode_t gl_solid_modes[] = {
- {"default", 3},
- {"GL_RGB", GL_RGB},
- {"GL_RGB8", GL_RGB8},
- {"GL_RGB5", GL_RGB5},
- {"GL_RGB4", GL_RGB4},
- {"GL_R3_G3_B2", GL_R3_G3_B2},
-#ifdef GL_RGB2_EXT
- {"GL_RGB2", GL_RGB2_EXT},
-#endif
-};
-
-#define NUM_GL_SOLID_MODES (sizeof(gl_solid_modes) / sizeof (gltmode_t))
-
-/*
-===============
-GL_TextureMode
-===============
-*/
-void GL_TextureMode( char *string )
-{
- int i;
- image_t *glt;
-
- for (i=0 ; i< NUM_GL_MODES ; i++)
- {
- if ( !Q_stricmp( modes[i].name, string ) )
- break;
- }
-
- if (i == NUM_GL_MODES)
- {
- ri.Con_Printf (PRINT_ALL, "bad filter name\n");
- return;
- }
-
- gl_filter_min = modes[i].minimize;
- gl_filter_max = modes[i].maximize;
-
- // change all the existing mipmap texture objects
- for (i=0, glt=gltextures ; i<numgltextures ; i++, glt++)
- {
- if (glt->type != it_pic && glt->type != it_sky )
- {
- GL_Bind (glt->texnum);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
- }
- }
-}
-
-/*
-===============
-GL_TextureAlphaMode
-===============
-*/
-void GL_TextureAlphaMode( char *string )
-{
- int i;
-
- for (i=0 ; i< NUM_GL_ALPHA_MODES ; i++)
- {
- if ( !Q_stricmp( gl_alpha_modes[i].name, string ) )
- break;
- }
-
- if (i == NUM_GL_ALPHA_MODES)
- {
- ri.Con_Printf (PRINT_ALL, "bad alpha texture mode name\n");
- return;
- }
-
- gl_tex_alpha_format = gl_alpha_modes[i].mode;
-}
-
-/*
-===============
-GL_TextureSolidMode
-===============
-*/
-void GL_TextureSolidMode( char *string )
-{
- int i;
-
- for (i=0 ; i< NUM_GL_SOLID_MODES ; i++)
- {
- if ( !Q_stricmp( gl_solid_modes[i].name, string ) )
- break;
- }
-
- if (i == NUM_GL_SOLID_MODES)
- {
- ri.Con_Printf (PRINT_ALL, "bad solid texture mode name\n");
- return;
- }
-
- gl_tex_solid_format = gl_solid_modes[i].mode;
-}
-
-/*
-===============
-GL_ImageList_f
-===============
-*/
-void GL_ImageList_f (void)
-{
- int i;
- image_t *image;
- int texels;
- const char *palstrings[2] =
- {
- "RGB",
- "PAL"
- };
-
- ri.Con_Printf (PRINT_ALL, "------------------\n");
- texels = 0;
-
- for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
- {
- if (image->texnum <= 0)
- continue;
- texels += image->upload_width*image->upload_height;
- switch (image->type)
- {
- case it_skin:
- ri.Con_Printf (PRINT_ALL, "M");
- break;
- case it_sprite:
- ri.Con_Printf (PRINT_ALL, "S");
- break;
- case it_wall:
- ri.Con_Printf (PRINT_ALL, "W");
- break;
- case it_pic:
- ri.Con_Printf (PRINT_ALL, "P");
- break;
- default:
- ri.Con_Printf (PRINT_ALL, " ");
- break;
- }
-
- ri.Con_Printf (PRINT_ALL, " %3i %3i %s: %s\n",
- image->upload_width, image->upload_height, palstrings[image->paletted], image->name);
- }
- ri.Con_Printf (PRINT_ALL, "Total texel count (not counting mipmaps): %i\n", texels);
-}
-
-
-/*
-=============================================================================
-
- scrap allocation
-
- Allocate all the little status bar obejcts into a single texture
- to crutch up inefficient hardware / drivers
-
-=============================================================================
-*/
-
-#define MAX_SCRAPS 1
-#define BLOCK_WIDTH 256
-#define BLOCK_HEIGHT 256
-
-int scrap_allocated[MAX_SCRAPS][BLOCK_WIDTH];
-byte scrap_texels[MAX_SCRAPS][BLOCK_WIDTH*BLOCK_HEIGHT];
-qboolean scrap_dirty;
-
-// returns a texture number and the position inside it
-int Scrap_AllocBlock (int w, int h, int *x, int *y)
-{
- int i, j;
- int best, best2;
- int texnum;
-
- for (texnum=0 ; texnum<MAX_SCRAPS ; texnum++)
- {
- best = BLOCK_HEIGHT;
-
- for (i=0 ; i<BLOCK_WIDTH-w ; i++)
- {
- best2 = 0;
-
- for (j=0 ; j<w ; j++)
- {
- if (scrap_allocated[texnum][i+j] >= best)
- break;
- if (scrap_allocated[texnum][i+j] > best2)
- best2 = scrap_allocated[texnum][i+j];
- }
- if (j == w)
- { // this is a valid spot
- *x = i;
- *y = best = best2;
- }
- }
-
- if (best + h > BLOCK_HEIGHT)
- continue;
-
- for (i=0 ; i<w ; i++)
- scrap_allocated[texnum][*x + i] = best + h;
-
- return texnum;
- }
-
- return -1;
-// Sys_Error ("Scrap_AllocBlock: full");
-}
-
-int scrap_uploads;
-
-void Scrap_Upload (void)
-{
- scrap_uploads++;
- GL_Bind(TEXNUM_SCRAPS);
- GL_Upload8 (scrap_texels[0], BLOCK_WIDTH, BLOCK_HEIGHT, false, false );
- scrap_dirty = false;
-}
-
-/*
-=================================================================
-
-PCX LOADING
-
-=================================================================
-*/
-
-
-/*
-==============
-LoadPCX
-==============
-*/
-void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height)
-{
- byte *raw;
- pcx_t *pcx;
- int x, y;
- int len;
- int dataByte, runLength;
- byte *out, *pix;
-
- *pic = NULL;
- *palette = NULL;
-
- //
- // load the file
- //
- len = ri.FS_LoadFile (filename, (void **)&raw);
- if (!raw)
- {
- ri.Con_Printf (PRINT_DEVELOPER, "Bad pcx file %s\n", filename);
- return;
- }
-
- //
- // parse the PCX file
- //
- pcx = (pcx_t *)raw;
-
- pcx->xmin = LittleShort(pcx->xmin);
- pcx->ymin = LittleShort(pcx->ymin);
- pcx->xmax = LittleShort(pcx->xmax);
- pcx->ymax = LittleShort(pcx->ymax);
- pcx->hres = LittleShort(pcx->hres);
- pcx->vres = LittleShort(pcx->vres);
- pcx->bytes_per_line = LittleShort(pcx->bytes_per_line);
- pcx->palette_type = LittleShort(pcx->palette_type);
-
- raw = &pcx->data;
-
- if (pcx->manufacturer != 0x0a
- || pcx->version != 5
- || pcx->encoding != 1
- || pcx->bits_per_pixel != 8
- || pcx->xmax >= 640
- || pcx->ymax >= 480)
- {
- ri.Con_Printf (PRINT_ALL, "Bad pcx file %s\n", filename);
- return;
- }
-
- out = malloc ( (pcx->ymax+1) * (pcx->xmax+1) );
-
- *pic = out;
-
- pix = out;
-
- if (palette)
- {
- *palette = malloc(768);
- memcpy (*palette, (byte *)pcx + len - 768, 768);
- }
-
- if (width)
- *width = pcx->xmax+1;
- if (height)
- *height = pcx->ymax+1;
-
- for (y=0 ; y<=pcx->ymax ; y++, pix += pcx->xmax+1)
- {
- for (x=0 ; x<=pcx->xmax ; )
- {
- dataByte = *raw++;
-
- if((dataByte & 0xC0) == 0xC0)
- {
- runLength = dataByte & 0x3F;
- dataByte = *raw++;
- }
- else
- runLength = 1;
-
- while(runLength-- > 0)
- pix[x++] = dataByte;
- }
-
- }
-
- if ( raw - (byte *)pcx > len)
- {
- ri.Con_Printf (PRINT_DEVELOPER, "PCX file %s was malformed", filename);
- free (*pic);
- *pic = NULL;
- }
-
- ri.FS_FreeFile (pcx);
-}
-
-/*
-=========================================================
-
-TARGA LOADING
-
-=========================================================
-*/
-
-typedef struct _TargaHeader {
- unsigned char id_length, colormap_type, image_type;
- unsigned short colormap_index, colormap_length;
- unsigned char colormap_size;
- unsigned short x_origin, y_origin, width, height;
- unsigned char pixel_size, attributes;
-} TargaHeader;
-
-
-/*
-=============
-LoadTGA
-=============
-*/
-void LoadTGA (char *name, byte **pic, int *width, int *height)
-{
- int columns, rows, numPixels;
- byte *pixbuf;
- int row, column;
- byte *buf_p;
- byte *buffer;
- int length;
- TargaHeader targa_header;
- byte *targa_rgba;
- byte tmp[2];
-
- *pic = NULL;
-
- //
- // load the file
- //
- length = ri.FS_LoadFile (name, (void **)&buffer);
- if (!buffer)
- {
- ri.Con_Printf (PRINT_DEVELOPER, "Bad tga file %s\n", name);
- return;
- }
-
- buf_p = buffer;
-
- targa_header.id_length = *buf_p++;
- targa_header.colormap_type = *buf_p++;
- targa_header.image_type = *buf_p++;
-
- tmp[0] = buf_p[0];
- tmp[1] = buf_p[1];
- targa_header.colormap_index = LittleShort ( *((short *)tmp) );
- buf_p+=2;
- tmp[0] = buf_p[0];
- tmp[1] = buf_p[1];
- targa_header.colormap_length = LittleShort ( *((short *)tmp) );
- buf_p+=2;
- targa_header.colormap_size = *buf_p++;
- targa_header.x_origin = LittleShort ( *((short *)buf_p) );
- buf_p+=2;
- targa_header.y_origin = LittleShort ( *((short *)buf_p) );
- buf_p+=2;
- targa_header.width = LittleShort ( *((short *)buf_p) );
- buf_p+=2;
- targa_header.height = LittleShort ( *((short *)buf_p) );
- buf_p+=2;
- targa_header.pixel_size = *buf_p++;
- targa_header.attributes = *buf_p++;
-
- if (targa_header.image_type!=2
- && targa_header.image_type!=10)
- ri.Sys_Error (ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n");
-
- if (targa_header.colormap_type !=0
- || (targa_header.pixel_size!=32 && targa_header.pixel_size!=24))
- ri.Sys_Error (ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n");
-
- columns = targa_header.width;
- rows = targa_header.height;
- numPixels = columns * rows;
-
- if (width)
- *width = columns;
- if (height)
- *height = rows;
-
- targa_rgba = malloc (numPixels*4);
- *pic = targa_rgba;
-
- if (targa_header.id_length != 0)
- buf_p += targa_header.id_length; // skip TARGA image comment
-
- if (targa_header.image_type==2) { // Uncompressed, RGB images
- for(row=rows-1; row>=0; row--) {
- pixbuf = targa_rgba + row*columns*4;
- for(column=0; column<columns; column++) {
- unsigned char red,green,blue,alphabyte;
- switch (targa_header.pixel_size) {
- case 24:
-
- blue = *buf_p++;
- green = *buf_p++;
- red = *buf_p++;
- *pixbuf++ = red;
- *pixbuf++ = green;
- *pixbuf++ = blue;
- *pixbuf++ = 255;
- break;
- case 32:
- blue = *buf_p++;
- green = *buf_p++;
- red = *buf_p++;
- alphabyte = *buf_p++;
- *pixbuf++ = red;
- *pixbuf++ = green;
- *pixbuf++ = blue;
- *pixbuf++ = alphabyte;
- break;
- }
- }
- }
- }
- else if (targa_header.image_type==10) { // Runlength encoded RGB images
- unsigned char red,green,blue,alphabyte,packetHeader,packetSize,j;
- for(row=rows-1; row>=0; row--) {
- pixbuf = targa_rgba + row*columns*4;
- for(column=0; column<columns; ) {
- packetHeader= *buf_p++;
- packetSize = 1 + (packetHeader & 0x7f);
- if (packetHeader & 0x80) { // run-length packet
- switch (targa_header.pixel_size) {
- case 24:
- blue = *buf_p++;
- green = *buf_p++;
- red = *buf_p++;
- alphabyte = 255;
- break;
- case 32:
- blue = *buf_p++;
- green = *buf_p++;
- red = *buf_p++;
- alphabyte = *buf_p++;
- break;
- }
-
- for(j=0;j<packetSize;j++) {
- *pixbuf++=red;
- *pixbuf++=green;
- *pixbuf++=blue;
- *pixbuf++=alphabyte;
- column++;
- if (column==columns) { // run spans across rows
- column=0;
- if (row>0)
- row--;
- else
- goto breakOut;
- pixbuf = targa_rgba + row*columns*4;
- }
- }
- }
- else { // non run-length packet
- for(j=0;j<packetSize;j++) {
- switch (targa_header.pixel_size) {
- case 24:
- blue = *buf_p++;
- green = *buf_p++;
- red = *buf_p++;
- *pixbuf++ = red;
- *pixbuf++ = green;
- *pixbuf++ = blue;
- *pixbuf++ = 255;
- break;
- case 32:
- blue = *buf_p++;
- green = *buf_p++;
- red = *buf_p++;
- alphabyte = *buf_p++;
- *pixbuf++ = red;
- *pixbuf++ = green;
- *pixbuf++ = blue;
- *pixbuf++ = alphabyte;
- break;
- }
- column++;
- if (column==columns) { // pixel packet run spans across rows
- column=0;
- if (row>0)
- row--;
- else
- goto breakOut;
- pixbuf = targa_rgba + row*columns*4;
- }
- }
- }
- }
- breakOut:;
- }
- }
-
- ri.FS_FreeFile (buffer);
-}
-
-
-/*
-====================================================================
-
-IMAGE FLOOD FILLING
-
-====================================================================
-*/
-
-
-/*
-=================
-Mod_FloodFillSkin
-
-Fill background pixels so mipmapping doesn't have haloes
-=================
-*/
-
-typedef struct
-{
- short x, y;
-} floodfill_t;
-
-// must be a power of 2
-#define FLOODFILL_FIFO_SIZE 0x1000
-#define FLOODFILL_FIFO_MASK (FLOODFILL_FIFO_SIZE - 1)
-
-#define FLOODFILL_STEP( off, dx, dy ) \
-{ \
- if (pos[off] == fillcolor) \
- { \
- pos[off] = 255; \
- fifo[inpt].x = x + (dx), fifo[inpt].y = y + (dy); \
- inpt = (inpt + 1) & FLOODFILL_FIFO_MASK; \
- } \
- else if (pos[off] != 255) fdc = pos[off]; \
-}
-
-void R_FloodFillSkin( byte *skin, int skinwidth, int skinheight )
-{
- byte fillcolor = *skin; // assume this is the pixel to fill
- floodfill_t fifo[FLOODFILL_FIFO_SIZE];
- int inpt = 0, outpt = 0;
- int filledcolor = -1;
- int i;
-
- if (filledcolor == -1)
- {
- filledcolor = 0;
- // attempt to find opaque black
- for (i = 0; i < 256; ++i)
- if (d_8to24table[i] == (255 << 0)) // alpha 1.0
- {
- filledcolor = i;
- break;
- }
- }
-
- // can't fill to filled color or to transparent color (used as visited marker)
- if ((fillcolor == filledcolor) || (fillcolor == 255))
- {
- //printf( "not filling skin from %d to %d\n", fillcolor, filledcolor );
- return;
- }
-
- fifo[inpt].x = 0, fifo[inpt].y = 0;
- inpt = (inpt + 1) & FLOODFILL_FIFO_MASK;
-
- while (outpt != inpt)
- {
- int x = fifo[outpt].x, y = fifo[outpt].y;
- int fdc = filledcolor;
- byte *pos = &skin[x + skinwidth * y];
-
- outpt = (outpt + 1) & FLOODFILL_FIFO_MASK;
-
- if (x > 0) FLOODFILL_STEP( -1, -1, 0 );
- if (x < skinwidth - 1) FLOODFILL_STEP( 1, 1, 0 );
- if (y > 0) FLOODFILL_STEP( -skinwidth, 0, -1 );
- if (y < skinheight - 1) FLOODFILL_STEP( skinwidth, 0, 1 );
- skin[x + skinwidth * y] = fdc;
- }
-}
-
-//=======================================================
-
-
-/*
-================
-GL_ResampleTexture
-================
-*/
-void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight)
-{
- int i, j;
- unsigned *inrow, *inrow2;
- unsigned frac, fracstep;
- unsigned p1[1024], p2[1024];
- byte *pix1, *pix2, *pix3, *pix4;
-
- fracstep = inwidth*0x10000/outwidth;
-
- frac = fracstep>>2;
- for (i=0 ; i<outwidth ; i++)
- {
- p1[i] = 4*(frac>>16);
- frac += fracstep;
- }
- frac = 3*(fracstep>>2);
- for (i=0 ; i<outwidth ; i++)
- {
- p2[i] = 4*(frac>>16);
- frac += fracstep;
- }
-
- for (i=0 ; i<outheight ; i++, out += outwidth)
- {
- inrow = in + inwidth*(int)((i+0.25)*inheight/outheight);
- inrow2 = in + inwidth*(int)((i+0.75)*inheight/outheight);
- frac = fracstep >> 1;
- for (j=0 ; j<outwidth ; j++)
- {
- pix1 = (byte *)inrow + p1[j];
- pix2 = (byte *)inrow + p2[j];
- pix3 = (byte *)inrow2 + p1[j];
- pix4 = (byte *)inrow2 + p2[j];
- ((byte *)(out+j))[0] = (pix1[0] + pix2[0] + pix3[0] + pix4[0])>>2;
- ((byte *)(out+j))[1] = (pix1[1] + pix2[1] + pix3[1] + pix4[1])>>2;
- ((byte *)(out+j))[2] = (pix1[2] + pix2[2] + pix3[2] + pix4[2])>>2;
- ((byte *)(out+j))[3] = (pix1[3] + pix2[3] + pix3[3] + pix4[3])>>2;
- }
- }
-}
-
-/*
-================
-GL_LightScaleTexture
-
-Scale up the pixel values in a texture to increase the
-lighting range
-================
-*/
-void GL_LightScaleTexture (unsigned *in, int inwidth, int inheight, qboolean only_gamma )
-{
- if ( only_gamma )
- {
- int i, c;
- byte *p;
-
- p = (byte *)in;
-
- c = inwidth*inheight;
- for (i=0 ; i<c ; i++, p+=4)
- {
- p[0] = gammatable[p[0]];
- p[1] = gammatable[p[1]];
- p[2] = gammatable[p[2]];
- }
- }
- else
- {
- int i, c;
- byte *p;
-
- p = (byte *)in;
-
- c = inwidth*inheight;
- for (i=0 ; i<c ; i++, p+=4)
- {
- p[0] = gammatable[intensitytable[p[0]]];
- p[1] = gammatable[intensitytable[p[1]]];
- p[2] = gammatable[intensitytable[p[2]]];
- }
- }
-}
-
-/*
-================
-GL_MipMap
-
-Operates in place, quartering the size of the texture
-================
-*/
-void GL_MipMap (byte *in, int width, int height)
-{
- int i, j;
- byte *out;
-
- width <<=2;
- height >>= 1;
- out = in;
- for (i=0 ; i<height ; i++, in+=width)
- {
- for (j=0 ; j<width ; j+=8, out+=4, in+=8)
- {
- out[0] = (in[0] + in[4] + in[width+0] + in[width+4])>>2;
- out[1] = (in[1] + in[5] + in[width+1] + in[width+5])>>2;
- out[2] = (in[2] + in[6] + in[width+2] + in[width+6])>>2;
- out[3] = (in[3] + in[7] + in[width+3] + in[width+7])>>2;
- }
- }
-}
-
-/*
-===============
-GL_Upload32
-
-Returns has_alpha
-===============
-*/
-void GL_BuildPalettedTexture( unsigned char *paletted_texture, unsigned char *scaled, int scaled_width, int scaled_height )
-{
- int i;
-
- for ( i = 0; i < scaled_width * scaled_height; i++ )
- {
- unsigned int r, g, b, c;
-
- r = ( scaled[0] >> 3 ) & 31;
- g = ( scaled[1] >> 2 ) & 63;
- b = ( scaled[2] >> 3 ) & 31;
-
- c = r | ( g << 5 ) | ( b << 11 );
-
- paletted_texture[i] = gl_state.d_16to8table[c];
-
- scaled += 4;
- }
-}
-
-int upload_width, upload_height;
-qboolean uploaded_paletted;
-
-qboolean GL_Upload32 (unsigned *data, int width, int height, qboolean mipmap)
-{
- int samples;
- unsigned scaled[256*256];
- unsigned char paletted_texture[256*256];
- int scaled_width, scaled_height;
- int i, c;
- byte *scan;
- int comp;
-
- uploaded_paletted = false;
-
- for (scaled_width = 1 ; scaled_width < width ; scaled_width<<=1)
- ;
- if (gl_round_down->value && scaled_width > width && mipmap)
- scaled_width >>= 1;
- for (scaled_height = 1 ; scaled_height < height ; scaled_height<<=1)
- ;
- if (gl_round_down->value && scaled_height > height && mipmap)
- scaled_height >>= 1;
-
- // let people sample down the world textures for speed
- if (mipmap)
- {
- scaled_width >>= (int)gl_picmip->value;
- scaled_height >>= (int)gl_picmip->value;
- }
-
- // don't ever bother with >256 textures
- if (scaled_width > 256)
- scaled_width = 256;
- if (scaled_height > 256)
- scaled_height = 256;
-
- if (scaled_width < 1)
- scaled_width = 1;
- if (scaled_height < 1)
- scaled_height = 1;
-
- upload_width = scaled_width;
- upload_height = scaled_height;
-
- if (scaled_width * scaled_height > sizeof(scaled)/4)
- ri.Sys_Error (ERR_DROP, "GL_Upload32: too big");
-
- // scan the texture for any non-255 alpha
- c = width*height;
- scan = ((byte *)data) + 3;
- samples = gl_solid_format;
- for (i=0 ; i<c ; i++, scan += 4)
- {
- if ( *scan != 255 )
- {
- samples = gl_alpha_format;
- break;
- }
- }
-
- if (samples == gl_solid_format)
- comp = gl_tex_solid_format;
- else if (samples == gl_alpha_format)
- comp = gl_tex_alpha_format;
- else {
- ri.Con_Printf (PRINT_ALL,
- "Unknown number of texture components %i\n",
- samples);
- comp = samples;
- }
-
-#if 0
- if (mipmap)
- gluBuild2DMipmaps (GL_TEXTURE_2D, samples, width, height, GL_RGBA, GL_UNSIGNED_BYTE, trans);
- else if (scaled_width == width && scaled_height == height)
- qglTexImage2D (GL_TEXTURE_2D, 0, comp, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, trans);
- else
- {
- gluScaleImage (GL_RGBA, width, height, GL_UNSIGNED_BYTE, trans,
- scaled_width, scaled_height, GL_UNSIGNED_BYTE, scaled);
- qglTexImage2D (GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled);
- }
-#else
-
- if (scaled_width == width && scaled_height == height)
- {
- if (!mipmap)
- {
- if ( qglColorTableEXT && gl_ext_palettedtexture->value && samples == gl_solid_format )
- {
- uploaded_paletted = true;
- GL_BuildPalettedTexture( paletted_texture, ( unsigned char * ) data, scaled_width, scaled_height );
- qglTexImage2D( GL_TEXTURE_2D,
- 0,
- GL_COLOR_INDEX8_EXT,
- scaled_width,
- scaled_height,
- 0,
- GL_COLOR_INDEX,
- GL_UNSIGNED_BYTE,
- paletted_texture );
- }
- else
- {
- qglTexImage2D (GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
- }
- goto done;
- }
- memcpy (scaled, data, width*height*4);
- }
- else
- GL_ResampleTexture (data, width, height, scaled, scaled_width, scaled_height);
-
- GL_LightScaleTexture (scaled, scaled_width, scaled_height, !mipmap );
-
- if ( qglColorTableEXT && gl_ext_palettedtexture->value && ( samples == gl_solid_format ) )
- {
- uploaded_paletted = true;
- GL_BuildPalettedTexture( paletted_texture, ( unsigned char * ) scaled, scaled_width, scaled_height );
- qglTexImage2D( GL_TEXTURE_2D,
- 0,
- GL_COLOR_INDEX8_EXT,
- scaled_width,
- scaled_height,
- 0,
- GL_COLOR_INDEX,
- GL_UNSIGNED_BYTE,
- paletted_texture );
- }
- else
- {
- qglTexImage2D( GL_TEXTURE_2D, 0, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled );
- }
-
- if (mipmap)
- {
- int miplevel;
-
- miplevel = 0;
- while (scaled_width > 1 || scaled_height > 1)
- {
- GL_MipMap ((byte *)scaled, scaled_width, scaled_height);
- scaled_width >>= 1;
- scaled_height >>= 1;
- if (scaled_width < 1)
- scaled_width = 1;
- if (scaled_height < 1)
- scaled_height = 1;
- miplevel++;
- if ( qglColorTableEXT && gl_ext_palettedtexture->value && samples == gl_solid_format )
- {
- uploaded_paletted = true;
- GL_BuildPalettedTexture( paletted_texture, ( unsigned char * ) scaled, scaled_width, scaled_height );
- qglTexImage2D( GL_TEXTURE_2D,
- miplevel,
- GL_COLOR_INDEX8_EXT,
- scaled_width,
- scaled_height,
- 0,
- GL_COLOR_INDEX,
- GL_UNSIGNED_BYTE,
- paletted_texture );
- }
- else
- {
- qglTexImage2D (GL_TEXTURE_2D, miplevel, comp, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled);
- }
- }
- }
-done: ;
-#endif
-
-
- if (mipmap)
- {
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
- }
- else
- {
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
- }
-
- return (samples == gl_alpha_format);
-}
-
-/*
-===============
-GL_Upload8
-
-Returns has_alpha
-===============
-*/
-/*
-static qboolean IsPowerOf2( int value )
-{
- int i = 1;
-
-
- while ( 1 )
- {
- if ( value == i )
- return true;
- if ( i > value )
- return false;
- i <<= 1;
- }
-}
-*/
-
-qboolean GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean is_sky )
-{
- unsigned trans[512*256];
- int i, s;
- int p;
-
- s = width*height;
-
- if (s > sizeof(trans)/4)
- ri.Sys_Error (ERR_DROP, "GL_Upload8: too large");
-
- if ( qglColorTableEXT &&
- gl_ext_palettedtexture->value &&
- is_sky )
- {
- qglTexImage2D( GL_TEXTURE_2D,
- 0,
- GL_COLOR_INDEX8_EXT,
- width,
- height,
- 0,
- GL_COLOR_INDEX,
- GL_UNSIGNED_BYTE,
- data );
-
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
- }
- else
- {
- for (i=0 ; i<s ; i++)
- {
- p = data[i];
- trans[i] = d_8to24table[p];
-
- if (p == 255)
- { // transparent, so scan around for another color
- // to avoid alpha fringes
- // FIXME: do a full flood fill so mips work...
- if (i > width && data[i-width] != 255)
- p = data[i-width];
- else if (i < s-width && data[i+width] != 255)
- p = data[i+width];
- else if (i > 0 && data[i-1] != 255)
- p = data[i-1];
- else if (i < s-1 && data[i+1] != 255)
- p = data[i+1];
- else
- p = 0;
- // copy rgb components
- ((byte *)&trans[i])[0] = ((byte *)&d_8to24table[p])[0];
- ((byte *)&trans[i])[1] = ((byte *)&d_8to24table[p])[1];
- ((byte *)&trans[i])[2] = ((byte *)&d_8to24table[p])[2];
- }
- }
-
- return GL_Upload32 (trans, width, height, mipmap);
- }
-}
-
-
-/*
-================
-GL_LoadPic
-
-This is also used as an entry point for the generated r_notexture
-================
-*/
-image_t *GL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits)
-{
- image_t *image;
- int i;
-
- // find a free image_t
- for (i=0, image=gltextures ; i<numgltextures ; i++,image++)
- {
- if (!image->texnum)
- break;
- }
- if (i == numgltextures)
- {
- if (numgltextures == MAX_GLTEXTURES)
- ri.Sys_Error (ERR_DROP, "MAX_GLTEXTURES");
- numgltextures++;
- }
- image = &gltextures[i];
-
- if (strlen(name) >= sizeof(image->name))
- ri.Sys_Error (ERR_DROP, "Draw_LoadPic: \"%s\" is too long", name);
- strcpy (image->name, name);
- image->registration_sequence = registration_sequence;
-
- image->width = width;
- image->height = height;
- image->type = type;
-
- if (type == it_skin && bits == 8)
- R_FloodFillSkin(pic, width, height);
-
- // load little pics into the scrap
- if (image->type == it_pic && bits == 8
- && image->width < 64 && image->height < 64)
- {
- int x, y;
- int i, j, k;
- int texnum;
-
- texnum = Scrap_AllocBlock (image->width, image->height, &x, &y);
- if (texnum == -1)
- goto nonscrap;
- scrap_dirty = true;
-
- // copy the texels into the scrap block
- k = 0;
- for (i=0 ; i<image->height ; i++)
- for (j=0 ; j<image->width ; j++, k++)
- scrap_texels[texnum][(y+i)*BLOCK_WIDTH + x + j] = pic[k];
- image->texnum = TEXNUM_SCRAPS + texnum;
- image->scrap = true;
- image->has_alpha = true;
- image->sl = (x+0.01)/(float)BLOCK_WIDTH;
- image->sh = (x+image->width-0.01)/(float)BLOCK_WIDTH;
- image->tl = (y+0.01)/(float)BLOCK_WIDTH;
- image->th = (y+image->height-0.01)/(float)BLOCK_WIDTH;
- }
- else
- {
-nonscrap:
- image->scrap = false;
- image->texnum = TEXNUM_IMAGES + (image - gltextures);
- GL_Bind(image->texnum);
- if (bits == 8)
- image->has_alpha = GL_Upload8 (pic, width, height, (image->type != it_pic && image->type != it_sky), image->type == it_sky );
- else
- image->has_alpha = GL_Upload32 ((unsigned *)pic, width, height, (image->type != it_pic && image->type != it_sky) );
- image->upload_width = upload_width; // after power of 2 and scales
- image->upload_height = upload_height;
- image->paletted = uploaded_paletted;
- image->sl = 0;
- image->sh = 1;
- image->tl = 0;
- image->th = 1;
- }
-
- return image;
-}
-
-
-/*
-================
-GL_LoadWal
-================
-*/
-image_t *GL_LoadWal (char *name)
-{
- miptex_t *mt;
- int width, height, ofs;
- image_t *image;
-
- ri.FS_LoadFile (name, (void **)&mt);
- if (!mt)
- {
- ri.Con_Printf (PRINT_ALL, "GL_FindImage: can't load %s\n", name);
- return r_notexture;
- }
-
- width = LittleLong (mt->width);
- height = LittleLong (mt->height);
- ofs = LittleLong (mt->offsets[0]);
-
- image = GL_LoadPic (name, (byte *)mt + ofs, width, height, it_wall, 8);
-
- ri.FS_FreeFile ((void *)mt);
-
- return image;
-}
-
-/*
-===============
-GL_FindImage
-
-Finds or loads the given image
-===============
-*/
-image_t *GL_FindImage (char *name, imagetype_t type)
-{
- image_t *image;
- int i, len;
- byte *pic, *palette;
- int width, height;
-
- if (!name)
- return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: NULL name");
- len = strlen(name);
- if (len<5)
- return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad name: %s", name);
-
- // look for it
- for (i=0, image=gltextures ; i<numgltextures ; i++,image++)
- {
- if (!strcmp(name, image->name))
- {
- image->registration_sequence = registration_sequence;
- return image;
- }
- }
-
- //
- // load the pic from disk
- //
- pic = NULL;
- palette = NULL;
- if (!strcmp(name+len-4, ".pcx"))
- {
- LoadPCX (name, &pic, &palette, &width, &height);
- if (!pic)
- return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: can't load %s", name);
- image = GL_LoadPic (name, pic, width, height, type, 8);
- }
- else if (!strcmp(name+len-4, ".wal"))
- {
- image = GL_LoadWal (name);
- }
- else if (!strcmp(name+len-4, ".tga"))
- {
- LoadTGA (name, &pic, &width, &height);
- if (!pic)
- return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: can't load %s", name);
- image = GL_LoadPic (name, pic, width, height, type, 32);
- }
- else
- return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad extension on: %s", name);
-
-
- if (pic)
- free(pic);
- if (palette)
- free(palette);
-
- return image;
-}
-
-
-
-/*
-===============
-R_RegisterSkin
-===============
-*/
-struct image_s *R_RegisterSkin (char *name)
-{
- return GL_FindImage (name, it_skin);
-}
-
-
-/*
-================
-GL_FreeUnusedImages
-
-Any image that was not touched on this registration sequence
-will be freed.
-================
-*/
-void GL_FreeUnusedImages (void)
-{
- int i;
- image_t *image;
-
- // never free r_notexture or particle texture
- r_notexture->registration_sequence = registration_sequence;
- r_particletexture->registration_sequence = registration_sequence;
-
- for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
- {
- if (image->registration_sequence == registration_sequence)
- continue; // used this sequence
- if (!image->registration_sequence)
- continue; // free image_t slot
- if (image->type == it_pic)
- continue; // don't free pics
- // free it
- qglDeleteTextures (1, &image->texnum);
- memset (image, 0, sizeof(*image));
- }
-}
-
-
-/*
-===============
-Draw_GetPalette
-===============
-*/
-int Draw_GetPalette (void)
-{
- int i;
- int r, g, b;
- unsigned v;
- byte *pic, *pal;
- int width, height;
-
- // get the palette
-
- LoadPCX ("pics/colormap.pcx", &pic, &pal, &width, &height);
- if (!pal)
- ri.Sys_Error (ERR_FATAL, "Couldn't load pics/colormap.pcx");
-
- for (i=0 ; i<256 ; i++)
- {
- r = pal[i*3+0];
- g = pal[i*3+1];
- b = pal[i*3+2];
-
- v = (255<<24) + (r<<0) + (g<<8) + (b<<16);
- d_8to24table[i] = LittleLong(v);
- }
-
- d_8to24table[255] &= LittleLong(0xffffff); // 255 is transparent
-
- free (pic);
- free (pal);
-
- return 0;
-}
-
-
-/*
-===============
-GL_InitImages
-===============
-*/
-void GL_InitImages (void)
-{
- int i, j;
- float g = vid_gamma->value;
-
- registration_sequence = 1;
-
- // init intensity conversions
- intensity = ri.Cvar_Get ("intensity", "2", 0);
-
- if ( intensity->value <= 1 )
- ri.Cvar_Set( "intensity", "1" );
-
- gl_state.inverse_intensity = 1 / intensity->value;
-
- Draw_GetPalette ();
-
- if ( qglColorTableEXT )
- {
- ri.FS_LoadFile( "pics/16to8.dat", &gl_state.d_16to8table );
- if ( !gl_state.d_16to8table )
- ri.Sys_Error( ERR_FATAL, "Couldn't load pics/16to8.pcx");
- }
-
- if ( gl_config.renderer & ( GL_RENDERER_VOODOO | GL_RENDERER_VOODOO2 ) )
- {
- g = 1.0F;
- }
-
- for ( i = 0; i < 256; i++ )
- {
- if ( g == 1 )
- {
- gammatable[i] = i;
- }
- else
- {
- float inf;
-
- inf = 255 * pow ( (i+0.5)/255.5 , g ) + 0.5;
- if (inf < 0)
- inf = 0;
- if (inf > 255)
- inf = 255;
- gammatable[i] = inf;
- }
- }
-
- for (i=0 ; i<256 ; i++)
- {
- j = i*intensity->value;
- if (j > 255)
- j = 255;
- intensitytable[i] = j;
- }
-}
-
-/*
-===============
-GL_ShutdownImages
-===============
-*/
-void GL_ShutdownImages (void)
-{
- int i;
- image_t *image;
-
- for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
- {
- if (!image->registration_sequence)
- continue; // free image_t slot
- // free it
- qglDeleteTextures (1, &image->texnum);
- memset (image, 0, sizeof(*image));
- }
-}
-
--- a/ref_gl/gl_light.c
+++ /dev/null
@@ -1,729 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// r_light.c
-
-#include "gl_local.h"
-
-int r_dlightframecount;
-
-#define DLIGHT_CUTOFF 64
-
-/*
-=============================================================================
-
-DYNAMIC LIGHTS BLEND RENDERING
-
-=============================================================================
-*/
-
-void R_RenderDlight (dlight_t *light)
-{
- int i, j;
- float a;
- vec3_t v;
- float rad;
-
- rad = light->intensity * 0.35;
-
- VectorSubtract (light->origin, r_origin, v);
-#if 0
- // FIXME?
- if (VectorLength (v) < rad)
- { // view is inside the dlight
- V_AddBlend (light->color[0], light->color[1], light->color[2], light->intensity * 0.0003, v_blend);
- return;
- }
-#endif
-
- qglBegin (GL_TRIANGLE_FAN);
- qglColor3f (light->color[0]*0.2, light->color[1]*0.2, light->color[2]*0.2);
- for (i=0 ; i<3 ; i++)
- v[i] = light->origin[i] - vpn[i]*rad;
- qglVertex3fv (v);
- qglColor3f (0,0,0);
- for (i=16 ; i>=0 ; i--)
- {
- a = i/16.0 * M_PI*2;
- for (j=0 ; j<3 ; j++)
- v[j] = light->origin[j] + vright[j]*cos(a)*rad
- + vup[j]*sin(a)*rad;
- qglVertex3fv (v);
- }
- qglEnd ();
-}
-
-/*
-=============
-R_RenderDlights
-=============
-*/
-void R_RenderDlights (void)
-{
- int i;
- dlight_t *l;
-
- if (!gl_flashblend->value)
- return;
-
- r_dlightframecount = r_framecount + 1; // because the count hasn't
- // advanced yet for this frame
- qglDepthMask (0);
- qglDisable (GL_TEXTURE_2D);
- qglShadeModel (GL_SMOOTH);
- qglEnable (GL_BLEND);
- qglBlendFunc (GL_ONE, GL_ONE);
-
- l = r_newrefdef.dlights;
- for (i=0 ; i<r_newrefdef.num_dlights ; i++, l++)
- R_RenderDlight (l);
-
- qglColor3f (1,1,1);
- qglDisable (GL_BLEND);
- qglEnable (GL_TEXTURE_2D);
- qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- qglDepthMask (1);
-}
-
-
-/*
-=============================================================================
-
-DYNAMIC LIGHTS
-
-=============================================================================
-*/
-
-/*
-=============
-R_MarkLights
-=============
-*/
-void R_MarkLights (dlight_t *light, int bit, mnode_t *node)
-{
- cplane_t *splitplane;
- float dist;
- msurface_t *surf;
- int i;
-
- if (node->contents != -1)
- return;
-
- splitplane = node->plane;
- dist = DotProduct (light->origin, splitplane->normal) - splitplane->dist;
-
- if (dist > light->intensity-DLIGHT_CUTOFF)
- {
- R_MarkLights (light, bit, node->children[0]);
- return;
- }
- if (dist < -light->intensity+DLIGHT_CUTOFF)
- {
- R_MarkLights (light, bit, node->children[1]);
- return;
- }
-
-// mark the polygons
- surf = r_worldmodel->surfaces + node->firstsurface;
- for (i=0 ; i<node->numsurfaces ; i++, surf++)
- {
- if (surf->dlightframe != r_dlightframecount)
- {
- surf->dlightbits = 0;
- surf->dlightframe = r_dlightframecount;
- }
- surf->dlightbits |= bit;
- }
-
- R_MarkLights (light, bit, node->children[0]);
- R_MarkLights (light, bit, node->children[1]);
-}
-
-
-/*
-=============
-R_PushDlights
-=============
-*/
-void R_PushDlights (void)
-{
- int i;
- dlight_t *l;
-
- if (gl_flashblend->value)
- return;
-
- r_dlightframecount = r_framecount + 1; // because the count hasn't
- // advanced yet for this frame
- l = r_newrefdef.dlights;
- for (i=0 ; i<r_newrefdef.num_dlights ; i++, l++)
- R_MarkLights ( l, 1<<i, r_worldmodel->nodes );
-}
-
-
-/*
-=============================================================================
-
-LIGHT SAMPLING
-
-=============================================================================
-*/
-
-vec3_t pointcolor;
-cplane_t *lightplane; // used as shadow plane
-vec3_t lightspot;
-
-int RecursiveLightPoint (mnode_t *node, vec3_t start, vec3_t end)
-{
- float front, back, frac;
- int side;
- cplane_t *plane;
- vec3_t mid;
- msurface_t *surf;
- int s, t, ds, dt;
- int i;
- mtexinfo_t *tex;
- byte *lightmap;
- int maps;
- int r;
-
- if (node->contents != -1)
- return -1; // didn't hit anything
-
-// calculate mid point
-
-// FIXME: optimize for axial
- plane = node->plane;
- front = DotProduct (start, plane->normal) - plane->dist;
- back = DotProduct (end, plane->normal) - plane->dist;
- side = front < 0;
-
- if ( (back < 0) == side)
- return RecursiveLightPoint (node->children[side], start, end);
-
- frac = front / (front-back);
- mid[0] = start[0] + (end[0] - start[0])*frac;
- mid[1] = start[1] + (end[1] - start[1])*frac;
- mid[2] = start[2] + (end[2] - start[2])*frac;
-
-// go down front side
- r = RecursiveLightPoint (node->children[side], start, mid);
- if (r >= 0)
- return r; // hit something
-
- if ( (back < 0) == side )
- return -1; // didn't hit anuthing
-
-// check for impact on this node
- VectorCopy (mid, lightspot);
- lightplane = plane;
-
- surf = r_worldmodel->surfaces + node->firstsurface;
- for (i=0 ; i<node->numsurfaces ; i++, surf++)
- {
- if (surf->flags&(SURF_DRAWTURB|SURF_DRAWSKY))
- continue; // no lightmaps
-
- tex = surf->texinfo;
-
- s = DotProduct (mid, tex->vecs[0]) + tex->vecs[0][3];
- t = DotProduct (mid, tex->vecs[1]) + tex->vecs[1][3];;
-
- if (s < surf->texturemins[0] ||
- t < surf->texturemins[1])
- continue;
-
- ds = s - surf->texturemins[0];
- dt = t - surf->texturemins[1];
-
- if ( ds > surf->extents[0] || dt > surf->extents[1] )
- continue;
-
- if (!surf->samples)
- return 0;
-
- ds >>= 4;
- dt >>= 4;
-
- lightmap = surf->samples;
- VectorCopy (vec3_origin, pointcolor);
- if (lightmap)
- {
- vec3_t scale;
-
- lightmap += 3*(dt * ((surf->extents[0]>>4)+1) + ds);
-
- for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
- maps++)
- {
- for (i=0 ; i<3 ; i++)
- scale[i] = gl_modulate->value*r_newrefdef.lightstyles[surf->styles[maps]].rgb[i];
-
- pointcolor[0] += lightmap[0] * scale[0] * (1.0/255);
- pointcolor[1] += lightmap[1] * scale[1] * (1.0/255);
- pointcolor[2] += lightmap[2] * scale[2] * (1.0/255);
- lightmap += 3*((surf->extents[0]>>4)+1) *
- ((surf->extents[1]>>4)+1);
- }
- }
-
- return 1;
- }
-
-// go down back side
- return RecursiveLightPoint (node->children[!side], mid, end);
-}
-
-/*
-===============
-R_LightPoint
-===============
-*/
-void R_LightPoint (vec3_t p, vec3_t color)
-{
- vec3_t end;
- float r;
- int lnum;
- dlight_t *dl;
- float light;
- vec3_t dist;
- float add;
-
- if (!r_worldmodel->lightdata)
- {
- color[0] = color[1] = color[2] = 1.0;
- return;
- }
-
- end[0] = p[0];
- end[1] = p[1];
- end[2] = p[2] - 2048;
-
- r = RecursiveLightPoint (r_worldmodel->nodes, p, end);
-
- if (r == -1)
- {
- VectorCopy (vec3_origin, color);
- }
- else
- {
- VectorCopy (pointcolor, color);
- }
-
- //
- // add dynamic lights
- //
- light = 0;
- dl = r_newrefdef.dlights;
- for (lnum=0 ; lnum<r_newrefdef.num_dlights ; lnum++, dl++)
- {
- VectorSubtract (currententity->origin,
- dl->origin,
- dist);
- add = dl->intensity - VectorLength(dist);
- add *= (1.0/256);
- if (add > 0)
- {
- VectorMA (color, add, dl->color, color);
- }
- }
-
- VectorScale (color, gl_modulate->value, color);
-}
-
-
-//===================================================================
-
-static float s_blocklights[34*34*3];
-/*
-===============
-R_AddDynamicLights
-===============
-*/
-void R_AddDynamicLights (msurface_t *surf)
-{
- int lnum;
- int sd, td;
- float fdist, frad, fminlight;
- vec3_t impact, local;
- int s, t;
- int i;
- int smax, tmax;
- mtexinfo_t *tex;
- dlight_t *dl;
- float *pfBL;
- float fsacc, ftacc;
-
- smax = (surf->extents[0]>>4)+1;
- tmax = (surf->extents[1]>>4)+1;
- tex = surf->texinfo;
-
- for (lnum=0 ; lnum<r_newrefdef.num_dlights ; lnum++)
- {
- if ( !(surf->dlightbits & (1<<lnum) ) )
- continue; // not lit by this light
-
- dl = &r_newrefdef.dlights[lnum];
- frad = dl->intensity;
- fdist = DotProduct (dl->origin, surf->plane->normal) -
- surf->plane->dist;
- frad -= fabs(fdist);
- // rad is now the highest intensity on the plane
-
- fminlight = DLIGHT_CUTOFF; // FIXME: make configurable?
- if (frad < fminlight)
- continue;
- fminlight = frad - fminlight;
-
- for (i=0 ; i<3 ; i++)
- {
- impact[i] = dl->origin[i] -
- surf->plane->normal[i]*fdist;
- }
-
- local[0] = DotProduct (impact, tex->vecs[0]) + tex->vecs[0][3] - surf->texturemins[0];
- local[1] = DotProduct (impact, tex->vecs[1]) + tex->vecs[1][3] - surf->texturemins[1];
-
- pfBL = s_blocklights;
- for (t = 0, ftacc = 0 ; t<tmax ; t++, ftacc += 16)
- {
- td = local[1] - ftacc;
- if ( td < 0 )
- td = -td;
-
- for ( s=0, fsacc = 0 ; s<smax ; s++, fsacc += 16, pfBL += 3)
- {
- sd = Q_ftol( local[0] - fsacc );
-
- if ( sd < 0 )
- sd = -sd;
-
- if (sd > td)
- fdist = sd + (td>>1);
- else
- fdist = td + (sd>>1);
-
- if ( fdist < fminlight )
- {
- pfBL[0] += ( frad - fdist ) * dl->color[0];
- pfBL[1] += ( frad - fdist ) * dl->color[1];
- pfBL[2] += ( frad - fdist ) * dl->color[2];
- }
- }
- }
- }
-}
-
-
-/*
-** R_SetCacheState
-*/
-void R_SetCacheState( msurface_t *surf )
-{
- int maps;
-
- for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
- maps++)
- {
- surf->cached_light[maps] = r_newrefdef.lightstyles[surf->styles[maps]].white;
- }
-}
-
-/*
-===============
-R_BuildLightMap
-
-Combine and scale multiple lightmaps into the floating format in blocklights
-===============
-*/
-void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
-{
- int smax, tmax;
- int r, g, b, a, max;
- int i, j, size;
- byte *lightmap;
- float scale[4];
- int nummaps;
- float *bl;
- lightstyle_t *style;
- int monolightmap;
-
- if ( surf->texinfo->flags & (SURF_SKY|SURF_TRANS33|SURF_TRANS66|SURF_WARP) )
- ri.Sys_Error (ERR_DROP, "R_BuildLightMap called for non-lit surface");
-
- smax = (surf->extents[0]>>4)+1;
- tmax = (surf->extents[1]>>4)+1;
- size = smax*tmax;
- if (size > (sizeof(s_blocklights)>>4) )
- ri.Sys_Error (ERR_DROP, "Bad s_blocklights size");
-
-// set to full bright if no light data
- if (!surf->samples)
- {
- int maps;
-
- for (i=0 ; i<size*3 ; i++)
- s_blocklights[i] = 255;
- for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
- maps++)
- {
- style = &r_newrefdef.lightstyles[surf->styles[maps]];
- }
- goto store;
- }
-
- // count the # of maps
- for ( nummaps = 0 ; nummaps < MAXLIGHTMAPS && surf->styles[nummaps] != 255 ;
- nummaps++)
- ;
-
- lightmap = surf->samples;
-
- // add all the lightmaps
- if ( nummaps == 1 )
- {
- int maps;
-
- for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
- maps++)
- {
- bl = s_blocklights;
-
- for (i=0 ; i<3 ; i++)
- scale[i] = gl_modulate->value*r_newrefdef.lightstyles[surf->styles[maps]].rgb[i];
-
- if ( scale[0] == 1.0F &&
- scale[1] == 1.0F &&
- scale[2] == 1.0F )
- {
- for (i=0 ; i<size ; i++, bl+=3)
- {
- bl[0] = lightmap[i*3+0];
- bl[1] = lightmap[i*3+1];
- bl[2] = lightmap[i*3+2];
- }
- }
- else
- {
- for (i=0 ; i<size ; i++, bl+=3)
- {
- bl[0] = lightmap[i*3+0] * scale[0];
- bl[1] = lightmap[i*3+1] * scale[1];
- bl[2] = lightmap[i*3+2] * scale[2];
- }
- }
- lightmap += size*3; // skip to next lightmap
- }
- }
- else
- {
- int maps;
-
- memset( s_blocklights, 0, sizeof( s_blocklights[0] ) * size * 3 );
-
- for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
- maps++)
- {
- bl = s_blocklights;
-
- for (i=0 ; i<3 ; i++)
- scale[i] = gl_modulate->value*r_newrefdef.lightstyles[surf->styles[maps]].rgb[i];
-
- if ( scale[0] == 1.0F &&
- scale[1] == 1.0F &&
- scale[2] == 1.0F )
- {
- for (i=0 ; i<size ; i++, bl+=3 )
- {
- bl[0] += lightmap[i*3+0];
- bl[1] += lightmap[i*3+1];
- bl[2] += lightmap[i*3+2];
- }
- }
- else
- {
- for (i=0 ; i<size ; i++, bl+=3)
- {
- bl[0] += lightmap[i*3+0] * scale[0];
- bl[1] += lightmap[i*3+1] * scale[1];
- bl[2] += lightmap[i*3+2] * scale[2];
- }
- }
- lightmap += size*3; // skip to next lightmap
- }
- }
-
-// add all the dynamic lights
- if (surf->dlightframe == r_framecount)
- R_AddDynamicLights (surf);
-
-// put into texture format
-store:
- stride -= (smax<<2);
- bl = s_blocklights;
-
- monolightmap = gl_monolightmap->string[0];
-
- if ( monolightmap == '0' )
- {
- for (i=0 ; i<tmax ; i++, dest += stride)
- {
- for (j=0 ; j<smax ; j++)
- {
-
- r = Q_ftol( bl[0] );
- g = Q_ftol( bl[1] );
- b = Q_ftol( bl[2] );
-
- // catch negative lights
- if (r < 0)
- r = 0;
- if (g < 0)
- g = 0;
- if (b < 0)
- b = 0;
-
- /*
- ** determine the brightest of the three color components
- */
- if (r > g)
- max = r;
- else
- max = g;
- if (b > max)
- max = b;
-
- /*
- ** alpha is ONLY used for the mono lightmap case. For this reason
- ** we set it to the brightest of the color components so that
- ** things don't get too dim.
- */
- a = max;
-
- /*
- ** rescale all the color components if the intensity of the greatest
- ** channel exceeds 1.0
- */
- if (max > 255)
- {
- float t = 255.0F / max;
-
- r = r*t;
- g = g*t;
- b = b*t;
- a = a*t;
- }
-
- dest[0] = r;
- dest[1] = g;
- dest[2] = b;
- dest[3] = a;
-
- bl += 3;
- dest += 4;
- }
- }
- }
- else
- {
- for (i=0 ; i<tmax ; i++, dest += stride)
- {
- for (j=0 ; j<smax ; j++)
- {
-
- r = Q_ftol( bl[0] );
- g = Q_ftol( bl[1] );
- b = Q_ftol( bl[2] );
-
- // catch negative lights
- if (r < 0)
- r = 0;
- if (g < 0)
- g = 0;
- if (b < 0)
- b = 0;
-
- /*
- ** determine the brightest of the three color components
- */
- if (r > g)
- max = r;
- else
- max = g;
- if (b > max)
- max = b;
-
- /*
- ** alpha is ONLY used for the mono lightmap case. For this reason
- ** we set it to the brightest of the color components so that
- ** things don't get too dim.
- */
- a = max;
-
- /*
- ** rescale all the color components if the intensity of the greatest
- ** channel exceeds 1.0
- */
- if (max > 255)
- {
- float t = 255.0F / max;
-
- r = r*t;
- g = g*t;
- b = b*t;
- a = a*t;
- }
-
- /*
- ** So if we are doing alpha lightmaps we need to set the R, G, and B
- ** components to 0 and we need to set alpha to 1-alpha.
- */
- switch ( monolightmap )
- {
- case 'L':
- case 'I':
- r = a;
- g = b = 0;
- break;
- case 'C':
- // try faking colored lighting
- a = 255 - ((r+g+b)/3);
- r *= a/255.0;
- g *= a/255.0;
- b *= a/255.0;
- break;
- case 'A':
- default:
- r = g = b = 0;
- a = 255 - a;
- break;
- }
-
- dest[0] = r;
- dest[1] = g;
- dest[2] = b;
- dest[3] = a;
-
- bl += 3;
- dest += 4;
- }
- }
- }
-}
-
--- a/ref_gl/gl_local.h
+++ /dev/null
@@ -1,460 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// disable data conversion warnings
-
-#if 0
-#pragma warning(disable : 4244) // MIPS
-#pragma warning(disable : 4136) // X86
-#pragma warning(disable : 4051) // ALPHA
-#endif
-
-#ifdef _WIN32
-# include <windows.h>
-#endif
-
-#include <stdio.h>
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-#include <math.h>
-
-#ifndef GL_COLOR_INDEX8_EXT
-#define GL_COLOR_INDEX8_EXT GL_COLOR_INDEX
-#endif
-
-#include "../client/ref.h"
-
-#include "qgl.h"
-
-#define REF_VERSION "GL 0.01"
-
-// up / down
-#define PITCH 0
-
-// left / right
-#define YAW 1
-
-// fall over
-#define ROLL 2
-
-
-typedef struct
-{
- unsigned width, height; // coordinates from main game
-} viddef_t;
-
-extern viddef_t vid;
-
-
-/*
-
- skins will be outline flood filled and mip mapped
- pics and sprites with alpha will be outline flood filled
- pic won't be mip mapped
-
- model skin
- sprite frame
- wall texture
- pic
-
-*/
-
-typedef enum
-{
- it_skin,
- it_sprite,
- it_wall,
- it_pic,
- it_sky
-} imagetype_t;
-
-typedef struct image_s
-{
- char name[MAX_QPATH]; // game path, including extension
- imagetype_t type;
- int width, height; // source image
- int upload_width, upload_height; // after power of two and picmip
- int registration_sequence; // 0 = free
- struct msurface_s *texturechain; // for sort-by-texture world drawing
- int texnum; // gl texture binding
- float sl, tl, sh, th; // 0,0 - 1,1 unless part of the scrap
- qboolean scrap;
- qboolean has_alpha;
-
- qboolean paletted;
-} image_t;
-
-#define TEXNUM_LIGHTMAPS 1024
-#define TEXNUM_SCRAPS 1152
-#define TEXNUM_IMAGES 1153
-
-#define MAX_GLTEXTURES 1024
-
-//===================================================================
-
-typedef enum
-{
- rserr_ok,
-
- rserr_invalid_fullscreen,
- rserr_invalid_mode,
-
- rserr_unknown
-} rserr_t;
-
-#include "gl_model.h"
-
-void GL_BeginRendering (int *x, int *y, int *width, int *height);
-void GL_EndRendering (void);
-
-void GL_SetDefaultState( void );
-void GL_UpdateSwapInterval( void );
-
-extern float gldepthmin, gldepthmax;
-
-typedef struct
-{
- float x, y, z;
- float s, t;
- float r, g, b;
-} glvert_t;
-
-
-#define MAX_LBM_HEIGHT 480
-
-#define BACKFACE_EPSILON 0.01
-
-
-//====================================================
-
-extern image_t gltextures[MAX_GLTEXTURES];
-extern int numgltextures;
-
-
-extern image_t *r_notexture;
-extern image_t *r_particletexture;
-extern entity_t *currententity;
-extern model_t *currentmodel;
-extern int r_visframecount;
-extern int r_framecount;
-extern cplane_t frustum[4];
-extern int c_brush_polys, c_alias_polys;
-
-
-extern int gl_filter_min, gl_filter_max;
-
-//
-// view origin
-//
-extern vec3_t vup;
-extern vec3_t vpn;
-extern vec3_t vright;
-extern vec3_t r_origin;
-
-//
-// screen size info
-//
-extern refdef_t r_newrefdef;
-extern int r_viewcluster, r_viewcluster2, r_oldviewcluster, r_oldviewcluster2;
-
-extern cvar_t *r_norefresh;
-extern cvar_t *r_lefthand;
-extern cvar_t *r_drawentities;
-extern cvar_t *r_drawworld;
-extern cvar_t *r_speeds;
-extern cvar_t *r_fullbright;
-extern cvar_t *r_novis;
-extern cvar_t *r_nocull;
-extern cvar_t *r_lerpmodels;
-
-extern cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light level
-
-extern cvar_t *gl_vertex_arrays;
-
-extern cvar_t *gl_ext_swapinterval;
-extern cvar_t *gl_ext_palettedtexture;
-extern cvar_t *gl_ext_multitexture;
-extern cvar_t *gl_ext_pointparameters;
-extern cvar_t *gl_ext_compiled_vertex_array;
-
-extern cvar_t *gl_particle_min_size;
-extern cvar_t *gl_particle_max_size;
-extern cvar_t *gl_particle_size;
-extern cvar_t *gl_particle_att_a;
-extern cvar_t *gl_particle_att_b;
-extern cvar_t *gl_particle_att_c;
-
-extern cvar_t *gl_nosubimage;
-extern cvar_t *gl_bitdepth;
-extern cvar_t *gl_mode;
-extern cvar_t *gl_log;
-extern cvar_t *gl_lightmap;
-extern cvar_t *gl_shadows;
-extern cvar_t *gl_dynamic;
-extern cvar_t *gl_monolightmap;
-extern cvar_t *gl_nobind;
-extern cvar_t *gl_round_down;
-extern cvar_t *gl_picmip;
-extern cvar_t *gl_skymip;
-extern cvar_t *gl_showtris;
-extern cvar_t *gl_finish;
-extern cvar_t *gl_ztrick;
-extern cvar_t *gl_clear;
-extern cvar_t *gl_cull;
-extern cvar_t *gl_poly;
-extern cvar_t *gl_texsort;
-extern cvar_t *gl_polyblend;
-extern cvar_t *gl_flashblend;
-extern cvar_t *gl_lightmaptype;
-extern cvar_t *gl_modulate;
-extern cvar_t *gl_playermip;
-extern cvar_t *gl_drawbuffer;
-extern cvar_t *gl_3dlabs_broken;
-extern cvar_t *gl_driver;
-extern cvar_t *gl_swapinterval;
-extern cvar_t *gl_texturemode;
-extern cvar_t *gl_texturealphamode;
-extern cvar_t *gl_texturesolidmode;
-extern cvar_t *gl_saturatelighting;
-extern cvar_t *gl_lockpvs;
-
-extern cvar_t *vid_fullscreen;
-extern cvar_t *vid_gamma;
-
-extern cvar_t *intensity;
-
-extern int gl_lightmap_format;
-extern int gl_solid_format;
-extern int gl_alpha_format;
-extern int gl_tex_solid_format;
-extern int gl_tex_alpha_format;
-
-extern int c_visible_lightmaps;
-extern int c_visible_textures;
-
-extern float r_world_matrix[16];
-
-void R_TranslatePlayerSkin (int playernum);
-void GL_Bind (int texnum);
-void GL_MBind( GLenum target, int texnum );
-void GL_TexEnv( GLenum value );
-void GL_EnableMultitexture( qboolean enable );
-void GL_SelectTexture( GLenum );
-
-void R_LightPoint (vec3_t p, vec3_t color);
-void R_PushDlights (void);
-
-//====================================================================
-
-extern model_t *r_worldmodel;
-
-extern unsigned d_8to24table[256];
-
-extern int registration_sequence;
-
-
-void V_AddBlend (float r, float g, float b, float a, float *v_blend);
-
-int R_Init( void *hinstance, void *hWnd );
-void R_Shutdown( void );
-
-void R_RenderView (refdef_t *fd);
-void GL_ScreenShot_f (void);
-void R_DrawAliasModel (entity_t *e);
-void R_DrawBrushModel (entity_t *e);
-void R_DrawSpriteModel (entity_t *e);
-void R_DrawBeam( entity_t *e );
-void R_DrawWorld (void);
-void R_RenderDlights (void);
-void R_DrawAlphaSurfaces (void);
-void R_RenderBrushPoly (msurface_t *fa);
-void R_InitParticleTexture (void);
-void Draw_InitLocal (void);
-void GL_SubdivideSurface (msurface_t *fa);
-qboolean R_CullBox (vec3_t mins, vec3_t maxs);
-void R_RotateForEntity (entity_t *e);
-void R_MarkLeaves (void);
-
-glpoly_t *WaterWarpPolyVerts (glpoly_t *p);
-void EmitWaterPolys (msurface_t *fa);
-void R_AddSkySurface (msurface_t *fa);
-void R_ClearSkyBox (void);
-void R_DrawSkyBox (void);
-void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
-
-#if 0
-short LittleShort (short l);
-short BigShort (short l);
-int LittleLong (int l);
-float LittleFloat (float f);
-
-char *va(char *format, ...);
-// does a varargs printf into a temp buffer
-#endif
-
-void COM_StripExtension (char *in, char *out);
-
-void Draw_GetPicSize (int *w, int *h, char *name);
-void Draw_Pic (int x, int y, char *name);
-void Draw_StretchPic (int x, int y, int w, int h, char *name);
-void Draw_Char (int x, int y, int c);
-void Draw_TileClear (int x, int y, int w, int h, char *name);
-void Draw_Fill (int x, int y, int w, int h, int c);
-void Draw_FadeScreen (void);
-void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data);
-
-void R_BeginFrame( float camera_separation );
-void R_SwapBuffers( int );
-void R_SetPalette ( const unsigned char *palette);
-
-int Draw_GetPalette (void);
-
-void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight);
-
-struct image_s *R_RegisterSkin (char *name);
-
-void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height);
-image_t *GL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits);
-image_t *GL_FindImage (char *name, imagetype_t type);
-void GL_TextureMode( char *string );
-void GL_ImageList_f (void);
-
-void GL_SetTexturePalette( unsigned palette[256] );
-
-void GL_InitImages (void);
-void GL_ShutdownImages (void);
-
-void GL_FreeUnusedImages (void);
-
-void GL_TextureAlphaMode( char *string );
-void GL_TextureSolidMode( char *string );
-
-/*
-** GL extension emulation functions
-*/
-void GL_DrawParticles( int n, const particle_t particles[], const unsigned colortable[768] );
-
-/*
-** GL config stuff
-*/
-#define GL_RENDERER_VOODOO 0x00000001
-#define GL_RENDERER_VOODOO2 0x00000002
-#define GL_RENDERER_VOODOO_RUSH 0x00000004
-#define GL_RENDERER_BANSHEE 0x00000008
-#define GL_RENDERER_3DFX 0x0000000F
-
-#define GL_RENDERER_PCX1 0x00000010
-#define GL_RENDERER_PCX2 0x00000020
-#define GL_RENDERER_PMX 0x00000040
-#define GL_RENDERER_POWERVR 0x00000070
-
-#define GL_RENDERER_PERMEDIA2 0x00000100
-#define GL_RENDERER_GLINT_MX 0x00000200
-#define GL_RENDERER_GLINT_TX 0x00000400
-#define GL_RENDERER_3DLABS_MISC 0x00000800
-#define GL_RENDERER_3DLABS 0x00000F00
-
-#define GL_RENDERER_REALIZM 0x00001000
-#define GL_RENDERER_REALIZM2 0x00002000
-#define GL_RENDERER_INTERGRAPH 0x00003000
-
-#define GL_RENDERER_3DPRO 0x00004000
-#define GL_RENDERER_REAL3D 0x00008000
-#define GL_RENDERER_RIVA128 0x00010000
-#define GL_RENDERER_DYPIC 0x00020000
-
-#define GL_RENDERER_V1000 0x00040000
-#define GL_RENDERER_V2100 0x00080000
-#define GL_RENDERER_V2200 0x00100000
-#define GL_RENDERER_RENDITION 0x001C0000
-
-#define GL_RENDERER_O2 0x00100000
-#define GL_RENDERER_IMPACT 0x00200000
-#define GL_RENDERER_RE 0x00400000
-#define GL_RENDERER_IR 0x00800000
-#define GL_RENDERER_SGI 0x00F00000
-
-#define GL_RENDERER_MCD 0x01000000
-#define GL_RENDERER_OTHER 0x80000000
-
-typedef struct
-{
- int renderer;
- const char *renderer_string;
- const char *vendor_string;
- const char *version_string;
- const char *extensions_string;
-
- qboolean allow_cds;
-} glconfig_t;
-
-typedef struct
-{
- float inverse_intensity;
- qboolean fullscreen;
-
- int prev_mode;
-
- unsigned char *d_16to8table;
-
- int lightmap_textures;
-
- int currenttextures[2];
- int currenttmu;
-
- float camera_separation;
- qboolean stereo_enabled;
-
- unsigned char originalRedGammaTable[256];
- unsigned char originalGreenGammaTable[256];
- unsigned char originalBlueGammaTable[256];
-} glstate_t;
-
-extern glconfig_t gl_config;
-extern glstate_t gl_state;
-
-/*
-====================================================================
-
-IMPORTED FUNCTIONS
-
-====================================================================
-*/
-
-extern refimport_t ri;
-
-
-/*
-====================================================================
-
-IMPLEMENTATION SPECIFIC FUNCTIONS
-
-====================================================================
-*/
-
-void GLimp_BeginFrame( float camera_separation );
-void GLimp_EndFrame( void );
-int GLimp_Init( void *hinstance, void *hWnd );
-void GLimp_Shutdown( void );
-int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen );
-void GLimp_AppActivate( qboolean active );
-void GLimp_EnableLogging( qboolean enable );
-void GLimp_LogNewFrame( void );
-
--- a/ref_gl/gl_mesh.c
+++ /dev/null
@@ -1,839 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// gl_mesh.c: triangle model functions
-
-#include "gl_local.h"
-
-/*
-=============================================================
-
- ALIAS MODELS
-
-=============================================================
-*/
-
-#define NUMVERTEXNORMALS 162
-
-float r_avertexnormals[NUMVERTEXNORMALS][3] = {
-#include "anorms.h"
-};
-
-typedef float vec4_t[4];
-
-static vec4_t s_lerped[MAX_VERTS];
-//static vec3_t lerped[MAX_VERTS];
-
-vec3_t shadevector;
-float shadelight[3];
-
-// precalculated dot products for quantized angles
-#define SHADEDOT_QUANT 16
-float r_avertexnormal_dots[SHADEDOT_QUANT][256] =
-#include "anormtab.h"
-;
-
-float *shadedots = r_avertexnormal_dots[0];
-
-void GL_LerpVerts( int nverts, dtrivertx_t *v, dtrivertx_t *ov, dtrivertx_t *verts, float *lerp, float move[3], float frontv[3], float backv[3] )
-{
- int i;
-
- //PMM -- added RF_SHELL_DOUBLE, RF_SHELL_HALF_DAM
- if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM) )
- {
- for (i=0 ; i < nverts; i++, v++, ov++, lerp+=4 )
- {
- float *normal = r_avertexnormals[verts[i].lightnormalindex];
-
- lerp[0] = move[0] + ov->v[0]*backv[0] + v->v[0]*frontv[0] + normal[0] * POWERSUIT_SCALE;
- lerp[1] = move[1] + ov->v[1]*backv[1] + v->v[1]*frontv[1] + normal[1] * POWERSUIT_SCALE;
- lerp[2] = move[2] + ov->v[2]*backv[2] + v->v[2]*frontv[2] + normal[2] * POWERSUIT_SCALE;
- }
- }
- else
- {
- for (i=0 ; i < nverts; i++, v++, ov++, lerp+=4)
- {
- lerp[0] = move[0] + ov->v[0]*backv[0] + v->v[0]*frontv[0];
- lerp[1] = move[1] + ov->v[1]*backv[1] + v->v[1]*frontv[1];
- lerp[2] = move[2] + ov->v[2]*backv[2] + v->v[2]*frontv[2];
- }
- }
-
-}
-
-/*
-=============
-GL_DrawAliasFrameLerp
-
-interpolates between two frames and origins
-FIXME: batch lerp all vertexes
-=============
-*/
-void GL_DrawAliasFrameLerp (dmdl_t *paliashdr, float backlerp)
-{
- float l;
- daliasframe_t *frame, *oldframe;
- dtrivertx_t *v, *ov, *verts;
- int *order;
- int count;
- float frontlerp;
- float alpha;
- vec3_t move, delta, vectors[3];
- vec3_t frontv, backv;
- int i;
- int index_xyz;
- float *lerp;
-
- frame = (daliasframe_t *)((byte *)paliashdr + paliashdr->ofs_frames
- + currententity->frame * paliashdr->framesize);
- verts = v = frame->verts;
-
- oldframe = (daliasframe_t *)((byte *)paliashdr + paliashdr->ofs_frames
- + currententity->oldframe * paliashdr->framesize);
- ov = oldframe->verts;
-
- order = (int *)((byte *)paliashdr + paliashdr->ofs_glcmds);
-
-// glTranslatef (frame->translate[0], frame->translate[1], frame->translate[2]);
-// glScalef (frame->scale[0], frame->scale[1], frame->scale[2]);
-
- if (currententity->flags & RF_TRANSLUCENT)
- alpha = currententity->alpha;
- else
- alpha = 1.0;
-
- // PMM - added double shell
- if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM) )
- qglDisable( GL_TEXTURE_2D );
-
- frontlerp = 1.0 - backlerp;
-
- // move should be the delta back to the previous frame * backlerp
- VectorSubtract (currententity->oldorigin, currententity->origin, delta);
- AngleVectors (currententity->angles, vectors[0], vectors[1], vectors[2]);
-
- move[0] = DotProduct (delta, vectors[0]); // forward
- move[1] = -DotProduct (delta, vectors[1]); // left
- move[2] = DotProduct (delta, vectors[2]); // up
-
- VectorAdd (move, oldframe->translate, move);
-
- for (i=0 ; i<3 ; i++)
- {
- move[i] = backlerp*move[i] + frontlerp*frame->translate[i];
- }
-
- for (i=0 ; i<3 ; i++)
- {
- frontv[i] = frontlerp*frame->scale[i];
- backv[i] = backlerp*oldframe->scale[i];
- }
-
- lerp = s_lerped[0];
-
- GL_LerpVerts( paliashdr->num_xyz, v, ov, verts, lerp, move, frontv, backv );
-
- if ( gl_vertex_arrays->value )
- {
- float colorArray[MAX_VERTS*4];
-
- qglEnableClientState( GL_VERTEX_ARRAY );
- qglVertexPointer( 3, GL_FLOAT, 16, s_lerped ); // padded for SIMD
-
-// if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE ) )
- // PMM - added double damage shell
- if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM) )
- {
- qglColor4f( shadelight[0], shadelight[1], shadelight[2], alpha );
- }
- else
- {
- qglEnableClientState( GL_COLOR_ARRAY );
- qglColorPointer( 3, GL_FLOAT, 0, colorArray );
-
- //
- // pre light everything
- //
- for ( i = 0; i < paliashdr->num_xyz; i++ )
- {
- float l = shadedots[verts[i].lightnormalindex];
-
- colorArray[i*3+0] = l * shadelight[0];
- colorArray[i*3+1] = l * shadelight[1];
- colorArray[i*3+2] = l * shadelight[2];
- }
- }
-
- if ( qglLockArraysEXT != 0 )
- qglLockArraysEXT( 0, paliashdr->num_xyz );
-
- while (1)
- {
- // get the vertex count and primitive type
- count = *order++;
- if (!count)
- break; // done
- if (count < 0)
- {
- count = -count;
- qglBegin (GL_TRIANGLE_FAN);
- }
- else
- {
- qglBegin (GL_TRIANGLE_STRIP);
- }
-
- // PMM - added double damage shell
- if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM) )
- {
- do
- {
- index_xyz = order[2];
- order += 3;
-
- qglVertex3fv( s_lerped[index_xyz] );
-
- } while (--count);
- }
- else
- {
- do
- {
- // texture coordinates come from the draw list
- qglTexCoord2f (((float *)order)[0], ((float *)order)[1]);
- index_xyz = order[2];
-
- order += 3;
-
- // normals and vertexes come from the frame list
-// l = shadedots[verts[index_xyz].lightnormalindex];
-
-// qglColor4f (l* shadelight[0], l*shadelight[1], l*shadelight[2], alpha);
- qglArrayElement( index_xyz );
-
- } while (--count);
- }
- qglEnd ();
- }
-
- if ( qglUnlockArraysEXT != 0 )
- qglUnlockArraysEXT();
- }
- else
- {
- while (1)
- {
- // get the vertex count and primitive type
- count = *order++;
- if (!count)
- break; // done
- if (count < 0)
- {
- count = -count;
- qglBegin (GL_TRIANGLE_FAN);
- }
- else
- {
- qglBegin (GL_TRIANGLE_STRIP);
- }
-
- if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE ) )
- {
- do
- {
- index_xyz = order[2];
- order += 3;
-
- qglColor4f( shadelight[0], shadelight[1], shadelight[2], alpha);
- qglVertex3fv (s_lerped[index_xyz]);
-
- } while (--count);
- }
- else
- {
- do
- {
- // texture coordinates come from the draw list
- qglTexCoord2f (((float *)order)[0], ((float *)order)[1]);
- index_xyz = order[2];
- order += 3;
-
- // normals and vertexes come from the frame list
- l = shadedots[verts[index_xyz].lightnormalindex];
-
- qglColor4f (l* shadelight[0], l*shadelight[1], l*shadelight[2], alpha);
- qglVertex3fv (s_lerped[index_xyz]);
- } while (--count);
- }
-
- qglEnd ();
- }
- }
-
-// if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE ) )
- // PMM - added double damage shell
- if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM) )
- qglEnable( GL_TEXTURE_2D );
-}
-
-
-#if 1
-/*
-=============
-GL_DrawAliasShadow
-=============
-*/
-extern vec3_t lightspot;
-
-void GL_DrawAliasShadow (dmdl_t *paliashdr, int posenum)
-{
- dtrivertx_t *verts;
- int *order;
- vec3_t point;
- float height, lheight;
- int count;
- daliasframe_t *frame;
-
- lheight = currententity->origin[2] - lightspot[2];
-
- frame = (daliasframe_t *)((byte *)paliashdr + paliashdr->ofs_frames
- + currententity->frame * paliashdr->framesize);
- verts = frame->verts;
-
- height = 0;
-
- order = (int *)((byte *)paliashdr + paliashdr->ofs_glcmds);
-
- height = -lheight + 1.0;
-
- while (1)
- {
- // get the vertex count and primitive type
- count = *order++;
- if (!count)
- break; // done
- if (count < 0)
- {
- count = -count;
- qglBegin (GL_TRIANGLE_FAN);
- }
- else
- qglBegin (GL_TRIANGLE_STRIP);
-
- do
- {
- // normals and vertexes come from the frame list
-/*
- point[0] = verts[order[2]].v[0] * frame->scale[0] + frame->translate[0];
- point[1] = verts[order[2]].v[1] * frame->scale[1] + frame->translate[1];
- point[2] = verts[order[2]].v[2] * frame->scale[2] + frame->translate[2];
-*/
-
- memcpy( point, s_lerped[order[2]], sizeof( point ) );
-
- point[0] -= shadevector[0]*(point[2]+lheight);
- point[1] -= shadevector[1]*(point[2]+lheight);
- point[2] = height;
-// height -= 0.001;
- qglVertex3fv (point);
-
- order += 3;
-
-// verts++;
-
- } while (--count);
-
- qglEnd ();
- }
-}
-
-#endif
-
-/*
-** R_CullAliasModel
-*/
-static qboolean R_CullAliasModel( vec3_t bbox[8], entity_t *e )
-{
- int i;
- vec3_t mins, maxs;
- dmdl_t *paliashdr;
- vec3_t vectors[3];
- vec3_t thismins, oldmins, thismaxs, oldmaxs;
- daliasframe_t *pframe, *poldframe;
- vec3_t angles;
-
- paliashdr = (dmdl_t *)currentmodel->extradata;
-
- if ( ( e->frame >= paliashdr->num_frames ) || ( e->frame < 0 ) )
- {
- ri.Con_Printf (PRINT_ALL, "R_CullAliasModel %s: no such frame %d\n",
- currentmodel->name, e->frame);
- e->frame = 0;
- }
- if ( ( e->oldframe >= paliashdr->num_frames ) || ( e->oldframe < 0 ) )
- {
- ri.Con_Printf (PRINT_ALL, "R_CullAliasModel %s: no such oldframe %d\n",
- currentmodel->name, e->oldframe);
- e->oldframe = 0;
- }
-
- pframe = ( daliasframe_t * ) ( ( byte * ) paliashdr +
- paliashdr->ofs_frames +
- e->frame * paliashdr->framesize);
-
- poldframe = ( daliasframe_t * ) ( ( byte * ) paliashdr +
- paliashdr->ofs_frames +
- e->oldframe * paliashdr->framesize);
-
- /*
- ** compute axially aligned mins and maxs
- */
- if ( pframe == poldframe )
- {
- for ( i = 0; i < 3; i++ )
- {
- mins[i] = pframe->translate[i];
- maxs[i] = mins[i] + pframe->scale[i]*255;
- }
- }
- else
- {
- for ( i = 0; i < 3; i++ )
- {
- thismins[i] = pframe->translate[i];
- thismaxs[i] = thismins[i] + pframe->scale[i]*255;
-
- oldmins[i] = poldframe->translate[i];
- oldmaxs[i] = oldmins[i] + poldframe->scale[i]*255;
-
- if ( thismins[i] < oldmins[i] )
- mins[i] = thismins[i];
- else
- mins[i] = oldmins[i];
-
- if ( thismaxs[i] > oldmaxs[i] )
- maxs[i] = thismaxs[i];
- else
- maxs[i] = oldmaxs[i];
- }
- }
-
- /*
- ** compute a full bounding box
- */
- for ( i = 0; i < 8; i++ )
- {
- vec3_t tmp;
-
- if ( i & 1 )
- tmp[0] = mins[0];
- else
- tmp[0] = maxs[0];
-
- if ( i & 2 )
- tmp[1] = mins[1];
- else
- tmp[1] = maxs[1];
-
- if ( i & 4 )
- tmp[2] = mins[2];
- else
- tmp[2] = maxs[2];
-
- VectorCopy( tmp, bbox[i] );
- }
-
- /*
- ** rotate the bounding box
- */
- VectorCopy( e->angles, angles );
- angles[YAW] = -angles[YAW];
- AngleVectors( angles, vectors[0], vectors[1], vectors[2] );
-
- for ( i = 0; i < 8; i++ )
- {
- vec3_t tmp;
-
- VectorCopy( bbox[i], tmp );
-
- bbox[i][0] = DotProduct( vectors[0], tmp );
- bbox[i][1] = -DotProduct( vectors[1], tmp );
- bbox[i][2] = DotProduct( vectors[2], tmp );
-
- VectorAdd( e->origin, bbox[i], bbox[i] );
- }
-
- {
- int p, f, aggregatemask = ~0;
-
- for ( p = 0; p < 8; p++ )
- {
- int mask = 0;
-
- for ( f = 0; f < 4; f++ )
- {
- float dp = DotProduct( frustum[f].normal, bbox[p] );
-
- if ( ( dp - frustum[f].dist ) < 0 )
- {
- mask |= ( 1 << f );
- }
- }
-
- aggregatemask &= mask;
- }
-
- if ( aggregatemask )
- {
- return true;
- }
-
- return false;
- }
-}
-
-/*
-=================
-R_DrawAliasModel
-
-=================
-*/
-void R_DrawAliasModel (entity_t *e)
-{
- int i;
- dmdl_t *paliashdr;
- float an;
- vec3_t bbox[8];
- image_t *skin;
-
- if ( !( e->flags & RF_WEAPONMODEL ) )
- {
- if ( R_CullAliasModel( bbox, e ) )
- return;
- }
-
- if ( e->flags & RF_WEAPONMODEL )
- {
- if ( r_lefthand->value == 2 )
- return;
- }
-
- paliashdr = (dmdl_t *)currentmodel->extradata;
-
- //
- // get lighting information
- //
- // PMM - rewrote, reordered to handle new shells & mixing
- //
- if ( currententity->flags & ( RF_SHELL_HALF_DAM | RF_SHELL_GREEN | RF_SHELL_RED | RF_SHELL_BLUE | RF_SHELL_DOUBLE ) )
- {
- // PMM -special case for godmode
- if ( (currententity->flags & RF_SHELL_RED) &&
- (currententity->flags & RF_SHELL_BLUE) &&
- (currententity->flags & RF_SHELL_GREEN) )
- {
- for (i=0 ; i<3 ; i++)
- shadelight[i] = 1.0;
- }
- else if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_BLUE | RF_SHELL_DOUBLE ) )
- {
- VectorClear (shadelight);
-
- if ( currententity->flags & RF_SHELL_RED )
- {
- shadelight[0] = 1.0;
- if (currententity->flags & (RF_SHELL_BLUE|RF_SHELL_DOUBLE) )
- shadelight[2] = 1.0;
- }
- else if ( currententity->flags & RF_SHELL_BLUE )
- {
- if ( currententity->flags & RF_SHELL_DOUBLE )
- {
- shadelight[1] = 1.0;
- shadelight[2] = 1.0;
- }
- else
- {
- shadelight[2] = 1.0;
- }
- }
- else if ( currententity->flags & RF_SHELL_DOUBLE )
- {
- shadelight[0] = 0.9;
- shadelight[1] = 0.7;
- }
- }
- else if ( currententity->flags & ( RF_SHELL_HALF_DAM | RF_SHELL_GREEN ) )
- {
- VectorClear (shadelight);
- // PMM - new colors
- if ( currententity->flags & RF_SHELL_HALF_DAM )
- {
- shadelight[0] = 0.56;
- shadelight[1] = 0.59;
- shadelight[2] = 0.45;
- }
- if ( currententity->flags & RF_SHELL_GREEN )
- {
- shadelight[1] = 1.0;
- }
- }
- }
- //PMM - ok, now flatten these down to range from 0 to 1.0.
- // max_shell_val = max(shadelight[0], max(shadelight[1], shadelight[2]));
- // if (max_shell_val > 0)
- // {
- // for (i=0; i<3; i++)
- // {
- // shadelight[i] = shadelight[i] / max_shell_val;
- // }
- // }
- // pmm
- else if ( currententity->flags & RF_FULLBRIGHT )
- {
- for (i=0 ; i<3 ; i++)
- shadelight[i] = 1.0;
- }
- else
- {
- R_LightPoint (currententity->origin, shadelight);
-
- // player lighting hack for communication back to server
- // big hack!
- if ( currententity->flags & RF_WEAPONMODEL )
- {
- // pick the greatest component, which should be the same
- // as the mono value returned by software
- if (shadelight[0] > shadelight[1])
- {
- if (shadelight[0] > shadelight[2])
- r_lightlevel->value = 150*shadelight[0];
- else
- r_lightlevel->value = 150*shadelight[2];
- }
- else
- {
- if (shadelight[1] > shadelight[2])
- r_lightlevel->value = 150*shadelight[1];
- else
- r_lightlevel->value = 150*shadelight[2];
- }
-
- }
-
- if ( gl_monolightmap->string[0] != '0' )
- {
- float s = shadelight[0];
-
- if ( s < shadelight[1] )
- s = shadelight[1];
- if ( s < shadelight[2] )
- s = shadelight[2];
-
- shadelight[0] = s;
- shadelight[1] = s;
- shadelight[2] = s;
- }
- }
-
- if ( currententity->flags & RF_MINLIGHT )
- {
- for (i=0 ; i<3 ; i++)
- if (shadelight[i] > 0.1)
- break;
- if (i == 3)
- {
- shadelight[0] = 0.1;
- shadelight[1] = 0.1;
- shadelight[2] = 0.1;
- }
- }
-
- if ( currententity->flags & RF_GLOW )
- { // bonus items will pulse with time
- float scale;
- float min;
-
- scale = 0.1 * sin(r_newrefdef.time*7);
- for (i=0 ; i<3 ; i++)
- {
- min = shadelight[i] * 0.8;
- shadelight[i] += scale;
- if (shadelight[i] < min)
- shadelight[i] = min;
- }
- }
-
-// =================
-// PGM ir goggles color override
- if ( r_newrefdef.rdflags & RDF_IRGOGGLES && currententity->flags & RF_IR_VISIBLE)
- {
- shadelight[0] = 1.0;
- shadelight[1] = 0.0;
- shadelight[2] = 0.0;
- }
-// PGM
-// =================
-
- shadedots = r_avertexnormal_dots[((int)(currententity->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1)];
-
- an = currententity->angles[1]/180*M_PI;
- shadevector[0] = cos(-an);
- shadevector[1] = sin(-an);
- shadevector[2] = 1;
- VectorNormalize (shadevector);
-
- //
- // locate the proper data
- //
-
- c_alias_polys += paliashdr->num_tris;
-
- //
- // draw all the triangles
- //
- if (currententity->flags & RF_DEPTHHACK) // hack the depth range to prevent view model from poking into walls
- qglDepthRange (gldepthmin, gldepthmin + 0.3*(gldepthmax-gldepthmin));
-
- if ( ( currententity->flags & RF_WEAPONMODEL ) && ( r_lefthand->value == 1.0F ) )
- {
- extern void MYgluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar );
-
- qglMatrixMode( GL_PROJECTION );
- qglPushMatrix();
- qglLoadIdentity();
- qglScalef( -1, 1, 1 );
- MYgluPerspective( r_newrefdef.fov_y, ( float ) r_newrefdef.width / r_newrefdef.height, 4, 4096);
- qglMatrixMode( GL_MODELVIEW );
-
- qglCullFace( GL_BACK );
- }
-
- qglPushMatrix ();
- e->angles[PITCH] = -e->angles[PITCH]; // sigh.
- R_RotateForEntity (e);
- e->angles[PITCH] = -e->angles[PITCH]; // sigh.
-
- // select skin
- if (currententity->skin)
- skin = currententity->skin; // custom player skin
- else
- {
- if (currententity->skinnum >= MAX_MD2SKINS)
- skin = currentmodel->skins[0];
- else
- {
- skin = currentmodel->skins[currententity->skinnum];
- if (!skin)
- skin = currentmodel->skins[0];
- }
- }
- if (!skin)
- skin = r_notexture; // fallback...
- GL_Bind(skin->texnum);
-
- // draw it
-
- qglShadeModel (GL_SMOOTH);
-
- GL_TexEnv( GL_MODULATE );
- if ( currententity->flags & RF_TRANSLUCENT )
- {
- qglEnable (GL_BLEND);
- }
-
-
- if ( (currententity->frame >= paliashdr->num_frames)
- || (currententity->frame < 0) )
- {
- ri.Con_Printf (PRINT_ALL, "R_DrawAliasModel %s: no such frame %d\n",
- currentmodel->name, currententity->frame);
- currententity->frame = 0;
- currententity->oldframe = 0;
- }
-
- if ( (currententity->oldframe >= paliashdr->num_frames)
- || (currententity->oldframe < 0))
- {
- ri.Con_Printf (PRINT_ALL, "R_DrawAliasModel %s: no such oldframe %d\n",
- currentmodel->name, currententity->oldframe);
- currententity->frame = 0;
- currententity->oldframe = 0;
- }
-
- if ( !r_lerpmodels->value )
- currententity->backlerp = 0;
- GL_DrawAliasFrameLerp (paliashdr, currententity->backlerp);
-
- GL_TexEnv( GL_REPLACE );
- qglShadeModel (GL_FLAT);
-
- qglPopMatrix ();
-
-#if 0
- qglDisable( GL_CULL_FACE );
- qglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
- qglDisable( GL_TEXTURE_2D );
- qglBegin( GL_TRIANGLE_STRIP );
- for ( i = 0; i < 8; i++ )
- {
- qglVertex3fv( bbox[i] );
- }
- qglEnd();
- qglEnable( GL_TEXTURE_2D );
- qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- qglEnable( GL_CULL_FACE );
-#endif
-
- if ( ( currententity->flags & RF_WEAPONMODEL ) && ( r_lefthand->value == 1.0F ) )
- {
- qglMatrixMode( GL_PROJECTION );
- qglPopMatrix();
- qglMatrixMode( GL_MODELVIEW );
- qglCullFace( GL_FRONT );
- }
-
- if ( currententity->flags & RF_TRANSLUCENT )
- {
- qglDisable (GL_BLEND);
- }
-
- if (currententity->flags & RF_DEPTHHACK)
- qglDepthRange (gldepthmin, gldepthmax);
-
-#if 1
- if (gl_shadows->value && !(currententity->flags & (RF_TRANSLUCENT | RF_WEAPONMODEL)))
- {
- qglPushMatrix ();
- R_RotateForEntity (e);
- qglDisable (GL_TEXTURE_2D);
- qglEnable (GL_BLEND);
- qglColor4f (0,0,0,0.5);
- GL_DrawAliasShadow (paliashdr, currententity->frame );
- qglEnable (GL_TEXTURE_2D);
- qglDisable (GL_BLEND);
- qglPopMatrix ();
- }
-#endif
- qglColor4f (1,1,1,1);
-}
-
-
--- a/ref_gl/gl_model.c
+++ /dev/null
@@ -1,1223 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// models.c -- model loading and caching
-
-#include "gl_local.h"
-
-model_t *loadmodel;
-int modfilelen;
-
-void Mod_LoadSpriteModel (model_t *mod, void *buffer);
-void Mod_LoadBrushModel (model_t *mod, void *buffer);
-void Mod_LoadAliasModel (model_t *mod, void *buffer);
-model_t *Mod_LoadModel (model_t *mod, qboolean crash);
-
-byte mod_novis[MAX_MAP_LEAFS/8];
-
-#define MAX_MOD_KNOWN 512
-model_t mod_known[MAX_MOD_KNOWN];
-int mod_numknown;
-
-// the inline * models from the current map are kept seperate
-model_t mod_inline[MAX_MOD_KNOWN];
-
-int registration_sequence;
-
-/*
-===============
-Mod_PointInLeaf
-===============
-*/
-mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model)
-{
- mnode_t *node;
- float d;
- cplane_t *plane;
-
- if (!model || !model->nodes)
- ri.Sys_Error (ERR_DROP, "Mod_PointInLeaf: bad model");
-
- node = model->nodes;
- while (1)
- {
- if (node->contents != -1)
- return (mleaf_t *)node;
- plane = node->plane;
- d = DotProduct (p,plane->normal) - plane->dist;
- if (d > 0)
- node = node->children[0];
- else
- node = node->children[1];
- }
-
- return NULL; // never reached
-}
-
-
-/*
-===================
-Mod_DecompressVis
-===================
-*/
-byte *Mod_DecompressVis (byte *in, model_t *model)
-{
- static byte decompressed[MAX_MAP_LEAFS/8];
- int c;
- byte *out;
- int row;
-
- row = (model->vis->numclusters+7)>>3;
- out = decompressed;
-
- if (!in)
- { // no vis info, so make all visible
- while (row)
- {
- *out++ = 0xff;
- row--;
- }
- return decompressed;
- }
-
- do
- {
- if (*in)
- {
- *out++ = *in++;
- continue;
- }
-
- c = in[1];
- in += 2;
- while (c)
- {
- *out++ = 0;
- c--;
- }
- } while (out - decompressed < row);
-
- return decompressed;
-}
-
-/*
-==============
-Mod_ClusterPVS
-==============
-*/
-byte *Mod_ClusterPVS (int cluster, model_t *model)
-{
- if (cluster == -1 || !model->vis)
- return mod_novis;
- return Mod_DecompressVis ( (byte *)model->vis + model->vis->bitofs[cluster][DVIS_PVS],
- model);
-}
-
-
-//===============================================================================
-
-/*
-================
-Mod_Modellist_f
-================
-*/
-void Mod_Modellist_f (void)
-{
- int i;
- model_t *mod;
- int total;
-
- total = 0;
- ri.Con_Printf (PRINT_ALL,"Loaded models:\n");
- for (i=0, mod=mod_known ; i < mod_numknown ; i++, mod++)
- {
- if (!mod->name[0])
- continue;
- ri.Con_Printf (PRINT_ALL, "%8i : %s\n",mod->extradatasize, mod->name);
- total += mod->extradatasize;
- }
- ri.Con_Printf (PRINT_ALL, "Total resident: %i\n", total);
-}
-
-/*
-===============
-Mod_Init
-===============
-*/
-void Mod_Init (void)
-{
- memset (mod_novis, 0xff, sizeof(mod_novis));
-}
-
-
-
-/*
-==================
-Mod_ForName
-
-Loads in a model for the given name
-==================
-*/
-model_t *Mod_ForName (char *name, qboolean crash)
-{
- model_t *mod;
- unsigned *buf;
- int i;
-
- if (!name[0])
- ri.Sys_Error (ERR_DROP, "Mod_ForName: NULL name");
-
- //
- // inline models are grabbed only from worldmodel
- //
- if (name[0] == '*')
- {
- i = atoi(name+1);
- if (i < 1 || !r_worldmodel || i >= r_worldmodel->numsubmodels)
- ri.Sys_Error (ERR_DROP, "bad inline model number");
- return &mod_inline[i];
- }
-
- //
- // search the currently loaded models
- //
- for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++)
- {
- if (!mod->name[0])
- continue;
- if (!strcmp (mod->name, name) )
- return mod;
- }
-
- //
- // find a free model slot spot
- //
- for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++)
- {
- if (!mod->name[0])
- break; // free spot
- }
- if (i == mod_numknown)
- {
- if (mod_numknown == MAX_MOD_KNOWN)
- ri.Sys_Error (ERR_DROP, "mod_numknown == MAX_MOD_KNOWN");
- mod_numknown++;
- }
- strcpy (mod->name, name);
-
- //
- // load the file
- //
- modfilelen = ri.FS_LoadFile (mod->name, &buf);
- if (!buf)
- {
- if (crash)
- ri.Sys_Error (ERR_DROP, "Mod_NumForName: %s not found", mod->name);
- memset (mod->name, 0, sizeof(mod->name));
- return NULL;
- }
-
- loadmodel = mod;
-
- //
- // fill it in
- //
-
-
- // call the apropriate loader
-
- switch (LittleLong(*(unsigned *)buf))
- {
- case IDALIASHEADER:
- loadmodel->extradata = Hunk_Begin (0x200000);
- Mod_LoadAliasModel (mod, buf);
- break;
-
- case IDSPRITEHEADER:
- loadmodel->extradata = Hunk_Begin (0x10000);
- Mod_LoadSpriteModel (mod, buf);
- break;
-
- case IDBSPHEADER:
- loadmodel->extradata = Hunk_Begin (0x1000000);
- Mod_LoadBrushModel (mod, buf);
- break;
-
- default:
- ri.Sys_Error (ERR_DROP,"Mod_NumForName: unknown fileid for %s", mod->name);
- break;
- }
-
- loadmodel->extradatasize = Hunk_End ();
-
- ri.FS_FreeFile (buf);
-
- return mod;
-}
-
-/*
-===============================================================================
-
- BRUSHMODEL LOADING
-
-===============================================================================
-*/
-
-byte *mod_base;
-
-
-/*
-=================
-Mod_LoadLighting
-=================
-*/
-void Mod_LoadLighting (lump_t *l)
-{
- if (!l->filelen)
- {
- loadmodel->lightdata = NULL;
- return;
- }
- loadmodel->lightdata = Hunk_Alloc ( l->filelen);
- memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
-}
-
-
-/*
-=================
-Mod_LoadVisibility
-=================
-*/
-void Mod_LoadVisibility (lump_t *l)
-{
- int i;
-
- if (!l->filelen)
- {
- loadmodel->vis = NULL;
- return;
- }
- loadmodel->vis = Hunk_Alloc ( l->filelen);
- memcpy (loadmodel->vis, mod_base + l->fileofs, l->filelen);
-
- loadmodel->vis->numclusters = LittleLong (loadmodel->vis->numclusters);
- for (i=0 ; i<loadmodel->vis->numclusters ; i++)
- {
- loadmodel->vis->bitofs[i][0] = LittleLong (loadmodel->vis->bitofs[i][0]);
- loadmodel->vis->bitofs[i][1] = LittleLong (loadmodel->vis->bitofs[i][1]);
- }
-}
-
-
-/*
-=================
-Mod_LoadVertexes
-=================
-*/
-void Mod_LoadVertexes (lump_t *l)
-{
- dvertex_t *in;
- mvertex_t *out;
- int i, count;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->vertexes = out;
- loadmodel->numvertexes = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- out->position[0] = LittleFloat (in->point[0]);
- out->position[1] = LittleFloat (in->point[1]);
- out->position[2] = LittleFloat (in->point[2]);
- }
-}
-
-/*
-=================
-RadiusFromBounds
-=================
-*/
-float RadiusFromBounds (vec3_t mins, vec3_t maxs)
-{
- int i;
- vec3_t corner;
-
- for (i=0 ; i<3 ; i++)
- {
- corner[i] = fabs(mins[i]) > fabs(maxs[i]) ? fabs(mins[i]) : fabs(maxs[i]);
- }
-
- return VectorLength (corner);
-}
-
-
-/*
-=================
-Mod_LoadSubmodels
-=================
-*/
-void Mod_LoadSubmodels (lump_t *l)
-{
- dmodel_t *in;
- mmodel_t *out;
- int i, j, count;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->submodels = out;
- loadmodel->numsubmodels = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- for (j=0 ; j<3 ; j++)
- { // spread the mins / maxs by a pixel
- out->mins[j] = LittleFloat (in->mins[j]) - 1;
- out->maxs[j] = LittleFloat (in->maxs[j]) + 1;
- out->origin[j] = LittleFloat (in->origin[j]);
- }
- out->radius = RadiusFromBounds (out->mins, out->maxs);
- out->headnode = LittleLong (in->headnode);
- out->firstface = LittleLong (in->firstface);
- out->numfaces = LittleLong (in->numfaces);
- }
-}
-
-/*
-=================
-Mod_LoadEdges
-=================
-*/
-void Mod_LoadEdges (lump_t *l)
-{
- dedge_t *in;
- medge_t *out;
- int i, count;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( (count + 1) * sizeof(*out));
-
- loadmodel->edges = out;
- loadmodel->numedges = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- out->v[0] = (unsigned short)LittleShort(in->v[0]);
- out->v[1] = (unsigned short)LittleShort(in->v[1]);
- }
-}
-
-/*
-=================
-Mod_LoadTexinfo
-=================
-*/
-void Mod_LoadTexinfo (lump_t *l)
-{
- texinfo_t *in;
- mtexinfo_t *out, *step;
- int i, j, count;
- char name[MAX_QPATH];
- int next;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->texinfo = out;
- loadmodel->numtexinfo = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- for (j=0 ; j<8 ; j++)
- out->vecs[0][j] = LittleFloat (in->vecs[0][j]);
-
- out->flags = LittleLong (in->flags);
- next = LittleLong (in->nexttexinfo);
- if (next > 0)
- out->next = loadmodel->texinfo + next;
- else
- out->next = NULL;
- Com_sprintf (name, sizeof(name), "textures/%s.wal", in->texture);
-
- out->image = GL_FindImage (name, it_wall);
- if (!out->image)
- {
- ri.Con_Printf (PRINT_ALL, "Couldn't load %s\n", name);
- out->image = r_notexture;
- }
- }
-
- // count animation frames
- for (i=0 ; i<count ; i++)
- {
- out = &loadmodel->texinfo[i];
- out->numframes = 1;
- for (step = out->next ; step && step != out ; step=step->next)
- out->numframes++;
- }
-}
-
-/*
-================
-CalcSurfaceExtents
-
-Fills in s->texturemins[] and s->extents[]
-================
-*/
-void CalcSurfaceExtents (msurface_t *s)
-{
- float mins[2], maxs[2], val;
- int i,j, e;
- mvertex_t *v;
- mtexinfo_t *tex;
- int bmins[2], bmaxs[2];
-
- mins[0] = mins[1] = 999999;
- maxs[0] = maxs[1] = -99999;
-
- tex = s->texinfo;
-
- for (i=0 ; i<s->numedges ; i++)
- {
- e = loadmodel->surfedges[s->firstedge+i];
- if (e >= 0)
- v = &loadmodel->vertexes[loadmodel->edges[e].v[0]];
- else
- v = &loadmodel->vertexes[loadmodel->edges[-e].v[1]];
-
- for (j=0 ; j<2 ; j++)
- {
- val = v->position[0] * tex->vecs[j][0] +
- v->position[1] * tex->vecs[j][1] +
- v->position[2] * tex->vecs[j][2] +
- tex->vecs[j][3];
- if (val < mins[j])
- mins[j] = val;
- if (val > maxs[j])
- maxs[j] = val;
- }
- }
-
- for (i=0 ; i<2 ; i++)
- {
- bmins[i] = floor(mins[i]/16);
- bmaxs[i] = ceil(maxs[i]/16);
-
- s->texturemins[i] = bmins[i] * 16;
- s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
-
-// if ( !(tex->flags & TEX_SPECIAL) && s->extents[i] > 512 /* 256 */ )
-// ri.Sys_Error (ERR_DROP, "Bad surface extents");
- }
-}
-
-
-void GL_BuildPolygonFromSurface(msurface_t *fa);
-void GL_CreateSurfaceLightmap (msurface_t *surf);
-void GL_EndBuildingLightmaps (void);
-void GL_BeginBuildingLightmaps (model_t *m);
-
-/*
-=================
-Mod_LoadFaces
-=================
-*/
-void Mod_LoadFaces (lump_t *l)
-{
- dface_t *in;
- msurface_t *out;
- int i, count, surfnum;
- int planenum, side;
- int ti;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->surfaces = out;
- loadmodel->numsurfaces = count;
-
- currentmodel = loadmodel;
-
- GL_BeginBuildingLightmaps (loadmodel);
-
- for ( surfnum=0 ; surfnum<count ; surfnum++, in++, out++)
- {
- out->firstedge = LittleLong(in->firstedge);
- out->numedges = LittleShort(in->numedges);
- out->flags = 0;
- out->polys = NULL;
-
- planenum = LittleShort(in->planenum);
- side = LittleShort(in->side);
- if (side)
- out->flags |= SURF_PLANEBACK;
-
- out->plane = loadmodel->planes + planenum;
-
- ti = LittleShort (in->texinfo);
- if (ti < 0 || ti >= loadmodel->numtexinfo)
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: bad texinfo number");
- out->texinfo = loadmodel->texinfo + ti;
-
- CalcSurfaceExtents (out);
-
- // lighting info
-
- for (i=0 ; i<MAXLIGHTMAPS ; i++)
- out->styles[i] = in->styles[i];
- i = LittleLong(in->lightofs);
- if (i == -1)
- out->samples = NULL;
- else
- out->samples = loadmodel->lightdata + i;
-
- // set the drawing flags
-
- if (out->texinfo->flags & SURF_WARP)
- {
- out->flags |= SURF_DRAWTURB;
- for (i=0 ; i<2 ; i++)
- {
- out->extents[i] = 16384;
- out->texturemins[i] = -8192;
- }
- GL_SubdivideSurface (out); // cut up polygon for warps
- }
-
- // create lightmaps and polygons
- if ( !(out->texinfo->flags & (SURF_SKY|SURF_TRANS33|SURF_TRANS66|SURF_WARP) ) )
- GL_CreateSurfaceLightmap (out);
-
- if (! (out->texinfo->flags & SURF_WARP) )
- GL_BuildPolygonFromSurface(out);
-
- }
-
- GL_EndBuildingLightmaps ();
-}
-
-
-/*
-=================
-Mod_SetParent
-=================
-*/
-void Mod_SetParent (mnode_t *node, mnode_t *parent)
-{
- node->parent = parent;
- if (node->contents != -1)
- return;
- Mod_SetParent (node->children[0], node);
- Mod_SetParent (node->children[1], node);
-}
-
-/*
-=================
-Mod_LoadNodes
-=================
-*/
-void Mod_LoadNodes (lump_t *l)
-{
- int i, j, count, p;
- dnode_t *in;
- mnode_t *out;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->nodes = out;
- loadmodel->numnodes = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- for (j=0 ; j<3 ; j++)
- {
- out->minmaxs[j] = LittleShort (in->mins[j]);
- out->minmaxs[3+j] = LittleShort (in->maxs[j]);
- }
-
- p = LittleLong(in->planenum);
- out->plane = loadmodel->planes + p;
-
- out->firstsurface = LittleShort (in->firstface);
- out->numsurfaces = LittleShort (in->numfaces);
- out->contents = -1; // differentiate from leafs
-
- for (j=0 ; j<2 ; j++)
- {
- p = LittleLong (in->children[j]);
- if (p >= 0)
- out->children[j] = loadmodel->nodes + p;
- else
- out->children[j] = (mnode_t *)(loadmodel->leafs + (-1 - p));
- }
- }
-
- Mod_SetParent (loadmodel->nodes, NULL); // sets nodes and leafs
-}
-
-/*
-=================
-Mod_LoadLeafs
-=================
-*/
-void Mod_LoadLeafs (lump_t *l)
-{
- dleaf_t *in;
- mleaf_t *out;
- int i, j, count, p;
-// glpoly_t *poly;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->leafs = out;
- loadmodel->numleafs = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- for (j=0 ; j<3 ; j++)
- {
- out->minmaxs[j] = LittleShort (in->mins[j]);
- out->minmaxs[3+j] = LittleShort (in->maxs[j]);
- }
-
- p = LittleLong(in->contents);
- out->contents = p;
-
- out->cluster = LittleShort(in->cluster);
- out->area = LittleShort(in->area);
-
- out->firstmarksurface = loadmodel->marksurfaces +
- LittleShort(in->firstleafface);
- out->nummarksurfaces = LittleShort(in->numleaffaces);
-
- // gl underwater warp
-#if 0
- if (out->contents & (CONTENTS_WATER|CONTENTS_SLIME|CONTENTS_LAVA|CONTENTS_THINWATER) )
- {
- for (j=0 ; j<out->nummarksurfaces ; j++)
- {
- out->firstmarksurface[j]->flags |= SURF_UNDERWATER;
- for (poly = out->firstmarksurface[j]->polys ; poly ; poly=poly->next)
- poly->flags |= SURF_UNDERWATER;
- }
- }
-#endif
- }
-}
-
-/*
-=================
-Mod_LoadMarksurfaces
-=================
-*/
-void Mod_LoadMarksurfaces (lump_t *l)
-{
- int i, j, count;
- short *in;
- msurface_t **out;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->marksurfaces = out;
- loadmodel->nummarksurfaces = count;
-
- for ( i=0 ; i<count ; i++)
- {
- j = LittleShort(in[i]);
- if (j < 0 || j >= loadmodel->numsurfaces)
- ri.Sys_Error (ERR_DROP, "Mod_ParseMarksurfaces: bad surface number");
- out[i] = loadmodel->surfaces + j;
- }
-}
-
-/*
-=================
-Mod_LoadSurfedges
-=================
-*/
-void Mod_LoadSurfedges (lump_t *l)
-{
- int i, count;
- int *in, *out;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- if (count < 1 || count >= MAX_MAP_SURFEDGES)
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: bad surfedges count in %s: %i",
- loadmodel->name, count);
-
- out = Hunk_Alloc ( count*sizeof(*out));
-
- loadmodel->surfedges = out;
- loadmodel->numsurfedges = count;
-
- for ( i=0 ; i<count ; i++)
- out[i] = LittleLong (in[i]);
-}
-
-
-/*
-=================
-Mod_LoadPlanes
-=================
-*/
-void Mod_LoadPlanes (lump_t *l)
-{
- int i, j;
- cplane_t *out;
- dplane_t *in;
- int count;
- int bits;
-
- in = (void *)(mod_base + l->fileofs);
- if (l->filelen % sizeof(*in))
- ri.Sys_Error (ERR_DROP, "MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
- count = l->filelen / sizeof(*in);
- out = Hunk_Alloc ( count*2*sizeof(*out));
-
- loadmodel->planes = out;
- loadmodel->numplanes = count;
-
- for ( i=0 ; i<count ; i++, in++, out++)
- {
- bits = 0;
- for (j=0 ; j<3 ; j++)
- {
- out->normal[j] = LittleFloat (in->normal[j]);
- if (out->normal[j] < 0)
- bits |= 1<<j;
- }
-
- out->dist = LittleFloat (in->dist);
- out->type = LittleLong (in->type);
- out->signbits = bits;
- }
-}
-
-/*
-=================
-Mod_LoadBrushModel
-=================
-*/
-void Mod_LoadBrushModel (model_t *mod, void *buffer)
-{
- int i;
- dheader_t *header;
- mmodel_t *bm;
-
- loadmodel->type = mod_brush;
- if (loadmodel != mod_known)
- ri.Sys_Error (ERR_DROP, "Loaded a brush model after the world");
-
- header = (dheader_t *)buffer;
-
- i = LittleLong (header->version);
- if (i != BSPVERSION)
- ri.Sys_Error (ERR_DROP, "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
-
-// swap all the lumps
- mod_base = (byte *)header;
-
- for (i=0 ; i<sizeof(dheader_t)/4 ; i++)
- ((int *)header)[i] = LittleLong ( ((int *)header)[i]);
-
-// load into heap
-
- Mod_LoadVertexes (&header->lumps[LUMP_VERTEXES]);
- Mod_LoadEdges (&header->lumps[LUMP_EDGES]);
- Mod_LoadSurfedges (&header->lumps[LUMP_SURFEDGES]);
- Mod_LoadLighting (&header->lumps[LUMP_LIGHTING]);
- Mod_LoadPlanes (&header->lumps[LUMP_PLANES]);
- Mod_LoadTexinfo (&header->lumps[LUMP_TEXINFO]);
- Mod_LoadFaces (&header->lumps[LUMP_FACES]);
- Mod_LoadMarksurfaces (&header->lumps[LUMP_LEAFFACES]);
- Mod_LoadVisibility (&header->lumps[LUMP_VISIBILITY]);
- Mod_LoadLeafs (&header->lumps[LUMP_LEAFS]);
- Mod_LoadNodes (&header->lumps[LUMP_NODES]);
- Mod_LoadSubmodels (&header->lumps[LUMP_MODELS]);
- mod->numframes = 2; // regular and alternate animation
-
-//
-// set up the submodels
-//
- for (i=0 ; i<mod->numsubmodels ; i++)
- {
- model_t *starmod;
-
- bm = &mod->submodels[i];
- starmod = &mod_inline[i];
-
- *starmod = *loadmodel;
-
- starmod->firstmodelsurface = bm->firstface;
- starmod->nummodelsurfaces = bm->numfaces;
- starmod->firstnode = bm->headnode;
- if (starmod->firstnode >= loadmodel->numnodes)
- ri.Sys_Error (ERR_DROP, "Inline model %i has bad firstnode", i);
-
- VectorCopy (bm->maxs, starmod->maxs);
- VectorCopy (bm->mins, starmod->mins);
- starmod->radius = bm->radius;
-
- if (i == 0)
- *loadmodel = *starmod;
-
- starmod->numleafs = bm->visleafs;
- }
-}
-
-/*
-==============================================================================
-
-ALIAS MODELS
-
-==============================================================================
-*/
-
-/*
-=================
-Mod_LoadAliasModel
-=================
-*/
-void Mod_LoadAliasModel (model_t *mod, void *buffer)
-{
- int i, j;
- dmdl_t *pinmodel, *pheader;
- dstvert_t *pinst, *poutst;
- dtriangle_t *pintri, *pouttri;
- daliasframe_t *pinframe, *poutframe;
- int *pincmd, *poutcmd;
- int version;
-
- pinmodel = (dmdl_t *)buffer;
-
- version = LittleLong (pinmodel->version);
- if (version != ALIAS_VERSION)
- ri.Sys_Error (ERR_DROP, "%s has wrong version number (%i should be %i)",
- mod->name, version, ALIAS_VERSION);
-
- pheader = Hunk_Alloc (LittleLong(pinmodel->ofs_end));
-
- // byte swap the header fields and sanity check
- for (i=0 ; i<sizeof(dmdl_t)/4 ; i++)
- ((int *)pheader)[i] = LittleLong (((int *)buffer)[i]);
-
- if (pheader->skinheight > MAX_LBM_HEIGHT)
- ri.Sys_Error (ERR_DROP, "model %s has a skin taller than %d", mod->name,
- MAX_LBM_HEIGHT);
-
- if (pheader->num_xyz <= 0)
- ri.Sys_Error (ERR_DROP, "model %s has no vertices", mod->name);
-
- if (pheader->num_xyz > MAX_VERTS)
- ri.Sys_Error (ERR_DROP, "model %s has too many vertices", mod->name);
-
- if (pheader->num_st <= 0)
- ri.Sys_Error (ERR_DROP, "model %s has no st vertices", mod->name);
-
- if (pheader->num_tris <= 0)
- ri.Sys_Error (ERR_DROP, "model %s has no triangles", mod->name);
-
- if (pheader->num_frames <= 0)
- ri.Sys_Error (ERR_DROP, "model %s has no frames", mod->name);
-
-//
-// load base s and t vertices (not used in gl version)
-//
- pinst = (dstvert_t *) ((byte *)pinmodel + pheader->ofs_st);
- poutst = (dstvert_t *) ((byte *)pheader + pheader->ofs_st);
-
- for (i=0 ; i<pheader->num_st ; i++)
- {
- poutst[i].s = LittleShort (pinst[i].s);
- poutst[i].t = LittleShort (pinst[i].t);
- }
-
-//
-// load triangle lists
-//
- pintri = (dtriangle_t *) ((byte *)pinmodel + pheader->ofs_tris);
- pouttri = (dtriangle_t *) ((byte *)pheader + pheader->ofs_tris);
-
- for (i=0 ; i<pheader->num_tris ; i++)
- {
- for (j=0 ; j<3 ; j++)
- {
- pouttri[i].index_xyz[j] = LittleShort (pintri[i].index_xyz[j]);
- pouttri[i].index_st[j] = LittleShort (pintri[i].index_st[j]);
- }
- }
-
-//
-// load the frames
-//
- for (i=0 ; i<pheader->num_frames ; i++)
- {
- pinframe = (daliasframe_t *) ((byte *)pinmodel
- + pheader->ofs_frames + i * pheader->framesize);
- poutframe = (daliasframe_t *) ((byte *)pheader
- + pheader->ofs_frames + i * pheader->framesize);
-
- memcpy (poutframe->name, pinframe->name, sizeof(poutframe->name));
- for (j=0 ; j<3 ; j++)
- {
- poutframe->scale[j] = LittleFloat (pinframe->scale[j]);
- poutframe->translate[j] = LittleFloat (pinframe->translate[j]);
- }
- // verts are all 8 bit, so no swapping needed
- memcpy (poutframe->verts, pinframe->verts,
- pheader->num_xyz*sizeof(dtrivertx_t));
-
- }
-
- mod->type = mod_alias;
-
- //
- // load the glcmds
- //
- pincmd = (int *) ((byte *)pinmodel + pheader->ofs_glcmds);
- poutcmd = (int *) ((byte *)pheader + pheader->ofs_glcmds);
- for (i=0 ; i<pheader->num_glcmds ; i++)
- poutcmd[i] = LittleLong (pincmd[i]);
-
-
- // register all skins
- memcpy ((char *)pheader + pheader->ofs_skins, (char *)pinmodel + pheader->ofs_skins,
- pheader->num_skins*MAX_SKINNAME);
- for (i=0 ; i<pheader->num_skins ; i++)
- {
- mod->skins[i] = GL_FindImage ((char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME
- , it_skin);
- }
-
- mod->mins[0] = -32;
- mod->mins[1] = -32;
- mod->mins[2] = -32;
- mod->maxs[0] = 32;
- mod->maxs[1] = 32;
- mod->maxs[2] = 32;
-}
-
-/*
-==============================================================================
-
-SPRITE MODELS
-
-==============================================================================
-*/
-
-/*
-=================
-Mod_LoadSpriteModel
-=================
-*/
-void Mod_LoadSpriteModel (model_t *mod, void *buffer)
-{
- dsprite_t *sprin, *sprout;
- int i;
-
- sprin = (dsprite_t *)buffer;
- sprout = Hunk_Alloc (modfilelen);
-
- sprout->ident = LittleLong (sprin->ident);
- sprout->version = LittleLong (sprin->version);
- sprout->numframes = LittleLong (sprin->numframes);
-
- if (sprout->version != SPRITE_VERSION)
- ri.Sys_Error (ERR_DROP, "%s has wrong version number (%i should be %i)",
- mod->name, sprout->version, SPRITE_VERSION);
-
- if (sprout->numframes > MAX_MD2SKINS)
- ri.Sys_Error (ERR_DROP, "%s has too many frames (%i > %i)",
- mod->name, sprout->numframes, MAX_MD2SKINS);
-
- // byte swap everything
- for (i=0 ; i<sprout->numframes ; i++)
- {
- sprout->frames[i].width = LittleLong (sprin->frames[i].width);
- sprout->frames[i].height = LittleLong (sprin->frames[i].height);
- sprout->frames[i].origin_x = LittleLong (sprin->frames[i].origin_x);
- sprout->frames[i].origin_y = LittleLong (sprin->frames[i].origin_y);
- memcpy (sprout->frames[i].name, sprin->frames[i].name, MAX_SKINNAME);
- mod->skins[i] = GL_FindImage (sprout->frames[i].name,
- it_sprite);
- }
-
- mod->type = mod_sprite;
-}
-
-//=============================================================================
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-R_BeginRegistration
-
-Specifies the model that will be used as the world
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void R_BeginRegistration (char *model)
-{
- char fullname[MAX_QPATH];
- cvar_t *flushmap;
-
- registration_sequence++;
- r_oldviewcluster = -1; // force markleafs
-
- Com_sprintf (fullname, sizeof(fullname), "maps/%s.bsp", model);
-
- // explicitly free the old map if different
- // this guarantees that mod_known[0] is the world map
- flushmap = ri.Cvar_Get ("flushmap", "0", 0);
- if ( strcmp(mod_known[0].name, fullname) || flushmap->value)
- Mod_Free (&mod_known[0]);
- r_worldmodel = Mod_ForName(fullname, true);
-
- r_viewcluster = -1;
-}
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-R_RegisterModel
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-struct model_s *R_RegisterModel (char *name)
-{
- model_t *mod;
- int i;
- dsprite_t *sprout;
- dmdl_t *pheader;
-
- mod = Mod_ForName (name, false);
- if (mod)
- {
- mod->registration_sequence = registration_sequence;
-
- // register any images used by the models
- if (mod->type == mod_sprite)
- {
- sprout = (dsprite_t *)mod->extradata;
- for (i=0 ; i<sprout->numframes ; i++)
- mod->skins[i] = GL_FindImage (sprout->frames[i].name, it_sprite);
- }
- else if (mod->type == mod_alias)
- {
- pheader = (dmdl_t *)mod->extradata;
- for (i=0 ; i<pheader->num_skins ; i++)
- mod->skins[i] = GL_FindImage ((char *)pheader + pheader->ofs_skins + i*MAX_SKINNAME, it_skin);
-//PGM
- mod->numframes = pheader->num_frames;
-//PGM
- }
- else if (mod->type == mod_brush)
- {
- for (i=0 ; i<mod->numtexinfo ; i++)
- mod->texinfo[i].image->registration_sequence = registration_sequence;
- }
- }
- return mod;
-}
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-R_EndRegistration
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void R_EndRegistration (void)
-{
- int i;
- model_t *mod;
-
- for (i=0, mod=mod_known ; i<mod_numknown ; i++, mod++)
- {
- if (!mod->name[0])
- continue;
- if (mod->registration_sequence != registration_sequence)
- { // don't need this model
- Mod_Free (mod);
- }
- }
-
- GL_FreeUnusedImages ();
-}
-
-
-//=============================================================================
-
-
-/*
-================
-Mod_Free
-================
-*/
-void Mod_Free (model_t *mod)
-{
- Hunk_Free (mod->extradata);
- memset (mod, 0, sizeof(*mod));
-}
-
-/*
-================
-Mod_FreeAll
-================
-*/
-void Mod_FreeAll (void)
-{
- int i;
-
- for (i=0 ; i<mod_numknown ; i++)
- {
- if (mod_known[i].extradatasize)
- Mod_Free (&mod_known[i]);
- }
-}
--- a/ref_gl/gl_model.h
+++ /dev/null
@@ -1,261 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-/*
-
-d*_t structures are on-disk representations
-m*_t structures are in-memory
-
-*/
-
-/*
-==============================================================================
-
-BRUSH MODELS
-
-==============================================================================
-*/
-
-
-//
-// in memory representation
-//
-// !!! if this is changed, it must be changed in asm_draw.h too !!!
-typedef struct
-{
- vec3_t position;
-} mvertex_t;
-
-typedef struct
-{
- vec3_t mins, maxs;
- vec3_t origin; // for sounds or lights
- float radius;
- int headnode;
- int visleafs; // not including the solid leaf 0
- int firstface, numfaces;
-} mmodel_t;
-
-
-#define SIDE_FRONT 0
-#define SIDE_BACK 1
-#define SIDE_ON 2
-
-
-#define SURF_PLANEBACK 2
-#define SURF_DRAWSKY 4
-#define SURF_DRAWTURB 0x10
-#define SURF_DRAWBACKGROUND 0x40
-#define SURF_UNDERWATER 0x80
-
-// !!! if this is changed, it must be changed in asm_draw.h too !!!
-typedef struct
-{
- unsigned short v[2];
- unsigned int cachededgeoffset;
-} medge_t;
-
-typedef struct mtexinfo_s
-{
- float vecs[2][4];
- int flags;
- int numframes;
- struct mtexinfo_s *next; // animation chain
- image_t *image;
-} mtexinfo_t;
-
-#define VERTEXSIZE 7
-
-typedef struct glpoly_s
-{
- struct glpoly_s *next;
- struct glpoly_s *chain;
- int numverts;
- int flags; // for SURF_UNDERWATER (not needed anymore?)
- float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
-} glpoly_t;
-
-typedef struct msurface_s
-{
- int visframe; // should be drawn when node is crossed
-
- cplane_t *plane;
- int flags;
-
- int firstedge; // look up in model->surfedges[], negative numbers
- int numedges; // are backwards edges
-
- short texturemins[2];
- short extents[2];
-
- int light_s, light_t; // gl lightmap coordinates
- int dlight_s, dlight_t; // gl lightmap coordinates for dynamic lightmaps
-
- glpoly_t *polys; // multiple if warped
- struct msurface_s *texturechain;
- struct msurface_s *lightmapchain;
-
- mtexinfo_t *texinfo;
-
-// lighting info
- int dlightframe;
- int dlightbits;
-
- int lightmaptexturenum;
- byte styles[MAXLIGHTMAPS];
- float cached_light[MAXLIGHTMAPS]; // values currently used in lightmap
- byte *samples; // [numstyles*surfsize]
-} msurface_t;
-
-typedef struct mnode_s
-{
-// common with leaf
- int contents; // -1, to differentiate from leafs
- int visframe; // node needs to be traversed if current
-
- float minmaxs[6]; // for bounding box culling
-
- struct mnode_s *parent;
-
-// node specific
- cplane_t *plane;
- struct mnode_s *children[2];
-
- unsigned short firstsurface;
- unsigned short numsurfaces;
-} mnode_t;
-
-
-
-typedef struct mleaf_s
-{
-// common with node
- int contents; // wil be a negative contents number
- int visframe; // node needs to be traversed if current
-
- float minmaxs[6]; // for bounding box culling
-
- struct mnode_s *parent;
-
-// leaf specific
- int cluster;
- int area;
-
- msurface_t **firstmarksurface;
- int nummarksurfaces;
-} mleaf_t;
-
-
-//===================================================================
-
-//
-// Whole model
-//
-
-typedef enum {mod_bad, mod_brush, mod_sprite, mod_alias } modtype_t;
-
-typedef struct model_s
-{
- char name[MAX_QPATH];
-
- int registration_sequence;
-
- modtype_t type;
- int numframes;
-
- int flags;
-
-//
-// volume occupied by the model graphics
-//
- vec3_t mins, maxs;
- float radius;
-
-//
-// solid volume for clipping
-//
- qboolean clipbox;
- vec3_t clipmins, clipmaxs;
-
-//
-// brush model
-//
- int firstmodelsurface, nummodelsurfaces;
- int lightmap; // only for submodels
-
- int numsubmodels;
- mmodel_t *submodels;
-
- int numplanes;
- cplane_t *planes;
-
- int numleafs; // number of visible leafs, not counting 0
- mleaf_t *leafs;
-
- int numvertexes;
- mvertex_t *vertexes;
-
- int numedges;
- medge_t *edges;
-
- int numnodes;
- int firstnode;
- mnode_t *nodes;
-
- int numtexinfo;
- mtexinfo_t *texinfo;
-
- int numsurfaces;
- msurface_t *surfaces;
-
- int numsurfedges;
- int *surfedges;
-
- int nummarksurfaces;
- msurface_t **marksurfaces;
-
- dvis_t *vis;
-
- byte *lightdata;
-
- // for alias models and skins
- image_t *skins[MAX_MD2SKINS];
-
- int extradatasize;
- void *extradata;
-} model_t;
-
-//============================================================================
-
-void Mod_Init (void);
-void Mod_ClearAll (void);
-model_t *Mod_ForName (char *name, qboolean crash);
-mleaf_t *Mod_PointInLeaf (float *p, model_t *model);
-byte *Mod_ClusterPVS (int cluster, model_t *model);
-
-void Mod_Modellist_f (void);
-
-void *Hunk_Begin (int maxsize);
-void *Hunk_Alloc (int size);
-int Hunk_End (void);
-void Hunk_Free (void *base);
-
-void Mod_FreeAll (void);
-void Mod_Free (model_t *mod);
--- a/ref_gl/gl_rmain.c
+++ /dev/null
@@ -1,1692 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// r_main.c
-#include "gl_local.h"
-
-void R_Clear (void);
-
-viddef_t vid;
-
-refimport_t ri;
-
-model_t *r_worldmodel;
-
-float gldepthmin, gldepthmax;
-
-glconfig_t gl_config;
-glstate_t gl_state;
-
-image_t *r_notexture; // use for bad textures
-image_t *r_particletexture; // little dot for particles
-
-entity_t *currententity;
-model_t *currentmodel;
-
-cplane_t frustum[4];
-
-int r_visframecount; // bumped when going to a new PVS
-int r_framecount; // used for dlight push checking
-
-int c_brush_polys, c_alias_polys;
-
-float v_blend[4]; // final blending color
-
-void GL_Strings_f( void );
-
-//
-// view origin
-//
-vec3_t vup;
-vec3_t vpn;
-vec3_t vright;
-vec3_t r_origin;
-
-float r_world_matrix[16];
-float r_base_world_matrix[16];
-
-//
-// screen size info
-//
-refdef_t r_newrefdef;
-
-int r_viewcluster, r_viewcluster2, r_oldviewcluster, r_oldviewcluster2;
-
-cvar_t *r_norefresh;
-cvar_t *r_drawentities;
-cvar_t *r_drawworld;
-cvar_t *r_speeds;
-cvar_t *r_fullbright;
-cvar_t *r_novis;
-cvar_t *r_nocull;
-cvar_t *r_lerpmodels;
-cvar_t *r_lefthand;
-
-cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light level
-
-cvar_t *gl_nosubimage;
-cvar_t *gl_allow_software;
-
-cvar_t *gl_vertex_arrays;
-
-cvar_t *gl_particle_min_size;
-cvar_t *gl_particle_max_size;
-cvar_t *gl_particle_size;
-cvar_t *gl_particle_att_a;
-cvar_t *gl_particle_att_b;
-cvar_t *gl_particle_att_c;
-
-cvar_t *gl_ext_swapinterval;
-cvar_t *gl_ext_palettedtexture;
-cvar_t *gl_ext_multitexture;
-cvar_t *gl_ext_pointparameters;
-cvar_t *gl_ext_compiled_vertex_array;
-
-cvar_t *gl_log;
-cvar_t *gl_bitdepth;
-cvar_t *gl_drawbuffer;
-cvar_t *gl_driver;
-cvar_t *gl_lightmap;
-cvar_t *gl_shadows;
-cvar_t *gl_mode;
-cvar_t *gl_dynamic;
-cvar_t *gl_monolightmap;
-cvar_t *gl_modulate;
-cvar_t *gl_nobind;
-cvar_t *gl_round_down;
-cvar_t *gl_picmip;
-cvar_t *gl_skymip;
-cvar_t *gl_showtris;
-cvar_t *gl_ztrick;
-cvar_t *gl_finish;
-cvar_t *gl_clear;
-cvar_t *gl_cull;
-cvar_t *gl_polyblend;
-cvar_t *gl_flashblend;
-cvar_t *gl_playermip;
-cvar_t *gl_saturatelighting;
-cvar_t *gl_swapinterval;
-cvar_t *gl_texturemode;
-cvar_t *gl_texturealphamode;
-cvar_t *gl_texturesolidmode;
-cvar_t *gl_lockpvs;
-
-cvar_t *gl_3dlabs_broken;
-
-cvar_t *vid_fullscreen;
-cvar_t *vid_gamma;
-cvar_t *vid_ref;
-
-/*
-=================
-R_CullBox
-
-Returns true if the box is completely outside the frustom
-=================
-*/
-qboolean R_CullBox (vec3_t mins, vec3_t maxs)
-{
- int i;
-
- if (r_nocull->value)
- return false;
-
- for (i=0 ; i<4 ; i++)
- if ( BOX_ON_PLANE_SIDE(mins, maxs, &frustum[i]) == 2)
- return true;
- return false;
-}
-
-
-void R_RotateForEntity (entity_t *e)
-{
- qglTranslatef (e->origin[0], e->origin[1], e->origin[2]);
-
- qglRotatef (e->angles[1], 0, 0, 1);
- qglRotatef (-e->angles[0], 0, 1, 0);
- qglRotatef (-e->angles[2], 1, 0, 0);
-}
-
-/*
-=============================================================
-
- SPRITE MODELS
-
-=============================================================
-*/
-
-
-/*
-=================
-R_DrawSpriteModel
-
-=================
-*/
-void R_DrawSpriteModel (entity_t *e)
-{
- float alpha = 1.0F;
- vec3_t point;
- dsprframe_t *frame;
- float *up, *right;
- dsprite_t *psprite;
-
- // don't even bother culling, because it's just a single
- // polygon without a surface cache
-
- psprite = (dsprite_t *)currentmodel->extradata;
-
-#if 0
- if (e->frame < 0 || e->frame >= psprite->numframes)
- {
- ri.Con_Printf (PRINT_ALL, "no such sprite frame %i\n", e->frame);
- e->frame = 0;
- }
-#endif
- e->frame %= psprite->numframes;
-
- frame = &psprite->frames[e->frame];
-
-#if 0
- if (psprite->type == SPR_ORIENTED)
- { // bullet marks on walls
- vec3_t v_forward, v_right, v_up;
-
- AngleVectors (currententity->angles, v_forward, v_right, v_up);
- up = v_up;
- right = v_right;
- }
- else
-#endif
- { // normal sprite
- up = vup;
- right = vright;
- }
-
- if ( e->flags & RF_TRANSLUCENT )
- alpha = e->alpha;
-
- if ( alpha != 1.0F )
- qglEnable( GL_BLEND );
-
- qglColor4f( 1, 1, 1, alpha );
-
- GL_Bind(currentmodel->skins[e->frame]->texnum);
-
- GL_TexEnv( GL_MODULATE );
-
- if ( alpha == 1.0 )
- qglEnable (GL_ALPHA_TEST);
- else
- qglDisable( GL_ALPHA_TEST );
-
- qglBegin (GL_QUADS);
-
- qglTexCoord2f (0, 1);
- VectorMA (e->origin, -frame->origin_y, up, point);
- VectorMA (point, -frame->origin_x, right, point);
- qglVertex3fv (point);
-
- qglTexCoord2f (0, 0);
- VectorMA (e->origin, frame->height - frame->origin_y, up, point);
- VectorMA (point, -frame->origin_x, right, point);
- qglVertex3fv (point);
-
- qglTexCoord2f (1, 0);
- VectorMA (e->origin, frame->height - frame->origin_y, up, point);
- VectorMA (point, frame->width - frame->origin_x, right, point);
- qglVertex3fv (point);
-
- qglTexCoord2f (1, 1);
- VectorMA (e->origin, -frame->origin_y, up, point);
- VectorMA (point, frame->width - frame->origin_x, right, point);
- qglVertex3fv (point);
-
- qglEnd ();
-
- qglDisable (GL_ALPHA_TEST);
- GL_TexEnv( GL_REPLACE );
-
- if ( alpha != 1.0F )
- qglDisable( GL_BLEND );
-
- qglColor4f( 1, 1, 1, 1 );
-}
-
-//==================================================================================
-
-/*
-=============
-R_DrawNullModel
-=============
-*/
-void R_DrawNullModel (void)
-{
- vec3_t shadelight;
- int i;
-
- if ( currententity->flags & RF_FULLBRIGHT )
- shadelight[0] = shadelight[1] = shadelight[2] = 1.0F;
- else
- R_LightPoint (currententity->origin, shadelight);
-
- qglPushMatrix ();
- R_RotateForEntity (currententity);
-
- qglDisable (GL_TEXTURE_2D);
- qglColor3fv (shadelight);
-
- qglBegin (GL_TRIANGLE_FAN);
- qglVertex3f (0, 0, -16);
- for (i=0 ; i<=4 ; i++)
- qglVertex3f (16*cos(i*M_PI/2), 16*sin(i*M_PI/2), 0);
- qglEnd ();
-
- qglBegin (GL_TRIANGLE_FAN);
- qglVertex3f (0, 0, 16);
- for (i=4 ; i>=0 ; i--)
- qglVertex3f (16*cos(i*M_PI/2), 16*sin(i*M_PI/2), 0);
- qglEnd ();
-
- qglColor3f (1,1,1);
- qglPopMatrix ();
- qglEnable (GL_TEXTURE_2D);
-}
-
-/*
-=============
-R_DrawEntitiesOnList
-=============
-*/
-void R_DrawEntitiesOnList (void)
-{
- int i;
-
- if (!r_drawentities->value)
- return;
-
- // draw non-transparent first
- for (i=0 ; i<r_newrefdef.num_entities ; i++)
- {
- currententity = &r_newrefdef.entities[i];
- if (currententity->flags & RF_TRANSLUCENT)
- continue; // solid
-
- if ( currententity->flags & RF_BEAM )
- {
- R_DrawBeam( currententity );
- }
- else
- {
- currentmodel = currententity->model;
- if (!currentmodel)
- {
- R_DrawNullModel ();
- continue;
- }
- switch (currentmodel->type)
- {
- case mod_alias:
- R_DrawAliasModel (currententity);
- break;
- case mod_brush:
- R_DrawBrushModel (currententity);
- break;
- case mod_sprite:
- R_DrawSpriteModel (currententity);
- break;
- default:
- ri.Sys_Error (ERR_DROP, "Bad modeltype");
- break;
- }
- }
- }
-
- // draw transparent entities
- // we could sort these if it ever becomes a problem...
- qglDepthMask (0); // no z writes
- for (i=0 ; i<r_newrefdef.num_entities ; i++)
- {
- currententity = &r_newrefdef.entities[i];
- if (!(currententity->flags & RF_TRANSLUCENT))
- continue; // solid
-
- if ( currententity->flags & RF_BEAM )
- {
- R_DrawBeam( currententity );
- }
- else
- {
- currentmodel = currententity->model;
-
- if (!currentmodel)
- {
- R_DrawNullModel ();
- continue;
- }
- switch (currentmodel->type)
- {
- case mod_alias:
- R_DrawAliasModel (currententity);
- break;
- case mod_brush:
- R_DrawBrushModel (currententity);
- break;
- case mod_sprite:
- R_DrawSpriteModel (currententity);
- break;
- default:
- ri.Sys_Error (ERR_DROP, "Bad modeltype");
- break;
- }
- }
- }
- qglDepthMask (1); // back to writing
-
-}
-
-/*
-** GL_DrawParticles
-**
-*/
-void GL_DrawParticles( int num_particles, const particle_t particles[], const unsigned colortable[768] )
-{
- const particle_t *p;
- int i;
- vec3_t up, right;
- float scale;
- byte color[4];
-
- GL_Bind(r_particletexture->texnum);
- qglDepthMask( GL_FALSE ); // no z buffering
- qglEnable( GL_BLEND );
- GL_TexEnv( GL_MODULATE );
- qglBegin( GL_TRIANGLES );
-
- VectorScale (vup, 1.5, up);
- VectorScale (vright, 1.5, right);
-
- for ( p = particles, i=0 ; i < num_particles ; i++,p++)
- {
- // hack a scale up to keep particles from disapearing
- scale = ( p->origin[0] - r_origin[0] ) * vpn[0] +
- ( p->origin[1] - r_origin[1] ) * vpn[1] +
- ( p->origin[2] - r_origin[2] ) * vpn[2];
-
- if (scale < 20)
- scale = 1;
- else
- scale = 1 + scale * 0.004;
-
- *(int *)color = colortable[p->color];
- color[3] = p->alpha*255;
-
- qglColor4ubv( color );
-
- qglTexCoord2f( 0.0625, 0.0625 );
- qglVertex3fv( p->origin );
-
- qglTexCoord2f( 1.0625, 0.0625 );
- qglVertex3f( p->origin[0] + up[0]*scale,
- p->origin[1] + up[1]*scale,
- p->origin[2] + up[2]*scale);
-
- qglTexCoord2f( 0.0625, 1.0625 );
- qglVertex3f( p->origin[0] + right[0]*scale,
- p->origin[1] + right[1]*scale,
- p->origin[2] + right[2]*scale);
- }
-
- qglEnd ();
- qglDisable( GL_BLEND );
- qglColor4f( 1,1,1,1 );
- qglDepthMask( 1 ); // back to normal Z buffering
- GL_TexEnv( GL_REPLACE );
-}
-
-/*
-===============
-R_DrawParticles
-===============
-*/
-void R_DrawParticles (void)
-{
- if ( gl_ext_pointparameters->value && qglPointParameterfEXT )
- {
- int i;
- unsigned char color[4];
- const particle_t *p;
-
- qglDepthMask( GL_FALSE );
- qglEnable( GL_BLEND );
- qglDisable( GL_TEXTURE_2D );
-
- qglPointSize( gl_particle_size->value );
-
- qglBegin( GL_POINTS );
- for ( i = 0, p = r_newrefdef.particles; i < r_newrefdef.num_particles; i++, p++ )
- {
- *(int *)color = d_8to24table[p->color];
- color[3] = p->alpha*255;
-
- qglColor4ubv( color );
-
- qglVertex3fv( p->origin );
- }
- qglEnd();
-
- qglDisable( GL_BLEND );
- qglColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
- qglDepthMask( GL_TRUE );
- qglEnable( GL_TEXTURE_2D );
-
- }
- else
- {
- GL_DrawParticles( r_newrefdef.num_particles, r_newrefdef.particles, d_8to24table );
- }
-}
-
-/*
-============
-R_PolyBlend
-============
-*/
-void R_PolyBlend (void)
-{
- if (!gl_polyblend->value)
- return;
- if (!v_blend[3])
- return;
-
- qglDisable (GL_ALPHA_TEST);
- qglEnable (GL_BLEND);
- qglDisable (GL_DEPTH_TEST);
- qglDisable (GL_TEXTURE_2D);
-
- qglLoadIdentity ();
-
- // FIXME: get rid of these
- qglRotatef (-90, 1, 0, 0); // put Z going up
- qglRotatef (90, 0, 0, 1); // put Z going up
-
- qglColor4fv (v_blend);
-
- qglBegin (GL_QUADS);
-
- qglVertex3f (10, 100, 100);
- qglVertex3f (10, -100, 100);
- qglVertex3f (10, -100, -100);
- qglVertex3f (10, 100, -100);
- qglEnd ();
-
- qglDisable (GL_BLEND);
- qglEnable (GL_TEXTURE_2D);
- qglEnable (GL_ALPHA_TEST);
-
- qglColor4f(1,1,1,1);
-}
-
-//=======================================================================
-
-int SignbitsForPlane (cplane_t *out)
-{
- int bits, j;
-
- // for fast box on planeside test
-
- bits = 0;
- for (j=0 ; j<3 ; j++)
- {
- if (out->normal[j] < 0)
- bits |= 1<<j;
- }
- return bits;
-}
-
-
-void R_SetFrustum (void)
-{
- int i;
-
-#if 0
- /*
- ** this code is wrong, since it presume a 90 degree FOV both in the
- ** horizontal and vertical plane
- */
- // front side is visible
- VectorAdd (vpn, vright, frustum[0].normal);
- VectorSubtract (vpn, vright, frustum[1].normal);
- VectorAdd (vpn, vup, frustum[2].normal);
- VectorSubtract (vpn, vup, frustum[3].normal);
-
- // we theoretically don't need to normalize these vectors, but I do it
- // anyway so that debugging is a little easier
- VectorNormalize( frustum[0].normal );
- VectorNormalize( frustum[1].normal );
- VectorNormalize( frustum[2].normal );
- VectorNormalize( frustum[3].normal );
-#else
- // rotate VPN right by FOV_X/2 degrees
- RotatePointAroundVector( frustum[0].normal, vup, vpn, -(90-r_newrefdef.fov_x / 2 ) );
- // rotate VPN left by FOV_X/2 degrees
- RotatePointAroundVector( frustum[1].normal, vup, vpn, 90-r_newrefdef.fov_x / 2 );
- // rotate VPN up by FOV_X/2 degrees
- RotatePointAroundVector( frustum[2].normal, vright, vpn, 90-r_newrefdef.fov_y / 2 );
- // rotate VPN down by FOV_X/2 degrees
- RotatePointAroundVector( frustum[3].normal, vright, vpn, -( 90 - r_newrefdef.fov_y / 2 ) );
-#endif
-
- for (i=0 ; i<4 ; i++)
- {
- frustum[i].type = PLANE_ANYZ;
- frustum[i].dist = DotProduct (r_origin, frustum[i].normal);
- frustum[i].signbits = SignbitsForPlane (&frustum[i]);
- }
-}
-
-//=======================================================================
-
-/*
-===============
-R_SetupFrame
-===============
-*/
-void R_SetupFrame (void)
-{
- int i;
- mleaf_t *leaf;
-
- r_framecount++;
-
-// build the transformation matrix for the given view angles
- VectorCopy (r_newrefdef.vieworg, r_origin);
-
- AngleVectors (r_newrefdef.viewangles, vpn, vright, vup);
-
-// current viewcluster
- if ( !( r_newrefdef.rdflags & RDF_NOWORLDMODEL ) )
- {
- r_oldviewcluster = r_viewcluster;
- r_oldviewcluster2 = r_viewcluster2;
- leaf = Mod_PointInLeaf (r_origin, r_worldmodel);
- r_viewcluster = r_viewcluster2 = leaf->cluster;
-
- // check above and below so crossing solid water doesn't draw wrong
- if (!leaf->contents)
- { // look down a bit
- vec3_t temp;
-
- VectorCopy (r_origin, temp);
- temp[2] -= 16;
- leaf = Mod_PointInLeaf (temp, r_worldmodel);
- if ( !(leaf->contents & CONTENTS_SOLID) &&
- (leaf->cluster != r_viewcluster2) )
- r_viewcluster2 = leaf->cluster;
- }
- else
- { // look up a bit
- vec3_t temp;
-
- VectorCopy (r_origin, temp);
- temp[2] += 16;
- leaf = Mod_PointInLeaf (temp, r_worldmodel);
- if ( !(leaf->contents & CONTENTS_SOLID) &&
- (leaf->cluster != r_viewcluster2) )
- r_viewcluster2 = leaf->cluster;
- }
- }
-
- for (i=0 ; i<4 ; i++)
- v_blend[i] = r_newrefdef.blend[i];
-
- c_brush_polys = 0;
- c_alias_polys = 0;
-
- // clear out the portion of the screen that the NOWORLDMODEL defines
- if ( r_newrefdef.rdflags & RDF_NOWORLDMODEL )
- {
- qglEnable( GL_SCISSOR_TEST );
- qglClearColor( 0.3, 0.3, 0.3, 1 );
- qglScissor( r_newrefdef.x, vid.height - r_newrefdef.height - r_newrefdef.y, r_newrefdef.width, r_newrefdef.height );
- qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- qglClearColor( 1, 0, 0.5, 0.5 );
- qglDisable( GL_SCISSOR_TEST );
- }
-}
-
-
-void MYgluPerspective( GLdouble fovy, GLdouble aspect,
- GLdouble zNear, GLdouble zFar )
-{
- GLdouble xmin, xmax, ymin, ymax;
-
- ymax = zNear * tan( fovy * M_PI / 360.0 );
- ymin = -ymax;
-
- xmin = ymin * aspect;
- xmax = ymax * aspect;
-
- xmin += -( 2 * gl_state.camera_separation ) / zNear;
- xmax += -( 2 * gl_state.camera_separation ) / zNear;
-
- qglFrustum( xmin, xmax, ymin, ymax, zNear, zFar );
-}
-
-
-/*
-=============
-R_SetupGL
-=============
-*/
-void R_SetupGL (void)
-{
- float screenaspect;
-// float yfov;
- int x, x2, y2, y, w, h;
-
- //
- // set up viewport
- //
- x = floor(r_newrefdef.x * vid.width / vid.width);
- x2 = ceil((r_newrefdef.x + r_newrefdef.width) * vid.width / vid.width);
- y = floor(vid.height - r_newrefdef.y * vid.height / vid.height);
- y2 = ceil(vid.height - (r_newrefdef.y + r_newrefdef.height) * vid.height / vid.height);
-
- w = x2 - x;
- h = y - y2;
-
- qglViewport (x, y2, w, h);
-
- //
- // set up projection matrix
- //
- screenaspect = (float)r_newrefdef.width/r_newrefdef.height;
-// yfov = 2*atan((float)r_newrefdef.height/r_newrefdef.width)*180/M_PI;
- qglMatrixMode(GL_PROJECTION);
- qglLoadIdentity ();
- MYgluPerspective (r_newrefdef.fov_y, screenaspect, 4, 4096);
-
- qglCullFace(GL_FRONT);
-
- qglMatrixMode(GL_MODELVIEW);
- qglLoadIdentity ();
-
- qglRotatef (-90, 1, 0, 0); // put Z going up
- qglRotatef (90, 0, 0, 1); // put Z going up
- qglRotatef (-r_newrefdef.viewangles[2], 1, 0, 0);
- qglRotatef (-r_newrefdef.viewangles[0], 0, 1, 0);
- qglRotatef (-r_newrefdef.viewangles[1], 0, 0, 1);
- qglTranslatef (-r_newrefdef.vieworg[0], -r_newrefdef.vieworg[1], -r_newrefdef.vieworg[2]);
-
-// if ( gl_state.camera_separation != 0 && gl_state.stereo_enabled )
-// qglTranslatef ( gl_state.camera_separation, 0, 0 );
-
- qglGetFloatv (GL_MODELVIEW_MATRIX, r_world_matrix);
-
- //
- // set drawing parms
- //
- if (gl_cull->value)
- qglEnable(GL_CULL_FACE);
- else
- qglDisable(GL_CULL_FACE);
-
- qglDisable(GL_BLEND);
- qglDisable(GL_ALPHA_TEST);
- qglEnable(GL_DEPTH_TEST);
-}
-
-/*
-=============
-R_Clear
-=============
-*/
-void R_Clear (void)
-{
- if (gl_ztrick->value)
- {
- static int trickframe;
-
- if (gl_clear->value)
- qglClear (GL_COLOR_BUFFER_BIT);
-
- trickframe++;
- if (trickframe & 1)
- {
- gldepthmin = 0;
- gldepthmax = 0.49999;
- qglDepthFunc (GL_LEQUAL);
- }
- else
- {
- gldepthmin = 1;
- gldepthmax = 0.5;
- qglDepthFunc (GL_GEQUAL);
- }
- }
- else
- {
- if (gl_clear->value)
- qglClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- else
- qglClear (GL_DEPTH_BUFFER_BIT);
- gldepthmin = 0;
- gldepthmax = 1;
- qglDepthFunc (GL_LEQUAL);
- }
-
- qglDepthRange (gldepthmin, gldepthmax);
-
-}
-
-void R_Flash( void )
-{
- R_PolyBlend ();
-}
-
-/*
-================
-R_RenderView
-
-r_newrefdef must be set before the first call
-================
-*/
-void R_RenderView (refdef_t *fd)
-{
- if (r_norefresh->value)
- return;
-
- r_newrefdef = *fd;
-
- if (!r_worldmodel && !( r_newrefdef.rdflags & RDF_NOWORLDMODEL ) )
- ri.Sys_Error (ERR_DROP, "R_RenderView: NULL worldmodel");
-
- if (r_speeds->value)
- {
- c_brush_polys = 0;
- c_alias_polys = 0;
- }
-
- R_PushDlights ();
-
- if (gl_finish->value)
- qglFinish ();
-
- R_SetupFrame ();
-
- R_SetFrustum ();
-
- R_SetupGL ();
-
- R_MarkLeaves (); // done here so we know if we're in water
-
- R_DrawWorld ();
-
- R_DrawEntitiesOnList ();
-
- R_RenderDlights ();
-
- R_DrawParticles ();
-
- R_DrawAlphaSurfaces ();
-
- R_Flash();
-
- if (r_speeds->value)
- {
- ri.Con_Printf (PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n",
- c_brush_polys,
- c_alias_polys,
- c_visible_textures,
- c_visible_lightmaps);
- }
-}
-
-
-void R_SetGL2D (void)
-{
- // set 2D virtual screen size
- qglViewport (0,0, vid.width, vid.height);
- qglMatrixMode(GL_PROJECTION);
- qglLoadIdentity ();
- qglOrtho (0, vid.width, vid.height, 0, -99999, 99999);
- qglMatrixMode(GL_MODELVIEW);
- qglLoadIdentity ();
- qglDisable (GL_DEPTH_TEST);
- qglDisable (GL_CULL_FACE);
- qglDisable (GL_BLEND);
- qglEnable (GL_ALPHA_TEST);
- qglColor4f (1,1,1,1);
-}
-
-static void GL_DrawColoredStereoLinePair( float r, float g, float b, float y )
-{
- qglColor3f( r, g, b );
- qglVertex2f( 0, y );
- qglVertex2f( vid.width, y );
- qglColor3f( 0, 0, 0 );
- qglVertex2f( 0, y + 1 );
- qglVertex2f( vid.width, y + 1 );
-}
-
-static void GL_DrawStereoPattern( void )
-{
- int i;
-
- if ( !( gl_config.renderer & GL_RENDERER_INTERGRAPH ) )
- return;
-
- if ( !gl_state.stereo_enabled )
- return;
-
- R_SetGL2D();
-
- qglDrawBuffer( GL_BACK_LEFT );
-
- for ( i = 0; i < 20; i++ )
- {
- qglBegin( GL_LINES );
- GL_DrawColoredStereoLinePair( 1, 0, 0, 0 );
- GL_DrawColoredStereoLinePair( 1, 0, 0, 2 );
- GL_DrawColoredStereoLinePair( 1, 0, 0, 4 );
- GL_DrawColoredStereoLinePair( 1, 0, 0, 6 );
- GL_DrawColoredStereoLinePair( 0, 1, 0, 8 );
- GL_DrawColoredStereoLinePair( 1, 1, 0, 10);
- GL_DrawColoredStereoLinePair( 1, 1, 0, 12);
- GL_DrawColoredStereoLinePair( 0, 1, 0, 14);
- qglEnd();
-
- GLimp_EndFrame();
- }
-}
-
-
-/*
-====================
-R_SetLightLevel
-
-====================
-*/
-void R_SetLightLevel (void)
-{
- vec3_t shadelight;
-
- if (r_newrefdef.rdflags & RDF_NOWORLDMODEL)
- return;
-
- // save off light value for server to look at (BIG HACK!)
-
- R_LightPoint (r_newrefdef.vieworg, shadelight);
-
- // pick the greatest component, which should be the same
- // as the mono value returned by software
- if (shadelight[0] > shadelight[1])
- {
- if (shadelight[0] > shadelight[2])
- r_lightlevel->value = 150*shadelight[0];
- else
- r_lightlevel->value = 150*shadelight[2];
- }
- else
- {
- if (shadelight[1] > shadelight[2])
- r_lightlevel->value = 150*shadelight[1];
- else
- r_lightlevel->value = 150*shadelight[2];
- }
-
-}
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-R_RenderFrame
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void R_RenderFrame (refdef_t *fd)
-{
- R_RenderView( fd );
- R_SetLightLevel ();
- R_SetGL2D ();
-}
-
-
-void R_Register( void )
-{
- r_lefthand = ri.Cvar_Get( "hand", "0", CVAR_USERINFO | CVAR_ARCHIVE );
- r_norefresh = ri.Cvar_Get ("r_norefresh", "0", 0);
- r_fullbright = ri.Cvar_Get ("r_fullbright", "0", 0);
- r_drawentities = ri.Cvar_Get ("r_drawentities", "1", 0);
- r_drawworld = ri.Cvar_Get ("r_drawworld", "1", 0);
- r_novis = ri.Cvar_Get ("r_novis", "0", 0);
- r_nocull = ri.Cvar_Get ("r_nocull", "0", 0);
- r_lerpmodels = ri.Cvar_Get ("r_lerpmodels", "1", 0);
- r_speeds = ri.Cvar_Get ("r_speeds", "0", 0);
-
- r_lightlevel = ri.Cvar_Get ("r_lightlevel", "0", 0);
-
- gl_nosubimage = ri.Cvar_Get( "gl_nosubimage", "0", 0 );
- gl_allow_software = ri.Cvar_Get( "gl_allow_software", "0", 0 );
-
- gl_particle_min_size = ri.Cvar_Get( "gl_particle_min_size", "2", CVAR_ARCHIVE );
- gl_particle_max_size = ri.Cvar_Get( "gl_particle_max_size", "40", CVAR_ARCHIVE );
- gl_particle_size = ri.Cvar_Get( "gl_particle_size", "40", CVAR_ARCHIVE );
- gl_particle_att_a = ri.Cvar_Get( "gl_particle_att_a", "0.01", CVAR_ARCHIVE );
- gl_particle_att_b = ri.Cvar_Get( "gl_particle_att_b", "0.0", CVAR_ARCHIVE );
- gl_particle_att_c = ri.Cvar_Get( "gl_particle_att_c", "0.01", CVAR_ARCHIVE );
-
- gl_modulate = ri.Cvar_Get ("gl_modulate", "1", CVAR_ARCHIVE );
- gl_log = ri.Cvar_Get( "gl_log", "0", 0 );
- gl_bitdepth = ri.Cvar_Get( "gl_bitdepth", "0", 0 );
- gl_mode = ri.Cvar_Get( "gl_mode", "3", CVAR_ARCHIVE );
- gl_lightmap = ri.Cvar_Get ("gl_lightmap", "0", 0);
- gl_shadows = ri.Cvar_Get ("gl_shadows", "0", CVAR_ARCHIVE );
- gl_dynamic = ri.Cvar_Get ("gl_dynamic", "1", 0);
- gl_nobind = ri.Cvar_Get ("gl_nobind", "0", 0);
- gl_round_down = ri.Cvar_Get ("gl_round_down", "1", 0);
- gl_picmip = ri.Cvar_Get ("gl_picmip", "0", 0);
- gl_skymip = ri.Cvar_Get ("gl_skymip", "0", 0);
- gl_showtris = ri.Cvar_Get ("gl_showtris", "0", 0);
- gl_ztrick = ri.Cvar_Get ("gl_ztrick", "0", 0);
- gl_finish = ri.Cvar_Get ("gl_finish", "0", CVAR_ARCHIVE);
- gl_clear = ri.Cvar_Get ("gl_clear", "0", 0);
- gl_cull = ri.Cvar_Get ("gl_cull", "1", 0);
- gl_polyblend = ri.Cvar_Get ("gl_polyblend", "1", 0);
- gl_flashblend = ri.Cvar_Get ("gl_flashblend", "0", 0);
- gl_playermip = ri.Cvar_Get ("gl_playermip", "0", 0);
- gl_monolightmap = ri.Cvar_Get( "gl_monolightmap", "0", 0 );
- gl_driver = ri.Cvar_Get( "gl_driver", "opengl32", CVAR_ARCHIVE );
- gl_texturemode = ri.Cvar_Get( "gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", CVAR_ARCHIVE );
- gl_texturealphamode = ri.Cvar_Get( "gl_texturealphamode", "default", CVAR_ARCHIVE );
- gl_texturesolidmode = ri.Cvar_Get( "gl_texturesolidmode", "default", CVAR_ARCHIVE );
- gl_lockpvs = ri.Cvar_Get( "gl_lockpvs", "0", 0 );
-
- gl_vertex_arrays = ri.Cvar_Get( "gl_vertex_arrays", "0", CVAR_ARCHIVE );
-
- gl_ext_swapinterval = ri.Cvar_Get( "gl_ext_swapinterval", "1", CVAR_ARCHIVE );
- gl_ext_palettedtexture = ri.Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE );
- gl_ext_multitexture = ri.Cvar_Get( "gl_ext_multitexture", "1", CVAR_ARCHIVE );
- gl_ext_pointparameters = ri.Cvar_Get( "gl_ext_pointparameters", "1", CVAR_ARCHIVE );
- gl_ext_compiled_vertex_array = ri.Cvar_Get( "gl_ext_compiled_vertex_array", "1", CVAR_ARCHIVE );
-
- gl_drawbuffer = ri.Cvar_Get( "gl_drawbuffer", "GL_BACK", 0 );
- gl_swapinterval = ri.Cvar_Get( "gl_swapinterval", "1", CVAR_ARCHIVE );
-
- gl_saturatelighting = ri.Cvar_Get( "gl_saturatelighting", "0", 0 );
-
- gl_3dlabs_broken = ri.Cvar_Get( "gl_3dlabs_broken", "1", CVAR_ARCHIVE );
-
- vid_fullscreen = ri.Cvar_Get( "vid_fullscreen", "0", CVAR_ARCHIVE );
- vid_gamma = ri.Cvar_Get( "vid_gamma", "1.0", CVAR_ARCHIVE );
- vid_ref = ri.Cvar_Get( "vid_ref", "soft", CVAR_ARCHIVE );
-
- ri.Cmd_AddCommand( "imagelist", GL_ImageList_f );
- ri.Cmd_AddCommand( "screenshot", GL_ScreenShot_f );
- ri.Cmd_AddCommand( "modellist", Mod_Modellist_f );
- ri.Cmd_AddCommand( "gl_strings", GL_Strings_f );
-}
-
-/*
-==================
-R_SetMode
-==================
-*/
-qboolean R_SetMode (void)
-{
- rserr_t err;
- qboolean fullscreen;
-
- if ( vid_fullscreen->modified && !gl_config.allow_cds )
- {
- ri.Con_Printf( PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n" );
- ri.Cvar_SetValue( "vid_fullscreen", !vid_fullscreen->value );
- vid_fullscreen->modified = false;
- }
-
- fullscreen = vid_fullscreen->value;
-
- vid_fullscreen->modified = false;
- gl_mode->modified = false;
-
- if ( ( err = GLimp_SetMode( &vid.width, &vid.height, gl_mode->value, fullscreen ) ) == rserr_ok )
- {
- gl_state.prev_mode = gl_mode->value;
- }
- else
- {
- if ( err == rserr_invalid_fullscreen )
- {
- ri.Cvar_SetValue( "vid_fullscreen", 0);
- vid_fullscreen->modified = false;
- ri.Con_Printf( PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n" );
- if ( ( err = GLimp_SetMode( &vid.width, &vid.height, gl_mode->value, false ) ) == rserr_ok )
- return true;
- }
- else if ( err == rserr_invalid_mode )
- {
- ri.Cvar_SetValue( "gl_mode", gl_state.prev_mode );
- gl_mode->modified = false;
- ri.Con_Printf( PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n" );
- }
-
- // try setting it back to something safe
- if ( ( err = GLimp_SetMode( &vid.width, &vid.height, gl_state.prev_mode, false ) ) != rserr_ok )
- {
- ri.Con_Printf( PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n" );
- return false;
- }
- }
- return true;
-}
-
-/*
-===============
-R_Init
-===============
-*/
-int R_Init( void *hinstance, void *hWnd )
-{
- char renderer_buffer[1000];
- char vendor_buffer[1000];
- int err;
- int j;
- extern float r_turbsin[256];
-
- for ( j = 0; j < 256; j++ )
- {
- r_turbsin[j] *= 0.5;
- }
-
- ri.Con_Printf (PRINT_ALL, "ref_gl version: "REF_VERSION"\n");
-
- Draw_GetPalette ();
-
- R_Register();
-
- // initialize our QGL dynamic bindings
- if ( !QGL_Init( gl_driver->string ) )
- {
- QGL_Shutdown();
- ri.Con_Printf (PRINT_ALL, "ref_gl::R_Init() - could not load \"%s\"\n", gl_driver->string );
- return -1;
- }
-
- // initialize OS-specific parts of OpenGL
- if ( !GLimp_Init( hinstance, hWnd ) )
- {
- QGL_Shutdown();
- return -1;
- }
-
- // set our "safe" modes
- gl_state.prev_mode = 3;
-
- // create the window and set up the context
- if ( !R_SetMode () )
- {
- QGL_Shutdown();
- ri.Con_Printf (PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n" );
- return -1;
- }
-
- ri.Vid_MenuInit();
-
- /*
- ** get our various GL strings
- */
- gl_config.vendor_string = qglGetString (GL_VENDOR);
- ri.Con_Printf (PRINT_ALL, "GL_VENDOR: %s\n", gl_config.vendor_string );
- gl_config.renderer_string = qglGetString (GL_RENDERER);
- ri.Con_Printf (PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string );
- gl_config.version_string = qglGetString (GL_VERSION);
- ri.Con_Printf (PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string );
- gl_config.extensions_string = qglGetString (GL_EXTENSIONS);
- ri.Con_Printf (PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string );
-
- strcpy( renderer_buffer, gl_config.renderer_string );
- strlwr( renderer_buffer );
-
- strcpy( vendor_buffer, gl_config.vendor_string );
- strlwr( vendor_buffer );
-
- if ( strstr( renderer_buffer, "voodoo" ) )
- {
- if ( !strstr( renderer_buffer, "rush" ) )
- gl_config.renderer = GL_RENDERER_VOODOO;
- else
- gl_config.renderer = GL_RENDERER_VOODOO_RUSH;
- }
- else if ( strstr( vendor_buffer, "sgi" ) )
- gl_config.renderer = GL_RENDERER_SGI;
- else if ( strstr( renderer_buffer, "permedia" ) )
- gl_config.renderer = GL_RENDERER_PERMEDIA2;
- else if ( strstr( renderer_buffer, "glint" ) )
- gl_config.renderer = GL_RENDERER_GLINT_MX;
- else if ( strstr( renderer_buffer, "glzicd" ) )
- gl_config.renderer = GL_RENDERER_REALIZM;
- else if ( strstr( renderer_buffer, "gdi" ) )
- gl_config.renderer = GL_RENDERER_MCD;
- else if ( strstr( renderer_buffer, "pcx2" ) )
- gl_config.renderer = GL_RENDERER_PCX2;
- else if ( strstr( renderer_buffer, "verite" ) )
- gl_config.renderer = GL_RENDERER_RENDITION;
- else
- gl_config.renderer = GL_RENDERER_OTHER;
-
- if ( toupper( gl_monolightmap->string[1] ) != 'F' )
- {
- if ( gl_config.renderer == GL_RENDERER_PERMEDIA2 )
- {
- ri.Cvar_Set( "gl_monolightmap", "A" );
- ri.Con_Printf( PRINT_ALL, "...using gl_monolightmap 'a'\n" );
- }
- else if ( gl_config.renderer & GL_RENDERER_POWERVR )
- {
- ri.Cvar_Set( "gl_monolightmap", "0" );
- }
- else
- {
- ri.Cvar_Set( "gl_monolightmap", "0" );
- }
- }
-
- // power vr can't have anything stay in the framebuffer, so
- // the screen needs to redraw the tiled background every frame
- if ( gl_config.renderer & GL_RENDERER_POWERVR )
- {
- ri.Cvar_Set( "scr_drawall", "1" );
- }
- else
- {
- ri.Cvar_Set( "scr_drawall", "0" );
- }
-
- // MCD has buffering issues
- if ( gl_config.renderer == GL_RENDERER_MCD )
- {
- ri.Cvar_SetValue( "gl_finish", 1 );
- }
-
- if ( gl_config.renderer & GL_RENDERER_3DLABS )
- {
- if ( gl_3dlabs_broken->value )
- gl_config.allow_cds = false;
- else
- gl_config.allow_cds = true;
- }
- else
- {
- gl_config.allow_cds = true;
- }
-
- if ( gl_config.allow_cds )
- ri.Con_Printf( PRINT_ALL, "...allowing CDS\n" );
- else
- ri.Con_Printf( PRINT_ALL, "...disabling CDS\n" );
-
- /*
- ** grab extensions
- */
-#ifdef WIN32
- if ( strstr( gl_config.extensions_string, "GL_EXT_compiled_vertex_array" ) ||
- strstr( gl_config.extensions_string, "GL_SGI_compiled_vertex_array" ) )
- {
- ri.Con_Printf( PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n" );
- qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" );
- qglUnlockArraysEXT = ( void * ) qwglGetProcAddress( "glUnlockArraysEXT" );
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" );
- }
-
- if ( strstr( gl_config.extensions_string, "WGL_EXT_swap_control" ) )
- {
- qwglSwapIntervalEXT = ( BOOL (WINAPI *)(int)) qwglGetProcAddress( "wglSwapIntervalEXT" );
- ri.Con_Printf( PRINT_ALL, "...enabling WGL_EXT_swap_control\n" );
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...WGL_EXT_swap_control not found\n" );
- }
-
- if ( strstr( gl_config.extensions_string, "GL_EXT_point_parameters" ) )
- {
- if ( gl_ext_pointparameters->value )
- {
- qglPointParameterfEXT = ( void (APIENTRY *)( GLenum, GLfloat ) ) qwglGetProcAddress( "glPointParameterfEXT" );
- qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" );
- ri.Con_Printf( PRINT_ALL, "...using GL_EXT_point_parameters\n" );
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...ignoring GL_EXT_point_parameters\n" );
- }
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...GL_EXT_point_parameters not found\n" );
- }
-
- if ( strstr( gl_config.extensions_string, "GL_EXT_paletted_texture" ) &&
- strstr( gl_config.extensions_string, "GL_EXT_shared_texture_palette" ) )
- {
- if ( gl_ext_palettedtexture->value )
- {
- ri.Con_Printf( PRINT_ALL, "...using GL_EXT_shared_texture_palette\n" );
- qglColorTableEXT = ( void ( APIENTRY * ) ( int, int, int, int, int, const void * ) ) qwglGetProcAddress( "glColorTableEXT" );
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n" );
- }
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n" );
- }
-
- if ( strstr( gl_config.extensions_string, "GL_SGIS_multitexture" ) )
- {
- if ( gl_ext_multitexture->value )
- {
- ri.Con_Printf( PRINT_ALL, "...using GL_SGIS_multitexture\n" );
- qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" );
- qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" );
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...ignoring GL_SGIS_multitexture\n" );
- }
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...GL_SGIS_multitexture not found\n" );
- }
-#endif
-
- GL_SetDefaultState();
-
- /*
- ** draw our stereo patterns
- */
-#if 0 // commented out until H3D pays us the money they owe us
- GL_DrawStereoPattern();
-#endif
-
- GL_InitImages ();
- Mod_Init ();
- R_InitParticleTexture ();
- Draw_InitLocal ();
-
- err = qglGetError();
- if ( err != GL_NO_ERROR )
- ri.Con_Printf (PRINT_ALL, "glGetError() = 0x%x\n", err);
-}
-
-/*
-===============
-R_Shutdown
-===============
-*/
-void R_Shutdown (void)
-{
- ri.Cmd_RemoveCommand ("modellist");
- ri.Cmd_RemoveCommand ("screenshot");
- ri.Cmd_RemoveCommand ("imagelist");
- ri.Cmd_RemoveCommand ("gl_strings");
-
- Mod_FreeAll ();
-
- GL_ShutdownImages ();
-
- /*
- ** shut down OS specific OpenGL stuff like contexts, etc.
- */
- GLimp_Shutdown();
-
- /*
- ** shutdown our QGL subsystem
- */
- QGL_Shutdown();
-}
-
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-R_BeginFrame
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void R_BeginFrame( float camera_separation )
-{
-
- gl_state.camera_separation = camera_separation;
-
- /*
- ** change modes if necessary
- */
- if ( gl_mode->modified || vid_fullscreen->modified )
- { // FIXME: only restart if CDS is required
- cvar_t *ref;
-
- ref = ri.Cvar_Get ("vid_ref", "gl", 0);
- ref->modified = true;
- }
-
- if ( gl_log->modified )
- {
- GLimp_EnableLogging( gl_log->value );
- gl_log->modified = false;
- }
-
- if ( gl_log->value )
- {
- GLimp_LogNewFrame();
- }
-
- /*
- ** update 3Dfx gamma -- it is expected that a user will do a vid_restart
- ** after tweaking this value
- */
- if ( vid_gamma->modified )
- {
- vid_gamma->modified = false;
-
- if ( gl_config.renderer & ( GL_RENDERER_VOODOO ) )
- {
- char envbuffer[1024];
- float g;
-
- g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
- Com_sprintf( envbuffer, sizeof(envbuffer), "SSTV2_GAMMA=%f", g );
- putenv( envbuffer );
- Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
- putenv( envbuffer );
- }
- }
-
- GLimp_BeginFrame( camera_separation );
-
- /*
- ** go into 2D mode
- */
- qglViewport (0,0, vid.width, vid.height);
- qglMatrixMode(GL_PROJECTION);
- qglLoadIdentity ();
- qglOrtho (0, vid.width, vid.height, 0, -99999, 99999);
- qglMatrixMode(GL_MODELVIEW);
- qglLoadIdentity ();
- qglDisable (GL_DEPTH_TEST);
- qglDisable (GL_CULL_FACE);
- qglDisable (GL_BLEND);
- qglEnable (GL_ALPHA_TEST);
- qglColor4f (1,1,1,1);
-
- /*
- ** draw buffer stuff
- */
- if ( gl_drawbuffer->modified )
- {
- gl_drawbuffer->modified = false;
-
- if ( gl_state.camera_separation == 0 || !gl_state.stereo_enabled )
- {
- if ( Q_stricmp( gl_drawbuffer->string, "GL_FRONT" ) == 0 )
- qglDrawBuffer( GL_FRONT );
- else
- qglDrawBuffer( GL_BACK );
- }
- }
-
- /*
- ** texturemode stuff
- */
- if ( gl_texturemode->modified )
- {
- GL_TextureMode( gl_texturemode->string );
- gl_texturemode->modified = false;
- }
-
- if ( gl_texturealphamode->modified )
- {
- GL_TextureAlphaMode( gl_texturealphamode->string );
- gl_texturealphamode->modified = false;
- }
-
- if ( gl_texturesolidmode->modified )
- {
- GL_TextureSolidMode( gl_texturesolidmode->string );
- gl_texturesolidmode->modified = false;
- }
-
- /*
- ** swapinterval stuff
- */
- GL_UpdateSwapInterval();
-
- //
- // clear screen if desired
- //
- R_Clear ();
-}
-
-/*
-=============
-R_SetPalette
-=============
-*/
-unsigned r_rawpalette[256];
-
-void R_SetPalette ( const unsigned char *palette)
-{
- int i;
-
- byte *rp = ( byte * ) r_rawpalette;
-
- if ( palette )
- {
- for ( i = 0; i < 256; i++ )
- {
- rp[i*4+0] = palette[i*3+0];
- rp[i*4+1] = palette[i*3+1];
- rp[i*4+2] = palette[i*3+2];
- rp[i*4+3] = 0xff;
- }
- }
- else
- {
- for ( i = 0; i < 256; i++ )
- {
- rp[i*4+0] = d_8to24table[i] & 0xff;
- rp[i*4+1] = ( d_8to24table[i] >> 8 ) & 0xff;
- rp[i*4+2] = ( d_8to24table[i] >> 16 ) & 0xff;
- rp[i*4+3] = 0xff;
- }
- }
- GL_SetTexturePalette( r_rawpalette );
-
- qglClearColor (0,0,0,0);
- qglClear (GL_COLOR_BUFFER_BIT);
- qglClearColor (1,0, 0.5 , 0.5);
-}
-
-/*
-** R_DrawBeam
-*/
-void R_DrawBeam( entity_t *e )
-{
-#define NUM_BEAM_SEGS 6
-
- int i;
- float r, g, b;
-
- vec3_t perpvec;
- vec3_t direction, normalized_direction;
- vec3_t start_points[NUM_BEAM_SEGS], end_points[NUM_BEAM_SEGS];
- vec3_t oldorigin, origin;
-
- oldorigin[0] = e->oldorigin[0];
- oldorigin[1] = e->oldorigin[1];
- oldorigin[2] = e->oldorigin[2];
-
- origin[0] = e->origin[0];
- origin[1] = e->origin[1];
- origin[2] = e->origin[2];
-
- normalized_direction[0] = direction[0] = oldorigin[0] - origin[0];
- normalized_direction[1] = direction[1] = oldorigin[1] - origin[1];
- normalized_direction[2] = direction[2] = oldorigin[2] - origin[2];
-
- if ( VectorNormalize( normalized_direction ) == 0 )
- return;
-
- PerpendicularVector( perpvec, normalized_direction );
- VectorScale( perpvec, e->frame / 2, perpvec );
-
- for ( i = 0; i < 6; i++ )
- {
- RotatePointAroundVector( start_points[i], normalized_direction, perpvec, (360.0/NUM_BEAM_SEGS)*i );
- VectorAdd( start_points[i], origin, start_points[i] );
- VectorAdd( start_points[i], direction, end_points[i] );
- }
-
- qglDisable( GL_TEXTURE_2D );
- qglEnable( GL_BLEND );
- qglDepthMask( GL_FALSE );
-
- r = ( d_8to24table[e->skinnum & 0xFF] ) & 0xFF;
- g = ( d_8to24table[e->skinnum & 0xFF] >> 8 ) & 0xFF;
- b = ( d_8to24table[e->skinnum & 0xFF] >> 16 ) & 0xFF;
-
- r *= 1/255.0F;
- g *= 1/255.0F;
- b *= 1/255.0F;
-
- qglColor4f( r, g, b, e->alpha );
-
- qglBegin( GL_TRIANGLE_STRIP );
- for ( i = 0; i < NUM_BEAM_SEGS; i++ )
- {
- qglVertex3fv( start_points[i] );
- qglVertex3fv( end_points[i] );
- qglVertex3fv( start_points[(i+1)%NUM_BEAM_SEGS] );
- qglVertex3fv( end_points[(i+1)%NUM_BEAM_SEGS] );
- }
- qglEnd();
-
- qglEnable( GL_TEXTURE_2D );
- qglDisable( GL_BLEND );
- qglDepthMask( GL_TRUE );
-}
-
-//===================================================================
-
-
-void R_BeginRegistration (char *map);
-struct model_s *R_RegisterModel (char *name);
-struct image_s *R_RegisterSkin (char *name);
-void R_SetSky (char *name, float rotate, vec3_t axis);
-void R_EndRegistration (void);
-
-void R_RenderFrame (refdef_t *fd);
-
-struct image_s *Draw_FindPic (char *name);
-
-void Draw_Pic (int x, int y, char *name);
-void Draw_Char (int x, int y, int c);
-void Draw_TileClear (int x, int y, int w, int h, char *name);
-void Draw_Fill (int x, int y, int w, int h, int c);
-void Draw_FadeScreen (void);
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-GetRefAPI
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-refexport_t GetRefAPI (refimport_t rimp )
-{
- refexport_t re;
-
- ri = rimp;
-
- re.api_version = API_VERSION;
-
- re.BeginRegistration = R_BeginRegistration;
- re.RegisterModel = R_RegisterModel;
- re.RegisterSkin = R_RegisterSkin;
- re.RegisterPic = Draw_FindPic;
- re.SetSky = R_SetSky;
- re.EndRegistration = R_EndRegistration;
-
- re.RenderFrame = R_RenderFrame;
-
- re.DrawGetPicSize = Draw_GetPicSize;
- re.DrawPic = Draw_Pic;
- re.DrawStretchPic = Draw_StretchPic;
- re.DrawChar = Draw_Char;
- re.DrawTileClear = Draw_TileClear;
- re.DrawFill = Draw_Fill;
- re.DrawFadeScreen= Draw_FadeScreen;
-
- re.DrawStretchRaw = Draw_StretchRaw;
-
- re.Init = R_Init;
- re.Shutdown = R_Shutdown;
-
- re.CinematicSetPalette = R_SetPalette;
- re.BeginFrame = R_BeginFrame;
- re.EndFrame = GLimp_EndFrame;
-
- re.AppActivate = GLimp_AppActivate;
-
- Swap_Init ();
-
- return re;
-}
-
-
-#ifndef REF_HARD_LINKED
-// this is only here so the functions in q_shared.c and q_shwin.c can link
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
- char text[1024];
-
- va_start (argptr, error);
- vsprintf (text, error, argptr);
- va_end (argptr);
-
- ri.Sys_Error (ERR_FATAL, "%s", text);
-}
-
-void Com_Printf (char *fmt, ...)
-{
- va_list argptr;
- char text[1024];
-
- va_start (argptr, fmt);
- vsprintf (text, fmt, argptr);
- va_end (argptr);
-
- ri.Con_Printf (PRINT_ALL, "%s", text);
-}
-
-#endif
--- a/ref_gl/gl_rmisc.c
+++ /dev/null
@@ -1,246 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// r_misc.c
-
-#include "gl_local.h"
-
-/*
-==================
-R_InitParticleTexture
-==================
-*/
-byte dottexture[8][8] =
-{
- {0,0,0,0,0,0,0,0},
- {0,0,1,1,0,0,0,0},
- {0,1,1,1,1,0,0,0},
- {0,1,1,1,1,0,0,0},
- {0,0,1,1,0,0,0,0},
- {0,0,0,0,0,0,0,0},
- {0,0,0,0,0,0,0,0},
- {0,0,0,0,0,0,0,0},
-};
-
-void R_InitParticleTexture (void)
-{
- int x,y;
- byte data[8][8][4];
-
- //
- // particle texture
- //
- for (x=0 ; x<8 ; x++)
- {
- for (y=0 ; y<8 ; y++)
- {
- data[y][x][0] = 255;
- data[y][x][1] = 255;
- data[y][x][2] = 255;
- data[y][x][3] = dottexture[x][y]*255;
- }
- }
- r_particletexture = GL_LoadPic ("***particle***", (byte *)data, 8, 8, it_sprite, 32);
-
- //
- // also use this for bad textures, but without alpha
- //
- for (x=0 ; x<8 ; x++)
- {
- for (y=0 ; y<8 ; y++)
- {
- data[y][x][0] = dottexture[x&3][y&3]*255;
- data[y][x][1] = 0; // dottexture[x&3][y&3]*255;
- data[y][x][2] = 0; //dottexture[x&3][y&3]*255;
- data[y][x][3] = 255;
- }
- }
- r_notexture = GL_LoadPic ("***r_notexture***", (byte *)data, 8, 8, it_wall, 32);
-}
-
-
-/*
-==============================================================================
-
- SCREEN SHOTS
-
-==============================================================================
-*/
-
-typedef struct _TargaHeader {
- unsigned char id_length, colormap_type, image_type;
- unsigned short colormap_index, colormap_length;
- unsigned char colormap_size;
- unsigned short x_origin, y_origin, width, height;
- unsigned char pixel_size, attributes;
-} TargaHeader;
-
-
-/*
-==================
-GL_ScreenShot_f
-==================
-*/
-void GL_ScreenShot_f (void)
-{
- byte *buffer;
- char picname[80];
- char checkname[MAX_OSPATH];
- int i, c, temp;
- FILE *f;
-
- // create the scrnshots directory if it doesn't exist
- Com_sprintf (checkname, sizeof(checkname), "%s/scrnshot", ri.FS_Gamedir());
- Sys_Mkdir (checkname);
-
-//
-// find a file name to save it to
-//
- strcpy(picname,"quake00.tga");
-
- for (i=0 ; i<=99 ; i++)
- {
- picname[5] = i/10 + '0';
- picname[6] = i%10 + '0';
- Com_sprintf (checkname, sizeof(checkname), "%s/scrnshot/%s", ri.FS_Gamedir(), picname);
- f = fopen (checkname, "rb");
- if (!f)
- break; // file doesn't exist
- fclose (f);
- }
- if (i==100)
- {
- ri.Con_Printf (PRINT_ALL, "SCR_ScreenShot_f: Couldn't create a file\n");
- return;
- }
-
-
- buffer = malloc(vid.width*vid.height*3 + 18);
- memset (buffer, 0, 18);
- buffer[2] = 2; // uncompressed type
- buffer[12] = vid.width&255;
- buffer[13] = vid.width>>8;
- buffer[14] = vid.height&255;
- buffer[15] = vid.height>>8;
- buffer[16] = 24; // pixel size
-
- qglReadPixels (0, 0, vid.width, vid.height, GL_RGB, GL_UNSIGNED_BYTE, buffer+18 );
-
- // swap rgb to bgr
- c = 18+vid.width*vid.height*3;
- for (i=18 ; i<c ; i+=3)
- {
- temp = buffer[i];
- buffer[i] = buffer[i+2];
- buffer[i+2] = temp;
- }
-
- f = fopen (checkname, "wb");
- fwrite (buffer, 1, c, f);
- fclose (f);
-
- free (buffer);
- ri.Con_Printf (PRINT_ALL, "Wrote %s\n", picname);
-}
-
-/*
-** GL_Strings_f
-*/
-void GL_Strings_f( void )
-{
- ri.Con_Printf (PRINT_ALL, "GL_VENDOR: %s\n", gl_config.vendor_string );
- ri.Con_Printf (PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string );
- ri.Con_Printf (PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string );
- ri.Con_Printf (PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string );
-}
-
-/*
-** GL_SetDefaultState
-*/
-void GL_SetDefaultState( void )
-{
- qglClearColor (1,0, 0.5 , 0.5);
- qglCullFace(GL_FRONT);
- qglEnable(GL_TEXTURE_2D);
-
- qglEnable(GL_ALPHA_TEST);
- qglAlphaFunc(GL_GREATER, 0.666);
-
- qglDisable (GL_DEPTH_TEST);
- qglDisable (GL_CULL_FACE);
- qglDisable (GL_BLEND);
-
- qglColor4f (1,1,1,1);
-
- qglPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
- qglShadeModel (GL_FLAT);
-
- GL_TextureMode( gl_texturemode->string );
- GL_TextureAlphaMode( gl_texturealphamode->string );
- GL_TextureSolidMode( gl_texturesolidmode->string );
-
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
-
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-
- qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
- GL_TexEnv( GL_REPLACE );
-
- if ( qglPointParameterfEXT )
- {
- float attenuations[3];
-
- attenuations[0] = gl_particle_att_a->value;
- attenuations[1] = gl_particle_att_b->value;
- attenuations[2] = gl_particle_att_c->value;
-
- qglEnable( GL_POINT_SMOOTH );
- qglPointParameterfEXT( GL_POINT_SIZE_MIN_EXT, gl_particle_min_size->value );
- qglPointParameterfEXT( GL_POINT_SIZE_MAX_EXT, gl_particle_max_size->value );
- qglPointParameterfvEXT( GL_DISTANCE_ATTENUATION_EXT, attenuations );
- }
-
- if ( qglColorTableEXT && gl_ext_palettedtexture->value )
- {
- qglEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
-
- GL_SetTexturePalette( d_8to24table );
- }
-
- GL_UpdateSwapInterval();
-}
-
-void GL_UpdateSwapInterval( void )
-{
- if ( gl_swapinterval->modified )
- {
- gl_swapinterval->modified = false;
-
- if ( !gl_state.stereo_enabled )
- {
-#ifdef _WIN32
- if ( qwglSwapIntervalEXT )
- qwglSwapIntervalEXT( gl_swapinterval->value );
-#endif
- }
- }
-}
\ No newline at end of file
--- a/ref_gl/gl_rsurf.c
+++ /dev/null
@@ -1,1660 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// GL_RSURF.C: surface-related refresh code
-#include <assert.h>
-
-#include "gl_local.h"
-
-static vec3_t modelorg; // relative to viewpoint
-
-msurface_t *r_alpha_surfaces;
-
-#define DYNAMIC_LIGHT_WIDTH 128
-#define DYNAMIC_LIGHT_HEIGHT 128
-
-#define LIGHTMAP_BYTES 4
-
-#define BLOCK_WIDTH 128
-#define BLOCK_HEIGHT 128
-
-#define MAX_LIGHTMAPS 128
-
-int c_visible_lightmaps;
-int c_visible_textures;
-
-#define GL_LIGHTMAP_FORMAT GL_RGBA
-
-typedef struct
-{
- int internal_format;
- int current_lightmap_texture;
-
- msurface_t *lightmap_surfaces[MAX_LIGHTMAPS];
-
- int allocated[BLOCK_WIDTH];
-
- // the lightmap texture data needs to be kept in
- // main memory so texsubimage can update properly
- byte lightmap_buffer[4*BLOCK_WIDTH*BLOCK_HEIGHT];
-} gllightmapstate_t;
-
-static gllightmapstate_t gl_lms;
-
-
-static void LM_InitBlock( void );
-static void LM_UploadBlock( qboolean dynamic );
-static qboolean LM_AllocBlock (int w, int h, int *x, int *y);
-
-extern void R_SetCacheState( msurface_t *surf );
-extern void R_BuildLightMap (msurface_t *surf, byte *dest, int stride);
-
-/*
-=============================================================
-
- BRUSH MODELS
-
-=============================================================
-*/
-
-/*
-===============
-R_TextureAnimation
-
-Returns the proper texture for a given time and base texture
-===============
-*/
-image_t *R_TextureAnimation (mtexinfo_t *tex)
-{
- int c;
-
- if (!tex->next)
- return tex->image;
-
- c = currententity->frame % tex->numframes;
- while (c)
- {
- tex = tex->next;
- c--;
- }
-
- return tex->image;
-}
-
-#if 0
-/*
-=================
-WaterWarpPolyVerts
-
-Mangles the x and y coordinates in a copy of the poly
-so that any drawing routine can be water warped
-=================
-*/
-glpoly_t *WaterWarpPolyVerts (glpoly_t *p)
-{
- int i;
- float *v, *nv;
- static byte buffer[1024];
- glpoly_t *out;
-
- out = (glpoly_t *)buffer;
-
- out->numverts = p->numverts;
- v = p->verts[0];
- nv = out->verts[0];
- for (i=0 ; i<p->numverts ; i++, v+= VERTEXSIZE, nv+=VERTEXSIZE)
- {
- nv[0] = v[0] + 4*sin(v[1]*0.05+r_newrefdef.time)*sin(v[2]*0.05+r_newrefdef.time);
- nv[1] = v[1] + 4*sin(v[0]*0.05+r_newrefdef.time)*sin(v[2]*0.05+r_newrefdef.time);
-
- nv[2] = v[2];
- nv[3] = v[3];
- nv[4] = v[4];
- nv[5] = v[5];
- nv[6] = v[6];
- }
-
- return out;
-}
-
-/*
-================
-DrawGLWaterPoly
-
-Warp the vertex coordinates
-================
-*/
-void DrawGLWaterPoly (glpoly_t *p)
-{
- int i;
- float *v;
-
- p = WaterWarpPolyVerts (p);
- qglBegin (GL_TRIANGLE_FAN);
- v = p->verts[0];
- for (i=0 ; i<p->numverts ; i++, v+= VERTEXSIZE)
- {
- qglTexCoord2f (v[3], v[4]);
- qglVertex3fv (v);
- }
- qglEnd ();
-}
-void DrawGLWaterPolyLightmap (glpoly_t *p)
-{
- int i;
- float *v;
-
- p = WaterWarpPolyVerts (p);
- qglBegin (GL_TRIANGLE_FAN);
- v = p->verts[0];
- for (i=0 ; i<p->numverts ; i++, v+= VERTEXSIZE)
- {
- qglTexCoord2f (v[5], v[6]);
- qglVertex3fv (v);
- }
- qglEnd ();
-}
-#endif
-
-/*
-================
-DrawGLPoly
-================
-*/
-void DrawGLPoly (glpoly_t *p)
-{
- int i;
- float *v;
-
- qglBegin (GL_POLYGON);
- v = p->verts[0];
- for (i=0 ; i<p->numverts ; i++, v+= VERTEXSIZE)
- {
- qglTexCoord2f (v[3], v[4]);
- qglVertex3fv (v);
- }
- qglEnd ();
-}
-
-//============
-//PGM
-/*
-================
-DrawGLFlowingPoly -- version of DrawGLPoly that handles scrolling texture
-================
-*/
-void DrawGLFlowingPoly (msurface_t *fa)
-{
- int i;
- float *v;
- glpoly_t *p;
- float scroll;
-
- p = fa->polys;
-
- scroll = -64 * ( (r_newrefdef.time / 40.0) - (int)(r_newrefdef.time / 40.0) );
- if(scroll == 0.0)
- scroll = -64.0;
-
- qglBegin (GL_POLYGON);
- v = p->verts[0];
- for (i=0 ; i<p->numverts ; i++, v+= VERTEXSIZE)
- {
- qglTexCoord2f ((v[3] + scroll), v[4]);
- qglVertex3fv (v);
- }
- qglEnd ();
-}
-//PGM
-//============
-
-/*
-** R_DrawTriangleOutlines
-*/
-void R_DrawTriangleOutlines (void)
-{
- int i, j;
- glpoly_t *p;
-
- if (!gl_showtris->value)
- return;
-
- qglDisable (GL_TEXTURE_2D);
- qglDisable (GL_DEPTH_TEST);
- qglColor4f (1,1,1,1);
-
- for (i=0 ; i<MAX_LIGHTMAPS ; i++)
- {
- msurface_t *surf;
-
- for ( surf = gl_lms.lightmap_surfaces[i]; surf != 0; surf = surf->lightmapchain )
- {
- p = surf->polys;
- for ( ; p ; p=p->chain)
- {
- for (j=2 ; j<p->numverts ; j++ )
- {
- qglBegin (GL_LINE_STRIP);
- qglVertex3fv (p->verts[0]);
- qglVertex3fv (p->verts[j-1]);
- qglVertex3fv (p->verts[j]);
- qglVertex3fv (p->verts[0]);
- qglEnd ();
- }
- }
- }
- }
-
- qglEnable (GL_DEPTH_TEST);
- qglEnable (GL_TEXTURE_2D);
-}
-
-/*
-** DrawGLPolyChain
-*/
-void DrawGLPolyChain( glpoly_t *p, float soffset, float toffset )
-{
- if ( soffset == 0 && toffset == 0 )
- {
- for ( ; p != 0; p = p->chain )
- {
- float *v;
- int j;
-
- qglBegin (GL_POLYGON);
- v = p->verts[0];
- for (j=0 ; j<p->numverts ; j++, v+= VERTEXSIZE)
- {
- qglTexCoord2f (v[5], v[6] );
- qglVertex3fv (v);
- }
- qglEnd ();
- }
- }
- else
- {
- for ( ; p != 0; p = p->chain )
- {
- float *v;
- int j;
-
- qglBegin (GL_POLYGON);
- v = p->verts[0];
- for (j=0 ; j<p->numverts ; j++, v+= VERTEXSIZE)
- {
- qglTexCoord2f (v[5] - soffset, v[6] - toffset );
- qglVertex3fv (v);
- }
- qglEnd ();
- }
- }
-}
-
-/*
-** R_BlendLightMaps
-**
-** This routine takes all the given light mapped surfaces in the world and
-** blends them into the framebuffer.
-*/
-void R_BlendLightmaps (void)
-{
- int i;
- msurface_t *surf, *newdrawsurf = 0;
-
- // don't bother if we're set to fullbright
- if (r_fullbright->value)
- return;
- if (!r_worldmodel->lightdata)
- return;
-
- // don't bother writing Z
- qglDepthMask( 0 );
-
- /*
- ** set the appropriate blending mode unless we're only looking at the
- ** lightmaps.
- */
- if (!gl_lightmap->value)
- {
- qglEnable (GL_BLEND);
-
- if ( gl_saturatelighting->value )
- {
- qglBlendFunc( GL_ONE, GL_ONE );
- }
- else
- {
- if ( gl_monolightmap->string[0] != '0' )
- {
- switch ( toupper( gl_monolightmap->string[0] ) )
- {
- case 'I':
- qglBlendFunc (GL_ZERO, GL_SRC_COLOR );
- break;
- case 'L':
- qglBlendFunc (GL_ZERO, GL_SRC_COLOR );
- break;
- case 'A':
- default:
- qglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
- break;
- }
- }
- else
- {
- qglBlendFunc (GL_ZERO, GL_SRC_COLOR );
- }
- }
- }
-
- if ( currentmodel == r_worldmodel )
- c_visible_lightmaps = 0;
-
- /*
- ** render static lightmaps first
- */
- for ( i = 1; i < MAX_LIGHTMAPS; i++ )
- {
- if ( gl_lms.lightmap_surfaces[i] )
- {
- if (currentmodel == r_worldmodel)
- c_visible_lightmaps++;
- GL_Bind( gl_state.lightmap_textures + i);
-
- for ( surf = gl_lms.lightmap_surfaces[i]; surf != 0; surf = surf->lightmapchain )
- {
- if ( surf->polys )
- DrawGLPolyChain( surf->polys, 0, 0 );
- }
- }
- }
-
- /*
- ** render dynamic lightmaps
- */
- if ( gl_dynamic->value )
- {
- LM_InitBlock();
-
- GL_Bind( gl_state.lightmap_textures+0 );
-
- if (currentmodel == r_worldmodel)
- c_visible_lightmaps++;
-
- newdrawsurf = gl_lms.lightmap_surfaces[0];
-
- for ( surf = gl_lms.lightmap_surfaces[0]; surf != 0; surf = surf->lightmapchain )
- {
- int smax, tmax;
- byte *base;
-
- smax = (surf->extents[0]>>4)+1;
- tmax = (surf->extents[1]>>4)+1;
-
- if ( LM_AllocBlock( smax, tmax, &surf->dlight_s, &surf->dlight_t ) )
- {
- base = gl_lms.lightmap_buffer;
- base += ( surf->dlight_t * BLOCK_WIDTH + surf->dlight_s ) * LIGHTMAP_BYTES;
-
- R_BuildLightMap (surf, base, BLOCK_WIDTH*LIGHTMAP_BYTES);
- }
- else
- {
- msurface_t *drawsurf;
-
- // upload what we have so far
- LM_UploadBlock( true );
-
- // draw all surfaces that use this lightmap
- for ( drawsurf = newdrawsurf; drawsurf != surf; drawsurf = drawsurf->lightmapchain )
- {
- if ( drawsurf->polys )
- DrawGLPolyChain( drawsurf->polys,
- ( drawsurf->light_s - drawsurf->dlight_s ) * ( 1.0 / 128.0 ),
- ( drawsurf->light_t - drawsurf->dlight_t ) * ( 1.0 / 128.0 ) );
- }
-
- newdrawsurf = drawsurf;
-
- // clear the block
- LM_InitBlock();
-
- // try uploading the block now
- if ( !LM_AllocBlock( smax, tmax, &surf->dlight_s, &surf->dlight_t ) )
- {
- ri.Sys_Error( ERR_FATAL, "Consecutive calls to LM_AllocBlock(%d,%d) failed (dynamic)\n", smax, tmax );
- }
-
- base = gl_lms.lightmap_buffer;
- base += ( surf->dlight_t * BLOCK_WIDTH + surf->dlight_s ) * LIGHTMAP_BYTES;
-
- R_BuildLightMap (surf, base, BLOCK_WIDTH*LIGHTMAP_BYTES);
- }
- }
-
- /*
- ** draw remainder of dynamic lightmaps that haven't been uploaded yet
- */
- if ( newdrawsurf )
- LM_UploadBlock( true );
-
- for ( surf = newdrawsurf; surf != 0; surf = surf->lightmapchain )
- {
- if ( surf->polys )
- DrawGLPolyChain( surf->polys, ( surf->light_s - surf->dlight_s ) * ( 1.0 / 128.0 ), ( surf->light_t - surf->dlight_t ) * ( 1.0 / 128.0 ) );
- }
- }
-
- /*
- ** restore state
- */
- qglDisable (GL_BLEND);
- qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- qglDepthMask( 1 );
-}
-
-/*
-================
-R_RenderBrushPoly
-================
-*/
-void R_RenderBrushPoly (msurface_t *fa)
-{
- int maps;
- image_t *image;
- qboolean is_dynamic = false;
-
- c_brush_polys++;
-
- image = R_TextureAnimation (fa->texinfo);
-
- if (fa->flags & SURF_DRAWTURB)
- {
- GL_Bind( image->texnum );
-
- // warp texture, no lightmaps
- GL_TexEnv( GL_MODULATE );
- qglColor4f( gl_state.inverse_intensity,
- gl_state.inverse_intensity,
- gl_state.inverse_intensity,
- 1.0F );
- EmitWaterPolys (fa);
- GL_TexEnv( GL_REPLACE );
-
- return;
- }
- else
- {
- GL_Bind( image->texnum );
-
- GL_TexEnv( GL_REPLACE );
- }
-
-//======
-//PGM
- if(fa->texinfo->flags & SURF_FLOWING)
- DrawGLFlowingPoly (fa);
- else
- DrawGLPoly (fa->polys);
-//PGM
-//======
-
- /*
- ** check for lightmap modification
- */
- for ( maps = 0; maps < MAXLIGHTMAPS && fa->styles[maps] != 255; maps++ )
- {
- if ( r_newrefdef.lightstyles[fa->styles[maps]].white != fa->cached_light[maps] )
- goto dynamic;
- }
-
- // dynamic this frame or dynamic previously
- if ( ( fa->dlightframe == r_framecount ) )
- {
-dynamic:
- if ( gl_dynamic->value )
- {
- if (!( fa->texinfo->flags & (SURF_SKY|SURF_TRANS33|SURF_TRANS66|SURF_WARP ) ) )
- {
- is_dynamic = true;
- }
- }
- }
-
- if ( is_dynamic )
- {
- if ( ( fa->styles[maps] >= 32 || fa->styles[maps] == 0 ) && ( fa->dlightframe != r_framecount ) )
- {
- unsigned temp[34*34];
- int smax, tmax;
-
- smax = (fa->extents[0]>>4)+1;
- tmax = (fa->extents[1]>>4)+1;
-
- R_BuildLightMap( fa, (void *)temp, smax*4 );
- R_SetCacheState( fa );
-
- GL_Bind( gl_state.lightmap_textures + fa->lightmaptexturenum );
-
- qglTexSubImage2D( GL_TEXTURE_2D, 0,
- fa->light_s, fa->light_t,
- smax, tmax,
- GL_LIGHTMAP_FORMAT,
- GL_UNSIGNED_BYTE, temp );
-
- fa->lightmapchain = gl_lms.lightmap_surfaces[fa->lightmaptexturenum];
- gl_lms.lightmap_surfaces[fa->lightmaptexturenum] = fa;
- }
- else
- {
- fa->lightmapchain = gl_lms.lightmap_surfaces[0];
- gl_lms.lightmap_surfaces[0] = fa;
- }
- }
- else
- {
- fa->lightmapchain = gl_lms.lightmap_surfaces[fa->lightmaptexturenum];
- gl_lms.lightmap_surfaces[fa->lightmaptexturenum] = fa;
- }
-}
-
-
-/*
-================
-R_DrawAlphaSurfaces
-
-Draw water surfaces and windows.
-The BSP tree is waled front to back, so unwinding the chain
-of alpha_surfaces will draw back to front, giving proper ordering.
-================
-*/
-void R_DrawAlphaSurfaces (void)
-{
- msurface_t *s;
- float intens;
-
- //
- // go back to the world matrix
- //
- qglLoadMatrixf (r_world_matrix);
-
- qglEnable (GL_BLEND);
- GL_TexEnv( GL_MODULATE );
-
- // the textures are prescaled up for a better lighting range,
- // so scale it back down
- intens = gl_state.inverse_intensity;
-
- for (s=r_alpha_surfaces ; s ; s=s->texturechain)
- {
- GL_Bind(s->texinfo->image->texnum);
- c_brush_polys++;
- if (s->texinfo->flags & SURF_TRANS33)
- qglColor4f (intens,intens,intens,0.33);
- else if (s->texinfo->flags & SURF_TRANS66)
- qglColor4f (intens,intens,intens,0.66);
- else
- qglColor4f (intens,intens,intens,1);
- if (s->flags & SURF_DRAWTURB)
- EmitWaterPolys (s);
- else
- DrawGLPoly (s->polys);
- }
-
- GL_TexEnv( GL_REPLACE );
- qglColor4f (1,1,1,1);
- qglDisable (GL_BLEND);
-
- r_alpha_surfaces = NULL;
-}
-
-/*
-================
-DrawTextureChains
-================
-*/
-void DrawTextureChains (void)
-{
- int i;
- msurface_t *s;
- image_t *image;
-
- c_visible_textures = 0;
-
-// GL_TexEnv( GL_REPLACE );
-
- if ( !qglSelectTextureSGIS )
- {
- for ( i = 0, image=gltextures ; i<numgltextures ; i++,image++)
- {
- if (!image->registration_sequence)
- continue;
- s = image->texturechain;
- if (!s)
- continue;
- c_visible_textures++;
-
- for ( ; s ; s=s->texturechain)
- R_RenderBrushPoly (s);
-
- image->texturechain = NULL;
- }
- }
- else
- {
- for ( i = 0, image=gltextures ; i<numgltextures ; i++,image++)
- {
- if (!image->registration_sequence)
- continue;
- if (!image->texturechain)
- continue;
- c_visible_textures++;
-
- for ( s = image->texturechain; s ; s=s->texturechain)
- {
- if ( !( s->flags & SURF_DRAWTURB ) )
- R_RenderBrushPoly (s);
- }
- }
-
- GL_EnableMultitexture( false );
- for ( i = 0, image=gltextures ; i<numgltextures ; i++,image++)
- {
- if (!image->registration_sequence)
- continue;
- s = image->texturechain;
- if (!s)
- continue;
-
- for ( ; s ; s=s->texturechain)
- {
- if ( s->flags & SURF_DRAWTURB )
- R_RenderBrushPoly (s);
- }
-
- image->texturechain = NULL;
- }
-// GL_EnableMultitexture( true );
- }
-
- GL_TexEnv( GL_REPLACE );
-}
-
-
-static void GL_RenderLightmappedPoly( msurface_t *surf )
-{
- int i, nv = surf->polys->numverts;
- int map;
- float *v;
- image_t *image = R_TextureAnimation( surf->texinfo );
- qboolean is_dynamic = false;
- unsigned lmtex = surf->lightmaptexturenum;
- glpoly_t *p;
-
- for ( map = 0; map < MAXLIGHTMAPS && surf->styles[map] != 255; map++ )
- {
- if ( r_newrefdef.lightstyles[surf->styles[map]].white != surf->cached_light[map] )
- goto dynamic;
- }
-
- // dynamic this frame or dynamic previously
- if ( ( surf->dlightframe == r_framecount ) )
- {
-dynamic:
- if ( gl_dynamic->value )
- {
- if ( !(surf->texinfo->flags & (SURF_SKY|SURF_TRANS33|SURF_TRANS66|SURF_WARP ) ) )
- {
- is_dynamic = true;
- }
- }
- }
-
- if ( is_dynamic )
- {
- unsigned temp[128*128];
- int smax, tmax;
-
- if ( ( surf->styles[map] >= 32 || surf->styles[map] == 0 ) && ( surf->dlightframe != r_framecount ) )
- {
- smax = (surf->extents[0]>>4)+1;
- tmax = (surf->extents[1]>>4)+1;
-
- R_BuildLightMap( surf, (void *)temp, smax*4 );
- R_SetCacheState( surf );
-
- GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + surf->lightmaptexturenum );
-
- lmtex = surf->lightmaptexturenum;
-
- qglTexSubImage2D( GL_TEXTURE_2D, 0,
- surf->light_s, surf->light_t,
- smax, tmax,
- GL_LIGHTMAP_FORMAT,
- GL_UNSIGNED_BYTE, temp );
-
- }
- else
- {
- smax = (surf->extents[0]>>4)+1;
- tmax = (surf->extents[1]>>4)+1;
-
- R_BuildLightMap( surf, (void *)temp, smax*4 );
-
- GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + 0 );
-
- lmtex = 0;
-
- qglTexSubImage2D( GL_TEXTURE_2D, 0,
- surf->light_s, surf->light_t,
- smax, tmax,
- GL_LIGHTMAP_FORMAT,
- GL_UNSIGNED_BYTE, temp );
-
- }
-
- c_brush_polys++;
-
- GL_MBind( GL_TEXTURE0_SGIS, image->texnum );
- GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + lmtex );
-
-//==========
-//PGM
- if (surf->texinfo->flags & SURF_FLOWING)
- {
- float scroll;
-
- scroll = -64 * ( (r_newrefdef.time / 40.0) - (int)(r_newrefdef.time / 40.0) );
- if(scroll == 0.0)
- scroll = -64.0;
-
- for ( p = surf->polys; p; p = p->chain )
- {
- v = p->verts[0];
- qglBegin (GL_POLYGON);
- for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
- {
- qglMTexCoord2fSGIS( GL_TEXTURE0_SGIS, (v[3]+scroll), v[4]);
- qglMTexCoord2fSGIS( GL_TEXTURE1_SGIS, v[5], v[6]);
- qglVertex3fv (v);
- }
- qglEnd ();
- }
- }
- else
- {
- for ( p = surf->polys; p; p = p->chain )
- {
- v = p->verts[0];
- qglBegin (GL_POLYGON);
- for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
- {
- qglMTexCoord2fSGIS( GL_TEXTURE0_SGIS, v[3], v[4]);
- qglMTexCoord2fSGIS( GL_TEXTURE1_SGIS, v[5], v[6]);
- qglVertex3fv (v);
- }
- qglEnd ();
- }
- }
-//PGM
-//==========
- }
- else
- {
- c_brush_polys++;
-
- GL_MBind( GL_TEXTURE0_SGIS, image->texnum );
- GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + lmtex );
-
-//==========
-//PGM
- if (surf->texinfo->flags & SURF_FLOWING)
- {
- float scroll;
-
- scroll = -64 * ( (r_newrefdef.time / 40.0) - (int)(r_newrefdef.time / 40.0) );
- if(scroll == 0.0)
- scroll = -64.0;
-
- for ( p = surf->polys; p; p = p->chain )
- {
- v = p->verts[0];
- qglBegin (GL_POLYGON);
- for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
- {
- qglMTexCoord2fSGIS( GL_TEXTURE0_SGIS, (v[3]+scroll), v[4]);
- qglMTexCoord2fSGIS( GL_TEXTURE1_SGIS, v[5], v[6]);
- qglVertex3fv (v);
- }
- qglEnd ();
- }
- }
- else
- {
-//PGM
-//==========
- for ( p = surf->polys; p; p = p->chain )
- {
- v = p->verts[0];
- qglBegin (GL_POLYGON);
- for (i=0 ; i< nv; i++, v+= VERTEXSIZE)
- {
- qglMTexCoord2fSGIS( GL_TEXTURE0_SGIS, v[3], v[4]);
- qglMTexCoord2fSGIS( GL_TEXTURE1_SGIS, v[5], v[6]);
- qglVertex3fv (v);
- }
- qglEnd ();
- }
-//==========
-//PGM
- }
-//PGM
-//==========
- }
-}
-
-/*
-=================
-R_DrawInlineBModel
-=================
-*/
-void R_DrawInlineBModel (void)
-{
- int i, k;
- cplane_t *pplane;
- float dot;
- msurface_t *psurf;
- dlight_t *lt;
-
- // calculate dynamic lighting for bmodel
- if ( !gl_flashblend->value )
- {
- lt = r_newrefdef.dlights;
- for (k=0 ; k<r_newrefdef.num_dlights ; k++, lt++)
- {
- R_MarkLights (lt, 1<<k, currentmodel->nodes + currentmodel->firstnode);
- }
- }
-
- psurf = ¤tmodel->surfaces[currentmodel->firstmodelsurface];
-
- if ( currententity->flags & RF_TRANSLUCENT )
- {
- qglEnable (GL_BLEND);
- qglColor4f (1,1,1,0.25);
- GL_TexEnv( GL_MODULATE );
- }
-
- //
- // draw texture
- //
- for (i=0 ; i<currentmodel->nummodelsurfaces ; i++, psurf++)
- {
- // find which side of the node we are on
- pplane = psurf->plane;
-
- dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
-
- // draw the polygon
- if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
- (!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
- {
- if (psurf->texinfo->flags & (SURF_TRANS33|SURF_TRANS66) )
- { // add to the translucent chain
- psurf->texturechain = r_alpha_surfaces;
- r_alpha_surfaces = psurf;
- }
- else if ( qglMTexCoord2fSGIS && !( psurf->flags & SURF_DRAWTURB ) )
- {
- GL_RenderLightmappedPoly( psurf );
- }
- else
- {
- GL_EnableMultitexture( false );
- R_RenderBrushPoly( psurf );
- GL_EnableMultitexture( true );
- }
- }
- }
-
- if ( !(currententity->flags & RF_TRANSLUCENT) )
- {
- if ( !qglMTexCoord2fSGIS )
- R_BlendLightmaps ();
- }
- else
- {
- qglDisable (GL_BLEND);
- qglColor4f (1,1,1,1);
- GL_TexEnv( GL_REPLACE );
- }
-}
-
-/*
-=================
-R_DrawBrushModel
-=================
-*/
-void R_DrawBrushModel (entity_t *e)
-{
- vec3_t mins, maxs;
- int i;
- qboolean rotated;
-
- if (currentmodel->nummodelsurfaces == 0)
- return;
-
- currententity = e;
- gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1;
-
- if (e->angles[0] || e->angles[1] || e->angles[2])
- {
- rotated = true;
- for (i=0 ; i<3 ; i++)
- {
- mins[i] = e->origin[i] - currentmodel->radius;
- maxs[i] = e->origin[i] + currentmodel->radius;
- }
- }
- else
- {
- rotated = false;
- VectorAdd (e->origin, currentmodel->mins, mins);
- VectorAdd (e->origin, currentmodel->maxs, maxs);
- }
-
- if (R_CullBox (mins, maxs))
- return;
-
- qglColor3f (1,1,1);
- memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces));
-
- VectorSubtract (r_newrefdef.vieworg, e->origin, modelorg);
- if (rotated)
- {
- vec3_t temp;
- vec3_t forward, right, up;
-
- VectorCopy (modelorg, temp);
- AngleVectors (e->angles, forward, right, up);
- modelorg[0] = DotProduct (temp, forward);
- modelorg[1] = -DotProduct (temp, right);
- modelorg[2] = DotProduct (temp, up);
- }
-
- qglPushMatrix ();
-e->angles[0] = -e->angles[0]; // stupid quake bug
-e->angles[2] = -e->angles[2]; // stupid quake bug
- R_RotateForEntity (e);
-e->angles[0] = -e->angles[0]; // stupid quake bug
-e->angles[2] = -e->angles[2]; // stupid quake bug
-
- GL_EnableMultitexture( true );
- GL_SelectTexture( GL_TEXTURE0_SGIS );
- GL_TexEnv( GL_REPLACE );
- GL_SelectTexture( GL_TEXTURE1_SGIS );
- GL_TexEnv( GL_MODULATE );
-
- R_DrawInlineBModel ();
- GL_EnableMultitexture( false );
-
- qglPopMatrix ();
-}
-
-/*
-=============================================================
-
- WORLD MODEL
-
-=============================================================
-*/
-
-/*
-================
-R_RecursiveWorldNode
-================
-*/
-void R_RecursiveWorldNode (mnode_t *node)
-{
- int c, side, sidebit;
- cplane_t *plane;
- msurface_t *surf, **mark;
- mleaf_t *pleaf;
- float dot;
- image_t *image;
-
- if (node->contents == CONTENTS_SOLID)
- return; // solid
-
- if (node->visframe != r_visframecount)
- return;
- if (R_CullBox (node->minmaxs, node->minmaxs+3))
- return;
-
-// if a leaf node, draw stuff
- if (node->contents != -1)
- {
- pleaf = (mleaf_t *)node;
-
- // check for door connected areas
- if (r_newrefdef.areabits)
- {
- if (! (r_newrefdef.areabits[pleaf->area>>3] & (1<<(pleaf->area&7)) ) )
- return; // not visible
- }
-
- mark = pleaf->firstmarksurface;
- c = pleaf->nummarksurfaces;
-
- if (c)
- {
- do
- {
- (*mark)->visframe = r_framecount;
- mark++;
- } while (--c);
- }
-
- return;
- }
-
-// node is just a decision point, so go down the apropriate sides
-
-// find which side of the node we are on
- plane = node->plane;
-
- switch (plane->type)
- {
- case PLANE_X:
- dot = modelorg[0] - plane->dist;
- break;
- case PLANE_Y:
- dot = modelorg[1] - plane->dist;
- break;
- case PLANE_Z:
- dot = modelorg[2] - plane->dist;
- break;
- default:
- dot = DotProduct (modelorg, plane->normal) - plane->dist;
- break;
- }
-
- if (dot >= 0)
- {
- side = 0;
- sidebit = 0;
- }
- else
- {
- side = 1;
- sidebit = SURF_PLANEBACK;
- }
-
-// recurse down the children, front side first
- R_RecursiveWorldNode (node->children[side]);
-
- // draw stuff
- for ( c = node->numsurfaces, surf = r_worldmodel->surfaces + node->firstsurface; c ; c--, surf++)
- {
- if (surf->visframe != r_framecount)
- continue;
-
- if ( (surf->flags & SURF_PLANEBACK) != sidebit )
- continue; // wrong side
-
- if (surf->texinfo->flags & SURF_SKY)
- { // just adds to visible sky bounds
- R_AddSkySurface (surf);
- }
- else if (surf->texinfo->flags & (SURF_TRANS33|SURF_TRANS66))
- { // add to the translucent chain
- surf->texturechain = r_alpha_surfaces;
- r_alpha_surfaces = surf;
- }
- else
- {
- if ( qglMTexCoord2fSGIS && !( surf->flags & SURF_DRAWTURB ) )
- {
- GL_RenderLightmappedPoly( surf );
- }
- else
- {
- // the polygon is visible, so add it to the texture
- // sorted chain
- // FIXME: this is a hack for animation
- image = R_TextureAnimation (surf->texinfo);
- surf->texturechain = image->texturechain;
- image->texturechain = surf;
- }
- }
- }
-
- // recurse down the back side
- R_RecursiveWorldNode (node->children[!side]);
-/*
- for ( ; c ; c--, surf++)
- {
- if (surf->visframe != r_framecount)
- continue;
-
- if ( (surf->flags & SURF_PLANEBACK) != sidebit )
- continue; // wrong side
-
- if (surf->texinfo->flags & SURF_SKY)
- { // just adds to visible sky bounds
- R_AddSkySurface (surf);
- }
- else if (surf->texinfo->flags & (SURF_TRANS33|SURF_TRANS66))
- { // add to the translucent chain
-// surf->texturechain = alpha_surfaces;
-// alpha_surfaces = surf;
- }
- else
- {
- if ( qglMTexCoord2fSGIS && !( surf->flags & SURF_DRAWTURB ) )
- {
- GL_RenderLightmappedPoly( surf );
- }
- else
- {
- // the polygon is visible, so add it to the texture
- // sorted chain
- // FIXME: this is a hack for animation
- image = R_TextureAnimation (surf->texinfo);
- surf->texturechain = image->texturechain;
- image->texturechain = surf;
- }
- }
- }
-*/
-}
-
-
-/*
-=============
-R_DrawWorld
-=============
-*/
-void R_DrawWorld (void)
-{
- entity_t ent;
-
- if (!r_drawworld->value)
- return;
-
- if ( r_newrefdef.rdflags & RDF_NOWORLDMODEL )
- return;
-
- currentmodel = r_worldmodel;
-
- VectorCopy (r_newrefdef.vieworg, modelorg);
-
- // auto cycle the world frame for texture animation
- memset (&ent, 0, sizeof(ent));
- ent.frame = (int)(r_newrefdef.time*2);
- currententity = &ent;
-
- gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1;
-
- qglColor3f (1,1,1);
- memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces));
- R_ClearSkyBox ();
-
- if ( qglMTexCoord2fSGIS )
- {
- GL_EnableMultitexture( true );
-
- GL_SelectTexture( GL_TEXTURE0_SGIS );
- GL_TexEnv( GL_REPLACE );
- GL_SelectTexture( GL_TEXTURE1_SGIS );
-
- if ( gl_lightmap->value )
- GL_TexEnv( GL_REPLACE );
- else
- GL_TexEnv( GL_MODULATE );
-
- R_RecursiveWorldNode (r_worldmodel->nodes);
-
- GL_EnableMultitexture( false );
- }
- else
- {
- R_RecursiveWorldNode (r_worldmodel->nodes);
- }
-
- /*
- ** theoretically nothing should happen in the next two functions
- ** if multitexture is enabled
- */
- DrawTextureChains ();
- R_BlendLightmaps ();
-
- R_DrawSkyBox ();
-
- R_DrawTriangleOutlines ();
-}
-
-
-/*
-===============
-R_MarkLeaves
-
-Mark the leaves and nodes that are in the PVS for the current
-cluster
-===============
-*/
-void R_MarkLeaves (void)
-{
- byte *vis;
- byte fatvis[MAX_MAP_LEAFS/8];
- mnode_t *node;
- int i, c;
- mleaf_t *leaf;
- int cluster;
-
- if (r_oldviewcluster == r_viewcluster && r_oldviewcluster2 == r_viewcluster2 && !r_novis->value && r_viewcluster != -1)
- return;
-
- // development aid to let you run around and see exactly where
- // the pvs ends
- if (gl_lockpvs->value)
- return;
-
- r_visframecount++;
- r_oldviewcluster = r_viewcluster;
- r_oldviewcluster2 = r_viewcluster2;
-
- if (r_novis->value || r_viewcluster == -1 || !r_worldmodel->vis)
- {
- // mark everything
- for (i=0 ; i<r_worldmodel->numleafs ; i++)
- r_worldmodel->leafs[i].visframe = r_visframecount;
- for (i=0 ; i<r_worldmodel->numnodes ; i++)
- r_worldmodel->nodes[i].visframe = r_visframecount;
- return;
- }
-
- vis = Mod_ClusterPVS (r_viewcluster, r_worldmodel);
- // may have to combine two clusters because of solid water boundaries
- if (r_viewcluster2 != r_viewcluster)
- {
- memcpy (fatvis, vis, (r_worldmodel->numleafs+7)/8);
- vis = Mod_ClusterPVS (r_viewcluster2, r_worldmodel);
- c = (r_worldmodel->numleafs+31)/32;
- for (i=0 ; i<c ; i++)
- ((int *)fatvis)[i] |= ((int *)vis)[i];
- vis = fatvis;
- }
-
- for (i=0,leaf=r_worldmodel->leafs ; i<r_worldmodel->numleafs ; i++, leaf++)
- {
- cluster = leaf->cluster;
- if (cluster == -1)
- continue;
- if (vis[cluster>>3] & (1<<(cluster&7)))
- {
- node = (mnode_t *)leaf;
- do
- {
- if (node->visframe == r_visframecount)
- break;
- node->visframe = r_visframecount;
- node = node->parent;
- } while (node);
- }
- }
-
-#if 0
- for (i=0 ; i<r_worldmodel->vis->numclusters ; i++)
- {
- if (vis[i>>3] & (1<<(i&7)))
- {
- node = (mnode_t *)&r_worldmodel->leafs[i]; // FIXME: cluster
- do
- {
- if (node->visframe == r_visframecount)
- break;
- node->visframe = r_visframecount;
- node = node->parent;
- } while (node);
- }
- }
-#endif
-}
-
-
-
-/*
-=============================================================================
-
- LIGHTMAP ALLOCATION
-
-=============================================================================
-*/
-
-static void LM_InitBlock( void )
-{
- memset( gl_lms.allocated, 0, sizeof( gl_lms.allocated ) );
-}
-
-static void LM_UploadBlock( qboolean dynamic )
-{
- int texture;
- int height = 0;
-
- if ( dynamic )
- {
- texture = 0;
- }
- else
- {
- texture = gl_lms.current_lightmap_texture;
- }
-
- GL_Bind( gl_state.lightmap_textures + texture );
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- if ( dynamic )
- {
- int i;
-
- for ( i = 0; i < BLOCK_WIDTH; i++ )
- {
- if ( gl_lms.allocated[i] > height )
- height = gl_lms.allocated[i];
- }
-
- qglTexSubImage2D( GL_TEXTURE_2D,
- 0,
- 0, 0,
- BLOCK_WIDTH, height,
- GL_LIGHTMAP_FORMAT,
- GL_UNSIGNED_BYTE,
- gl_lms.lightmap_buffer );
- }
- else
- {
- qglTexImage2D( GL_TEXTURE_2D,
- 0,
- gl_lms.internal_format,
- BLOCK_WIDTH, BLOCK_HEIGHT,
- 0,
- GL_LIGHTMAP_FORMAT,
- GL_UNSIGNED_BYTE,
- gl_lms.lightmap_buffer );
- if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS )
- ri.Sys_Error( ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" );
- }
-}
-
-// returns a texture number and the position inside it
-static qboolean LM_AllocBlock (int w, int h, int *x, int *y)
-{
- int i, j;
- int best, best2;
-
- best = BLOCK_HEIGHT;
-
- for (i=0 ; i<BLOCK_WIDTH-w ; i++)
- {
- best2 = 0;
-
- for (j=0 ; j<w ; j++)
- {
- if (gl_lms.allocated[i+j] >= best)
- break;
- if (gl_lms.allocated[i+j] > best2)
- best2 = gl_lms.allocated[i+j];
- }
- if (j == w)
- { // this is a valid spot
- *x = i;
- *y = best = best2;
- }
- }
-
- if (best + h > BLOCK_HEIGHT)
- return false;
-
- for (i=0 ; i<w ; i++)
- gl_lms.allocated[*x + i] = best + h;
-
- return true;
-}
-
-/*
-================
-GL_BuildPolygonFromSurface
-================
-*/
-void GL_BuildPolygonFromSurface(msurface_t *fa)
-{
- int i, lindex, lnumverts;
- medge_t *pedges, *r_pedge;
- int vertpage;
- float *vec;
- float s, t;
- glpoly_t *poly;
- vec3_t total;
-
-// reconstruct the polygon
- pedges = currentmodel->edges;
- lnumverts = fa->numedges;
- vertpage = 0;
-
- VectorClear (total);
- //
- // draw texture
- //
- poly = Hunk_Alloc (sizeof(glpoly_t) + (lnumverts-4) * VERTEXSIZE*sizeof(float));
- poly->next = fa->polys;
- poly->flags = fa->flags;
- fa->polys = poly;
- poly->numverts = lnumverts;
-
- for (i=0 ; i<lnumverts ; i++)
- {
- lindex = currentmodel->surfedges[fa->firstedge + i];
-
- if (lindex > 0)
- {
- r_pedge = &pedges[lindex];
- vec = currentmodel->vertexes[r_pedge->v[0]].position;
- }
- else
- {
- r_pedge = &pedges[-lindex];
- vec = currentmodel->vertexes[r_pedge->v[1]].position;
- }
- s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
- s /= fa->texinfo->image->width;
-
- t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
- t /= fa->texinfo->image->height;
-
- VectorAdd (total, vec, total);
- VectorCopy (vec, poly->verts[i]);
- poly->verts[i][3] = s;
- poly->verts[i][4] = t;
-
- //
- // lightmap texture coordinates
- //
- s = DotProduct (vec, fa->texinfo->vecs[0]) + fa->texinfo->vecs[0][3];
- s -= fa->texturemins[0];
- s += fa->light_s*16;
- s += 8;
- s /= BLOCK_WIDTH*16; //fa->texinfo->texture->width;
-
- t = DotProduct (vec, fa->texinfo->vecs[1]) + fa->texinfo->vecs[1][3];
- t -= fa->texturemins[1];
- t += fa->light_t*16;
- t += 8;
- t /= BLOCK_HEIGHT*16; //fa->texinfo->texture->height;
-
- poly->verts[i][5] = s;
- poly->verts[i][6] = t;
- }
-
- poly->numverts = lnumverts;
-
-}
-
-/*
-========================
-GL_CreateSurfaceLightmap
-========================
-*/
-void GL_CreateSurfaceLightmap (msurface_t *surf)
-{
- int smax, tmax;
- byte *base;
-
- if (surf->flags & (SURF_DRAWSKY|SURF_DRAWTURB))
- return;
-
- smax = (surf->extents[0]>>4)+1;
- tmax = (surf->extents[1]>>4)+1;
-
- if ( !LM_AllocBlock( smax, tmax, &surf->light_s, &surf->light_t ) )
- {
- LM_UploadBlock( false );
- LM_InitBlock();
- if ( !LM_AllocBlock( smax, tmax, &surf->light_s, &surf->light_t ) )
- {
- ri.Sys_Error( ERR_FATAL, "Consecutive calls to LM_AllocBlock(%d,%d) failed\n", smax, tmax );
- }
- }
-
- surf->lightmaptexturenum = gl_lms.current_lightmap_texture;
-
- base = gl_lms.lightmap_buffer;
- base += (surf->light_t * BLOCK_WIDTH + surf->light_s) * LIGHTMAP_BYTES;
-
- R_SetCacheState( surf );
- R_BuildLightMap (surf, base, BLOCK_WIDTH*LIGHTMAP_BYTES);
-}
-
-
-/*
-==================
-GL_BeginBuildingLightmaps
-
-==================
-*/
-void GL_BeginBuildingLightmaps (model_t *m)
-{
- static lightstyle_t lightstyles[MAX_LIGHTSTYLES];
- int i;
- unsigned dummy[128*128];
-
- memset( gl_lms.allocated, 0, sizeof(gl_lms.allocated) );
-
- r_framecount = 1; // no dlightcache
-
- GL_EnableMultitexture( true );
- GL_SelectTexture( GL_TEXTURE1_SGIS );
-
- /*
- ** setup the base lightstyles so the lightmaps won't have to be regenerated
- ** the first time they're seen
- */
- for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
- {
- lightstyles[i].rgb[0] = 1;
- lightstyles[i].rgb[1] = 1;
- lightstyles[i].rgb[2] = 1;
- lightstyles[i].white = 3;
- }
- r_newrefdef.lightstyles = lightstyles;
-
- if (!gl_state.lightmap_textures)
- {
- gl_state.lightmap_textures = TEXNUM_LIGHTMAPS;
-// gl_state.lightmap_textures = gl_state.texture_extension_number;
-// gl_state.texture_extension_number = gl_state.lightmap_textures + MAX_LIGHTMAPS;
- }
-
- gl_lms.current_lightmap_texture = 1;
-
- /*
- ** if mono lightmaps are enabled and we want to use alpha
- ** blending (a,1-a) then we're likely running on a 3DLabs
- ** Permedia2. In a perfect world we'd use a GL_ALPHA lightmap
- ** in order to conserve space and maximize bandwidth, however
- ** this isn't a perfect world.
- **
- ** So we have to use alpha lightmaps, but stored in GL_RGBA format,
- ** which means we only get 1/16th the color resolution we should when
- ** using alpha lightmaps. If we find another board that supports
- ** only alpha lightmaps but that can at least support the GL_ALPHA
- ** format then we should change this code to use real alpha maps.
- */
- if ( toupper( gl_monolightmap->string[0] ) == 'A' )
- {
- gl_lms.internal_format = gl_tex_alpha_format;
- }
- /*
- ** try to do hacked colored lighting with a blended texture
- */
- else if ( toupper( gl_monolightmap->string[0] ) == 'C' )
- {
- gl_lms.internal_format = gl_tex_alpha_format;
- }
- else if ( toupper( gl_monolightmap->string[0] ) == 'I' )
- {
- gl_lms.internal_format = GL_INTENSITY8;
- }
- else if ( toupper( gl_monolightmap->string[0] ) == 'L' )
- {
- gl_lms.internal_format = GL_LUMINANCE8;
- }
- else
- {
- gl_lms.internal_format = gl_tex_solid_format;
- }
-
- /*
- ** initialize the dynamic lightmap texture
- */
- GL_Bind( gl_state.lightmap_textures + 0 );
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- qglTexImage2D( GL_TEXTURE_2D,
- 0,
- gl_lms.internal_format,
- BLOCK_WIDTH, BLOCK_HEIGHT,
- 0,
- GL_LIGHTMAP_FORMAT,
- GL_UNSIGNED_BYTE,
- dummy );
-}
-
-/*
-=======================
-GL_EndBuildingLightmaps
-=======================
-*/
-void GL_EndBuildingLightmaps (void)
-{
- LM_UploadBlock( false );
- GL_EnableMultitexture( false );
-}
-
--- a/ref_gl/gl_warp.c
+++ /dev/null
@@ -1,662 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// gl_warp.c -- sky and water polygons
-
-#include "gl_local.h"
-
-extern model_t *loadmodel;
-
-char skyname[MAX_QPATH];
-float skyrotate;
-vec3_t skyaxis;
-image_t *sky_images[6];
-
-msurface_t *warpface;
-
-#define SUBDIVIDE_SIZE 64
-//#define SUBDIVIDE_SIZE 1024
-
-void BoundPoly (int numverts, float *verts, vec3_t mins, vec3_t maxs)
-{
- int i, j;
- float *v;
-
- mins[0] = mins[1] = mins[2] = 9999;
- maxs[0] = maxs[1] = maxs[2] = -9999;
- v = verts;
- for (i=0 ; i<numverts ; i++)
- for (j=0 ; j<3 ; j++, v++)
- {
- if (*v < mins[j])
- mins[j] = *v;
- if (*v > maxs[j])
- maxs[j] = *v;
- }
-}
-
-void SubdividePolygon (int numverts, float *verts)
-{
- int i, j, k;
- vec3_t mins, maxs;
- float m;
- float *v;
- vec3_t front[64], back[64];
- int f, b;
- float dist[64];
- float frac;
- glpoly_t *poly;
- float s, t;
- vec3_t total;
- float total_s, total_t;
-
- if (numverts > 60)
- ri.Sys_Error (ERR_DROP, "numverts = %i", numverts);
-
- BoundPoly (numverts, verts, mins, maxs);
-
- for (i=0 ; i<3 ; i++)
- {
- m = (mins[i] + maxs[i]) * 0.5;
- m = SUBDIVIDE_SIZE * floor (m/SUBDIVIDE_SIZE + 0.5);
- if (maxs[i] - m < 8)
- continue;
- if (m - mins[i] < 8)
- continue;
-
- // cut it
- v = verts + i;
- for (j=0 ; j<numverts ; j++, v+= 3)
- dist[j] = *v - m;
-
- // wrap cases
- dist[j] = dist[0];
- v-=i;
- VectorCopy (verts, v);
-
- f = b = 0;
- v = verts;
- for (j=0 ; j<numverts ; j++, v+= 3)
- {
- if (dist[j] >= 0)
- {
- VectorCopy (v, front[f]);
- f++;
- }
- if (dist[j] <= 0)
- {
- VectorCopy (v, back[b]);
- b++;
- }
- if (dist[j] == 0 || dist[j+1] == 0)
- continue;
- if ( (dist[j] > 0) != (dist[j+1] > 0) )
- {
- // clip point
- frac = dist[j] / (dist[j] - dist[j+1]);
- for (k=0 ; k<3 ; k++)
- front[f][k] = back[b][k] = v[k] + frac*(v[3+k] - v[k]);
- f++;
- b++;
- }
- }
-
- SubdividePolygon (f, front[0]);
- SubdividePolygon (b, back[0]);
- return;
- }
-
- // add a point in the center to help keep warp valid
- poly = Hunk_Alloc (sizeof(glpoly_t) + ((numverts-4)+2) * VERTEXSIZE*sizeof(float));
- poly->next = warpface->polys;
- warpface->polys = poly;
- poly->numverts = numverts+2;
- VectorClear (total);
- total_s = 0;
- total_t = 0;
- for (i=0 ; i<numverts ; i++, verts+= 3)
- {
- VectorCopy (verts, poly->verts[i+1]);
- s = DotProduct (verts, warpface->texinfo->vecs[0]);
- t = DotProduct (verts, warpface->texinfo->vecs[1]);
-
- total_s += s;
- total_t += t;
- VectorAdd (total, verts, total);
-
- poly->verts[i+1][3] = s;
- poly->verts[i+1][4] = t;
- }
-
- VectorScale (total, (1.0/numverts), poly->verts[0]);
- poly->verts[0][3] = total_s/numverts;
- poly->verts[0][4] = total_t/numverts;
-
- // copy first vertex to last
- memcpy (poly->verts[i+1], poly->verts[1], sizeof(poly->verts[0]));
-}
-
-/*
-================
-GL_SubdivideSurface
-
-Breaks a polygon up along axial 64 unit
-boundaries so that turbulent and sky warps
-can be done reasonably.
-================
-*/
-void GL_SubdivideSurface (msurface_t *fa)
-{
- vec3_t verts[64];
- int numverts;
- int i;
- int lindex;
- float *vec;
-
- warpface = fa;
-
- //
- // convert edges back to a normal polygon
- //
- numverts = 0;
- for (i=0 ; i<fa->numedges ; i++)
- {
- lindex = loadmodel->surfedges[fa->firstedge + i];
-
- if (lindex > 0)
- vec = loadmodel->vertexes[loadmodel->edges[lindex].v[0]].position;
- else
- vec = loadmodel->vertexes[loadmodel->edges[-lindex].v[1]].position;
- VectorCopy (vec, verts[numverts]);
- numverts++;
- }
-
- SubdividePolygon (numverts, verts[0]);
-}
-
-//=========================================================
-
-
-
-// speed up sin calculations - Ed
-float r_turbsin[] =
-{
- #include "warpsin.h"
-};
-#define TURBSCALE (256.0 / (2 * M_PI))
-
-/*
-=============
-EmitWaterPolys
-
-Does a water warp on the pre-fragmented glpoly_t chain
-=============
-*/
-void EmitWaterPolys (msurface_t *fa)
-{
- glpoly_t *p, *bp;
- float *v;
- int i;
- float s, t, os, ot;
- float scroll;
- float rdt = r_newrefdef.time;
-
- if (fa->texinfo->flags & SURF_FLOWING)
- scroll = -64 * ( (r_newrefdef.time*0.5) - (int)(r_newrefdef.time*0.5) );
- else
- scroll = 0;
- for (bp=fa->polys ; bp ; bp=bp->next)
- {
- p = bp;
-
- qglBegin (GL_TRIANGLE_FAN);
- for (i=0,v=p->verts[0] ; i<p->numverts ; i++, v+=VERTEXSIZE)
- {
- os = v[3];
- ot = v[4];
-
-#if !id386
- s = os + r_turbsin[(int)((ot*0.125+r_newrefdef.time) * TURBSCALE) & 255];
-#else
- s = os + r_turbsin[Q_ftol( ((ot*0.125+rdt) * TURBSCALE) ) & 255];
-#endif
- s += scroll;
- s *= (1.0/64);
-
-#if !id386
- t = ot + r_turbsin[(int)((os*0.125+rdt) * TURBSCALE) & 255];
-#else
- t = ot + r_turbsin[Q_ftol( ((os*0.125+rdt) * TURBSCALE) ) & 255];
-#endif
- t *= (1.0/64);
-
- qglTexCoord2f (s, t);
- qglVertex3fv (v);
- }
- qglEnd ();
- }
-}
-
-
-//===================================================================
-
-
-vec3_t skyclip[6] = {
- {1,1,0},
- {1,-1,0},
- {0,-1,1},
- {0,1,1},
- {1,0,1},
- {-1,0,1}
-};
-int c_sky;
-
-// 1 = s, 2 = t, 3 = 2048
-int st_to_vec[6][3] =
-{
- {3,-1,2},
- {-3,1,2},
-
- {1,3,2},
- {-1,-3,2},
-
- {-2,-1,3}, // 0 degrees yaw, look straight up
- {2,-1,-3} // look straight down
-
-// {-1,2,3},
-// {1,2,-3}
-};
-
-// s = [0]/[2], t = [1]/[2]
-int vec_to_st[6][3] =
-{
- {-2,3,1},
- {2,3,-1},
-
- {1,3,2},
- {-1,3,-2},
-
- {-2,-1,3},
- {-2,1,-3}
-
-// {-1,2,3},
-// {1,2,-3}
-};
-
-float skymins[2][6], skymaxs[2][6];
-float sky_min, sky_max;
-
-void DrawSkyPolygon (int nump, vec3_t vecs)
-{
- int i,j;
- vec3_t v, av;
- float s, t, dv;
- int axis;
- float *vp;
-
- c_sky++;
-#if 0
-glBegin (GL_POLYGON);
-for (i=0 ; i<nump ; i++, vecs+=3)
-{
- VectorAdd(vecs, r_origin, v);
- qglVertex3fv (v);
-}
-glEnd();
-return;
-#endif
- // decide which face it maps to
- VectorCopy (vec3_origin, v);
- for (i=0, vp=vecs ; i<nump ; i++, vp+=3)
- {
- VectorAdd (vp, v, v);
- }
- av[0] = fabs(v[0]);
- av[1] = fabs(v[1]);
- av[2] = fabs(v[2]);
- if (av[0] > av[1] && av[0] > av[2])
- {
- if (v[0] < 0)
- axis = 1;
- else
- axis = 0;
- }
- else if (av[1] > av[2] && av[1] > av[0])
- {
- if (v[1] < 0)
- axis = 3;
- else
- axis = 2;
- }
- else
- {
- if (v[2] < 0)
- axis = 5;
- else
- axis = 4;
- }
-
- // project new texture coords
- for (i=0 ; i<nump ; i++, vecs+=3)
- {
- j = vec_to_st[axis][2];
- if (j > 0)
- dv = vecs[j - 1];
- else
- dv = -vecs[-j - 1];
- if (dv < 0.001)
- continue; // don't divide by zero
- j = vec_to_st[axis][0];
- if (j < 0)
- s = -vecs[-j -1] / dv;
- else
- s = vecs[j-1] / dv;
- j = vec_to_st[axis][1];
- if (j < 0)
- t = -vecs[-j -1] / dv;
- else
- t = vecs[j-1] / dv;
-
- if (s < skymins[0][axis])
- skymins[0][axis] = s;
- if (t < skymins[1][axis])
- skymins[1][axis] = t;
- if (s > skymaxs[0][axis])
- skymaxs[0][axis] = s;
- if (t > skymaxs[1][axis])
- skymaxs[1][axis] = t;
- }
-}
-
-#define ON_EPSILON 0.1 // point on plane side epsilon
-#define MAX_CLIP_VERTS 64
-void ClipSkyPolygon (int nump, vec3_t vecs, int stage)
-{
- float *norm;
- float *v;
- qboolean front, back;
- float d, e;
- float dists[MAX_CLIP_VERTS];
- int sides[MAX_CLIP_VERTS];
- vec3_t newv[2][MAX_CLIP_VERTS];
- int newc[2];
- int i, j;
-
- if (nump > MAX_CLIP_VERTS-2)
- ri.Sys_Error (ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS");
- if (stage == 6)
- { // fully clipped, so draw it
- DrawSkyPolygon (nump, vecs);
- return;
- }
-
- front = back = false;
- norm = skyclip[stage];
- for (i=0, v = vecs ; i<nump ; i++, v+=3)
- {
- d = DotProduct (v, norm);
- if (d > ON_EPSILON)
- {
- front = true;
- sides[i] = SIDE_FRONT;
- }
- else if (d < -ON_EPSILON)
- {
- back = true;
- sides[i] = SIDE_BACK;
- }
- else
- sides[i] = SIDE_ON;
- dists[i] = d;
- }
-
- if (!front || !back)
- { // not clipped
- ClipSkyPolygon (nump, vecs, stage+1);
- return;
- }
-
- // clip it
- sides[i] = sides[0];
- dists[i] = dists[0];
- VectorCopy (vecs, (vecs+(i*3)) );
- newc[0] = newc[1] = 0;
-
- for (i=0, v = vecs ; i<nump ; i++, v+=3)
- {
- switch (sides[i])
- {
- case SIDE_FRONT:
- VectorCopy (v, newv[0][newc[0]]);
- newc[0]++;
- break;
- case SIDE_BACK:
- VectorCopy (v, newv[1][newc[1]]);
- newc[1]++;
- break;
- case SIDE_ON:
- VectorCopy (v, newv[0][newc[0]]);
- newc[0]++;
- VectorCopy (v, newv[1][newc[1]]);
- newc[1]++;
- break;
- }
-
- if (sides[i] == SIDE_ON || sides[i+1] == SIDE_ON || sides[i+1] == sides[i])
- continue;
-
- d = dists[i] / (dists[i] - dists[i+1]);
- for (j=0 ; j<3 ; j++)
- {
- e = v[j] + d*(v[j+3] - v[j]);
- newv[0][newc[0]][j] = e;
- newv[1][newc[1]][j] = e;
- }
- newc[0]++;
- newc[1]++;
- }
-
- // continue
- ClipSkyPolygon (newc[0], newv[0][0], stage+1);
- ClipSkyPolygon (newc[1], newv[1][0], stage+1);
-}
-
-/*
-=================
-R_AddSkySurface
-=================
-*/
-void R_AddSkySurface (msurface_t *fa)
-{
- int i;
- vec3_t verts[MAX_CLIP_VERTS];
- glpoly_t *p;
-
- // calculate vertex values for sky box
- for (p=fa->polys ; p ; p=p->next)
- {
- for (i=0 ; i<p->numverts ; i++)
- {
- VectorSubtract (p->verts[i], r_origin, verts[i]);
- }
- ClipSkyPolygon (p->numverts, verts[0], 0);
- }
-}
-
-
-/*
-==============
-R_ClearSkyBox
-==============
-*/
-void R_ClearSkyBox (void)
-{
- int i;
-
- for (i=0 ; i<6 ; i++)
- {
- skymins[0][i] = skymins[1][i] = 9999;
- skymaxs[0][i] = skymaxs[1][i] = -9999;
- }
-}
-
-
-void MakeSkyVec (float s, float t, int axis)
-{
- vec3_t v, b;
- int j, k;
-
- b[0] = s*2300;
- b[1] = t*2300;
- b[2] = 2300;
-
- for (j=0 ; j<3 ; j++)
- {
- k = st_to_vec[axis][j];
- if (k < 0)
- v[j] = -b[-k - 1];
- else
- v[j] = b[k - 1];
- }
-
- // avoid bilerp seam
- s = (s+1)*0.5;
- t = (t+1)*0.5;
-
- if (s < sky_min)
- s = sky_min;
- else if (s > sky_max)
- s = sky_max;
- if (t < sky_min)
- t = sky_min;
- else if (t > sky_max)
- t = sky_max;
-
- t = 1.0 - t;
- qglTexCoord2f (s, t);
- qglVertex3fv (v);
-}
-
-/*
-==============
-R_DrawSkyBox
-==============
-*/
-int skytexorder[6] = {0,2,1,3,4,5};
-void R_DrawSkyBox (void)
-{
- int i;
-
-#if 0
-qglEnable (GL_BLEND);
-GL_TexEnv( GL_MODULATE );
-qglColor4f (1,1,1,0.5);
-qglDisable (GL_DEPTH_TEST);
-#endif
- if (skyrotate)
- { // check for no sky at all
- for (i=0 ; i<6 ; i++)
- if (skymins[0][i] < skymaxs[0][i]
- && skymins[1][i] < skymaxs[1][i])
- break;
- if (i == 6)
- return; // nothing visible
- }
-
-qglPushMatrix ();
-qglTranslatef (r_origin[0], r_origin[1], r_origin[2]);
-qglRotatef (r_newrefdef.time * skyrotate, skyaxis[0], skyaxis[1], skyaxis[2]);
-
- for (i=0 ; i<6 ; i++)
- {
- if (skyrotate)
- { // hack, forces full sky to draw when rotating
- skymins[0][i] = -1;
- skymins[1][i] = -1;
- skymaxs[0][i] = 1;
- skymaxs[1][i] = 1;
- }
-
- if (skymins[0][i] >= skymaxs[0][i]
- || skymins[1][i] >= skymaxs[1][i])
- continue;
-
- GL_Bind (sky_images[skytexorder[i]]->texnum);
-
- qglBegin (GL_QUADS);
- MakeSkyVec (skymins[0][i], skymins[1][i], i);
- MakeSkyVec (skymins[0][i], skymaxs[1][i], i);
- MakeSkyVec (skymaxs[0][i], skymaxs[1][i], i);
- MakeSkyVec (skymaxs[0][i], skymins[1][i], i);
- qglEnd ();
- }
-qglPopMatrix ();
-#if 0
-glDisable (GL_BLEND);
-glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-glColor4f (1,1,1,0.5);
-glEnable (GL_DEPTH_TEST);
-#endif
-}
-
-
-/*
-============
-R_SetSky
-============
-*/
-// 3dstudio environment map names
-char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
-void R_SetSky (char *name, float rotate, vec3_t axis)
-{
- int i;
- char pathname[MAX_QPATH];
-
- strncpy (skyname, name, sizeof(skyname)-1);
- skyrotate = rotate;
- VectorCopy (axis, skyaxis);
-
- for (i=0 ; i<6 ; i++)
- {
- // chop down rotating skies for less memory
- if (gl_skymip->value || skyrotate)
- gl_picmip->value++;
-
- if ( qglColorTableEXT && gl_ext_palettedtexture->value )
- Com_sprintf (pathname, sizeof(pathname), "env/%s%s.pcx", skyname, suf[i]);
- else
- Com_sprintf (pathname, sizeof(pathname), "env/%s%s.tga", skyname, suf[i]);
-
- sky_images[i] = GL_FindImage (pathname, it_sky);
- if (!sky_images[i])
- sky_images[i] = r_notexture;
-
- if (gl_skymip->value || skyrotate)
- { // take less memory
- gl_picmip->value--;
- sky_min = 1.0/256;
- sky_max = 255.0/256;
- }
- else
- {
- sky_min = 1.0/512;
- sky_max = 511.0/512;
- }
- }
-}
--- a/ref_gl/qgl.h
+++ /dev/null
@@ -1,442 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-/*
-** QGL.H
-*/
-
-#ifndef __QGL_H__
-#define __QGL_H__
-
-#ifdef _WIN32
-# include <windows.h>
-#endif
-
-#include <GL/gl.h>
-
-qboolean QGL_Init( const char *dllname );
-void QGL_Shutdown( void );
-
-#ifndef APIENTRY
-# define APIENTRY
-#endif
-
-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);
-
-extern void ( APIENTRY * qglPointParameterfEXT)( GLenum param, GLfloat value );
-extern void ( APIENTRY * qglPointParameterfvEXT)( GLenum param, const GLfloat *value );
-extern void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * );
-
-extern void ( APIENTRY * qglLockArraysEXT) (int , int);
-extern void ( APIENTRY * qglUnlockArraysEXT) (void);
-
-extern void ( APIENTRY * qglMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat );
-extern void ( APIENTRY * qglSelectTextureSGIS)( GLenum );
-
-#ifdef _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 * 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 );
-
-extern BOOL ( WINAPI * qwglGetDeviceGammaRampEXT ) ( unsigned char *pRed, unsigned char *pGreen, unsigned char *pBlue );
-extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT ) ( const unsigned char *pRed, const unsigned char *pGreen, const unsigned char *pBlue );
-
-#endif
-
-/*
-** extension constants
-*/
-#define GL_POINT_SIZE_MIN_EXT 0x8126
-#define GL_POINT_SIZE_MAX_EXT 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
-#define GL_DISTANCE_ATTENUATION_EXT 0x8129
-
-#ifdef __sgi
-#define GL_SHARED_TEXTURE_PALETTE_EXT GL_TEXTURE_COLOR_TABLE_SGI
-#else
-#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
-#endif
-
-#define GL_TEXTURE0_SGIS 0x835E
-#define GL_TEXTURE1_SGIS 0x835F
-
-#endif
--- a/ref_gl/ref_gl.001
+++ /dev/null
@@ -1,752 +1,0 @@
-# Microsoft Developer Studio Project File - Name="ref_gl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602
-
-CFG=ref_gl - Win32 Debug Alpha
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ref_gl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ref_gl.mak" CFG="ref_gl - Win32 Debug Alpha"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ref_gl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Debug Alpha" (based on\
- "Win32 (ALPHA) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Release Alpha" (based on\
- "Win32 (ALPHA) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\ref_gl__"
-# PROP BASE Intermediate_Dir ".\ref_gl__"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\release"
-# PROP Intermediate_Dir ".\release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /machine:I386
-# SUBTRACT LINK32 /incremental:yes /debug
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\ref_gl__"
-# PROP BASE Intermediate_Dir ".\ref_gl__"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\debug"
-# PROP Intermediate_Dir ".\debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386
-# SUBTRACT LINK32 /profile
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug Alpha"
-# PROP BASE Intermediate_Dir "Debug Alpha"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\DebugAxp"
-# PROP Intermediate_Dir ".\DebugAxp"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /Gt0 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /QA21164 /MTd /Gt0 /W3 /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 winmm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:ALPHA
-# ADD LINK32 opengl32.lib kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /debug /machine:ALPHA
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ref_gl__"
-# PROP BASE Intermediate_Dir "ref_gl__"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\ReleaseAXP"
-# PROP Intermediate_Dir ".\ReleaseAXP"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /Gt0 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /QA21164 /MT /Gt0 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-# SUBTRACT CPP /Z<none> /Fr
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:ALPHA
-# SUBTRACT BASE LINK32 /debug
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /machine:ALPHA
-# SUBTRACT LINK32 /debug
-
-!ENDIF
-
-# Begin Target
-
-# Name "ref_gl - Win32 Release"
-# Name "ref_gl - Win32 Debug"
-# Name "ref_gl - Win32 Debug Alpha"
-# Name "ref_gl - Win32 Release Alpha"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\gl_draw.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_DR=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_DR=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_DR=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_image.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_IM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_IM=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_IM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_light.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_LI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_LI=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_LI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_mesh.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_ME=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\anorms.h"\
- ".\anormtab.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_ME=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_ME=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\anorms.h"\
- ".\anormtab.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_model.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_MO=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_MO=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_MO=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_rmain.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_RM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RM=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_RM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_rmisc.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_RMI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RMI=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_RMI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_rsurf.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_RS=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RS=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_RS=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_warp.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_WA=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- ".\warpsin.h"\
-
-NODEP_CPP_GL_WA=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_WA=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- ".\warpsin.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\glw_imp.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GLW_I=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- "..\win32\winquake.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GLW_I=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GLW_I=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- "..\win32\winquake.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\game\q_shared.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHA=\
- "..\game\q_shared.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_Q_SHA=\
- "..\game\q_shared.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\q_shwin.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHW=\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_Q_SHW=\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\qgl_win.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_QGL_W=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_QGL_W=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_QGL_W=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- {$(INCLUDE)}"GL\gl.h"\
- {$(INCLUDE)}"GL\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\anorms.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\anormtab.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_local.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_model.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\glw_win.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\game\q_shared.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\qcommon\qcommon.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\qcommon\qfiles.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qgl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qmenu.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\client\ref.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ref_gl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\warpsin.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\winquake.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\ref_gl.def
-# End Source File
-# End Group
-# End Target
-# End Project
--- a/ref_gl/ref_gl.def
+++ /dev/null
@@ -1,2 +1,0 @@
-EXPORTS
- GetRefAPI
--- a/ref_gl/ref_gl.dsp
+++ /dev/null
@@ -1,773 +1,0 @@
-# Microsoft Developer Studio Project File - Name="ref_gl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602
-
-CFG=ref_gl - Win32 Debug Alpha
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ref_gl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ref_gl.mak" CFG="ref_gl - Win32 Debug Alpha"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ref_gl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Debug Alpha" (based on "Win32 (ALPHA) Dynamic-Link Library")
-!MESSAGE "ref_gl - Win32 Release Alpha" (based on "Win32 (ALPHA) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\ref_gl__"
-# PROP BASE Intermediate_Dir ".\ref_gl__"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\release"
-# PROP Intermediate_Dir ".\release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MT /W4 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /machine:I386
-# SUBTRACT LINK32 /incremental:yes /debug
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\ref_gl__"
-# PROP BASE Intermediate_Dir ".\ref_gl__"
-# PROP BASE Target_Dir "."
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\debug"
-# PROP Intermediate_Dir ".\debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir "."
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /map /debug /machine:I386
-# SUBTRACT LINK32 /profile
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug Alpha"
-# PROP BASE Intermediate_Dir "Debug Alpha"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "..\DebugAxp"
-# PROP Intermediate_Dir ".\DebugAxp"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /Gt0 /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /QA21164 /MTd /Gt0 /W3 /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 winmm.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:ALPHA
-# ADD LINK32 opengl32.lib kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /debug /machine:ALPHA
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ref_gl__"
-# PROP BASE Intermediate_Dir "ref_gl__"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\ReleaseAXP"
-# PROP Intermediate_Dir ".\ReleaseAXP"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /Gt0 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /QA21164 /MT /Gt0 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "C_ONLY" /YX /FD /QAieee1 /c
-# SUBTRACT CPP /Z<none> /Fr
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:ALPHA
-# SUBTRACT BASE LINK32 /debug
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /machine:ALPHA
-# SUBTRACT LINK32 /debug
-
-!ENDIF
-
-# Begin Target
-
-# Name "ref_gl - Win32 Release"
-# Name "ref_gl - Win32 Debug"
-# Name "ref_gl - Win32 Debug Alpha"
-# Name "ref_gl - Win32 Release Alpha"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\gl_draw.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_DR=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_DR=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_DR=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_DR=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_image.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_IM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_IM=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_IM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_IM=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_light.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_LI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_LI=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_LI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_LI=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_mesh.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_ME=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\anorms.h"\
- ".\anormtab.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_ME=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_ME=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\anorms.h"\
- ".\anormtab.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_ME=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_model.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_MO=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_MO=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_MO=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_MO=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_rmain.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_RM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RM=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_RM=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RM=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_rmisc.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_RMI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RMI=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_RMI=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RMI=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_rsurf.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_RS=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RS=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_RS=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GL_RS=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_warp.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GL_WA=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- ".\warpsin.h"\
-
-NODEP_CPP_GL_WA=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GL_WA=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
- ".\warpsin.h"\
-
-NODEP_CPP_GL_WA=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\glw_imp.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_GLW_I=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- "..\win32\winquake.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GLW_I=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_GLW_I=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- "..\win32\winquake.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_GLW_I=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\game\q_shared.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHA=\
- "..\game\q_shared.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_Q_SHA=\
- "..\game\q_shared.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\q_shwin.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_Q_SHW=\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\winquake.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_Q_SHW=\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\winquake.h"\
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\qgl_win.c
-
-!IF "$(CFG)" == "ref_gl - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug"
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Debug Alpha"
-
-DEP_CPP_QGL_W=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_QGL_W=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ELSEIF "$(CFG)" == "ref_gl - Win32 Release Alpha"
-
-DEP_CPP_QGL_W=\
- "..\client\ref.h"\
- "..\game\q_shared.h"\
- "..\qcommon\qcommon.h"\
- "..\qcommon\qfiles.h"\
- "..\win32\glw_win.h"\
- ".\gl_local.h"\
- ".\gl_model.h"\
- ".\qgl.h"\
-
-NODEP_CPP_QGL_W=\
- ".\L\gl.h"\
- ".\L\glu.h"\
-
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\anorms.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\anormtab.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_local.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\gl_model.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\glw_win.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\game\q_shared.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\qcommon\qcommon.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\qcommon\qfiles.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qgl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\qmenu.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\client\ref.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ref_gl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\warpsin.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32\winquake.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\ref_gl.def
-# End Source File
-# End Group
-# End Target
-# End Project
--- a/ref_gl/ref_gl.plg
+++ /dev/null
@@ -1,17 +1,0 @@
---------------------Configuration: ref_gl - Win32 Release Alpha--------------------
-Begining build with project "G:\quake2\code\ref_gl\ref_gl.dsp", at root.
-Active configuration is Win32 (ALPHA) Dynamic-Link Library (based on Win32 (ALPHA) Dynamic-Link Library)
-
-Project's tools are:
- "OLE Type Library Maker" with flags "/nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 "
- "C/C++ Compiler for Alpha" with flags "/nologo /QA21164 /MT /Gt0 /W3 /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "C_ONLY" /Fp".\ReleaseAXP/ref_gl.pch" /YX /Fo".\ReleaseAXP/" /Fd".\ReleaseAXP/" /FD /QAieee1 /c "
- "Win32 Resource Compiler" with flags "/l 0x409 /d "NDEBUG" "
- "Browser Database Maker" with flags "/nologo /o"..\ReleaseAXP/ref_gl.bsc" "
- "COFF Linker for Alpha" with flags "kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"..\ReleaseAXP/ref_gl.pdb" /debug /machine:ALPHA /def:".\ref_gl.def" /out:"..\ReleaseAXP/ref_gl.dll" /implib:"..\ReleaseAXP/ref_gl.lib" "
- "Custom Build" with flags ""
- "<Component 0xa>" with flags ""
-
-
-
-
-ref_gl.dll - 0 error(s), 0 warning(s)
--- a/ref_gl/warpsin.h
+++ /dev/null
@@ -1,51 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
- 0, 0.19633, 0.392541, 0.588517, 0.784137, 0.979285, 1.17384, 1.3677,
- 1.56072, 1.75281, 1.94384, 2.1337, 2.32228, 2.50945, 2.69512, 2.87916,
- 3.06147, 3.24193, 3.42044, 3.59689, 3.77117, 3.94319, 4.11282, 4.27998,
- 4.44456, 4.60647, 4.76559, 4.92185, 5.07515, 5.22538, 5.37247, 5.51632,
- 5.65685, 5.79398, 5.92761, 6.05767, 6.18408, 6.30677, 6.42566, 6.54068,
- 6.65176, 6.75883, 6.86183, 6.9607, 7.05537, 7.14579, 7.23191, 7.31368,
- 7.39104, 7.46394, 7.53235, 7.59623, 7.65552, 7.71021, 7.76025, 7.80562,
- 7.84628, 7.88222, 7.91341, 7.93984, 7.96148, 7.97832, 7.99036, 7.99759,
- 8, 7.99759, 7.99036, 7.97832, 7.96148, 7.93984, 7.91341, 7.88222,
- 7.84628, 7.80562, 7.76025, 7.71021, 7.65552, 7.59623, 7.53235, 7.46394,
- 7.39104, 7.31368, 7.23191, 7.14579, 7.05537, 6.9607, 6.86183, 6.75883,
- 6.65176, 6.54068, 6.42566, 6.30677, 6.18408, 6.05767, 5.92761, 5.79398,
- 5.65685, 5.51632, 5.37247, 5.22538, 5.07515, 4.92185, 4.76559, 4.60647,
- 4.44456, 4.27998, 4.11282, 3.94319, 3.77117, 3.59689, 3.42044, 3.24193,
- 3.06147, 2.87916, 2.69512, 2.50945, 2.32228, 2.1337, 1.94384, 1.75281,
- 1.56072, 1.3677, 1.17384, 0.979285, 0.784137, 0.588517, 0.392541, 0.19633,
- 9.79717e-16, -0.19633, -0.392541, -0.588517, -0.784137, -0.979285, -1.17384, -1.3677,
- -1.56072, -1.75281, -1.94384, -2.1337, -2.32228, -2.50945, -2.69512, -2.87916,
- -3.06147, -3.24193, -3.42044, -3.59689, -3.77117, -3.94319, -4.11282, -4.27998,
- -4.44456, -4.60647, -4.76559, -4.92185, -5.07515, -5.22538, -5.37247, -5.51632,
- -5.65685, -5.79398, -5.92761, -6.05767, -6.18408, -6.30677, -6.42566, -6.54068,
- -6.65176, -6.75883, -6.86183, -6.9607, -7.05537, -7.14579, -7.23191, -7.31368,
- -7.39104, -7.46394, -7.53235, -7.59623, -7.65552, -7.71021, -7.76025, -7.80562,
- -7.84628, -7.88222, -7.91341, -7.93984, -7.96148, -7.97832, -7.99036, -7.99759,
- -8, -7.99759, -7.99036, -7.97832, -7.96148, -7.93984, -7.91341, -7.88222,
- -7.84628, -7.80562, -7.76025, -7.71021, -7.65552, -7.59623, -7.53235, -7.46394,
- -7.39104, -7.31368, -7.23191, -7.14579, -7.05537, -6.9607, -6.86183, -6.75883,
- -6.65176, -6.54068, -6.42566, -6.30677, -6.18408, -6.05767, -5.92761, -5.79398,
- -5.65685, -5.51632, -5.37247, -5.22538, -5.07515, -4.92185, -4.76559, -4.60647,
- -4.44456, -4.27998, -4.11282, -3.94319, -3.77117, -3.59689, -3.42044, -3.24193,
- -3.06147, -2.87916, -2.69512, -2.50945, -2.32228, -2.1337, -1.94384, -1.75281,
- -1.56072, -1.3677, -1.17384, -0.979285, -0.784137, -0.588517, -0.392541, -0.19633,
--- a/rhapsody/in_next.m
+++ /dev/null
@@ -1,332 +1,0 @@
-// in_next.m
-
-#import <AppKit/AppKit.h>
-#import <drivers/event_status_driver.h>
-#include "../client/client.h"
-
-float mousex, mousey;
-
-float mouse_center_x = 160;
-float mouse_center_y = 100;
-
-void PSsetmouse (float x, float y);
-void PSshowcursor (void);
-void PShidecursor (void);
-void PScurrentmouse (int win, float *x, float *y);
-
-extern NSView *vid_view_i;
-extern NSWindow *vid_window_i;
-
-qboolean mlooking;
-qboolean mouseinitialized;
-int mouse_buttons;
-int mouse_oldbuttonstate;
-int mouseactive;
-int mousereset;
-int mx_accum, my_accum;
-int window_center_x, window_center_y;
-int old_mouse_x, old_mouse_y;
-
-cvar_t in_mouse = {"in_mouse", "0", CVAR_ARCHIVE};
-cvar_t m_filter = {"m_filter", "0", CVAR_ARCHIVE};
-cvar_t freelook = {"in_freelook", "0", CVAR_ARCHIVE};
-
-
-/*
-===========
-IN_ActivateMouse
-
-Called when the window gains focus or changes in some way
-===========
-*/
-void IN_ActivateMouse (void)
-{
- NSRect r;
-
- if (!mouseinitialized)
- return;
- if (!in_mouse.value)
- return;
-
- r = [vid_window_i frame];
- window_center_x = r.size.width / 2;
- window_center_y = r.size.height / 2;
-
- if (!mouseactive)
- PShidecursor ();
-
- mouseactive = true;
- mousereset = true;
-}
-
-
-/*
-===========
-IN_DeactivateMouse
-
-Called when the window loses focus
-===========
-*/
-void IN_DeactivateMouse (void)
-{
- if (!mouseinitialized)
- return;
-
- if (mouseactive)
- PSshowcursor ();
-
- mouseactive = false;
-}
-
-
-/*
-===========
-IN_StartupMouse
-===========
-*/
-void IN_StartupMouse (void)
-{
- if ( COM_CheckParm ("-nomouse") )
- return;
-
- mouseinitialized = true;
-
- mouse_buttons = 3;
-
- IN_ActivateMouse ();
-}
-
-/*
-===========
-IN_MouseEvent
-===========
-*/
-void IN_MouseEvent (int mstate)
-{
- int i;
-
- if (!mouseactive)
- return;
-
-// perform button actions
- for (i=0 ; i<mouse_buttons ; i++)
- {
- if ( (mstate & (1<<i)) &&
- !(mouse_oldbuttonstate & (1<<i)) )
- {
- Key_Event (K_MOUSE1 + i, true);
- }
-
- if ( !(mstate & (1<<i)) &&
- (mouse_oldbuttonstate & (1<<i)) )
- {
- Key_Event (K_MOUSE1 + i, false);
- }
- }
-
- mouse_oldbuttonstate = mstate;
-}
-
-
-
-/*
-===========
-IN_Accumulate
-===========
-*/
-void IN_Accumulate (void)
-{
- int dx, dy;
- static int old_x, old_y;
-
- if (!mouseinitialized)
- return;
-
- if (in_mouse.modified)
- {
- in_mouse.modified = false;
- IN_DeactivateMouse ();
- IN_ActivateMouse ();
- }
-
- if (!mouseactive)
- return;
-
-// [vid_view_i lockFocus];
-
- if (mousereset)
- { // we haven't centered cursor yet
- mousereset = false;
- }
- else
- {
- NSPoint p;
-
- PScurrentmouse ([vid_window_i windowNumber], &mousex, &mousey);
-
- p.x = mousex;
- p.y = mousey;
- p = [vid_view_i convertPoint:p fromView: nil];
-
- mousex = p.x;
- mousey = p.y;
-
- dx = mousex - old_x;
- dy = old_y - mousey;
-
- if (!dx && !dy)
- return;
- mx_accum += dx;
- my_accum += dy;
- }
-
- // force the mouse to the center, so there's room to move
- PSsetmouse (window_center_x, window_center_y);
- PScurrentmouse ([vid_window_i windowNumber], &mousex, &mousey);
-// PSsetmouse (window_center_x, window_center_y);
- old_x = window_center_x;
- old_y = window_center_y;
-
-// [vid_view_i unlockFocus];
-}
-
-
-/*
-===========
-IN_MouseMove
-===========
-*/
-void IN_MouseMove (usercmd_t *cmd)
-{
- int mx, my;
- int mouse_x, mouse_y;
-
- IN_Accumulate ();
-
- mx = mx_accum;
- my = my_accum;
-
- mx_accum = 0;
- my_accum = 0;
-
- if (m_filter.value)
- {
- mouse_x = (mx + old_mouse_x) * 0.5;
- mouse_y = (my + old_mouse_y) * 0.5;
- }
- else
- {
- mouse_x = mx;
- mouse_y = my;
- }
-
- old_mouse_x = mx;
- old_mouse_y = my;
-
- if (!mx && !my)
- return;
-
- if (!mouseactive)
- return;
-
- mouse_x *= sensitivity.value;
- mouse_y *= sensitivity.value;
-
-// add mouse X/Y movement to cmd
- if ( (in_strafe.state & 1) || (lookstrafe.value && mlooking ))
- cmd->sidemove += m_side.value * mouse_x;
- else
- cl.viewangles[YAW] -= m_yaw.value * mouse_x;
-
- if ( (mlooking || freelook.value) && !(in_strafe.state & 1))
- {
- cl.viewangles[PITCH] += m_pitch.value * mouse_y;
- if (cl.viewangles[PITCH] > 80)
- cl.viewangles[PITCH] = 80;
- if (cl.viewangles[PITCH] < -70)
- cl.viewangles[PITCH] = -70;
- }
- else
- {
- cmd->forwardmove -= m_forward.value * mouse_y;
- }
-
-}
-
-void IN_ShowMouse (void)
-{
- PSshowcursor ();
-}
-
-void IN_HideMouse (void)
-{
- PShidecursor ();
-}
-
-NXEventHandle eventhandle;
-NXMouseScaling oldscaling, newscaling;
-NXMouseButton oldbutton;
-
-/*
- =============
- IN_Init
- =============
- */
-void IN_Init (void)
-{
- Cvar_RegisterVariable (&in_mouse);
- Cvar_RegisterVariable (&m_filter);
- Cvar_RegisterVariable (&freelook);
-
- Cmd_AddCommand ("showmouse", IN_ShowMouse);
- Cmd_AddCommand ("hidemouse", IN_HideMouse);
-
- IN_StartupMouse ();
-
- // open the event status driver
- eventhandle = NXOpenEventStatus();
- NXGetMouseScaling (eventhandle, &oldscaling);
- NXSetMouseScaling (eventhandle, &newscaling);
- oldbutton = NXMouseButtonEnabled (eventhandle);
- NXEnableMouseButton (eventhandle, 2);
-}
-
-/*
- =============
- IN_Shutdown
- =============
- */
-void IN_Shutdown (void)
-{
- IN_DeactivateMouse ();
-
- // put mouse scaling back the way it was
- NXSetMouseScaling (eventhandle, &oldscaling);
- NXEnableMouseButton (eventhandle, oldbutton);
- NXCloseEventStatus (eventhandle);
-}
-
-void IN_Move (usercmd_t *cmd)
-{
- IN_MouseMove (cmd);
-}
-
-void IN_Commands (void)
-{
-}
-
-
-/*
-=========================================================================
-
-VIEW CENTERING
-
-=========================================================================
-*/
-
-void V_StopPitchDrift (void)
-{
- cl.laststop = cl.time;
- cl.nodrift = true;
- cl.pitchvel = 0;
-}
--- a/rhapsody/makefile.bak
+++ /dev/null
@@ -1,63 +1,0 @@
-
-CFLAGS = -O -g -DGAME_HARD_LINKED -DREF_HARD_LINKED
-LDFLAGS = -sectcreate __ICON __header quake2.iconheader -segprot __ICON r r -sectcreate __ICON app quake2.tiff -framework AppKit -framework Foundation
-EXE = quake2
-TARGETS = $(EXE)
-
-all: $(TARGETS)
-
-#----------------------------------------------------------------------
-
-SERVERFILES = sv_ccmds.o sv_ents.o sv_game.o sv_init.o sv_main.o sv_send.o sv_user.o sv_world.o
-
-GAMEFILES = g_ai.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_target.o g_trigger.o g_utils.o g_weapon.o g_turret.o m_actor.o m_berserk.o m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o m_tank.o p_client.o p_hud.o p_trail.o p_view.o p_weapon.o
-
-CLIENTFILES = cl_ents.o cl_fx.o cl_input.o cl_inv.o cl_main.o cl_parse.o cl_pred.o cl_scrn.o cl_cin.o cl_tent.o cl_view.o console.o keys.o menu.o qmenu.o snd_dma.o snd_mem.o snd_mix.o
-
-# commonfiles are used by both client and server
-COMMONFILES = m_flash.o cmd.o cmodel.o common.o cvar.o files.o md4.o net_chan.o net_udp.o pmove.o
-
-REFGLFILES = gl_draw.o gl_light.o gl_mesh.o gl_model.o gl_rmain.o gl_rmisc.o gl_rsurf.o gl_warp.o gl_image.o
-
-REFSOFTFILES = r_aclip.o r_alias.o r_bsp.o r_draw.o r_edge.o r_image.o r_light.o r_main.o r_misc.o r_model.o r_part.o r_polyse.o r_poly.o r_rast.o r_scan.o r_sprite.o r_surf.o
-
-# sharedfiles are included in EVERY dll
-SHAREDFILES = q_shared.o
-
-IRIXFILES = cd_sgi.o glx_imp.o qgl_sgi.o sys_sgi.o vid_sgi.o in_sgi.o snddma_null.o
-
-RHAPFILES = cd_null.o in_null.o snddma_null.o sys_rhap.o vid_null.o swimp_rhap.o
-
-NULLFILES = cd_null.o in_null.o snddma_null.o sys_null.o vid_null.o swimp_null.o
-
-#----------------------------------------------------------------------
-
-FILES = $(SERVERFILES) $(GAMEFILES) $(COMMONFILES) $(CLIENTFILES) $(REFSOFTFILES) $(SHAREDFILES) $(RHAPFILES)
-
-$(EXE) : $(FILES)
- cc -o $(EXE) $(FILES) $(LDFLAGS)
-
-clean:
- rm -f $(EXE) $(FILES)
-
-#----------------------------------------------------------------------
-
-# gnumake pattern rules are so cool!
-
-%.o : ../game/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../qcommon/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../client/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../server/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../ref_soft/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../ref_gl/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../null/%.c
- cc $(CFLAGS) -c -o $@ $?
-%.o : ../rhapsody/%.m
- cc $(CFLAGS) -c -o $@ $?
-
--- a/rhapsody/notes.txt
+++ /dev/null
@@ -1,34 +1,0 @@
-f1
-
-not calling back to set vid size after sw_mode change?
-
-do vid_xpos / ypos creep because of frames?
-
-fix fullscreen fallback bug
-
-nsping
-
-icon
-
-don't make sys_error varargs
-
-cvar_stvalue in ref????
-
-subframe event timing information
-
-swimp init / swimp_initgraphics?
-
-SWimp_SetMode shouldn't call
- R_GammaCorrectAndSetPalette( ( const unsigned char * ) d_8to24table );
-
-subclass window instead of view?
-
-/*
-** SWimp_SetPalette
-**
-** System specific palette setting routine. A NULL palette means
-** to use the existing palette. The palette is expected to be in
-** a padded 4-byte xRGB format.
-*/
-
-do we ever pass a NULL palette?
--- a/rhapsody/pb.project
+++ /dev/null
@@ -1,17 +1,0 @@
-{
- DYNAMIC_CODE_GEN = YES;
- FILESTABLE = {
- FRAMEWORKS = (Foundation.framework);
- OTHER_LINKED = (QuakeWorld_main.m);
- OTHER_SOURCES = (Makefile.preamble, Makefile, Makefile.postamble, m.template, h.template);
- };
- LANGUAGE = English;
- LOCALIZABLE_FILES = {};
- MAKEFILEDIR = "$(NEXT_ROOT)/NextDeveloper/Makefiles/pb_makefiles";
- NEXTSTEP_BUILDTOOL = /bin/gnumake;
- PDO_UNIX_BUILDTOOL = $NEXT_ROOT/NextDeveloper/bin/make;
- PROJECTNAME = QuakeWorld;
- PROJECTTYPE = Tool;
- PROJECTVERSION = 2.6;
- WINDOWS_BUILDTOOL = $NEXT_ROOT/NextDeveloper/Executables/make;
-}
--- a/rhapsody/quake2.iconheader
+++ /dev/null
@@ -1,2 +1,0 @@
-F test.app test app
-F test test app
binary files a/rhapsody/quake2.tiff /dev/null differ
--- a/rhapsody/r_next.m
+++ /dev/null
@@ -1,735 +1,0 @@
-
-#import <AppKit/AppKit.h>
-#include "../ref_soft/r_local.h"
-
-/*
-====================================================================
-
- OPENSTEP specific stuff
-
-====================================================================
-*/
-
-@interface QuakeView : NSView
-@end
-
-NSWindow *vid_window_i;
-QuakeView *vid_view_i;
-
-unsigned *buffernative;
-
-//===========================================================
-
-
-int Draw_SetResolution (void);
-
-#define TYPE_FULLSCREEN 0
-#define TYPE_WINDOWED 1
-#define TYPE_STRETCHED 2
-
-#define NUM_RESOLUTIONS 7
-int resolutions[NUM_RESOLUTIONS][2] = {
- {320,200}, {320,240}, {400,300}, {512,384}, {640,480}, {800,600}, {1024,768} };
-
-qboolean available[NUM_RESOLUTIONS][3];
-int mode_res = 0, mode_type = TYPE_WINDOWED;
-
-byte gammatable[256]; // palette is sent through this
-unsigned current_palette[256];
-unsigned gamma_palette[256];
-
-int cursor_res, cursor_type;
-
-cvar_t *vid_x;
-cvar_t *vid_y;
-cvar_t *vid_mode;
-cvar_t *vid_stretched;
-cvar_t *vid_fullscreen;
-cvar_t *draw_gamma;
-
-void Draw_BuildGammaTable (void);
-
-/*
-====================================================================
-
-MENU INTERACTION
-
-====================================================================
-*/
-
-void FindModes (void)
-{
- if (mode_res < 0 || mode_res >= NUM_RESOLUTIONS)
- mode_res = 0;
- if (mode_type < 0 || mode_type > 3)
- mode_type = 1;
-
-}
-
-void RM_Print (int x, int y, char *s)
-{
- while (*s)
- {
- Draw_Char (x, y, (*s)+128);
- s++;
- x += 8;
- }
-}
-
-/*
-================
-Draw_MenuDraw
-================
-*/
-void Draw_MenuDraw (void)
-{
- int i, j;
- int y;
- char string[32];
-
- Draw_Pic ( 4, 4, "vidmodes");
-
- RM_Print (80, 32, "fullscreen windowed stretched");
- RM_Print (80, 40, "---------- -------- ---------");
- y = 50;
-
- // draw background behind selected mode
- Draw_Fill ( (mode_type+1)*80, y+(mode_res)*10, 40,10, 8);
-
- // draw available grid
- for (i=0 ; i<NUM_RESOLUTIONS ; i++, y+= 10)
- {
- sprintf (string, "%ix%i", resolutions[i][0], resolutions[i][1]);
- RM_Print (0, y, string);
- for (j=0 ; j<3 ; j++)
- if (available[i][j])
- RM_Print ( 80 + j*80, y, "*");
- }
-
- // draw the cursor
- Draw_Char (80 + cursor_type*80, 50 + cursor_res*10, 128 + 12+((int)(r_newrefdef.time*4)&1));
-}
-
-
-#define K_TAB 9
-#define K_ENTER 13
-#define K_ESCAPE 27
-#define K_SPACE 32
-
-// normal keys should be passed as lowercased ascii
-
-#define K_BACKSPACE 127
-#define K_UPARROW 128
-#define K_DOWNARROW 129
-#define K_LEFTARROW 130
-#define K_RIGHTARROW 131
-
-/*
-================
-Draw_MenuKey
-================
-*/
-void Draw_MenuKey (int key)
-{
- switch (key)
- {
- case K_LEFTARROW:
- cursor_type--;
- if (cursor_type < 0)
- cursor_type = 2;
- break;
-
- case K_RIGHTARROW:
- cursor_type++;
- if (cursor_type > 2)
- cursor_type = 0;
- break;
-
- case K_UPARROW:
- cursor_res--;
- if (cursor_res < 0)
- cursor_res = NUM_RESOLUTIONS-1;
- break;
-
- case K_DOWNARROW:
- cursor_res++;
- if (cursor_res >= NUM_RESOLUTIONS)
- cursor_res = 0;
- break;
-
- case K_ENTER:
- ri.Cmd_ExecuteText (EXEC_NOW, va("vid_mode %i", cursor_res));
- switch (cursor_type)
- {
- case TYPE_FULLSCREEN:
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_fullscreen 1");
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_stretched 0");
- break;
- case TYPE_WINDOWED:
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_fullscreen 0");
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_stretched 0");
- break;
- case TYPE_STRETCHED:
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_fullscreen 0");
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_stretched 1");
- break;
- }
-
- mode_res = cursor_res;
- mode_type = cursor_type;
- Draw_SetResolution ();
- break;
-
- default:
- break;
- }
-}
-
-//===========================================================
-
-
-/*
-================
-Draw_SetResolution
-
-The vid structure will be filled in on return
-Also allocates the z buffer and surface cache
-================
-*/
-int Draw_SetResolution (void)
-{
- NSRect content;
-
- if (vid_mode->value < 0)
- ri.Cmd_ExecuteText (EXEC_NOW, "vid_mode 0");
- if (vid_mode->value >= NUM_RESOLUTIONS)
- ri.Cmd_ExecuteText (EXEC_NOW, va("vid_mode %i", NUM_RESOLUTIONS-1));
-
- vid_mode->modified = false;
- vid_fullscreen->modified = false;
- vid_stretched->modified = false;
-
- // free nativebuffer
- if (buffernative)
- {
- free (buffernative);
- buffernative = NULL;
- }
-
- // free z buffer
- if (d_pzbuffer)
- {
- free (d_pzbuffer);
- d_pzbuffer = NULL;
- }
- // free surface cache
- if (sc_base)
- {
- D_FlushCaches ();
- free (sc_base);
- sc_base = NULL;
- }
-
- vid.width = resolutions[(int)(vid_mode->value)][0];
- vid.height = resolutions[(int)(vid_mode->value)][1];
-
- vid.win_width = vid.width;
- vid.win_height = vid.height;
- if (vid_stretched->value)
- {
- vid.win_width <<= 1;
- vid.win_height <<= 1;
- }
-
- vid.aspect = 1;
- vid.buffer = malloc (vid.width*vid.height);
- vid.rowbytes = vid.width;
- d_pzbuffer = malloc(vid.width*vid.height*2);
- buffernative = malloc(vid.width*vid.height*4);
-
- D_InitCaches ();
-
- Sys_SetPalette ((byte *)d_8to24table);
-
- if (vid_view_i)
- [vid_view_i unlockFocus];
- if (vid_window_i)
- [vid_window_i close];
-//
-// open a window
-//
- content = NSMakeRect (vid_x->value,vid_y->value,vid.win_width, vid.win_height);
- vid_window_i = [[NSWindow alloc]
- initWithContentRect: content
- styleMask: NSTitledWindowMask
- backing: NSBackingStoreRetained
- defer: NO
- ];
-
- [vid_window_i setDelegate: vid_window_i];
- [vid_window_i display];
- [NSApp activateIgnoringOtherApps: YES];
- [vid_window_i makeKeyAndOrderFront: nil];
-
-// NSPing ();
-
- content.origin.x = content.origin.y = 0;
- vid_view_i = [[QuakeView alloc] initWithFrame: content];
- [vid_window_i setContentView: vid_view_i];
- [vid_window_i makeFirstResponder: vid_view_i];
- [vid_window_i setDelegate: vid_view_i];
-
-// [vid_window_i addToEventMask: NS_FLAGSCHANGEDMASK];
- [vid_window_i setTitle: @"Bitmap Quake Console"];
- [vid_window_i makeKeyAndOrderFront: nil];
-
- // leave focus locked forever
- [vid_view_i lockFocus];
-
- ri.VID_SetSize (vid.width, vid.height);
-
- return 0;
-}
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-Draw_Init
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-int Draw_Init (void *window)
-{
- [NSApplication sharedApplication];
- [NSApp finishLaunching];
-
- ri.Con_Printf (PRINT_ALL, "refresh version: "REF_VERSION"\n");
-
- vid_x = ri.Cvar_Get ("vid_x", "0", CVAR_ARCHIVE);
- vid_y = ri.Cvar_Get ("vid_y", "0", CVAR_ARCHIVE);
- vid_mode = ri.Cvar_Get ("vid_mode", "0", CVAR_ARCHIVE);
- vid_fullscreen = ri.Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE);
- vid_stretched = ri.Cvar_Get ("vid_stretched", "0", CVAR_ARCHIVE);
- draw_gamma = ri.Cvar_Get ("gamma", "1", CVAR_ARCHIVE);
-
- Draw_GetPalette ();
-
- Draw_BuildGammaTable ();
-
- // get the lighting colormap
- ri.FS_LoadFile ("gfx/colormap.lmp", (void **)&vid.colormap);
- if (!vid.colormap)
- {
- ri.Con_Printf (PRINT_ALL, "ERROR: Couldn't load gfx/colormap.lmp");
- return -1;
- }
-
- Draw_SetResolution ();
-
- R_Init ();
-
- return 0;
-}
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-Draw_Shutdown
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void Draw_Shutdown (void)
-{
- R_Shutdown ();
-}
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-Draw_BuildGammaTable
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void Draw_BuildGammaTable (void)
-{
- int i, inf;
- float g;
-
- draw_gamma->modified = false;
- g = draw_gamma->value;
-
- if (g == 1.0)
- {
- for (i=0 ; i<256 ; i++)
- gammatable[i] = i;
- return;
- }
-
- for (i=0 ; i<256 ; i++)
- {
- inf = 255 * pow ( (i+0.5)/255.5 , g ) + 0.5;
- if (inf < 0)
- inf = 0;
- if (inf > 255)
- inf = 255;
- gammatable[i] = inf;
- }
-}
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-Draw_BeginFram
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void Draw_BeginFrame (void)
-{
- if (vid_mode->modified || vid_fullscreen->modified
- || vid_stretched->modified)
- Draw_SetResolution ();
-
- if (draw_gamma->modified)
- {
- Draw_BuildGammaTable ();
- Sys_SetPalette ((byte *)current_palette);
- }
-
-// MGL_beginDirectAccess();
-// vid.buffer = mgldc->surface;
-// vid.rowbytes = mgldc->mi.bytesPerLine;
-}
-
-
-/*
-@@@@@@@@@@@@@@@@@@@@@
-Draw_EndFrame
-
-@@@@@@@@@@@@@@@@@@@@@
-*/
-void Draw_EndFrame (void)
-{
- int i, c;
- int bps, spp, bpp, bpr;
- unsigned char *planes[5];
- NSRect bounds;
-
- // translate to 24 bit color
- c = vid.width*vid.height;
- for (i=0 ; i<c ; i++)
- buffernative[i] = gamma_palette[vid.buffer[i]];
-
- bps = 8;
- spp = 3;
- bpp = 32;
- bpr = vid.width * 4;
- planes[0] = (unsigned char *)buffernative;
-
- bounds = [vid_view_i bounds];
-
- NSDrawBitmap(
- bounds,
- vid.width,
- vid.height,
- bps,
- spp,
- bpp,
- bpr,
- NO,
- NO,
- @"NSDeviceRGBColorSpace",
- planes
- );
-}
-
-
-//===============================================================================
-
-#define HUNK_MAGIC 0xffaffaff
-typedef struct
-{
- int magic;
- int length;
- int pad[6];
-} hunkheader_t;
-
-hunkheader_t *membase;
-int maxsize;
-int cursize;
-
-void *Hunk_Begin (void)
-{
- kern_return_t r;
-
-// reserve a huge chunk of memory, but don't commit any yet
- maxsize = 16*1024*1024;
- cursize = 0;
- membase = NULL;
- r = vm_allocate(task_self(), (vm_address_t *)&membase, maxsize, 1);
- if (!membase || r != KERN_SUCCESS)
- ri.Sys_Error (ERR_FATAL,"vm_allocate failed");
- membase->magic = HUNK_MAGIC;
- membase->length = maxsize;
- cursize = 32;
- return (void *)((byte *)membase + cursize);
-}
-
-void *Hunk_Alloc (int size)
-{
- // round to cacheline
- size = (size+31)&~31;
-
- cursize += size;
-
- if (cursize > maxsize)
- ri.Sys_Error (ERR_DROP, "Hunk_Alloc overflow");
-
- memset ((byte *)membase+cursize-size,0,size);
-
- return (void *)((byte *)membase+cursize-size);
-}
-
-int Hunk_End (void)
-{
- kern_return_t r;
-
- // round to pagesize
- cursize = (cursize+vm_page_size)&~(vm_page_size-1);
- membase->length = cursize;
- r = vm_deallocate(task_self(),
- (vm_address_t)((byte *)membase + cursize),
- maxsize - cursize);
- if ( r != KERN_SUCCESS )
- ri.Sys_Error (ERR_DROP, "vm_deallocate failed");
- return cursize;
-}
-
-void Hunk_Free (void *base)
-{
- hunkheader_t *h;
- kern_return_t r;
-
- h = ((hunkheader_t *)base) - 1;
- if (h->magic != HUNK_MAGIC)
- ri.Sys_Error (ERR_FATAL, "Hunk_Free: bad magic");
-
- r = vm_deallocate(task_self(), (vm_address_t)h, h->length);
- if ( r != KERN_SUCCESS )
- ri.Sys_Error (ERR_DROP, "vm_deallocate failed");
-}
-
-
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-}
-
-
-/*
-================
-Sys_SetPalette
-================
-*/
-void Sys_SetPalette (byte *palette)
-{
- byte *p;
- int i;
-
- memcpy (current_palette, palette, sizeof(current_palette));
- p = (byte *)gamma_palette;
- // gamma correct and byte swap
- for (i=0 ; i<256 ; i++, p+=4, palette+=4)
- {
- p[0] = gammatable[palette[0]];
- p[1] = gammatable[palette[1]];
- p[2] = gammatable[palette[2]];
- p[3] = 0xff;
- }
-
-}
-
-
-/*
- ==========================================================================
-
- NEXTSTEP VIEW CLASS
-
- ==========================================================================
- */
-#include "../client/keys.h"
-
-void IN_ActivateMouse (void);
-void IN_DeactivateMouse (void);
-
-@implementation QuakeView
-
--(BOOL) acceptsFirstResponder
-{
- return YES;
-}
-
-- (void)windowDidMove: (NSNotification *)note
-{
- NSRect r;
-
- r = [vid_window_i frame];
- ri.Cmd_ExecuteText (EXEC_NOW, va("vid_x %i", (int)r.origin.x+1));
- ri.Cmd_ExecuteText (EXEC_NOW, va("vid_y %i", (int)r.origin.y+1));
-}
-
-- (void)becomeKeyWindow
-{
- IN_ActivateMouse ();
-}
-
-- (void)resignKeyWindow
-{
- IN_DeactivateMouse ();
-}
-
-
-typedef struct
-{
- int source, dest;
-} keymap_t;
-
-keymap_t keymaps[] =
-{
- {103, K_RIGHTARROW},
- {102, K_LEFTARROW},
- {100, K_UPARROW},
- {101, K_DOWNARROW},
-
- {59, K_F1},
- {60, K_F2},
- {61, K_F3},
- {62, K_F4},
- {63, K_F5},
- {64, K_F6},
- {65, K_F7},
- {66, K_F8},
- {67, K_F9},
- {68, K_F10},
- {87, K_F11},
- {88, K_F12},
-
- {-1,-1}
-};
-
-keymap_t flagmaps[] =
-{
- {NSShiftKeyMask, K_SHIFT},
- {NSControlKeyMask, K_CTRL},
- {NSAlternateKeyMask, K_ALT},
- {NSCommandKeyMask, K_ALT},
-
- {-1,-1}
-};
-
-- (void)mouseDown:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE1, true);
-}
-- (void)mouseUp:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE1, false);
-}
-- (void)rightMouseDown:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE2, true);
-}
-- (void)rightMouseUp:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE2, false);
-}
-
-
-/*
- ===================
- keyboard methods
- ===================
- */
-- (void)keyDown:(NSEvent *)theEvent
-{
- int ch;
- keymap_t *km;
-
-// PSobscurecursor ();
-
-// check for non-ascii first
- ch = [theEvent keyCode];
- for (km=keymaps;km->source!=-1;km++)
- if (ch == km->source)
- {
- Key_Event (km->dest, true);
- return;
- }
-
- ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
- if (ch >= 'A' && ch <= 'Z')
- ch += 'a' - 'A';
- if (ch>=256)
- return;
-
- Key_Event (ch, true);
-}
-
-- (void)flagsChanged:(NSEvent *)theEvent
-{
- static int oldflags;
- int newflags;
- int delta;
- keymap_t *km;
- int i;
-
-// PSobscurecursor ();
- newflags = [theEvent modifierFlags];
- delta = newflags ^ oldflags;
- for (i=0 ; i<32 ; i++)
- {
- if ( !(delta & (1<<i)))
- continue;
- // changed
- for (km=flagmaps;km->source!=-1;km++)
- if ( (1<<i) == km->source)
- {
- if (newflags & (1<<i))
- Key_Event (km->dest, true);
- else
- Key_Event (km->dest, false);
- }
-
- }
-
- oldflags = newflags;
-}
-
-
-- (void)keyUp:(NSEvent *)theEvent
-{
- int ch;
- keymap_t *km;
-
- // check for non-ascii first
- ch = [theEvent keyCode];
- for (km=keymaps;km->source!=-1;km++)
- if (ch == km->source)
- {
- Key_Event (km->dest, false);
- return;
- }
-
- ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
- if (ch >= 'A' && ch <= 'Z')
- ch += 'a' - 'A';
- if (ch>=256)
- return;
- Key_Event (ch, false);
-}
-
-@end
-
-
--- a/rhapsody/rhapqw.txt
+++ /dev/null
@@ -1,36 +1,0 @@
-Put this QuakeWorld executable in a directory with the registered quake and QuakeWorld files. You should be able to launch it from the workspace or the command line.
-
-The sound is a bit lagged and will likely drift on longer games, because I am using the system timer to calculate sample position. This will need to be fixed at some point.
-
-There is no assembly language in yet, and it is still just using DPS to draw, so it isn't real fast yet. Run it on a ppro with a write combining video driver.
-
-If you ever lose your mouse cursor inapropriately due to the game messing up, if you can restart QuakeWorld, you can type "showmouse" to bump the visibility counter by one.
-
-You should eb able to connect to any QuakeWorld server, but you will have to do it with manual connect commands at the console, because we don't have either qspy or a browser plugin (yet) for openstep to find servers.
-
-Because the configuration ranges are different than windows, things like sensitivity and volume will need to be specified at the console.
-
-Some typical values (all of these should be saved automatically in the config file):
-
-vid_mode 1
-Sets 320*240 resolution. 320*200 (vid_mode 0) is somewhat faster, but looks scrunched at some desktop resolutions.
-
-vid_stretched 1
-Sets pixel doubling. Slower, of cource.
-
-snd_mixahead 0.2
-Because this isn't very fast yet, you probably want to increase the mixahead from 0.1 so the sound doesn't break up.
-
-volume 0.15
-The default 0.7 is VERY loud on my system. I don't know what it will be like on other systems.
-
-gamma 1.4
-Because openstep desktops are typically gamma corrected, the game will look washed out with default settings. Geater than 1.0 gets darker, less than gets brighter.
-
-sensitivity 20
-The normal slider range probably doesn't give enough speed for most people.
-
-in_mouse 0
-The mouse is normally grabbed for controlling the game. Setting this to 0 will give the mouse back to the desktop.
-
-
--- a/rhapsody/snd_next.m
+++ /dev/null
@@ -1,2151 +1,0 @@
-
-#import <servers/netname.h>
-#import <libc.h>
-
-#include "../client/client.h"
-
-double snd_basetime;
-port_t devPort;
-
-extern port_t task_self_;
-#define task_self() task_self_
-
-//========================================================================
-
-#ifndef _ntsoundNTSound
-#define _ntsoundNTSound
-
-/* Module NTSound */
-
-#include <mach/kern_return.h>
-#include <mach/port.h>
-#include <mach/message.h>
-
-#ifndef mig_external
-#define mig_external extern
-#endif
-
-#include <mach/std_types.h>
-#include <mach/mach_types.h>
-typedef short *sound_data_t;
-
-#define NTSOUNDNAME "NEXTIME_Sound"
-
-/* Routine ntsoundAcquire */
-mig_external kern_return_t ntsoundAcquire (
- port_t kern_serv_port,
- port_t owner_port,
- vm_offset_t *dmaAddress,
- int *dmaSize,
- int *success);
-
-/* Routine ntsoundRelease */
-mig_external kern_return_t ntsoundRelease (
- port_t kern_serv_port,
- port_t owner_port);
-
-/* Routine ntsoundStart */
-mig_external kern_return_t ntsoundStart (
- port_t kern_serv_port,
- port_t owner_port);
-
-/* Routine ntsoundStop */
-mig_external kern_return_t ntsoundStop (
- port_t kern_serv_port,
- port_t owner_port);
-
-/* Routine ntsoundConfig */
-mig_external kern_return_t ntsoundConfig (
- port_t kern_serv_port,
- port_t owner_port,
- int channelCount,
- int samplingRate,
- int encoding,
- int useInterrupts);
-
-/* Routine ntsoundBytesProcessed */
-mig_external kern_return_t ntsoundBytesProcessed (
- port_t kern_serv_port,
- port_t owner_port,
- int *byte_count);
-
-/* Routine ntsoundDMACount */
-mig_external kern_return_t ntsoundDMACount (
- port_t kern_serv_port,
- port_t owner_port,
- int *dma_count);
-
-/* Routine ntsoundInterruptCount */
-mig_external kern_return_t ntsoundInterruptCount (
- port_t kern_serv_port,
- port_t owner_port,
- int *irq_count);
-
-/* Routine ntsoundWrite */
-mig_external kern_return_t ntsoundWrite (
- port_t kern_serv_port,
- port_t owner_port,
- sound_data_t data,
- unsigned int dataCnt,
- int *actual_count);
-
-/* Routine ntsoundSetVolume */
-mig_external kern_return_t ntsoundSetVolume (
- port_t kern_serv_port,
- port_t owner_port,
- int value);
-
-/* Routine ntsoundWireRange */
-mig_external kern_return_t ntsoundWireRange (
- port_t device_port,
- port_t token,
- port_t task,
- vm_offset_t addr,
- vm_size_t size,
- boolean_t wire);
-
-#endif _ntsoundNTSound
-
-//========================================================================
-
-extern port_t name_server_port;
-
-#define NX_SoundDeviceParameterKeyBase 0
-#define NX_SoundDeviceParameterValueBase 200
-#define NX_SoundStreamParameterKeyBase 400
-#define NX_SoundStreamParameterValueBase 600
-#define NX_SoundParameterTagMax 799
-
-typedef enum _NXSoundParameterTag {
- NX_SoundDeviceBufferSize = NX_SoundDeviceParameterKeyBase,
- NX_SoundDeviceBufferCount,
- NX_SoundDeviceDetectPeaks,
- NX_SoundDeviceRampUp,
- NX_SoundDeviceRampDown,
- NX_SoundDeviceInsertZeros,
- NX_SoundDeviceDeemphasize,
- NX_SoundDeviceMuteSpeaker,
- NX_SoundDeviceMuteHeadphone,
- NX_SoundDeviceMuteLineOut,
- NX_SoundDeviceOutputLoudness,
- NX_SoundDeviceOutputAttenuationStereo,
- NX_SoundDeviceOutputAttenuationLeft,
- NX_SoundDeviceOutputAttenuationRight,
- NX_SoundDeviceAnalogInputSource,
- NX_SoundDeviceMonitorAttenuation,
- NX_SoundDeviceInputGainStereo,
- NX_SoundDeviceInputGainLeft,
- NX_SoundDeviceInputGainRight,
-
- NX_SoundDeviceAnalogInputSource_Microphone
- = NX_SoundDeviceParameterValueBase,
- NX_SoundDeviceAnalogInputSource_LineIn,
-
- NX_SoundStreamDataEncoding = NX_SoundStreamParameterKeyBase,
- NX_SoundStreamSamplingRate,
- NX_SoundStreamChannelCount,
- NX_SoundStreamHighWaterMark,
- NX_SoundStreamLowWaterMark,
- NX_SoundStreamSource,
- NX_SoundStreamSink,
- NX_SoundStreamDetectPeaks,
- NX_SoundStreamGainStereo,
- NX_SoundStreamGainLeft,
- NX_SoundStreamGainRight,
-
- NX_SoundStreamDataEncoding_Linear16 = NX_SoundStreamParameterValueBase,
- NX_SoundStreamDataEncoding_Linear8,
- NX_SoundStreamDataEncoding_Mulaw8,
- NX_SoundStreamDataEncoding_Alaw8,
- NX_SoundStreamDataEncoding_AES,
- NX_SoundStreamSource_Analog,
- NX_SoundStreamSource_AES,
- NX_SoundStreamSink_Analog,
- NX_SoundStreamSink_AES
-} NXSoundParameterTag;
-
-//========================================================================
-
-//#include "NTSound.h"
-#include <mach/mach_types.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/msg_type.h>
-#if !defined(KERNEL) && !defined(MIG_NO_STRINGS)
-#include <strings.h>
-#endif
-/* LINTLIBRARY */
-
-extern port_t mig_get_reply_port();
-extern void mig_dealloc_reply_port();
-
-#ifndef mig_internal
-#define mig_internal static
-#endif
-
-#ifndef TypeCheck
-#define TypeCheck 1
-#endif
-
-#ifndef UseExternRCSId
-#ifdef hc
-#define UseExternRCSId 1
-#endif
-#endif
-
-#ifndef UseStaticMsgType
-#if !defined(hc) || defined(__STDC__)
-#define UseStaticMsgType 1
-#endif
-#endif
-
-#define msg_request_port msg_remote_port
-#define msg_reply_port msg_local_port
-
-
-/* Routine Acquire */
-mig_external kern_return_t ntsoundAcquire (
- port_t kern_serv_port,
- port_t owner_port,
- vm_offset_t *dmaAddress,
- int *dmaSize,
- int *success)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- msg_type_t dmaAddressType;
- vm_offset_t dmaAddress;
- msg_type_t dmaSizeType;
- int dmaSize;
- msg_type_t successType;
- int success;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t dmaAddressCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t dmaSizeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t successCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1008;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1108)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 56) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->dmaAddressType != * (int *) &dmaAddressCheck)
-#else UseStaticMsgType
- if ((OutP->dmaAddressType.msg_type_inline != TRUE) ||
- (OutP->dmaAddressType.msg_type_longform != FALSE) ||
- (OutP->dmaAddressType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->dmaAddressType.msg_type_number != 1) ||
- (OutP->dmaAddressType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *dmaAddress /* dmaAddress */ = /* *dmaAddress */ OutP->dmaAddress;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->dmaSizeType != * (int *) &dmaSizeCheck)
-#else UseStaticMsgType
- if ((OutP->dmaSizeType.msg_type_inline != TRUE) ||
- (OutP->dmaSizeType.msg_type_longform != FALSE) ||
- (OutP->dmaSizeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->dmaSizeType.msg_type_number != 1) ||
- (OutP->dmaSizeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *dmaSize /* dmaSize */ = /* *dmaSize */ OutP->dmaSize;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->successType != * (int *) &successCheck)
-#else UseStaticMsgType
- if ((OutP->successType.msg_type_inline != TRUE) ||
- (OutP->successType.msg_type_longform != FALSE) ||
- (OutP->successType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->successType.msg_type_number != 1) ||
- (OutP->successType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *success /* success */ = /* *success */ OutP->success;
-
- return OutP->RetCode;
-}
-
-/* Routine Release */
-mig_external kern_return_t ntsoundRelease (
- port_t kern_serv_port,
- port_t owner_port)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1009;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1109)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 32) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
- return OutP->RetCode;
-}
-
-/* Routine Start */
-mig_external kern_return_t ntsoundStart (
- port_t kern_serv_port,
- port_t owner_port)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1010;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1110)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 32) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
- return OutP->RetCode;
-}
-
-/* Routine Stop */
-mig_external kern_return_t ntsoundStop (
- port_t kern_serv_port,
- port_t owner_port)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1011;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1111)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 32) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
- return OutP->RetCode;
-}
-
-/* Routine Config */
-mig_external kern_return_t ntsoundConfig (
- port_t kern_serv_port,
- port_t owner_port,
- int channelCount,
- int samplingRate,
- int encoding,
- int useInterrupts)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- msg_type_t channelCountType;
- int channelCount;
- msg_type_t samplingRateType;
- int samplingRate;
- msg_type_t encodingType;
- int encoding;
- msg_type_t useInterruptsType;
- int useInterrupts;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 64;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t channelCountType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t samplingRateType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t encodingType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t useInterruptsType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
-#if UseStaticMsgType
- InP->channelCountType = channelCountType;
-#else UseStaticMsgType
- InP->channelCountType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->channelCountType.msg_type_size = 32;
- InP->channelCountType.msg_type_number = 1;
- InP->channelCountType.msg_type_inline = TRUE;
- InP->channelCountType.msg_type_longform = FALSE;
- InP->channelCountType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->channelCount /* channelCount */ = /* channelCount */ channelCount;
-
-#if UseStaticMsgType
- InP->samplingRateType = samplingRateType;
-#else UseStaticMsgType
- InP->samplingRateType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->samplingRateType.msg_type_size = 32;
- InP->samplingRateType.msg_type_number = 1;
- InP->samplingRateType.msg_type_inline = TRUE;
- InP->samplingRateType.msg_type_longform = FALSE;
- InP->samplingRateType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->samplingRate /* samplingRate */ = /* samplingRate */ samplingRate;
-
-#if UseStaticMsgType
- InP->encodingType = encodingType;
-#else UseStaticMsgType
- InP->encodingType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->encodingType.msg_type_size = 32;
- InP->encodingType.msg_type_number = 1;
- InP->encodingType.msg_type_inline = TRUE;
- InP->encodingType.msg_type_longform = FALSE;
- InP->encodingType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->encoding /* encoding */ = /* encoding */ encoding;
-
-#if UseStaticMsgType
- InP->useInterruptsType = useInterruptsType;
-#else UseStaticMsgType
- InP->useInterruptsType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->useInterruptsType.msg_type_size = 32;
- InP->useInterruptsType.msg_type_number = 1;
- InP->useInterruptsType.msg_type_inline = TRUE;
- InP->useInterruptsType.msg_type_longform = FALSE;
- InP->useInterruptsType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->useInterrupts /* useInterrupts */ = /* useInterrupts */ useInterrupts;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1012;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1112)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 32) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
- return OutP->RetCode;
-}
-
-/* Routine BytesProcessed */
-mig_external kern_return_t ntsoundBytesProcessed (
- port_t kern_serv_port,
- port_t owner_port,
- int *byte_count)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- msg_type_t byte_countType;
- int byte_count;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t byte_countCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1013;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1113)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 40) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->byte_countType != * (int *) &byte_countCheck)
-#else UseStaticMsgType
- if ((OutP->byte_countType.msg_type_inline != TRUE) ||
- (OutP->byte_countType.msg_type_longform != FALSE) ||
- (OutP->byte_countType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->byte_countType.msg_type_number != 1) ||
- (OutP->byte_countType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *byte_count /* byte_count */ = /* *byte_count */ OutP->byte_count;
-
- return OutP->RetCode;
-}
-
-/* Routine DMACount */
-mig_external kern_return_t ntsoundDMACount (
- port_t kern_serv_port,
- port_t owner_port,
- int *dma_count)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- msg_type_t dma_countType;
- int dma_count;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t dma_countCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1014;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1114)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 40) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->dma_countType != * (int *) &dma_countCheck)
-#else UseStaticMsgType
- if ((OutP->dma_countType.msg_type_inline != TRUE) ||
- (OutP->dma_countType.msg_type_longform != FALSE) ||
- (OutP->dma_countType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->dma_countType.msg_type_number != 1) ||
- (OutP->dma_countType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *dma_count /* dma_count */ = /* *dma_count */ OutP->dma_count;
-
- return OutP->RetCode;
-}
-
-/* Routine InterruptCount */
-mig_external kern_return_t ntsoundInterruptCount (
- port_t kern_serv_port,
- port_t owner_port,
- int *irq_count)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- msg_type_t irq_countType;
- int irq_count;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 32;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t irq_countCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1015;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1115)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 40) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->irq_countType != * (int *) &irq_countCheck)
-#else UseStaticMsgType
- if ((OutP->irq_countType.msg_type_inline != TRUE) ||
- (OutP->irq_countType.msg_type_longform != FALSE) ||
- (OutP->irq_countType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->irq_countType.msg_type_number != 1) ||
- (OutP->irq_countType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *irq_count /* irq_count */ = /* *irq_count */ OutP->irq_count;
-
- return OutP->RetCode;
-}
-
-/* Routine Write */
-mig_external kern_return_t ntsoundWrite (
- port_t kern_serv_port,
- port_t owner_port,
- sound_data_t data,
- unsigned int dataCnt,
- int *actual_count)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- msg_type_long_t dataType;
- short data[7000];
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- msg_type_t actual_countType;
- int actual_count;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 44;
- /* Maximum request size 14044 */
- unsigned int msg_size_delta;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_long_t dataType = {
- {
- /* msg_type_name = */ 0,
- /* msg_type_size = */ 0,
- /* msg_type_number = */ 0,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ TRUE,
- /* msg_type_deallocate = */ FALSE,
- },
- /* msg_type_long_name = */ MSG_TYPE_INTEGER_16,
- /* msg_type_long_size = */ 16,
- /* msg_type_long_number = */ 7000,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t actual_countCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
-#if UseStaticMsgType
- InP->dataType = dataType;
-#else UseStaticMsgType
- InP->dataType.msg_type_long_name = MSG_TYPE_INTEGER_16;
- InP->dataType.msg_type_long_size = 16;
- InP->dataType.msg_type_header.msg_type_inline = TRUE;
- InP->dataType.msg_type_header.msg_type_longform = TRUE;
- InP->dataType.msg_type_header.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- if (dataCnt > 7000)
- return MIG_ARRAY_TOO_LARGE;
- bcopy((char *) data, (char *) InP->data, 2 * dataCnt);
-
- InP->dataType.msg_type_long_number /* dataCnt */ = /* dataType.msg_type_long_number */ dataCnt;
-
- msg_size_delta = (2 * dataCnt + 3) & ~3;
- msg_size += msg_size_delta;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1016;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1116)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 40) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->actual_countType != * (int *) &actual_countCheck)
-#else UseStaticMsgType
- if ((OutP->actual_countType.msg_type_inline != TRUE) ||
- (OutP->actual_countType.msg_type_longform != FALSE) ||
- (OutP->actual_countType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->actual_countType.msg_type_number != 1) ||
- (OutP->actual_countType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- *actual_count /* actual_count */ = /* *actual_count */ OutP->actual_count;
-
- return OutP->RetCode;
-}
-
-/* Routine SetVolume */
-mig_external kern_return_t ntsoundSetVolume (
- port_t kern_serv_port,
- port_t owner_port,
- int value)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t owner_portType;
- port_t owner_port;
- msg_type_t valueType;
- int value;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 40;
-
-#if UseStaticMsgType
- static const msg_type_t owner_portType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t valueType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->owner_portType = owner_portType;
-#else UseStaticMsgType
- InP->owner_portType.msg_type_name = MSG_TYPE_PORT;
- InP->owner_portType.msg_type_size = 32;
- InP->owner_portType.msg_type_number = 1;
- InP->owner_portType.msg_type_inline = TRUE;
- InP->owner_portType.msg_type_longform = FALSE;
- InP->owner_portType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->owner_port /* owner_port */ = /* owner_port */ owner_port;
-
-#if UseStaticMsgType
- InP->valueType = valueType;
-#else UseStaticMsgType
- InP->valueType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->valueType.msg_type_size = 32;
- InP->valueType.msg_type_number = 1;
- InP->valueType.msg_type_inline = TRUE;
- InP->valueType.msg_type_longform = FALSE;
- InP->valueType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->value /* value */ = /* value */ value;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = kern_serv_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1017;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1117)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 32) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
- return OutP->RetCode;
-}
-
-/* Routine WireRange */
-mig_external kern_return_t ntsoundWireRange (
- port_t device_port,
- port_t token,
- port_t task,
- vm_offset_t addr,
- vm_size_t size,
- boolean_t wire)
-{
- typedef struct {
- msg_header_t Head;
- msg_type_t tokenType;
- port_t token;
- msg_type_t taskType;
- port_t task;
- msg_type_t addrType;
- vm_offset_t addr;
- msg_type_t sizeType;
- vm_size_t size;
- msg_type_t wireType;
- boolean_t wire;
- } Request;
-
- typedef struct {
- msg_header_t Head;
- msg_type_t RetCodeType;
- kern_return_t RetCode;
- } Reply;
-
- union {
- Request In;
- Reply Out;
- } Mess;
-
- register Request *InP = &Mess.In;
- register Reply *OutP = &Mess.Out;
-
- msg_return_t msg_result;
-
-#if TypeCheck
- boolean_t msg_simple;
-#endif TypeCheck
-
- unsigned int msg_size = 64;
-
-#if UseStaticMsgType
- static const msg_type_t tokenType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t taskType = {
- /* msg_type_name = */ MSG_TYPE_PORT,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t addrType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t sizeType = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t wireType = {
- /* msg_type_name = */ MSG_TYPE_BOOLEAN,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0,
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- static const msg_type_t RetCodeCheck = {
- /* msg_type_name = */ MSG_TYPE_INTEGER_32,
- /* msg_type_size = */ 32,
- /* msg_type_number = */ 1,
- /* msg_type_inline = */ TRUE,
- /* msg_type_longform = */ FALSE,
- /* msg_type_deallocate = */ FALSE,
- /* msg_type_unused = */ 0
- };
-#endif UseStaticMsgType
-
-#if UseStaticMsgType
- InP->tokenType = tokenType;
-#else UseStaticMsgType
- InP->tokenType.msg_type_name = MSG_TYPE_PORT;
- InP->tokenType.msg_type_size = 32;
- InP->tokenType.msg_type_number = 1;
- InP->tokenType.msg_type_inline = TRUE;
- InP->tokenType.msg_type_longform = FALSE;
- InP->tokenType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->token /* token */ = /* token */ token;
-
-#if UseStaticMsgType
- InP->taskType = taskType;
-#else UseStaticMsgType
- InP->taskType.msg_type_name = MSG_TYPE_PORT;
- InP->taskType.msg_type_size = 32;
- InP->taskType.msg_type_number = 1;
- InP->taskType.msg_type_inline = TRUE;
- InP->taskType.msg_type_longform = FALSE;
- InP->taskType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->task /* task */ = /* task */ task;
-
-#if UseStaticMsgType
- InP->addrType = addrType;
-#else UseStaticMsgType
- InP->addrType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->addrType.msg_type_size = 32;
- InP->addrType.msg_type_number = 1;
- InP->addrType.msg_type_inline = TRUE;
- InP->addrType.msg_type_longform = FALSE;
- InP->addrType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->addr /* addr */ = /* addr */ addr;
-
-#if UseStaticMsgType
- InP->sizeType = sizeType;
-#else UseStaticMsgType
- InP->sizeType.msg_type_name = MSG_TYPE_INTEGER_32;
- InP->sizeType.msg_type_size = 32;
- InP->sizeType.msg_type_number = 1;
- InP->sizeType.msg_type_inline = TRUE;
- InP->sizeType.msg_type_longform = FALSE;
- InP->sizeType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->size /* size */ = /* size */ size;
-
-#if UseStaticMsgType
- InP->wireType = wireType;
-#else UseStaticMsgType
- InP->wireType.msg_type_name = MSG_TYPE_BOOLEAN;
- InP->wireType.msg_type_size = 32;
- InP->wireType.msg_type_number = 1;
- InP->wireType.msg_type_inline = TRUE;
- InP->wireType.msg_type_longform = FALSE;
- InP->wireType.msg_type_deallocate = FALSE;
-#endif UseStaticMsgType
-
- InP->wire /* wire */ = /* wire */ wire;
-
- InP->Head.msg_simple = FALSE;
- InP->Head.msg_size = msg_size;
- InP->Head.msg_type = MSG_TYPE_NORMAL | MSG_TYPE_RPC;
- InP->Head.msg_request_port = device_port;
- InP->Head.msg_reply_port = mig_get_reply_port();
- InP->Head.msg_id = 1018;
-
- msg_result = msg_rpc(&InP->Head, MSG_OPTION_NONE, sizeof(Reply), 0, 0);
- if (msg_result != RPC_SUCCESS) {
- if (msg_result == RCV_INVALID_PORT)
- mig_dealloc_reply_port();
- return msg_result;
- }
-
-#if TypeCheck
- msg_size = OutP->Head.msg_size;
- msg_simple = OutP->Head.msg_simple;
-#endif TypeCheck
-
- if (OutP->Head.msg_id != 1118)
- return MIG_REPLY_MISMATCH;
-
-#if TypeCheck
- if (((msg_size != 32) || (msg_simple != TRUE)) &&
- ((msg_size != sizeof(death_pill_t)) ||
- (msg_simple != TRUE) ||
- (OutP->RetCode == KERN_SUCCESS)))
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
-#if TypeCheck
-#if UseStaticMsgType
- if (* (int *) &OutP->RetCodeType != * (int *) &RetCodeCheck)
-#else UseStaticMsgType
- if ((OutP->RetCodeType.msg_type_inline != TRUE) ||
- (OutP->RetCodeType.msg_type_longform != FALSE) ||
- (OutP->RetCodeType.msg_type_name != MSG_TYPE_INTEGER_32) ||
- (OutP->RetCodeType.msg_type_number != 1) ||
- (OutP->RetCodeType.msg_type_size != 32))
-#endif UseStaticMsgType
- return MIG_TYPE_ERROR;
-#endif TypeCheck
-
- if (OutP->RetCode != KERN_SUCCESS)
- return OutP->RetCode;
-
- return OutP->RetCode;
-}
-
-
-//========================================================================
-
-/*
-==================
-SNDDMA_Init
-
-Try to find a sound device to mix for.
-Returns false if nothing is found.
-==================
-*/
-qboolean SNDDMA_Init(void)
-{
- int err;
- int i;
- byte *buf;
- int bufsize;
- int progress, oldprogress;
-
- shm = &sn;
- shm->channels = 2;
- shm->samplebits = 16;
- shm->speed = 11025;
-
- err = netname_look_up(name_server_port,"", NTSOUNDNAME,&devPort);
- if (err)
- {
- Com_Printf("SNDDMA_Init: Cannot access theater driver\n");
- return false;
- }
-
- err = ntsoundAcquire(devPort,task_self(),(vm_offset_t *)&buf,&bufsize,&i);
- if (err || !i)
- {
- Com_Printf("SNDDMA_Init: Sound driver is busy or messed up\n");
- return false;
- }
-
- err = ntsoundConfig(devPort,task_self(),shm->channels,(int)shm->speed,
- NX_SoundStreamDataEncoding_Linear16, 1);
- if (err)
- {
- Com_Printf("SNDDMA_Init: ntsoundConfig error: %d\n",err);
- return false;
- }
- else
- Com_Printf("SNDDMA_Init: Configured for %d Hz, %d channels\n"
- ,(int)shm->speed,shm->channels);
- // printf ("buf: 0x%x\n", buf);
- // printf ("bufsize: %d\n", bufsize);
-
- bzero(buf,bufsize);
-
-// ntsoundSetVolume(devPort,task_self(),5);
- ntsoundStart(devPort,task_self());
-
- shm->soundalive = true;
- shm->splitbuffer = false;
- shm->samples = bufsize/(shm->samplebits/8);
- shm->samplepos = 0;
- shm->submission_chunk = 1;
- shm->buffer = buf;
-
- //
- // find a buffer crossing point for pos testing
- //
-
- ntsoundBytesProcessed(devPort,task_self(),&oldprogress);
- do
- {
- ntsoundBytesProcessed(devPort,task_self(),&progress);
- } while (progress == oldprogress);
- snd_basetime = Sys_DoubleTime() - progress/(11025*2);
-
- return true;
-}
-
-/*
-==============
-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)
-{
- int progress;
-
-#if 0
- ntsoundBytesProcessed(devPort,task_self(),&progress);
-// ntsoundDMACount(devPort,task_self(),&progress);
-
-//printf ("(%i / %f) ", progress, (float)(Sys_DoubleTime ()));
- progress += 2048;
- progress >>= 1;
-#else
-
- progress = (Sys_DoubleTime() - snd_basetime)*11025*2;
- progress += 8192;
- progress &= ~1;
-#endif
-
- progress &= (shm->samples-1);
-
- return progress;
-}
-
-
-/*
-==============
-SNDDMA_Submit
-
-Reset the sound device for exiting
-===============
-*/
-void SNDDMA_Submit(void)
-{
-}
-
-/*
-==============
-SNDDMA_Shutdown
-
-Reset the sound device for exiting
-===============
-*/
-void SNDDMA_Shutdown(void)
-{
- ntsoundStop(devPort,task_self());
- ntsoundRelease(devPort,task_self());
-}
-
--- a/rhapsody/swimp_rhap.m
+++ /dev/null
@@ -1,580 +1,0 @@
-#import <AppKit/AppKit.h>
-#import <Interceptor/NSDirectScreen.h>
-#import <AppKit/NSColor.h>
-#include "../ref_soft/r_local.h"
-
-@interface QuakeView : NSView
-@end
-
-NSWindow *vid_window_i;
-QuakeView *vid_view_i;
-NSDirectScreen *vid_screen;
-byte *vid_buffer; // real framebuffer
-int vid_rowbytes; // framebuffer rowbytes
-
-unsigned *buffernative; // 24 bit off-screen back buffer for window
-unsigned swimp_palette[256];
-
-typedef enum {
- rhap_shutdown,
- rhap_windowed,
- rhap_fullscreen
-} rhapMode_t;
-
-rhapMode_t rhap_mode;
-
-/*
-=======================================================================
-
-FULLSCREEN
-
-=======================================================================
-*/
-
-/*
-** InitFullscreen
-*/
-rserr_t InitFullscreen (int width, int height)
-{
- NSDictionary *mode, *bestMode;
- int modeWidth, bestWidth;
- int modeHeight, bestHeight;
- NSArray *modes;
- int i;
- NSString *string;
-
-
- vid_screen = [[NSDirectScreen alloc] initWithScreen:[NSScreen mainScreen]];
-
- // search for an apropriate mode
- modes = [vid_screen availableDisplayModes];
- bestMode = NULL;
- bestWidth = 99999;
- bestHeight = 99999;
- for (i=0 ; i<[modes count] ; i++) {
- mode = [modes objectAtIndex: i];
- string = [mode objectForKey: @"NSDirectScreenPixelEncoding"];
- if ( ![string isEqualToString: @"PPPPPPPP"] )
- continue; // only look at paletted modes
- modeWidth = [[mode objectForKey: @"NSDirectScreenWidth"] intValue];
- modeHeight = [[mode objectForKey: @"NSDirectScreenHeight"] intValue];
- if (modeWidth < width || modeHeight < height)
- continue;
- if (modeWidth < bestWidth) {
- bestWidth = modeWidth;
- bestHeight = modeHeight;
- bestMode = mode;
- }
- }
-
- // if there wasn't any paletted mode of that res or greater, fail
- if (!bestMode)
- return rserr_invalid_fullscreen;
-
- ri.Con_Printf (PRINT_ALL, "SheildDisplay\n");
- [vid_screen shieldDisplay];
-
- // hide the cursor in all fullscreen modes
- [NSCursor hide];
-
- vid_window_i = [vid_screen shieldingWindow];
-
- ri.Con_Printf (PRINT_ALL, "switchToDisplayMode\n");
- [vid_screen switchToDisplayMode:bestMode];
-// [vid_screen fadeDisplayOutToColor:[NSColor blackColor]];
-// [vid_screen fadeDisplayInFromColor:[NSColor blackColor]];
-
- vid_buffer = [vid_screen data];
- vid_rowbytes = [vid_screen bytesPerRow];
-
- return rserr_ok;
-}
-
-void ShutdownFullscreen (void)
-{
- [vid_screen dealloc];
- [NSCursor unhide];
-}
-
-void SetPaletteFullscreen (const unsigned char *palette) {
-#if 0
- byte *p;
- int i;
- NSDirectPalette *pal;
-
- pal = [NSDirectPalette init];
- for (i=0 ; i<256 ; i++)
- [pal setRed: palette[0]*(1.0/255)
- green: palette[1]*(1.0/255)
- blue: palette[2]*(1.0/255)
- atIndex: i];
- [vid_screen setPalette: pal];
- [pal release];
-#endif
-}
-
-
-
-void BlitFullscreen (void)
-{
- int i, j;
- int w;
- int *dest, *source;
-
- w = vid.width>>2;
-
- source = (int *)vid.buffer; // off-screen buffer
- dest = (int *)vid_buffer; // directly on screen
- for (j=0 ; j<vid.height ; j++
- , source += (vid.rowbytes>>2), dest += (vid_rowbytes>>2) ) {
- for (i=0 ; i<w ; i++ ) {
- dest[i] = source[i];
- }
- }
-}
-
-/*
-=======================================================================
-
-WINDOWED
-
-=======================================================================
-*/
-
-/*
-** InitWindowed
-*/
-rserr_t InitWindowed (int width, int height)
-{
- rserr_t retval = rserr_ok;
- NSRect content;
- cvar_t *vid_xpos;
- cvar_t *vid_ypos;
-
- //
- // open a window
- //
- vid_xpos = ri.Cvar_Get ("vid_xpos", "0", 0);
- vid_ypos = ri.Cvar_Get ("vid_ypos", "0", 0);
-
- content = NSMakeRect (vid_xpos->value,vid_ypos->value, width, height);
- vid_window_i = [[NSWindow alloc]
- initWithContentRect: content
- styleMask: NSTitledWindowMask
- backing: NSBackingStoreRetained
- defer: NO
- ];
-
-// [vid_window_i addToEventMask: NS_FLAGSCHANGEDMASK];
- [vid_window_i setTitle: @"Quake2"];
-
- buffernative = malloc(width * height * 4);
-
- return retval;
-}
-
-void ShutdownWindowed (void)
-{
- if (vid_window_i)
- {
- [vid_window_i release];
- vid_window_i = NULL;
- }
- if (buffernative)
- {
- free (buffernative);
- buffernative = NULL;
- }
-}
-
-void SetPaletteWindowed (const unsigned char *palette) {
- byte *p;
- int i;
-
- p = (byte *)swimp_palette;
- for (i=0 ; i<256 ; i++, p+=4, palette+=4)
- {
- p[0] = palette[0];
- p[1] = palette[1];
- p[2] = palette[2];
- p[3] = 0xff;
- }
-}
-
-
-void BlitWindowed (void)
-{
- int i, c;
- int bps, spp, bpp, bpr;
- unsigned char *planes[5];
- NSRect bounds;
-
- if (!vid_view_i)
- return;
-
- // translate to 24 bit color
- c = vid.width*vid.height;
- for (i=0 ; i<c ; i++)
- buffernative[i] = swimp_palette[vid.buffer[i]];
-
- bps = 8;
- spp = 3;
- bpp = 32;
- bpr = vid.width * 4;
- planes[0] = (unsigned char *)buffernative;
-
- bounds = [vid_view_i bounds];
-
- [vid_view_i lockFocus];
-
- NSDrawBitmap(
- bounds,
- vid.width,
- vid.height,
- bps,
- spp,
- bpp,
- bpr,
- NO,
- NO,
- @"NSDeviceRGBColorSpace",
- planes
- );
-
- [vid_view_i unlockFocus];
- PSWait ();
-}
-
-
-//======================================================================
-
-/*
-** RW_IMP.C
-**
-** This file contains ALL Win32 specific stuff having to do with the
-** software refresh. When a port is being made the following functions
-** must be implemented by the port:
-**
-** SWimp_EndFrame
-** SWimp_Init
-** SWimp_SetPalette
-** SWimp_Shutdown
-*/
-
-
-/*
-** SWimp_Init
-**
-** This routine is responsible for initializing the implementation
-** specific stuff in a software rendering subsystem.
-*/
-int SWimp_Init( void *hInstance, void *wndProc )
-{
- if (!NSApp)
- {
- [NSApplication sharedApplication];
- [NSApp finishLaunching];
- }
-
- return true;
-}
-
-
-/*
-** SWimp_SetMode
-*/
-rserr_t SWimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen)
-{
- const char *win_fs[] = { "W", "FS" };
- NSRect content;
- rserr_t ret;
-
- // free resources in use
- SWimp_Shutdown ();
-
- ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( pwidth, pheight, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d %s\n", *pwidth, *pheight, win_fs[fullscreen] );
-
- vid.buffer = malloc(*pwidth * *pheight);
- vid.rowbytes = *pwidth;
-
- if (fullscreen) {
- rhap_mode = rhap_fullscreen;
- ret = InitFullscreen (*pwidth, *pheight);
- } else {
- rhap_mode = rhap_windowed;
- ret = InitWindowed (*pwidth, *pheight);
- }
-
- if (ret != rserr_ok) {
- SWimp_Shutdown ();
- return ret;
- }
-
- /*
- ** the view is identical in windowed and fullscreen modes
- */
- content.origin.x = content.origin.y = 0;
- content.size.width = *pwidth;
- content.size.height = *pheight;
- vid_view_i = [[QuakeView alloc] initWithFrame: content];
- [vid_window_i setContentView: vid_view_i];
- [vid_window_i makeFirstResponder: vid_view_i];
- [vid_window_i setDelegate: vid_view_i];
-
- [NSApp activateIgnoringOtherApps: YES];
- [vid_window_i makeKeyAndOrderFront: nil];
- [vid_window_i display];
-
- return ret;
-}
-
-/*
-** SWimp_Shutdown
-**
-** System specific graphics subsystem shutdown routine
-*/
-void SWimp_Shutdown( void )
-{
- if (rhap_mode == rhap_windowed)
- ShutdownWindowed ();
- else if (rhap_mode == rhap_fullscreen)
- ShutdownFullscreen ();
-
- rhap_mode = rhap_shutdown;
-
- if (vid.buffer)
- {
- free (vid.buffer);
- vid.buffer = NULL;
- }
-}
-
-
-/*
-** SWimp_SetPalette
-**
-** System specific palette setting routine. A NULL palette means
-** to use the existing palette. The palette is expected to be in
-** a padded 4-byte xRGB format.
-*/
-void SWimp_SetPalette( const unsigned char *palette )
-{
- if (rhap_mode == rhap_windowed)
- SetPaletteWindowed (palette);
- else if (rhap_mode == rhap_fullscreen)
- SetPaletteFullscreen (palette);
-}
-
-
-/*
-** SWimp_EndFrame
-**
-** This does an implementation specific copy from the backbuffer to the
-** front buffer. In the Win32 case it uses BitBlt or BltFast depending
-** on whether we're using DIB sections/GDI or DDRAW.
-*/
-void SWimp_EndFrame (void)
-{
- if (rhap_mode == rhap_windowed)
- BlitWindowed ();
- else if (rhap_mode == rhap_fullscreen)
- BlitFullscreen ();
-}
-
-
-/*
-** SWimp_AppActivate
-*/
-void SWimp_AppActivate( qboolean active )
-{
-}
-
-
-/*
- ==========================================================================
-
- NEXTSTEP VIEW CLASS
-
- ==========================================================================
- */
-#include "../client/keys.h"
-
-void IN_ActivateMouse (void);
-void IN_DeactivateMouse (void);
-
-@implementation QuakeView
-
--(BOOL) acceptsFirstResponder
-{
- return YES;
-}
-
-- (void)windowDidMove: (NSNotification *)note
-{
- NSRect r;
-
- r = [vid_window_i frame];
- ri.Cmd_ExecuteText (EXEC_NOW, va("vid_xpos %i", (int)r.origin.x+1));
- ri.Cmd_ExecuteText (EXEC_NOW, va("vid_ypos %i", (int)r.origin.y+1));
-}
-
-- (void)becomeKeyWindow
-{
- IN_ActivateMouse ();
-}
-
-- (void)resignKeyWindow
-{
- IN_DeactivateMouse ();
-}
-
-
-typedef struct
-{
- int source, dest;
-} keymap_t;
-
-keymap_t keymaps[] =
-{
- {0xf703, K_RIGHTARROW},
- {0xf702, K_LEFTARROW},
- {0xf700, K_UPARROW},
- {0xf701, K_DOWNARROW},
-
- {0xf704, K_F1},
- {0xf705, K_F2},
- {0xf706, K_F3},
- {0xf707, K_F4},
- {0xf708, K_F5},
- {0xf709, K_F6},
- {0xf70a, K_F7},
- {0xf70b, K_F8},
- {0xf70c, K_F9},
- {0xf70d, K_F10},
- {0xf70e, K_F11},
- {0xf70f, K_F12},
-
- {-1,-1}
-};
-
-keymap_t flagmaps[] =
-{
- {NSShiftKeyMask, K_SHIFT},
- {NSControlKeyMask, K_CTRL},
- {NSAlternateKeyMask, K_ALT},
- {NSCommandKeyMask, K_ALT},
-
- {-1,-1}
-};
-
-- (void)mouseDown:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE1, true, 0);
-}
-- (void)mouseUp:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE1, false, 0);
-}
-- (void)rightMouseDown:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE2, true, 0);
-}
-- (void)rightMouseUp:(NSEvent *)theEvent
-{
- Key_Event (K_MOUSE2, false, 0);
-}
-
-
-/*
- ===================
- keyboard methods
- ===================
- */
-- (void)keyDown:(NSEvent *)theEvent
-{
- int ch;
- keymap_t *km;
-
-// PSobscurecursor ();
-
- ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
-// check for non-ascii first
- for (km=keymaps;km->source!=-1;km++)
- if (ch == km->source)
- {
- Key_Event (km->dest, true, 0);
- return;
- }
-
- if (ch >= 'A' && ch <= 'Z')
- ch += 'a' - 'A';
- if (ch>=256)
- return;
-
- Key_Event (ch, true, 0);
-}
-
-- (void)flagsChanged:(NSEvent *)theEvent
-{
- static int oldflags;
- int newflags;
- int delta;
- keymap_t *km;
- int i;
-
-// PSobscurecursor ();
- newflags = [theEvent modifierFlags];
- delta = newflags ^ oldflags;
- for (i=0 ; i<32 ; i++)
- {
- if ( !(delta & (1<<i)))
- continue;
- // changed
- for (km=flagmaps;km->source!=-1;km++)
- if ( (1<<i) == km->source)
- {
- if (newflags & (1<<i))
- Key_Event (km->dest, true, 0);
- else
- Key_Event (km->dest, false, 0);
- }
-
- }
-
- oldflags = newflags;
-}
-
-
-- (void)keyUp:(NSEvent *)theEvent
-{
- int ch;
- keymap_t *km;
-
- ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
-
- // check for non-ascii first
- for (km=keymaps;km->source!=-1;km++)
- if (ch == km->source)
- {
- Key_Event (km->dest, false, 0);
- return;
- }
-
- if (ch >= 'A' && ch <= 'Z')
- ch += 'a' - 'A';
- if (ch>=256)
- return;
- Key_Event (ch, false, 0);
-}
-
-@end
-
-
--- a/rhapsody/sys_rhap.m
+++ /dev/null
@@ -1,338 +1,0 @@
-#include <libc.h>
-#import <AppKit/AppKit.h>
-#include "../qcommon/qcommon.h"
-
-int curtime;
-int sys_frame_time;
-
-void Sys_UnloadGame (void)
-{
-}
-
-void *GetGameAPI (void *import);
-
-void *Sys_GetGameAPI (void *parms)
-{
- // we are hard-linked in, so no need to load anything
- return GetGameAPI (parms);
-}
-
-void Sys_CopyProtect (void)
-{
-}
-
-char *Sys_GetClipboardData( void )
-{
- return NULL;
-}
-
-
-//===========================================================================
-
-int hunkcount;
-
-byte *membase;
-int hunkmaxsize;
-int cursize;
-
-//#define VIRTUAL_ALLOC
-
-void *Hunk_Begin (int maxsize)
-{
- // reserve a huge chunk of memory, but don't commit any yet
- cursize = 0;
- hunkmaxsize = maxsize;
-#ifdef VIRTUAL_ALLOC
- membase = VirtualAlloc (NULL, maxsize, MEM_RESERVE, PAGE_NOACCESS);
-#else
- membase = malloc (maxsize);
- memset (membase, 0, maxsize);
-#endif
- if (!membase)
- Sys_Error ("VirtualAlloc reserve failed");
- return (void *)membase;
-}
-
-void *Hunk_Alloc (int size)
-{
- void *buf;
-
- // round to cacheline
- size = (size+31)&~31;
-
-#ifdef VIRTUAL_ALLOC
- // commit pages as needed
-// buf = VirtualAlloc (membase+cursize, size, MEM_COMMIT, PAGE_READWRITE);
- buf = VirtualAlloc (membase, cursize+size, MEM_COMMIT, PAGE_READWRITE);
- if (!buf)
- {
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL);
- Sys_Error ("VirtualAlloc commit failed.\n%s", buf);
- }
-#endif
- cursize += size;
- if (cursize > hunkmaxsize)
- Sys_Error ("Hunk_Alloc overflow");
-
- return (void *)(membase+cursize-size);
-}
-
-int Hunk_End (void)
-{
-
- // free the remaining unused virtual memory
-#if 0
- void *buf;
-
- // write protect it
- buf = VirtualAlloc (membase, cursize, MEM_COMMIT, PAGE_READONLY);
- if (!buf)
- Sys_Error ("VirtualAlloc commit failed");
-#endif
-
- hunkcount++;
-//Com_Printf ("hunkcount: %i\n", hunkcount);
- return cursize;
-}
-
-void Hunk_Free (void *base)
-{
- if ( base )
-#ifdef VIRTUAL_ALLOC
- VirtualFree (base, 0, MEM_RELEASE);
-#else
- free (base);
-#endif
-
- hunkcount--;
-}
-
-
-//===========================================================================
-
-
-void Sys_Mkdir (char *path)
-{
- if (mkdir (path, 0777) != -1)
- return;
- if (errno != EEXIST)
- Com_Error (ERR_FATAL, "mkdir %s: %s",path, strerror(errno));
-}
-
-char *Sys_FindFirst (char *path, unsigned musthave, unsigned canthave)
-{
- return NULL;
-}
-
-char *Sys_FindNext (unsigned musthave, unsigned canthave)
-{
- return NULL;
-}
-
-void Sys_FindClose (void)
-{
-}
-
-/*
-================
-Sys_Milliseconds
-================
-*/
-int Sys_Milliseconds (void)
-{
- struct timeval tp;
- struct timezone tzp;
- static int secbase;
-
- gettimeofday(&tp, &tzp);
-
- if (!secbase)
- {
- secbase = tp.tv_sec;
- return tp.tv_usec/1000;
- }
-
- curtime = (tp.tv_sec - secbase)*1000 + tp.tv_usec/1000;
-
- return curtime;
-}
-
-/*
-================
-Sys_Error
-================
-*/
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
- char string[1024];
-
-// change stdin to non blocking
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-
- va_start (argptr,error);
- vsprintf (string,error,argptr);
- va_end (argptr);
- printf ("Fatal error: %s\n",string);
-
- if (!NSApp)
- { // appkit isn't running, so don't try to pop up a panel
- exit (1);
- }
- NSRunAlertPanel (@"Fatal error",[NSString stringWithCString: string]
- ,@"exit",NULL,NULL);
- [NSApp terminate: NULL];
- exit(1);
-}
-
-/*
-================
-Sys_Printf
-================
-*/
-void Sys_ConsoleOutput (char *text)
-{
- char *t_p;
- int l, r;
-
- l = strlen(text);
- t_p = text;
-
-// make sure everything goes through, even though we are non-blocking
- while (l)
- {
- r = write (1, text, l);
- if (r != l)
- sleep (0);
- if (r > 0)
- {
- t_p += r;
- l -= r;
- }
- }
-}
-
-/*
-================
-Sys_Quit
-================
-*/
-void Sys_Quit (void)
-{
-// change stdin to blocking
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-
- if (!NSApp)
- exit (0); // appkit isn't running
-
- [NSApp terminate:nil];
-}
-
-
-/*
-================
-Sys_Init
-================
-*/
-void Sys_Init(void)
-{
- moncontrol(0); // turn off profiling except during real Quake work
-
-// change stdin to non blocking
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-}
-
-
-extern NSWindow *vid_window_i;
-
-void Sys_AppActivate (void)
-{
- [vid_window_i makeKeyAndOrderFront: nil];
-}
-
-
-/*
-================
-Sys_SendKeyEvents
-
-service any pending appkit events
-================
-*/
-void Sys_SendKeyEvents (void)
-{
- NSEvent *event;
- NSDate *date;
-
- date = [NSDate date];
- do
- {
- event = [NSApp
- nextEventMatchingMask: 0xffffffff
- untilDate: date
- inMode: @"NSDefaultRunLoopMode"
- dequeue: YES];
- if (event)
- [NSApp sendEvent: event];
- } while (event);
-
- // grab frame time
- sys_frame_time = Sys_Milliseconds();
-}
-
-
-/*
-================
-Sys_ConsoleInput
-
-Checks for a complete line of text typed in at the console, then forwards
-it to the host command processor
-================
-*/
-char *Sys_ConsoleInput (void)
-{
- static char text[256];
- int len;
-
- len = read (0, text, sizeof(text));
- if (len < 1)
- return NULL;
- text[len-1] = 0; // rip off the /n and terminate
-
- return text;
-}
-
-
-/*
-=============
-main
-=============
-*/
-void main (int argc, char **argv)
-{
- int frame;
- NSAutoreleasePool *pool;
- int oldtime, t;
-
- pool = [[NSAutoreleasePool alloc] init];
-
- Qcommon_Init (argc, argv);
-
- [pool release];
-
- oldtime = Sys_Milliseconds ();
- while (1)
- {
- pool =[[NSAutoreleasePool alloc] init];
-
- if (++frame > 10)
- moncontrol(1);// profile only while we do each Quake frame
-
- t = Sys_Milliseconds ();
- Qcommon_Frame (t - oldtime);
- oldtime = t;
- moncontrol(0);
-
- [pool release];
- }
-}
-
--- a/rhapsody/vid_next.m
+++ /dev/null
@@ -1,1789 +1,0 @@
-// vid_next.m -- NEXTSTEP video driver
-
-#define INTERCEPTOR
-
-#import <appkit/appkit.h>
-#import <string.h>
-#import "intercep.h"
-#include "quakedef.h"
-#include "d_local.h"
-
-int BASEWIDTH = 320;
-int BASEHEIGHT = 200;
-
-void SetupBitmap (void);
-void SetupFramebuffer (void);
-void UpdateBitmap (void);
-void UpdateFramebuffer (vrect_t *vrect);
-void SetVideoEncoding (char *encoding);
-void Update8_1 (pixel_t *src, byte *dest, int width,
- int height, int destrowbytes);
-void Update16_1 (pixel_t *src, unsigned short *dest, int width,
- int height, int destrowbytes);
-void Update32_1 (pixel_t *src, unsigned *dest, int width,
- int height, int destrowbytes);
-
-
-@interface QuakeView : View
-@end
-
-@interface FrameWindow:Window
-@end
-
-unsigned short d_8to16table[256]; // not used in 8 bpp mode
-unsigned d_8to24table[256]; // not used in 8 bpp mode
-
-
-/*
-==========================================================================
-
- API FUNCTIONS
-
-==========================================================================
-*/
-
-typedef enum {disp_bitmap, disp_framebuffer} display_t;
-
-pixel_t *vid_buffer;
-pixel_t *buffernative;
-unsigned pcolormap[4][256]; // map from quake pixels to native pixels
-unsigned pixbytesnative;
-unsigned rowbytesnative;
-int dither;
-
-int drawdirect = 0;
-
-int d_con_indirect = 0;
-
-display_t vid_display;
-
-byte vid_palette[768]; // saved for restarting vid system
-
-id vid_window_i;
-id vid_view_i;
-#ifdef INTERCEPTOR
-NXDirectBitmap *vid_dbitmap_i;
-NXFramebuffer *vid_framebuffer_i;
-#endif
-
-NXRect screenBounds; // only valid in framebuffer mode
-
-int vid_scale;
-
-char *vid_encodingstring;
-
-int vid_fullscreen;
-int vid_screen;
-
-int vid_high_hunk_mark;
-
-typedef enum
-{
- enc_24_rgba,
- enc_24_0rgb,
- enc_24_rgb0,
- enc_12_rgba,
- enc_12_rgb0,
- enc_15_0rgb,
- enc_564,
- enc_8_gray,
- enc_8_rgb
-} vid_encoding_t;
-
-typedef struct
-{
- char *string;
- int pixelbytes;
- void (*colormap) (void);
- vid_encoding_t name;
-} vidtype_t;
-
-vid_encoding_t vid_encoding;
-
-void Table8 (void);
-void Table15 (void);
-void Table12 (void);
-void Table12Swap (void);
-void Table24 (void);
-void Table24Swap (void);
-
-vidtype_t vid_encodingtable[]=
-{
-{"RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA",4, Table24Swap, enc_24_rgba},
-{"--------RRRRRRRRGGGGGGGGBBBBBBBB",4, Table24, enc_24_0rgb},
-{"RRRRRRRRGGGGGGGGBBBBBBBB--------",4, Table24Swap, enc_24_rgb0},
-{"RRRRGGGGBBBBAAAA",2, Table12Swap, enc_12_rgba},
-{"RRRRGGGGBBBB----",2, Table12, enc_12_rgb0},
-{"-RRRRRGGGGGBBBBB",2, Table15, enc_15_0rgb},
-{"WWWWWWWW",1, Table8, enc_8_gray},
-{"PPPPPPPP",1, Table8, enc_8_rgb},
-{NULL,0, 0, 0}
-};
-
-vidtype_t *vid_type;
-void InitNS8Bit (void);
-
-/*
-================
-D_BeginDirectRect
-================
-*/
-void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height)
-{
-// direct drawing of the "accessing disk" icon isn't supported under Nextstep
-}
-
-
-/*
-================
-D_EndDirectRect
-================
-*/
-void D_EndDirectRect (int x, int y, int width, int height)
-{
-// direct drawing of the "accessing disk" icon isn't supported under Nextstep
-}
-
-
-/*
-==============
-VID_Restart
-
-internal call only
-===============
-*/
-void VID_Restart (display_t mode, int scale)
-{
- vid_display = mode;
- vid_scale = scale;
-
- [NXApp activateSelf:YES];
-
- if (vid_display == disp_framebuffer)
- SetupFramebuffer ();
- else
- SetupBitmap ();
-
- vid.recalc_refdef = 1;
-}
-
-
-/*
-=================
-VID_Scale_f
-
-Keybinding command
-=================
-*/
-void VID_Scale_f (void)
-{
- int scale;
-
- if (Cmd_Argc () != 2)
- return;
-
- scale = atoi (Cmd_Argv(1));
- if (scale != 1 && scale != 2)
- {
- Con_Printf ("scale must be 1 or 2\n");
- return;
- }
- VID_Shutdown ();
- VID_Restart (vid_display, scale);
-}
-
-/*
-=================
-VID_Mode_f
-
-Keybinding command
-=================
-*/
-void VID_Mode_f (void)
-{
- int mode;
-
- if (Cmd_Argc () != 2)
- return;
-
- mode = atoi (Cmd_Argv(1));
-
- VID_Shutdown ();
- if (mode == 0)
- {
- drawdirect = 0;
- VID_Restart (disp_bitmap, vid_scale);
- }
- else if (mode == 1)
- {
- drawdirect = 0;
- VID_Restart (disp_framebuffer, vid_scale);
- }
- else
- {
- drawdirect = 1;
- VID_Restart (disp_framebuffer, vid_scale);
- }
-}
-
-/*
-=================
-VID_Size_f
-
-Keybinding command
-=================
-*/
-void VID_Size_f (void)
-{
- if (Cmd_Argc () != 3)
- return;
-
- VID_Shutdown ();
-
- BASEWIDTH = atoi (Cmd_Argv(1));
- BASEHEIGHT = atoi (Cmd_Argv(2));
-
- VID_Restart (vid_display, vid_scale);
-}
-
-/*
-================
-VID_Init
-================
-*/
-void VID_Init (unsigned char *palette)
-{
- InitNS8Bit (); // fixed palette lookups
-
- Q_memcpy (vid_palette, palette, sizeof(vid_palette));
-
- if (COM_CheckParm ("-bitmap"))
- vid_display = disp_bitmap;
- else
- vid_display = disp_framebuffer;
-
- if (COM_CheckParm ("-screen2"))
- vid_screen = 1;
- else
- vid_screen = 0;
-
- if (COM_CheckParm ("-direct"))
- drawdirect = 1;
-
- Cmd_AddCommand ("vid_scale", VID_Scale_f);
- Cmd_AddCommand ("vid_mode", VID_Mode_f);
- Cmd_AddCommand ("vid_size", VID_Size_f);
-
- vid.width = BASEWIDTH;
- vid.height = BASEHEIGHT;
- vid.aspect = 1.0;
- vid.numpages = 1;
- vid.colormap = host_colormap;
- vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
- vid.maxwarpwidth = WARP_WIDTH;
- vid.maxwarpheight = WARP_HEIGHT;
-
- if (COM_CheckParm ("-scale2"))
- vid_scale = 2;
- else
- vid_scale = 1;
-
- [Application new];
-
- VID_Restart (vid_display, vid_scale);
-}
-
-
-/*
-================
-VID_Shutdown
-================
-*/
-void VID_Shutdown (void)
-{
-#ifdef INTERCEPTOR
- if (vid_dbitmap_i)
- {
- [vid_dbitmap_i free];
- vid_dbitmap_i = 0;
- }
- if (vid_framebuffer_i)
- {
- [vid_framebuffer_i free];
- vid_framebuffer_i = 0;
- }
-#endif
- [vid_window_i close];
- [vid_window_i free];
-}
-
-
-/*
-================
-VID_Update
-================
-*/
-void VID_Update (vrect_t *rects)
-{
- if (drawdirect)
- return;
-
- while (rects)
- {
- UpdateFramebuffer (rects);
- rects = rects->pnext;
- }
-
- if (vid_display == disp_bitmap)
- UpdateBitmap ();
-}
-
-
-/*
-================
-VID_SetPalette
-================
-*/
-void VID_SetPalette (unsigned char *palette)
-{
- Q_memcpy (vid_palette, palette, sizeof(vid_palette));
- vid_type->colormap ();
-}
-
-
-/*
-================
-VID_ShiftPalette
-================
-*/
-void VID_ShiftPalette (unsigned char *palette)
-{
-
- VID_SetPalette (palette);
-}
-
-
-/*
-==========================================================================
-
- NS STUFF
-
-==========================================================================
-*/
-
-
-/*
-=================
-SetVideoEncoding
-=================
-*/
-void SetVideoEncoding (char *encoding)
-{
- vidtype_t *type;
-
- Sys_Printf ("SetVideoEncoding: %s\n",encoding);
- vid_encodingstring = encoding;
-
- for (type = vid_encodingtable ; type->string ; type++)
- {
- if (strcmp(type->string, encoding) == 0)
- {
- pixbytesnative = type->pixelbytes;
- vid_encoding = type->name;
- type->colormap ();
- vid_type = type;
- return;
- }
- }
-
- Sys_Error ("Unsupported video encoding: %s\n",encoding);
-}
-
-/*
-=================
-AllocBuffers
-=================
-*/
-void AllocBuffers (qboolean withnative)
-{
- int surfcachesize;
- void *surfcache;
- int pixels;
- int pixbytes;
- int vid_buffersize;
-
- if (vid_buffer)
- {
- D_FlushCaches ();
- Hunk_FreeToHighMark (vid_high_hunk_mark);
- vid_high_hunk_mark = 0;
- vid_buffer = NULL;
- }
-
- pixels = vid.width * vid.height;
-
- pixbytes = 1 +sizeof (*d_pzbuffer);
- if (withnative)
- pixbytes += pixbytesnative;
-
- surfcachesize = D_SurfaceCacheForRes (vid.width, vid.height);
- vid_buffersize = pixels * pixbytes + surfcachesize;
-
- vid_high_hunk_mark = Hunk_HighMark ();
- vid_buffer = Hunk_HighAllocName (vid_buffersize, "video");
- if (!vid_buffer)
- Sys_Error ("Couldn't alloc video buffers");
-
- vid.buffer = vid_buffer;
-
- d_pzbuffer = (unsigned short *)((byte *)vid_buffer + pixels);
- surfcache = (byte *)d_pzbuffer + pixels * sizeof (*d_pzbuffer);
- if (withnative)
- buffernative = (byte *)surfcache + surfcachesize;
-
- D_InitCaches (surfcache, surfcachesize);
-}
-
-/*
-=================
-SetupFramebuffer
-=================
-*/
-void SetupFramebuffer (void)
-{
-#ifdef INTERCEPTOR
- int windowNum;
- NXRect cont;
- NXScreen const *screens;
- int screencount;
-
-//
-// get the screen list
-//
- [NXApp getScreens:&screens count:&screencount];
-
-//
-// create vid_framebuffer_i
-//
- vid_framebuffer_i = [[NXFramebuffer alloc]
- initFromScreen:screens[vid_screen].screenNumber andMapIfPossible:YES];
- [vid_framebuffer_i screenBounds:&screenBounds];
-
- SetVideoEncoding ([vid_framebuffer_i pixelEncoding]);
-
- buffernative = [vid_framebuffer_i data];
- rowbytesnative = [vid_framebuffer_i bytesPerRow];
-
-//
-// create window
-//
- if (vid_fullscreen)
- {
- vid.height = screenBounds.size.height / vid_scale;
- vid.width = screenBounds.size.width / vid_scale;
- cont.origin.x = 0;
- cont.origin.y = 0;
- cont.size.width = screenBounds.size.width;
- cont.size.height = screenBounds.size.height;
- }
- else
- {
- buffernative = (unsigned char *)buffernative + 8 * rowbytesnative +
- 8 * pixbytesnative;
- vid.width = BASEWIDTH;
- vid.height = BASEHEIGHT;
- cont.origin.x = 8;
- cont.origin.y = screenBounds.size.height - (vid.height*vid_scale) - 8;
- cont.size.width = vid.width * vid_scale;
- cont.size.height = vid.height * vid_scale;
- }
-
- vid_window_i = [[FrameWindow alloc]
- initContent: &cont
- style: NX_PLAINSTYLE
- backing: NX_NONRETAINED
- buttonMask: 0
- defer: NO
- screen: screens+vid_screen];
- windowNum = [vid_window_i windowNum];
- PSsetwindowlevel(40, windowNum);
- PSsetautofill(YES, windowNum);
- PSgsave();
- PSwindowdeviceround(windowNum);
- PSsetgray(NX_BLACK);
- PSsetexposurecolor();
- PSgrestore();
-
-//
-// create view
-//
- vid_view_i = [[QuakeView alloc] initFrame: &screenBounds];
- [[vid_window_i setContentView: vid_view_i] free];
- [vid_window_i makeFirstResponder: vid_view_i];
- [vid_window_i setDelegate: vid_view_i];
- [vid_window_i display];
- [vid_window_i makeKeyAndOrderFront: nil];
- NXPing ();
-
- AllocBuffers (false); // no native buffer
-
- if (drawdirect)
- { // the direct drawing mode to NeXT colorspace
- vid.buffer = buffernative;
- vid.rowbytes = rowbytesnative;
- }
- else
- vid.rowbytes = vid.width;
-
- vid.conbuffer = vid.buffer;
- vid.conrowbytes = vid.rowbytes;
- vid.conwidth = vid.width;
- vid.conheight = vid.height;
-#endif
-}
-
-/*
-=================
-SetupBitmap
-=================
-*/
-void SetupBitmap (void)
-{
- int depth;
- NXRect content;
-
-//
-// open a window
-//
- NXSetRect (&content, 8,136, vid.width*vid_scale, vid.height*vid_scale);
- vid_window_i = [[Window alloc]
- initContent: &content
- style: NX_RESIZEBARSTYLE
- backing: NX_RETAINED
- buttonMask: 0
- defer: NO
- ];
- [vid_window_i display];
- [vid_window_i makeKeyAndOrderFront: nil];
-
- NXPing ();
-
- content.origin.x = content.origin.y = 0;
- vid_view_i = [[QuakeView alloc] initFrame: &content];
- [[vid_window_i setContentView: vid_view_i] free];
- [vid_window_i makeFirstResponder: vid_view_i];
- [vid_window_i setDelegate: vid_view_i];
-
- [vid_window_i addToEventMask: NX_FLAGSCHANGEDMASK];
-
-//
-// find video info
-//
- depth = [Window defaultDepthLimit];
- switch (depth) {
- case NX_EightBitGrayDepth:
- SetVideoEncoding ("WWWWWWWW");
- break;
- case NX_TwelveBitRGBDepth:
- SetVideoEncoding ("RRRRGGGGBBBBAAAA");
- break;
- default:
- case NX_TwentyFourBitRGBDepth:
- SetVideoEncoding ("RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA");
- break;
-// default: // 8 bit color shows up as an unknown...
- Sys_Error ("Unsupported window depth");
- }
-
- [vid_window_i setTitle: "Bitmap Quake Console"];
-
-//
-// allocate memory for the back and translation buffers
-//
- vid.rowbytes = vid.width;
- rowbytesnative = vid.width * pixbytesnative;
-
- AllocBuffers (true);
-
- vid.conbuffer = vid.buffer;
- vid.conrowbytes = vid.rowbytes;
- vid.conwidth = vid.width;
- vid.conheight = vid.height;
-}
-
-
-/*
-=================
-UpdateFramebuffer
-=================
-*/
-void UpdateFramebuffer (vrect_t *vrect)
-{
- byte *psourcebase;
- byte *pdestbase;
- int scale;
-
- psourcebase = vid.buffer + vrect->x + vrect->y * vid.rowbytes;
-
- if (vid_display == disp_bitmap)
- scale = 1; // let NS do the scaling
- else
- scale = vid_scale;
-
- pdestbase = buffernative + scale *
- (vrect->x * pixbytesnative + vrect->y * rowbytesnative);
-
-//
-// translate from ideal to native (except 8 bpp direct) and copy to screen
-//
-
- if (pixbytesnative == 1)
- Update8_1 (psourcebase, pdestbase, vrect->width, vrect->height,
- rowbytesnative);
- else if (pixbytesnative == 2)
- Update16_1 (psourcebase, (unsigned short *)pdestbase, vrect->width, vrect->height,
- rowbytesnative);
- else
- Update32_1 (psourcebase, (unsigned *)pdestbase, vrect->width, vrect->height,
- rowbytesnative);
-}
-
-
-/*
-=================
-UpdateBitmap
-=================
-*/
-void UpdateBitmap (void)
-{
- unsigned char *planes[5];
- NXRect bounds;
- int bpp, spp, bps, bpr, colorspace;
-
-//
-// flush the screen with an image call
-//
- if (pixbytesnative == 1)
- {
- bps = 8;
- spp = 1;
- bpp = 8;
- bpr = vid.width;
- colorspace = NX_OneIsWhiteColorSpace;
- planes[0] = vid.buffer;
- }
- else if (pixbytesnative == 2)
- {
- bps = 4;
- spp = 3;
- bpp = 16;
- bpr = vid.width * 2;
- colorspace = NX_RGBColorSpace;
- planes[0] = buffernative;
- }
- else
- {
- bps = 8;
- spp = 3;
- bpp = 32;
- bpr = vid.width * 4;
- colorspace = NX_RGBColorSpace;
- planes[0] = buffernative;
- }
-
- [vid_view_i getBounds: &bounds];
- [vid_view_i lockFocus];
-
- NXDrawBitmap(
- &bounds,
- vid.width,
- vid.height,
- bps,
- spp,
- bpp,
- bpr,
- NO,
- NO,
- colorspace,
- planes
- );
-
- [vid_view_i unlockFocus];
- NXPing ();
-}
-
-
-
-/*
-==========================================================================
-
- TRANSLATION TABLE BUILDING
-
-==========================================================================
-*/
-
-int redramp[] = {0, 19, 59, 113, 178, 255, 300};
-int greenramp[] = {0, 11, 34, 66, 104, 149, 199, 255, 300};
-int blueramp[] = {0, 28, 84, 161, 255, 300};
-int greyramp[] = { 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204,
- 221, 238, 255, 300};
-
-byte greytable[256];
-byte redtable[256];
-byte greentable[256];
-byte bluetable[256];
-
-void FillTable (byte *table, int *ramp, int base)
-{
- int i, j, o;
-
- o = 0;
- for (i=0 ; i<16 && o < 256; i++)
- {
- j = ramp[i];
- for ( ; o<=j ; o++)
- table[o] = base + i;
- }
-}
-
-void InitNS8Bit (void)
-{
- FillTable (greytable, greyramp, 240);
- FillTable (redtable, redramp, 0);
- FillTable (greentable, greenramp, 0);
- FillTable (bluetable, blueramp, 0);
-}
-
-
-byte ns8trans[256] = // FIXME: dynamically calc this so palettes work
-{
-0,241,242,243,244,244,245,246,247,248,249,250,251,252,253,254,
-45,241,241,242,91,91,91,96,96,136,136,136,141,141,141,141,
-241,46,242,243,243,97,97,97,245,246,143,143,143,143,148,148,
-0,5,45,45,50,50,90,90,95,95,95,95,95,140,140,141,
-0,40,40,40,40,80,80,80,80,80,120,120,120,120,120,120,
-45,50,50,90,90,95,95,135,135,135,136,141,141,181,181,181,
-45,90,91,91,131,131,136,136,136,176,181,181,186,226,231,236,
-45,45,91,91,96,96,136,136,137,142,182,182,187,188,188,233,
-188,249,248,247,246,137,137,137,244,243,243,91,242,241,241,45,
-183,183,183,247,137,137,137,137,137,244,91,91,91,241,241,45,
-252,251,188,188,248,248,142,142,142,244,244,243,91,242,241,45,
-247,247,246,246,245,245,244,244,243,243,242,242,51,241,241,5,
-236,231,231,191,186,185,185,140,140,135,135,95,90,90,45,45,
-4,49,49,53,53,93,93,93,93,92,92,92,243,242,46,241,
-239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,
-239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,182
-};
-
-/*
-===================
-Table8
-===================
-*/
-void Table8 (void)
-{
- byte *pal;
- int r,g,b,v;
- int i;
- byte *table;
-
- pal = vid_palette;
- table = (byte *)pcolormap[0];
-
- for (i=0 ; i<256 ; i++)
- {
- r = pal[0];
- g = pal[1];
- b = pal[2];
- pal += 3;
-
-// use the grey ramp if all indexes are close
-
- if (r-g < 16 && r-g > -16 && r-b < 16 && r-b > -16)
- {
- v = (r+g+b)/3;
- *table++ = greytable[v];
- continue;
- }
-
- r = redtable[r];
- g = greentable[g];
- b = bluetable[b];
-
-// otherwise use the color cube
- *table++ = r*(8*5) + g*5 + b;
- }
-}
-
-/*
-===================
-Table24
-===================
-*/
-void Table24 (void)
-{
- byte *pal;
- int r,g,b,v;
- int i;
- unsigned *table;
-
-
-//
-// 8 8 8 encoding
-//
- pal = vid_palette;
- table = (unsigned *)pcolormap[0];
-
- for (i=0 ; i<256 ; i++)
- {
- r = pal[0];
- g = pal[1];
- b = pal[2];
- pal += 3;
-
- v = (r<<16) + (g<<8) + b;
- *table++ = v;
- }
-}
-
-/*
-===================
-Table24Swap
-===================
-*/
-void Table24Swap (void)
-{
- byte *pal;
- int r,g,b,v;
- int i;
- unsigned *table;
-
-//
-// 8 8 8 encoding
-//
- pal = vid_palette;
- table = (unsigned *)pcolormap[0];
-
- for (i=0 ; i<256 ; i++)
- {
- r = pal[0];
- g = pal[1];
- b = pal[2];
- pal += 3;
-
- v = (r<<24) + (g<<16) + (b<<8) /*+ 255*/;
- v = NXSwapBigLongToHost (v);
- *table++ = v;
- }
-}
-
-
-/*
-===================
-Table15
-===================
-*/
-void Table15 (void)
-{
- byte *pal;
- int r,g,b,v;
- int i, k;
- unsigned char *palette;
- unsigned short *table;
- int dadj;
- int ditheradjust[4] = {(1 << 9) * 3 / 8,
- (1 << 9) * 5 / 8,
- (1 << 9) * 7 / 8,
- (1 << 9) * 1 / 8};
-
- palette = vid_palette;
- table = (unsigned short *)pcolormap;
-
-//
-// 5 5 5 encoding
-//
- for (k=0 ; k<4 ; k++)
- {
- dadj = ditheradjust[k];
-
- pal = vid_palette;
-
- for (i=0 ; i<256 ; i++)
- {
- // shift 6 bits to get back to 0-255, & 3 more for 5 bit color
- // FIXME: scale intensity levels properly
- r = (pal[0] + dadj) >> 3;
- g = (pal[1] + dadj) >> 3;
- b = (pal[2] + dadj) >> 3;
- pal += 3;
-
- v = (r<<10) + (g<<5) + b;
-
- *table++ = v;
- }
- }
-}
-
-/*
-===================
-Table12
-===================
-*/
-void Table12 (void)
-{
- byte *pal;
- int r,g,b,v;
- int i, k;
- unsigned short *table;
- int dadj;
- static int ditheradjust[4] = {(1 << 9) * 3 / 8,
- (1 << 9) * 5 / 8,
- (1 << 9) * 7 / 8,
- (1 << 9) * 1 / 8};
-
- table = (unsigned short *)pcolormap;
-
-//
-// 4 4 4 encoding
-//
- for (k=0 ; k<4 ; k++)
- {
- dadj = ditheradjust[k];
-
- pal = vid_palette;
-
- for (i=0 ; i<256 ; i++)
- {
- // shift 5 bits to get back to 0-255, & 4 more for 4 bit color
- // FIXME: scale intensity levels properly
- r = (pal[0] + dadj) >> 4;
- g = (pal[1] + dadj) >> 4;
- b = (pal[2] + dadj) >> 4;
- pal += 3;
-
- v = ((r<<12) + (g<<8) + (b<<4) /*+ 15*/);
-
- *table++ = v;
- }
- }
-}
-
-/*
-===================
-Table12Swap
-===================
-*/
-void Table12Swap (void)
-{
- byte *pal;
- int r,g,b,v;
- int i, k;
- unsigned short *table;
- int dadj;
- static int ditheradjust[4] = {(1 << 9) * 3 / 8,
- (1 << 9) * 5 / 8,
- (1 << 9) * 7 / 8,
- (1 << 9) * 1 / 8};
-
- table = (unsigned short *)pcolormap;
-
-//
-// 4 4 4 encoding
-//
- for (k=0 ; k<4 ; k++)
- {
- dadj = ditheradjust[k];
-
- pal = vid_palette;
-
- for (i=0 ; i<256 ; i++)
- {
- // shift 5 bits to get back to 0-255, & 4 more for 4 bit color
- // FIXME: scale intensity levels properly
- r = (pal[0] + dadj) >> 4;
- g = (pal[1] + dadj) >> 4;
- b = (pal[2] + dadj) >> 4;
- pal += 3;
-
- v = ((r<<12) + (g<<8) + (b<<4) /*+ 15*/);
- v = NXSwapBigShortToHost (v);
-
- *table++ = v;
- }
- }
-}
-
-
-/*
-==========================================================================
-
- GENERIC IMAGING FUNCTIONS
-
-==========================================================================
-*/
-
-/*
-===================
-Update8_1
-===================
-*/
-void Update8_1 (pixel_t *src, byte *dest, int width, int height,
- int destrowbytes)
-{
- int x,y;
- unsigned rowdelta, srcdelta;
- unsigned xcount;
- byte *pdest;
- int xwidth;
-
- pdest = dest;
-
- xcount = width >> 3;
- srcdelta = vid.width - width;
-
- xwidth = width - (xcount << 3);
- if (xwidth)
- Sys_Error ("Width not multiple of 8");
-
- if ((vid_display == disp_framebuffer) && (vid_scale == 2))
- {
- int nextrow = destrowbytes;
-
- rowdelta = destrowbytes - (width << 1) + destrowbytes;
-
- if (dither)
- {
- unsigned short *psrc;
-
- psrc = (unsigned short *)src;
-
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- unsigned temp;
-
- temp = psrc[0];
- pdest[0] = ((byte *)pcolormap[0])[temp];
- pdest[1] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 1] = ((byte *)pcolormap[3])[temp];
- temp = psrc[1];
- pdest[2] = ((byte *)pcolormap[0])[temp];
- pdest[3] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 2] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 3] = ((byte *)pcolormap[3])[temp];
- temp = psrc[2];
- pdest[4] = ((byte *)pcolormap[0])[temp];
- pdest[5] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 4] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 5] = ((byte *)pcolormap[3])[temp];
- temp = psrc[3];
- pdest[6] = ((byte *)pcolormap[0])[temp];
- pdest[7] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 6] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 7] = ((byte *)pcolormap[3])[temp];
- temp = psrc[4];
- pdest[8] = ((byte *)pcolormap[0])[temp];
- pdest[9] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 8] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 9] = ((byte *)pcolormap[3])[temp];
- temp = psrc[5];
- pdest[10] = ((byte *)pcolormap[0])[temp];
- pdest[11] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 10] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 11] = ((byte *)pcolormap[3])[temp];
- temp = psrc[6];
- pdest[12] = ((byte *)pcolormap[0])[temp];
- pdest[13] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 12] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 13] = ((byte *)pcolormap[3])[temp];
- temp = psrc[7];
- pdest[14] = ((byte *)pcolormap[0])[temp];
- pdest[15] = ((byte *)pcolormap[1])[temp];
- pdest[nextrow + 14] = ((byte *)pcolormap[2])[temp];
- pdest[nextrow + 15] = ((byte *)pcolormap[3])[temp];
- pdest += 16; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- else
- {
- byte *psrc;
-
- psrc = (byte *)src;
-
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = pdest[1] = pdest[nextrow] =
- pdest[nextrow + 1] = ((byte *)pcolormap[0])[psrc[0]];
- pdest[2] = pdest[3] = pdest[nextrow + 2] =
- pdest[nextrow + 3] = ((byte *)pcolormap[0])[psrc[1]];
- pdest[4] = pdest[5] = pdest[nextrow + 4] =
- pdest[nextrow + 5] = ((byte *)pcolormap[0])[psrc[2]];
- pdest[6] = pdest[7] = pdest[nextrow + 6] =
- pdest[nextrow + 7] = ((byte *)pcolormap[0])[psrc[3]];
- pdest[8] = pdest[9] = pdest[nextrow + 8] =
- pdest[nextrow + 9] = ((byte *)pcolormap[0])[psrc[4]];
- pdest[10] = pdest[11] = pdest[nextrow + 10] =
- pdest[nextrow + 11] = ((byte *)pcolormap[0])[psrc[5]];
- pdest[12] = pdest[13] = pdest[nextrow + 12] =
- pdest[nextrow + 13] = ((byte *)pcolormap[0])[psrc[6]];
- pdest[14] = pdest[15] = pdest[nextrow + 14] =
- pdest[nextrow + 15] = ((byte *)pcolormap[0])[psrc[7]];
- pdest += 16; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- }
- else
- {
- rowdelta = destrowbytes - width;
-
- if (dither)
- {
- unsigned short *psrc;
-
- psrc = (unsigned short *)src;
-
- for (y = height ; y>0 ; y -= 2)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = ((byte *)pcolormap[0])[psrc[0]];
- pdest[1] = ((byte *)pcolormap[1])[psrc[1]];
- pdest[2] = ((byte *)pcolormap[0])[psrc[2]];
- pdest[3] = ((byte *)pcolormap[1])[psrc[3]];
- pdest[4] = ((byte *)pcolormap[0])[psrc[4]];
- pdest[5] = ((byte *)pcolormap[1])[psrc[5]];
- pdest[6] = ((byte *)pcolormap[0])[psrc[6]];
- pdest[7] = ((byte *)pcolormap[1])[psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
-
- for (x = xcount ; x ;x--)
- {
- pdest[0] = ((byte *)pcolormap[2])[psrc[0]];
- pdest[1] = ((byte *)pcolormap[3])[psrc[1]];
- pdest[2] = ((byte *)pcolormap[2])[psrc[2]];
- pdest[3] = ((byte *)pcolormap[3])[psrc[3]];
- pdest[4] = ((byte *)pcolormap[2])[psrc[4]];
- pdest[5] = ((byte *)pcolormap[3])[psrc[5]];
- pdest[6] = ((byte *)pcolormap[2])[psrc[6]];
- pdest[7] = ((byte *)pcolormap[3])[psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- else
- {
- byte *psrc;
-
- psrc = (byte *)src;
-// srcdelta += width;
-// rowdelta += width;
-
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = ((byte *)pcolormap[0])[psrc[0]];
- pdest[1] = ((byte *)pcolormap[0])[psrc[1]];
- pdest[2] = ((byte *)pcolormap[0])[psrc[2]];
- pdest[3] = ((byte *)pcolormap[0])[psrc[3]];
- pdest[4] = ((byte *)pcolormap[0])[psrc[4]];
- pdest[5] = ((byte *)pcolormap[0])[psrc[5]];
- pdest[6] = ((byte *)pcolormap[0])[psrc[6]];
- pdest[7] = ((byte *)pcolormap[0])[psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- }
-}
-
-
-/*
-===================
-Update16_1
-===================
-*/
-void Update16_1 (pixel_t *src, unsigned short *dest, int width,
- int height, int destrowbytes)
-{
- int x,y;
- unsigned rowdelta, srcdelta;
- unsigned xcount;
- pixel_t *psrc;
- unsigned short *pdest;
- int xwidth;
-
-
- psrc = src;
- pdest = dest;
-
- xcount = width >> 3;
- srcdelta = vid.width - width;
-
- xwidth = width - (xcount << 3);
- if (xwidth)
- Sys_Error ("Width not multiple of 8");
-
- if ((vid_display == disp_framebuffer) && (vid_scale == 2))
- {
- int nextrow = destrowbytes >> 1;
-
- rowdelta = (destrowbytes - ((width << 1) << 1) + destrowbytes) >> 1;
-
- if (dither)
- {
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- unsigned temp;
-
- temp = psrc[0];
- pdest[0] = ((unsigned short *)pcolormap[0])[temp];
- pdest[1] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 1] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[1];
- pdest[2] = ((unsigned short *)pcolormap[0])[temp];
- pdest[3] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 2] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 3] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[2];
- pdest[4] = ((unsigned short *)pcolormap[0])[temp];
- pdest[5] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 4] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 5] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[3];
- pdest[6] = ((unsigned short *)pcolormap[0])[temp];
- pdest[7] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 6] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 7] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[4];
- pdest[8] = ((unsigned short *)pcolormap[0])[temp];
- pdest[9] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 8] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 9] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[5];
- pdest[10] = ((unsigned short *)pcolormap[0])[temp];
- pdest[11] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 10] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 11] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[6];
- pdest[12] = ((unsigned short *)pcolormap[0])[temp];
- pdest[13] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 12] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 13] = ((unsigned short *)pcolormap[3])[temp];
- temp = psrc[7];
- pdest[14] = ((unsigned short *)pcolormap[0])[temp];
- pdest[15] = ((unsigned short *)pcolormap[1])[temp];
- pdest[nextrow + 14] = ((unsigned short *)pcolormap[2])[temp];
- pdest[nextrow + 15] = ((unsigned short *)pcolormap[3])[temp];
- pdest += 16; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- else
- {
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = pdest[1] = pdest[nextrow] =
- pdest[nextrow + 1] = pcolormap[0][psrc[0]];
- pdest[2] = pdest[3] = pdest[nextrow + 2] =
- pdest[nextrow + 3] = pcolormap[0][psrc[1]];
- pdest[4] = pdest[5] = pdest[nextrow + 4] =
- pdest[nextrow + 5] = pcolormap[0][psrc[2]];
- pdest[6] = pdest[7] = pdest[nextrow + 6] =
- pdest[nextrow + 7] = pcolormap[0][psrc[3]];
- pdest[8] = pdest[9] = pdest[nextrow + 8] =
- pdest[nextrow + 9] = pcolormap[0][psrc[4]];
- pdest[10] = pdest[11] = pdest[nextrow + 10] =
- pdest[nextrow + 11] = pcolormap[0][psrc[5]];
- pdest[12] = pdest[13] = pdest[nextrow + 12] =
- pdest[nextrow + 13] = pcolormap[0][psrc[6]];
- pdest[14] = pdest[15] = pdest[nextrow + 14] =
- pdest[nextrow + 15] = pcolormap[0][psrc[7]];
- pdest += 16; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- }
- else
- {
- rowdelta = (destrowbytes - (width<<1))>>1;
-
- if (dither)
- {
- for (y = height ; y>0 ; y -= 2)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = ((unsigned short *)pcolormap[0])[psrc[0]];
- pdest[1] = ((unsigned short *)pcolormap[1])[psrc[1]];
- pdest[2] = ((unsigned short *)pcolormap[0])[psrc[2]];
- pdest[3] = ((unsigned short *)pcolormap[1])[psrc[3]];
- pdest[4] = ((unsigned short *)pcolormap[0])[psrc[4]];
- pdest[5] = ((unsigned short *)pcolormap[1])[psrc[5]];
- pdest[6] = ((unsigned short *)pcolormap[0])[psrc[6]];
- pdest[7] = ((unsigned short *)pcolormap[1])[psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
-
- for (x = xcount ; x ;x--)
- {
- pdest[0] = ((unsigned short *)pcolormap[2])[psrc[0]];
- pdest[1] = ((unsigned short *)pcolormap[3])[psrc[1]];
- pdest[2] = ((unsigned short *)pcolormap[2])[psrc[2]];
- pdest[3] = ((unsigned short *)pcolormap[3])[psrc[3]];
- pdest[4] = ((unsigned short *)pcolormap[2])[psrc[4]];
- pdest[5] = ((unsigned short *)pcolormap[3])[psrc[5]];
- pdest[6] = ((unsigned short *)pcolormap[2])[psrc[6]];
- pdest[7] = ((unsigned short *)pcolormap[3])[psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- else
- {
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = pcolormap[0][psrc[0]];
- pdest[1] = pcolormap[0][psrc[1]];
- pdest[2] = pcolormap[0][psrc[2]];
- pdest[3] = pcolormap[0][psrc[3]];
- pdest[4] = pcolormap[0][psrc[4]];
- pdest[5] = pcolormap[0][psrc[5]];
- pdest[6] = pcolormap[0][psrc[6]];
- pdest[7] = pcolormap[0][psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- }
-}
-
-
-/*
-===================
-Update32_1
-===================
-*/
-void Update32_1 (pixel_t *src, unsigned *dest, int width, int height,
- int destrowbytes)
-{
- int x,y;
- unsigned rowdelta, srcdelta;
- unsigned xcount;
- pixel_t *psrc;
- unsigned *pdest;
- int xwidth;
-
- psrc = src;
- pdest = dest;
-
- xcount = width >> 3;
- srcdelta = vid.width - width;
-
- xwidth = width - (xcount << 3);
- if (xwidth)
- Sys_Error ("Width not multiple of 8");
-
- if ((vid_display == disp_framebuffer) && (vid_scale == 2))
- {
- int nextrow = destrowbytes >> 2;
-
- rowdelta = ((destrowbytes - ((width << 1) << 2)) >> 2) +
- (destrowbytes >> 2);
-
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = pdest[1] = pdest[nextrow] =
- pdest[nextrow + 1] = pcolormap[0][psrc[0]];
- pdest[2] = pdest[3] = pdest[nextrow + 2] =
- pdest[nextrow + 3] = pcolormap[0][psrc[1]];
- pdest[4] = pdest[5] = pdest[nextrow + 4] =
- pdest[nextrow + 5] = pcolormap[0][psrc[2]];
- pdest[6] = pdest[7] = pdest[nextrow + 6] =
- pdest[nextrow + 7] = pcolormap[0][psrc[3]];
- pdest[8] = pdest[9] = pdest[nextrow + 8] =
- pdest[nextrow + 9] = pcolormap[0][psrc[4]];
- pdest[10] = pdest[11] = pdest[nextrow + 10] =
- pdest[nextrow + 11] = pcolormap[0][psrc[5]];
- pdest[12] = pdest[13] = pdest[nextrow + 12] =
- pdest[nextrow + 13] = pcolormap[0][psrc[6]];
- pdest[14] = pdest[15] = pdest[nextrow + 14] =
- pdest[nextrow + 15] = pcolormap[0][psrc[7]];
- pdest += 16; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
- else
- {
- rowdelta = (destrowbytes - (width<<2))>>2;
-
- for (y = height ; y ; y--)
- {
- for (x = xcount ; x ;x--)
- {
- pdest[0] = pcolormap[0][psrc[0]];
- pdest[1] = pcolormap[0][psrc[1]];
- pdest[2] = pcolormap[0][psrc[2]];
- pdest[3] = pcolormap[0][psrc[3]];
- pdest[4] = pcolormap[0][psrc[4]];
- pdest[5] = pcolormap[0][psrc[5]];
- pdest[6] = pcolormap[0][psrc[6]];
- pdest[7] = pcolormap[0][psrc[7]];
- pdest += 8; psrc += 8;
- }
-
- psrc += srcdelta;
- pdest += rowdelta;
- }
- }
-}
-
-
-/*
-==========================================================================
-
- NEXTSTEP VIEW CLASS
-
-==========================================================================
-*/
-
-
-@implementation QuakeView
-
-/*
-=================
-windowDidMove
-
-=================
-*/
-- windowDidMove:sender
-{
- NXPoint aPoint;
- NXRect winframe;
-
- aPoint.x = aPoint.y = 0;
- [self convertPoint:&aPoint toView:nil];
- [window convertBaseToScreen: &aPoint];
- [window getFrame: &winframe];
-
- if ((int)aPoint.x & 7)
- {
- [window moveTo:winframe.origin.x - ((int)aPoint.x&7)
- :winframe.origin.y];
- [window getFrame: &winframe];
- }
- return self;
-}
-
-- windowWillResize:sender toSize:(NXSize *)frameSize
-{
- NXRect fr, cont;
-
- fr.origin.x = fr.origin.y = 0;
- fr.size = *frameSize;
-
- [Window getContentRect:&cont forFrameRect: &fr style:[window style]];
-
- cont.size.width = (int)cont.size.width & ~15;
- if (cont.size.width < 128)
- cont.size.width = 128;
- cont.size.height = (int)cont.size.height & ~3;
- if (cont.size.height < 32)
- cont.size.height = 32;
-
- [Window getFrameRect:&fr forContentRect: &cont style:[window style]];
-
- *frameSize = fr.size;
-
- return self;
-}
-
-- windowDidResize:sender
-{
- if (vid_display == disp_framebuffer)
- Sys_Error ("How the heck are you resizing a framebuffer window?!?");
-
- vid.width = bounds.size.width/vid_scale;
- vid.height = bounds.size.height/vid_scale;
-
-//
-// allocate memory for the back and translation buffers
-//
- vid.rowbytes = vid.width;
- rowbytesnative = vid.width * pixbytesnative;
-
- AllocBuffers (true);
-
- vid.conbuffer = vid.buffer;
- vid.conrowbytes = vid.rowbytes;
- vid.conwidth = vid.width;
- vid.conheight = vid.height;
-
- vid.recalc_refdef = 1;
-
- return self;
-}
-
--(BOOL) acceptsFirstResponder
-{
- return YES;
-}
-
-
-typedef struct
-{
- int source, dest;
-} keymap_t;
-
-keymap_t keymaps[] =
-{
- {103, K_RIGHTARROW},
- {102, K_LEFTARROW},
- {100, K_UPARROW},
- {101, K_DOWNARROW},
- {111, K_PAUSE},
-
- {59, K_F1},
- {60, K_F2},
- {61, K_F3},
- {62, K_F4},
- {63, K_F5},
- {64, K_F6},
- {65, K_F7},
- {66, K_F8},
- {67, K_F9},
- {68, K_F10},
- {87, K_F11},
- {88, K_F12},
-
- {-1,-1}
-};
-
-keymap_t flagmaps[] =
-{
- {NX_SHIFTMASK, K_SHIFT},
- {NX_CONTROLMASK, K_CTRL},
- {NX_ALTERNATEMASK, K_ALT},
- {NX_COMMANDMASK, K_ALT},
-
- {-1,-1}
-};
-
-/*
-===================
-keyboard methods
-===================
-*/
-- keyDown:(NXEvent *)theEvent
-{
- int ch;
- keymap_t *km;
-
- PSobscurecursor ();
-
-// check for non-ascii first
- ch = theEvent->data.key.keyCode;
- for (km=keymaps;km->source!=-1;km++)
- if (ch == km->source)
- {
- Key_Event (km->dest, true);
- return self;
- }
-
- ch = theEvent->data.key.charCode;
- if (ch >= 'A' && ch <= 'Z')
- ch += 'a' - 'A';
- if (ch>=256)
- return self;
-
- Key_Event (ch, true);
- return self;
-}
-
-- flagsChanged:(NXEvent *)theEvent
-{
- static int oldflags;
- int newflags;
- int delta;
- keymap_t *km;
- int i;
-
- PSobscurecursor ();
- newflags = theEvent->flags;
- delta = newflags ^ oldflags;
- for (i=0 ; i<32 ; i++)
- {
- if ( !(delta & (1<<i)))
- continue;
- // changed
- for (km=flagmaps;km->source!=-1;km++)
- if ( (1<<i) == km->source)
- {
- if (newflags & (1<<i))
- Key_Event (km->dest, true);
- else
- Key_Event (km->dest, false);
- }
-
- }
-
- oldflags = newflags;
-
- return self;
-}
-
-
-- keyUp:(NXEvent *)theEvent
-{
- int ch;
- keymap_t *km;
-
- // check for non-ascii first
- ch = theEvent->data.key.keyCode;
- for (km=keymaps;km->source!=-1;km++)
- if (ch == km->source)
- {
- Key_Event (km->dest, false);
- return self;
- }
-
- ch = theEvent->data.key.charCode;
- if (ch >= 'A' && ch <= 'Z')
- ch += 'a' - 'A';
- if (ch>=256)
- return self;
- Key_Event (ch, false);
- return self;
-}
-
-
-- tiffShot
-{
- id imagerep, image;
- NXRect r;
- NXStream *stream;
- int fd;
- int i;
- char tiffname[80];
-
- [vid_window_i getFrame: &r];
- r.origin.x = r.origin.y = 0;
- image = [[NXImage alloc] initSize: &r.size];
- imagerep = [[NXCachedImageRep alloc] initFromWindow:vid_window_i rect:&r];
-
- [image lockFocus];
- [imagerep draw];
- [image unlockFocus];
-
-//
-// find a file name to save it to
-//
- strcpy(tiffname,"quake00.tif");
-
- for (i=0 ; i<=99 ; i++)
- {
- tiffname[5] = i/10 + '0';
- tiffname[6] = i%10 + '0';
- if (Sys_FileTime(tiffname) == -1)
- break; // file doesn't exist
- }
- if (i==100)
- Sys_Error ("SCR_ScreenShot_f: Couldn't create a tiff");
-
- fd = open (tiffname, O_RDWR|O_CREAT|O_TRUNC, 0666);
- stream = NXOpenFile (fd, NX_READWRITE);
- [image writeTIFF: stream];
- NXClose (stream);
- close (fd);
- printf ("wrote %s\n", tiffname);
-
- [image free];
- [imagerep free];
- return self;
-
-}
-
-- screenShot: sender
-{
- return [self tiffShot];
-}
-
-- setScaleFullScreen: sender
-{
- VID_Shutdown ();
- if (vid_fullscreen)
- {
- vid_fullscreen = 0;
- VID_Restart (vid_display, vid_scale);
- }
- else
- {
- vid_fullscreen = 1;
- VID_Restart (vid_display, vid_scale);
- }
- return self;
-}
-
-@end
-
-//============================================================================
-
-@implementation FrameWindow
-
-- windowExposed:(NXEvent *)theEvent
-{
- return self;
-}
-
-@end
-
-
--- a/solaris/Makefile.OLD
+++ /dev/null
@@ -1,478 +1,0 @@
-#
-# Quake2 Makefile for Solaris
-#
-# Jan '98 by Zoid <[email protected]>
-#
-
-ifneq (,$(findstring i86pc,$(shell uname -m)))
-ARCH=i386
-else
-ARCH=sparc
-endif
-
-MOUNT_DIR=/chest/Quake2/code
-
-BUILD_DEBUG_DIR=debug$(ARCH)
-BUILD_RELEASE_DIR=release$(ARCH)
-CLIENT_DIR=$(MOUNT_DIR)/client
-SERVER_DIR=$(MOUNT_DIR)/server
-COMMON_DIR=$(MOUNT_DIR)/qcommon
-SOLARIS_DIR=$(MOUNT_DIR)/solaris
-GAME_DIR=$(MOUNT_DIR)/game
-XATRIX_DIR=$(MOUNT_DIR)/xatrix
-CTF_DIR=$(MOUNT_DIR)/game
-NULL_DIR=$(MOUNT_DIR)/null
-
-ARCH=i386
-
-CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp
-RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -fomit-frame-pointer -fno-strength-reduce -funroll-loops -fexpensive-optimizations
-DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-LDFLAGS=-ldl -lm -lnsl -lsocket
-
-SHLIBEXT=so
-
-SHLIBCFLAGS=-fPIC
-SHLIBLDFLAGS=-G
-
-DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
-DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-
-#############################################################################
-# SETUP AND BUILD
-#############################################################################
-
-TARGETS=$(BUILDDIR)/quake2 $(BUILDDIR)/game$(ARCH).$(SHLIBEXT)
-
-build_debug:
- @-mkdir $(BUILD_DEBUG_DIR) \
- $(BUILD_DEBUG_DIR)/client \
- $(BUILD_DEBUG_DIR)/game
- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-build_release:
- @-mkdir $(BUILD_RELEASE_DIR) \
- $(BUILD_RELEASE_DIR)/client \
- $(BUILD_RELEASE_DIR)/game
- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
-
-all: build_debug build_release
-
-targets: $(TARGETS)
-
-#############################################################################
-# CLIENT/SERVER
-#############################################################################
-
-QUAKE2_OBJS = \
- $(BUILDDIR)/client/cl_cin.o \
- $(BUILDDIR)/client/cl_ents.o \
- $(BUILDDIR)/client/cl_fx.o \
- $(BUILDDIR)/client/cl_input.o \
- $(BUILDDIR)/client/cl_inv.o \
- $(BUILDDIR)/client/cl_main.o \
- $(BUILDDIR)/client/cl_parse.o \
- $(BUILDDIR)/client/cl_pred.o \
- $(BUILDDIR)/client/cl_tent.o \
- $(BUILDDIR)/client/cl_scrn.o \
- $(BUILDDIR)/client/cl_view.o \
- $(BUILDDIR)/client/console.o \
- $(BUILDDIR)/client/keys.o \
- $(BUILDDIR)/client/menu.o \
- $(BUILDDIR)/client/qmenu.o \
- $(BUILDDIR)/client/m_flash.o \
- \
- $(BUILDDIR)/client/cmd.o \
- $(BUILDDIR)/client/cmodel.o \
- $(BUILDDIR)/client/common.o \
- $(BUILDDIR)/client/cvar.o \
- $(BUILDDIR)/client/files.o \
- $(BUILDDIR)/client/md4.o \
- $(BUILDDIR)/client/net_chan.o \
- \
- $(BUILDDIR)/client/sv_ccmds.o \
- $(BUILDDIR)/client/sv_ents.o \
- $(BUILDDIR)/client/sv_game.o \
- $(BUILDDIR)/client/sv_init.o \
- $(BUILDDIR)/client/sv_main.o \
- $(BUILDDIR)/client/sv_send.o \
- $(BUILDDIR)/client/sv_user.o \
- $(BUILDDIR)/client/sv_world.o \
- \
- $(BUILDDIR)/client/snd_dma.o \
- $(BUILDDIR)/client/snd_mem.o \
- $(BUILDDIR)/client/snd_mix.o \
- \
- $(BUILDDIR)/client/cd_null.o \
- $(BUILDDIR)/client/q_shsolaris.o \
- $(BUILDDIR)/client/vid_null.o \
- $(BUILDDIR)/client/ref_null.o \
- $(BUILDDIR)/client/in_null.o \
- $(BUILDDIR)/client/snddma_null.o \
- $(BUILDDIR)/client/sys_solaris.o \
- $(BUILDDIR)/client/glob.o \
- $(BUILDDIR)/client/net_udp.o \
- \
- $(BUILDDIR)/client/q_shared.o \
- $(BUILDDIR)/client/pmove.o
-
-$(BUILDDIR)/quake2 : $(QUAKE2_OBJS)
- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(LDFLAGS)
-
-$(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_ents.o : $(CLIENT_DIR)/cl_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_fx.o : $(CLIENT_DIR)/cl_fx.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_input.o : $(CLIENT_DIR)/cl_input.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_inv.o : $(CLIENT_DIR)/cl_inv.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_main.o : $(CLIENT_DIR)/cl_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_parse.o : $(CLIENT_DIR)/cl_parse.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_pred.o : $(CLIENT_DIR)/cl_pred.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_tent.o : $(CLIENT_DIR)/cl_tent.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_scrn.o : $(CLIENT_DIR)/cl_scrn.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_view.o : $(CLIENT_DIR)/cl_view.c
- $(DO_CC)
-
-$(BUILDDIR)/client/console.o : $(CLIENT_DIR)/console.c
- $(DO_CC)
-
-$(BUILDDIR)/client/keys.o : $(CLIENT_DIR)/keys.c
- $(DO_CC)
-
-$(BUILDDIR)/client/menu.o : $(CLIENT_DIR)/menu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/qmenu.o : $(CLIENT_DIR)/qmenu.c
- $(DO_CC)
-
-$(BUILDDIR)/client/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmd.o : $(COMMON_DIR)/cmd.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmodel.o : $(COMMON_DIR)/cmodel.c
- $(DO_CC)
-
-$(BUILDDIR)/client/common.o : $(COMMON_DIR)/common.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cvar.o : $(COMMON_DIR)/cvar.c
- $(DO_CC)
-
-$(BUILDDIR)/client/files.o : $(COMMON_DIR)/files.c
- $(DO_CC)
-
-$(BUILDDIR)/client/md4.o : $(COMMON_DIR)/md4.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_chan.o : $(COMMON_DIR)/net_chan.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_CC)
-
-$(BUILDDIR)/client/pmove.o : $(COMMON_DIR)/pmove.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ccmds.o : $(SERVER_DIR)/sv_ccmds.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ents.o : $(SERVER_DIR)/sv_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_game.o : $(SERVER_DIR)/sv_game.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_init.o : $(SERVER_DIR)/sv_init.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_main.o : $(SERVER_DIR)/sv_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_send.o : $(SERVER_DIR)/sv_send.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_user.o : $(SERVER_DIR)/sv_user.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_world.o : $(SERVER_DIR)/sv_world.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cd_null.o : $(NULL_DIR)/cd_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shsolaris.o : $(SOLARIS_DIR)/q_shsolaris.c
- $(DO_CC)
-
-$(BUILDDIR)/client/vid_null.o : $(NULL_DIR)/vid_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/ref_null.o : $(NULL_DIR)/ref_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snddma_null.o : $(NULL_DIR)/snddma_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_dma.o : $(CLIENT_DIR)/snd_dma.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mem.o : $(CLIENT_DIR)/snd_mem.c
- $(DO_CC)
-
-$(BUILDDIR)/client/snd_mix.o : $(CLIENT_DIR)/snd_mix.c
- $(DO_CC)
-
-$(BUILDDIR)/client/in_null.o : $(NULL_DIR)/in_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sys_solaris.o : $(SOLARIS_DIR)/sys_solaris.c
- $(DO_CC)
-
-$(BUILDDIR)/client/glob.o : $(SOLARIS_DIR)/glob.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_udp.o : $(SOLARIS_DIR)/net_udp.c
- $(DO_CC)
-
-#############################################################################
-# GAME
-#############################################################################
-
-GAME_OBJS = \
- $(BUILDDIR)/game/g_ai.o \
- $(BUILDDIR)/game/p_client.o \
- $(BUILDDIR)/game/g_cmds.o \
- $(BUILDDIR)/game/g_svcmds.o \
- $(BUILDDIR)/game/g_combat.o \
- $(BUILDDIR)/game/g_func.o \
- $(BUILDDIR)/game/g_items.o \
- $(BUILDDIR)/game/g_main.o \
- $(BUILDDIR)/game/g_misc.o \
- $(BUILDDIR)/game/g_monster.o \
- $(BUILDDIR)/game/g_phys.o \
- $(BUILDDIR)/game/g_save.o \
- $(BUILDDIR)/game/g_spawn.o \
- $(BUILDDIR)/game/g_target.o \
- $(BUILDDIR)/game/g_trigger.o \
- $(BUILDDIR)/game/g_turret.o \
- $(BUILDDIR)/game/g_utils.o \
- $(BUILDDIR)/game/g_weapon.o \
- $(BUILDDIR)/game/m_actor.o \
- $(BUILDDIR)/game/m_berserk.o \
- $(BUILDDIR)/game/m_boss2.o \
- $(BUILDDIR)/game/m_boss3.o \
- $(BUILDDIR)/game/m_boss31.o \
- $(BUILDDIR)/game/m_boss32.o \
- $(BUILDDIR)/game/m_brain.o \
- $(BUILDDIR)/game/m_chick.o \
- $(BUILDDIR)/game/m_flipper.o \
- $(BUILDDIR)/game/m_float.o \
- $(BUILDDIR)/game/m_flyer.o \
- $(BUILDDIR)/game/m_gladiator.o \
- $(BUILDDIR)/game/m_gunner.o \
- $(BUILDDIR)/game/m_hover.o \
- $(BUILDDIR)/game/m_infantry.o \
- $(BUILDDIR)/game/m_insane.o \
- $(BUILDDIR)/game/m_medic.o \
- $(BUILDDIR)/game/m_move.o \
- $(BUILDDIR)/game/m_mutant.o \
- $(BUILDDIR)/game/m_parasite.o \
- $(BUILDDIR)/game/m_soldier.o \
- $(BUILDDIR)/game/m_supertank.o \
- $(BUILDDIR)/game/m_tank.o \
- $(BUILDDIR)/game/p_hud.o \
- $(BUILDDIR)/game/p_trail.o \
- $(BUILDDIR)/game/p_view.o \
- $(BUILDDIR)/game/p_weapon.o \
- $(BUILDDIR)/game/q_shared.o \
- $(BUILDDIR)/game/m_flash.o \
- $(BUILDDIR)/game/g_so.o
-
-$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
-
-$(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_client.o : $(GAME_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_cmds.o : $(GAME_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_svcmds.o : $(GAME_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_combat.o : $(GAME_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_func.o : $(GAME_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_items.o : $(GAME_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_main.o : $(GAME_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_misc.o : $(GAME_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_monster.o : $(GAME_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_phys.o : $(GAME_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_save.o : $(GAME_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_spawn.o : $(GAME_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_target.o : $(GAME_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_trigger.o : $(GAME_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_turret.o : $(GAME_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_utils.o : $(GAME_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_weapon.o : $(GAME_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_actor.o : $(GAME_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_berserk.o : $(GAME_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss2.o : $(GAME_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss3.o : $(GAME_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss31.o : $(GAME_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss32.o : $(GAME_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_brain.o : $(GAME_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_chick.o : $(GAME_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flipper.o : $(GAME_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_float.o : $(GAME_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flyer.o : $(GAME_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gladiator.o : $(GAME_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gunner.o : $(GAME_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_hover.o : $(GAME_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_infantry.o : $(GAME_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_insane.o : $(GAME_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_medic.o : $(GAME_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_move.o : $(GAME_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_mutant.o : $(GAME_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_parasite.o : $(GAME_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_soldier.o : $(GAME_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_supertank.o : $(GAME_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_tank.o : $(GAME_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_hud.o : $(GAME_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_trail.o : $(GAME_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_view.o : $(GAME_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_weapon.o : $(GAME_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_so.o : $(SOLARIS_DIR)/g_so.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# MISC
-#############################################################################
-
-clean: clean-debug clean-release
-
-clean-debug:
- $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean-release:
- $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean2:
- -rm -f $(QUAKE2_OBJS) \
- $(GAME_OBJS) \
- $(REF_SOFT_OBJS) \
- $(REF_SOFT_SVGA_OBJS) \
- $(REF_SOFT_X11_OBJS) \
- $(REF_GL_OBJS)
-
--- a/solaris/Makefile.Solaris
+++ /dev/null
@@ -1,719 +1,0 @@
-#
-# Quake2 Makefile for Solaris
-#
-# Nov '97 by Zoid <[email protected]>
-#
-# ELF only
-#
-
-ifneq (,$(findstring i86pc,$(shell uname -m)))
-ARCH=i386
-else
-ARCH=sparc
-endif
-
-MOUNT_DIR=/chest/Quake2/code
-
-BUILD_DEBUG_DIR=debug$(ARCH)
-BUILD_RELEASE_DIR=release$(ARCH)
-CLIENT_DIR=$(MOUNT_DIR)/client
-SERVER_DIR=$(MOUNT_DIR)/server
-COMMON_DIR=$(MOUNT_DIR)/qcommon
-SOLARIS_DIR=$(MOUNT_DIR)/solaris
-GAME_DIR=$(MOUNT_DIR)/game
-CTF_DIR=$(MOUNT_DIR)/ctf
-XATRIX_DIR=$(MOUNT_DIR)/xatrix
-NULL_DIR=$(MOUNT_DIR)/null
-
-CC=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp -DC_ONLY -DDEDICATED_ONLY
-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations
-
-DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-LDFLAGS=-ldl -lm -lsocket -lnsl
-
-SHLIBEXT=so
-
-SHLIBCFLAGS=-fPIC
-SHLIBLDFLAGS=-shared
-
-DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
-DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-
-#############################################################################
-# SETUP AND BUILD
-#############################################################################
-
-TARGETS=$(BUILDDIR)/q2ded \
- $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
- $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
-
-build_debug:
- @-mkdir $(BUILD_DEBUG_DIR) \
- $(BUILD_DEBUG_DIR)/client \
- $(BUILD_DEBUG_DIR)/game \
- $(BUILD_DEBUG_DIR)/ctf \
- $(BUILD_DEBUG_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-build_release:
- @-mkdir $(BUILD_RELEASE_DIR) \
- $(BUILD_RELEASE_DIR)/client \
- $(BUILD_RELEASE_DIR)/game \
- $(BUILD_RELEASE_DIR)/ctf \
- $(BUILD_RELEASE_DIR)/xatrix
- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
-
-all: build_debug build_release
-
-targets: $(TARGETS)
-
-#############################################################################
-# CLIENT/SERVER
-#############################################################################
-
-QUAKE2_OBJS = \
- \
- $(BUILDDIR)/client/cmd.o \
- $(BUILDDIR)/client/cmodel.o \
- $(BUILDDIR)/client/common.o \
- $(BUILDDIR)/client/crc.o \
- $(BUILDDIR)/client/cvar.o \
- $(BUILDDIR)/client/files.o \
- $(BUILDDIR)/client/md4.o \
- $(BUILDDIR)/client/net_chan.o \
- \
- $(BUILDDIR)/client/sv_ccmds.o \
- $(BUILDDIR)/client/sv_ents.o \
- $(BUILDDIR)/client/sv_game.o \
- $(BUILDDIR)/client/sv_init.o \
- $(BUILDDIR)/client/sv_main.o \
- $(BUILDDIR)/client/sv_send.o \
- $(BUILDDIR)/client/sv_user.o \
- $(BUILDDIR)/client/sv_world.o \
- \
- $(BUILDDIR)/client/q_shsolaris.o \
- $(BUILDDIR)/client/sys_solaris.o \
- $(BUILDDIR)/client/glob.o \
- $(BUILDDIR)/client/net_udp.o \
- \
- $(BUILDDIR)/client/q_shared.o \
- $(BUILDDIR)/client/pmove.o \
- \
- $(BUILDDIR)/client/cl_null.o \
- $(BUILDDIR)/client/cd_null.o
-
-$(BUILDDIR)/q2ded : $(QUAKE2_OBJS)
- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(LDFLAGS)
-
-$(BUILDDIR)/client/cmd.o : $(COMMON_DIR)/cmd.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cmodel.o : $(COMMON_DIR)/cmodel.c
- $(DO_CC)
-
-$(BUILDDIR)/client/common.o : $(COMMON_DIR)/common.c
- $(DO_CC)
-
-$(BUILDDIR)/client/crc.o : $(COMMON_DIR)/crc.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cvar.o : $(COMMON_DIR)/cvar.c
- $(DO_CC)
-
-$(BUILDDIR)/client/files.o : $(COMMON_DIR)/files.c
- $(DO_CC)
-
-$(BUILDDIR)/client/md4.o : $(COMMON_DIR)/md4.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_chan.o : $(COMMON_DIR)/net_chan.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_CC)
-
-$(BUILDDIR)/client/pmove.o : $(COMMON_DIR)/pmove.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ccmds.o : $(SERVER_DIR)/sv_ccmds.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_ents.o : $(SERVER_DIR)/sv_ents.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_game.o : $(SERVER_DIR)/sv_game.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_init.o : $(SERVER_DIR)/sv_init.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_main.o : $(SERVER_DIR)/sv_main.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_send.o : $(SERVER_DIR)/sv_send.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_user.o : $(SERVER_DIR)/sv_user.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sv_world.o : $(SERVER_DIR)/sv_world.c
- $(DO_CC)
-
-$(BUILDDIR)/client/q_shsolaris.o : $(SOLARIS_DIR)/q_shsolaris.c
- $(DO_CC)
-
-$(BUILDDIR)/client/sys_solaris.o : $(SOLARIS_DIR)/sys_solaris.c
- $(DO_CC)
-
-$(BUILDDIR)/client/glob.o : $(SOLARIS_DIR)/glob.c
- $(DO_CC)
-
-$(BUILDDIR)/client/net_udp.o : $(SOLARIS_DIR)/net_udp.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cd_null.o : $(NULL_DIR)/cd_null.c
- $(DO_CC)
-
-$(BUILDDIR)/client/cl_null.o : $(NULL_DIR)/cl_null.c
- $(DO_CC)
-
-#############################################################################
-# GAME
-#############################################################################
-
-GAME_OBJS = \
- $(BUILDDIR)/game/g_ai.o \
- $(BUILDDIR)/game/p_client.o \
- $(BUILDDIR)/game/g_cmds.o \
- $(BUILDDIR)/game/g_svcmds.o \
- $(BUILDDIR)/game/g_combat.o \
- $(BUILDDIR)/game/g_func.o \
- $(BUILDDIR)/game/g_items.o \
- $(BUILDDIR)/game/g_main.o \
- $(BUILDDIR)/game/g_misc.o \
- $(BUILDDIR)/game/g_monster.o \
- $(BUILDDIR)/game/g_phys.o \
- $(BUILDDIR)/game/g_save.o \
- $(BUILDDIR)/game/g_spawn.o \
- $(BUILDDIR)/game/g_target.o \
- $(BUILDDIR)/game/g_trigger.o \
- $(BUILDDIR)/game/g_turret.o \
- $(BUILDDIR)/game/g_utils.o \
- $(BUILDDIR)/game/g_weapon.o \
- $(BUILDDIR)/game/m_actor.o \
- $(BUILDDIR)/game/m_berserk.o \
- $(BUILDDIR)/game/m_boss2.o \
- $(BUILDDIR)/game/m_boss3.o \
- $(BUILDDIR)/game/m_boss31.o \
- $(BUILDDIR)/game/m_boss32.o \
- $(BUILDDIR)/game/m_brain.o \
- $(BUILDDIR)/game/m_chick.o \
- $(BUILDDIR)/game/m_flipper.o \
- $(BUILDDIR)/game/m_float.o \
- $(BUILDDIR)/game/m_flyer.o \
- $(BUILDDIR)/game/m_gladiator.o \
- $(BUILDDIR)/game/m_gunner.o \
- $(BUILDDIR)/game/m_hover.o \
- $(BUILDDIR)/game/m_infantry.o \
- $(BUILDDIR)/game/m_insane.o \
- $(BUILDDIR)/game/m_medic.o \
- $(BUILDDIR)/game/m_move.o \
- $(BUILDDIR)/game/m_mutant.o \
- $(BUILDDIR)/game/m_parasite.o \
- $(BUILDDIR)/game/m_soldier.o \
- $(BUILDDIR)/game/m_supertank.o \
- $(BUILDDIR)/game/m_tank.o \
- $(BUILDDIR)/game/p_hud.o \
- $(BUILDDIR)/game/p_trail.o \
- $(BUILDDIR)/game/p_view.o \
- $(BUILDDIR)/game/p_weapon.o \
- $(BUILDDIR)/game/q_shared.o \
- $(BUILDDIR)/game/m_flash.o
-
-$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
-
-$(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_client.o : $(GAME_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_cmds.o : $(GAME_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_svcmds.o : $(GAME_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_combat.o : $(GAME_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_func.o : $(GAME_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_items.o : $(GAME_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_main.o : $(GAME_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_misc.o : $(GAME_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_monster.o : $(GAME_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_phys.o : $(GAME_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_save.o : $(GAME_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_spawn.o : $(GAME_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_target.o : $(GAME_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_trigger.o : $(GAME_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_turret.o : $(GAME_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_utils.o : $(GAME_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/g_weapon.o : $(GAME_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_actor.o : $(GAME_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_berserk.o : $(GAME_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss2.o : $(GAME_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss3.o : $(GAME_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss31.o : $(GAME_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_boss32.o : $(GAME_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_brain.o : $(GAME_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_chick.o : $(GAME_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flipper.o : $(GAME_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_float.o : $(GAME_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flyer.o : $(GAME_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gladiator.o : $(GAME_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_gunner.o : $(GAME_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_hover.o : $(GAME_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_infantry.o : $(GAME_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_insane.o : $(GAME_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_medic.o : $(GAME_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_move.o : $(GAME_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_mutant.o : $(GAME_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_parasite.o : $(GAME_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_soldier.o : $(GAME_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_supertank.o : $(GAME_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_tank.o : $(GAME_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_hud.o : $(GAME_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_trail.o : $(GAME_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_view.o : $(GAME_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/p_weapon.o : $(GAME_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/q_shared.o : $(GAME_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/game/m_flash.o : $(GAME_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# CTF
-#############################################################################
-
-CTF_OBJS = \
- $(BUILDDIR)/ctf/g_ai.o \
- $(BUILDDIR)/ctf/g_chase.o \
- $(BUILDDIR)/ctf/g_cmds.o \
- $(BUILDDIR)/ctf/g_combat.o \
- $(BUILDDIR)/ctf/g_ctf.o \
- $(BUILDDIR)/ctf/g_func.o \
- $(BUILDDIR)/ctf/g_items.o \
- $(BUILDDIR)/ctf/g_main.o \
- $(BUILDDIR)/ctf/g_misc.o \
- $(BUILDDIR)/ctf/g_monster.o \
- $(BUILDDIR)/ctf/g_phys.o \
- $(BUILDDIR)/ctf/g_save.o \
- $(BUILDDIR)/ctf/g_spawn.o \
- $(BUILDDIR)/ctf/g_svcmds.o \
- $(BUILDDIR)/ctf/g_target.o \
- $(BUILDDIR)/ctf/g_trigger.o \
- $(BUILDDIR)/ctf/g_utils.o \
- $(BUILDDIR)/ctf/g_weapon.o \
- $(BUILDDIR)/ctf/m_move.o \
- $(BUILDDIR)/ctf/p_client.o \
- $(BUILDDIR)/ctf/p_hud.o \
- $(BUILDDIR)/ctf/p_menu.o \
- $(BUILDDIR)/ctf/p_trail.o \
- $(BUILDDIR)/ctf/p_view.o \
- $(BUILDDIR)/ctf/p_weapon.o \
- $(BUILDDIR)/ctf/q_shared.o
-
-$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
-
-$(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_chase.o : $(CTF_DIR)/g_chase.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_cmds.o : $(CTF_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_combat.o : $(CTF_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_ctf.o : $(CTF_DIR)/g_ctf.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_func.o : $(CTF_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_items.o : $(CTF_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_main.o : $(CTF_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_misc.o : $(CTF_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_monster.o : $(CTF_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_phys.o : $(CTF_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_save.o : $(CTF_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_spawn.o : $(CTF_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_svcmds.o : $(CTF_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_target.o : $(CTF_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_trigger.o : $(CTF_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_utils.o : $(CTF_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/g_weapon.o : $(CTF_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/m_move.o : $(CTF_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_client.o : $(CTF_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_hud.o : $(CTF_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_menu.o : $(CTF_DIR)/p_menu.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_trail.o : $(CTF_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_view.o : $(CTF_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/p_weapon.o : $(CTF_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/ctf/q_shared.o : $(CTF_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# XATRIX
-#############################################################################
-
-XATRIX_OBJS = \
- $(BUILDDIR)/xatrix/g_ai.o \
- $(BUILDDIR)/xatrix/g_cmds.o \
- $(BUILDDIR)/xatrix/g_combat.o \
- $(BUILDDIR)/xatrix/g_func.o \
- $(BUILDDIR)/xatrix/g_items.o \
- $(BUILDDIR)/xatrix/g_main.o \
- $(BUILDDIR)/xatrix/g_misc.o \
- $(BUILDDIR)/xatrix/g_monster.o \
- $(BUILDDIR)/xatrix/g_phys.o \
- $(BUILDDIR)/xatrix/g_save.o \
- $(BUILDDIR)/xatrix/g_spawn.o \
- $(BUILDDIR)/xatrix/g_svcmds.o \
- $(BUILDDIR)/xatrix/g_target.o \
- $(BUILDDIR)/xatrix/g_trigger.o \
- $(BUILDDIR)/xatrix/g_turret.o \
- $(BUILDDIR)/xatrix/g_utils.o \
- $(BUILDDIR)/xatrix/g_weapon.o \
- $(BUILDDIR)/xatrix/m_actor.o \
- $(BUILDDIR)/xatrix/m_berserk.o \
- $(BUILDDIR)/xatrix/m_boss2.o \
- $(BUILDDIR)/xatrix/m_boss3.o \
- $(BUILDDIR)/xatrix/m_boss31.o \
- $(BUILDDIR)/xatrix/m_boss32.o \
- $(BUILDDIR)/xatrix/m_boss5.o \
- $(BUILDDIR)/xatrix/m_brain.o \
- $(BUILDDIR)/xatrix/m_chick.o \
- $(BUILDDIR)/xatrix/m_fixbot.o \
- $(BUILDDIR)/xatrix/m_flash.o \
- $(BUILDDIR)/xatrix/m_flipper.o \
- $(BUILDDIR)/xatrix/m_float.o \
- $(BUILDDIR)/xatrix/m_flyer.o \
- $(BUILDDIR)/xatrix/m_gekk.o \
- $(BUILDDIR)/xatrix/m_gladb.o \
- $(BUILDDIR)/xatrix/m_gladiator.o \
- $(BUILDDIR)/xatrix/m_gunner.o \
- $(BUILDDIR)/xatrix/m_hover.o \
- $(BUILDDIR)/xatrix/m_infantry.o \
- $(BUILDDIR)/xatrix/m_insane.o \
- $(BUILDDIR)/xatrix/m_medic.o \
- $(BUILDDIR)/xatrix/m_move.o \
- $(BUILDDIR)/xatrix/m_mutant.o \
- $(BUILDDIR)/xatrix/m_parasite.o \
- $(BUILDDIR)/xatrix/m_soldier.o \
- $(BUILDDIR)/xatrix/m_supertank.o \
- $(BUILDDIR)/xatrix/m_tank.o \
- $(BUILDDIR)/xatrix/p_client.o \
- $(BUILDDIR)/xatrix/p_hud.o \
- $(BUILDDIR)/xatrix/p_trail.o \
- $(BUILDDIR)/xatrix/p_view.o \
- $(BUILDDIR)/xatrix/p_weapon.o \
- $(BUILDDIR)/xatrix/q_shared.o
-
-$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
-
-$(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_cmds.o : $(XATRIX_DIR)/g_cmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_combat.o : $(XATRIX_DIR)/g_combat.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_func.o : $(XATRIX_DIR)/g_func.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_items.o : $(XATRIX_DIR)/g_items.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_main.o : $(XATRIX_DIR)/g_main.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_misc.o : $(XATRIX_DIR)/g_misc.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_monster.o : $(XATRIX_DIR)/g_monster.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_phys.o : $(XATRIX_DIR)/g_phys.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_save.o : $(XATRIX_DIR)/g_save.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_spawn.o : $(XATRIX_DIR)/g_spawn.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_svcmds.o : $(XATRIX_DIR)/g_svcmds.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_target.o : $(XATRIX_DIR)/g_target.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_trigger.o : $(XATRIX_DIR)/g_trigger.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_turret.o : $(XATRIX_DIR)/g_turret.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_utils.o : $(XATRIX_DIR)/g_utils.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/g_weapon.o : $(XATRIX_DIR)/g_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_actor.o : $(XATRIX_DIR)/m_actor.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_berserk.o : $(XATRIX_DIR)/m_berserk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss2.o : $(XATRIX_DIR)/m_boss2.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss3.o : $(XATRIX_DIR)/m_boss3.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss31.o : $(XATRIX_DIR)/m_boss31.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss32.o : $(XATRIX_DIR)/m_boss32.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_boss5.o : $(XATRIX_DIR)/m_boss5.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_brain.o : $(XATRIX_DIR)/m_brain.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_chick.o : $(XATRIX_DIR)/m_chick.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_fixbot.o : $(XATRIX_DIR)/m_fixbot.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flash.o : $(XATRIX_DIR)/m_flash.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flipper.o : $(XATRIX_DIR)/m_flipper.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_float.o : $(XATRIX_DIR)/m_float.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_flyer.o : $(XATRIX_DIR)/m_flyer.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gekk.o : $(XATRIX_DIR)/m_gekk.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladb.o : $(XATRIX_DIR)/m_gladb.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gladiator.o : $(XATRIX_DIR)/m_gladiator.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_gunner.o : $(XATRIX_DIR)/m_gunner.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_hover.o : $(XATRIX_DIR)/m_hover.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_infantry.o : $(XATRIX_DIR)/m_infantry.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_insane.o : $(XATRIX_DIR)/m_insane.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_medic.o : $(XATRIX_DIR)/m_medic.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_move.o : $(XATRIX_DIR)/m_move.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_mutant.o : $(XATRIX_DIR)/m_mutant.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_parasite.o : $(XATRIX_DIR)/m_parasite.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_soldier.o : $(XATRIX_DIR)/m_soldier.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_supertank.o : $(XATRIX_DIR)/m_supertank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/m_tank.o : $(XATRIX_DIR)/m_tank.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_client.o : $(XATRIX_DIR)/p_client.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_hud.o : $(XATRIX_DIR)/p_hud.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_trail.o : $(XATRIX_DIR)/p_trail.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_view.o : $(XATRIX_DIR)/p_view.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/p_weapon.o : $(XATRIX_DIR)/p_weapon.c
- $(DO_SHLIB_CC)
-
-$(BUILDDIR)/xatrix/q_shared.o : $(XATRIX_DIR)/q_shared.c
- $(DO_SHLIB_CC)
-
-#############################################################################
-# MISC
-#############################################################################
-
-clean: clean-debug clean-release
-
-clean-debug:
- $(MAKE) clean2 BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean-release:
- $(MAKE) clean2 BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(DEBUG_CFLAGS)"
-
-clean2:
- -rm -f $(QUAKE2_OBJS) $(GAME_OBJS) $(CTF_OBJS) $(XATRIX_OBJS)
--- a/solaris/g_so.c
+++ /dev/null
@@ -1,3 +1,0 @@
-int main(int argc, char *argv)
-{
-}
--- a/solaris/glob.c
+++ /dev/null
@@ -1,164 +1,0 @@
-
-#include <stdio.h>
-#include "../linux/glob.h"
-
-/* Like glob_match, but match PATTERN against any final segment of TEXT. */
-static int glob_match_after_star(char *pattern, char *text)
-{
- register char *p = pattern, *t = text;
- register char c, c1;
-
- while ((c = *p++) == '?' || c == '*')
- if (c == '?' && *t++ == '\0')
- return 0;
-
- if (c == '\0')
- return 1;
-
- if (c == '\\')
- c1 = *p;
- else
- c1 = c;
-
- while (1) {
- if ((c == '[' || *t == c1) && glob_match(p - 1, t))
- return 1;
- if (*t++ == '\0')
- return 0;
- }
-}
-
-/* Return nonzero if PATTERN has any special globbing chars in it. */
-static int glob_pattern_p(char *pattern)
-{
- register char *p = pattern;
- register char c;
- int open = 0;
-
- while ((c = *p++) != '\0')
- switch (c) {
- case '?':
- case '*':
- return 1;
-
- case '[': /* Only accept an open brace if there is a close */
- open++; /* brace to match it. Bracket expressions must be */
- continue; /* complete, according to Posix.2 */
- case ']':
- if (open)
- return 1;
- continue;
-
- case '\\':
- if (*p++ == '\0')
- return 0;
- }
-
- return 0;
-}
-
-/* Match the pattern PATTERN against the string TEXT;
- return 1 if it matches, 0 otherwise.
-
- A match means the entire string TEXT is used up in matching.
-
- In the pattern string, `*' matches any sequence of characters,
- `?' matches any character, [SET] matches any character in the specified set,
- [!SET] matches any character not in the specified set.
-
- A set is composed of characters or ranges; a range looks like
- character hyphen character (as in 0-9 or A-Z).
- [0-9a-zA-Z_] is the set of characters allowed in C identifiers.
- Any other character in the pattern must be matched exactly.
-
- To suppress the special syntactic significance of any of `[]*?!-\',
- and match the character exactly, precede it with a `\'.
-*/
-
-int glob_match(char *pattern, char *text)
-{
- register char *p = pattern, *t = text;
- register char c;
-
- while ((c = *p++) != '\0')
- switch (c) {
- case '?':
- if (*t == '\0')
- return 0;
- else
- ++t;
- break;
-
- case '\\':
- if (*p++ != *t++)
- return 0;
- break;
-
- case '*':
- return glob_match_after_star(p, t);
-
- case '[':
- {
- register char c1 = *t++;
- int invert;
-
- if (!c1)
- return (0);
-
- invert = ((*p == '!') || (*p == '^'));
- if (invert)
- p++;
-
- c = *p++;
- while (1) {
- register char cstart = c, cend = c;
-
- if (c == '\\') {
- cstart = *p++;
- cend = cstart;
- }
- if (c == '\0')
- return 0;
-
- c = *p++;
- if (c == '-' && *p != ']') {
- cend = *p++;
- if (cend == '\\')
- cend = *p++;
- if (cend == '\0')
- return 0;
- c = *p++;
- }
- if (c1 >= cstart && c1 <= cend)
- goto match;
- if (c == ']')
- break;
- }
- if (!invert)
- return 0;
- break;
-
- match:
- /* Skip the rest of the [...] construct that already matched. */
- while (c != ']') {
- if (c == '\0')
- return 0;
- c = *p++;
- if (c == '\0')
- return 0;
- else if (c == '\\')
- ++p;
- }
- if (invert)
- return 0;
- break;
- }
-
- default:
- if (c != *t++)
- return 0;
- }
-
- return *t == '\0';
-}
-
--- a/solaris/glob.h
+++ /dev/null
@@ -1,1 +1,0 @@
-int glob_match(char *pattern, char *text);
--- a/solaris/net_udp.c
+++ /dev/null
@@ -1,537 +1,0 @@
-// net_wins.c
-
-#include "../qcommon/qcommon.h"
-
-#include <unistd.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <sys/filio.h>
-
-#ifdef NeXT
-#include <libc.h>
-#endif
-
-netadr_t net_local_adr;
-
-#define LOOPBACK 0x7f000001
-
-#define MAX_LOOPBACK 4
-
-typedef struct
-{
- byte data[MAX_MSGLEN];
- int datalen;
-} loopmsg_t;
-
-typedef struct
-{
- loopmsg_t msgs[MAX_LOOPBACK];
- int get, send;
-} loopback_t;
-
-loopback_t loopbacks[2];
-int ip_sockets[2];
-int ipx_sockets[2];
-
-int NET_Socket (char *net_interface, int port);
-char *NET_ErrorString (void);
-
-//=============================================================================
-
-void NetadrToSockadr (netadr_t *a, struct sockaddr_in *s)
-{
- memset (s, 0, sizeof(*s));
-
- if (a->type == NA_BROADCAST)
- {
- s->sin_family = AF_INET;
-
- s->sin_port = a->port;
- *(int *)&s->sin_addr = -1;
- }
- else if (a->type == NA_IP)
- {
- s->sin_family = AF_INET;
-
- *(int *)&s->sin_addr = *(int *)&a->ip;
- s->sin_port = a->port;
- }
-}
-
-void SockadrToNetadr (struct sockaddr_in *s, netadr_t *a)
-{
- *(int *)&a->ip = *(int *)&s->sin_addr;
- a->port = s->sin_port;
- a->type = NA_IP;
-}
-
-
-qboolean NET_CompareAdr (netadr_t a, netadr_t b)
-{
- if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3] && a.port == b.port)
- return true;
- return false;
-}
-
-/*
-===================
-NET_CompareBaseAdr
-
-Compares without the port
-===================
-*/
-qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b)
-{
- if (a.type != b.type)
- return false;
-
- if (a.type == NA_LOOPBACK)
- return true;
-
- if (a.type == NA_IP)
- {
- if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3])
- return true;
- return false;
- }
-
- if (a.type == NA_IPX)
- {
- if ((memcmp(a.ipx, b.ipx, 10) == 0))
- return true;
- return false;
- }
-}
-
-char *NET_AdrToString (netadr_t a)
-{
- static char s[64];
-
- Com_sprintf (s, sizeof(s), "%i.%i.%i.%i:%i", a.ip[0], a.ip[1], a.ip[2], a.ip[3], ntohs(a.port));
-
- return s;
-}
-
-char *NET_BaseAdrToString (netadr_t a)
-{
- static char s[64];
-
- Com_sprintf (s, sizeof(s), "%i.%i.%i.%i", a.ip[0], a.ip[1], a.ip[2], a.ip[3]);
-
- return s;
-}
-
-/*
-=============
-NET_StringToAdr
-
-localhost
-idnewt
-idnewt:28000
-192.246.40.70
-192.246.40.70:28000
-=============
-*/
-qboolean NET_StringToSockaddr (char *s, struct sockaddr *sadr)
-{
- struct hostent *h;
- char *colon;
- char copy[128];
-
- memset (sadr, 0, sizeof(*sadr));
- ((struct sockaddr_in *)sadr)->sin_family = AF_INET;
-
- ((struct sockaddr_in *)sadr)->sin_port = 0;
-
- strcpy (copy, s);
- // strip off a trailing :port if present
- for (colon = copy ; *colon ; colon++)
- if (*colon == ':')
- {
- *colon = 0;
- ((struct sockaddr_in *)sadr)->sin_port = htons((short)atoi(colon+1));
- }
-
- if (copy[0] >= '0' && copy[0] <= '9')
- {
- *(int *)&((struct sockaddr_in *)sadr)->sin_addr = inet_addr(copy);
- }
- else
- {
- if (! (h = gethostbyname(copy)) )
- return 0;
- *(int *)&((struct sockaddr_in *)sadr)->sin_addr = *(int *)h->h_addr_list[0];
- }
-
- return true;
-}
-
-/*
-=============
-NET_StringToAdr
-
-localhost
-idnewt
-idnewt:28000
-192.246.40.70
-192.246.40.70:28000
-=============
-*/
-qboolean NET_StringToAdr (char *s, netadr_t *a)
-{
- struct sockaddr_in sadr;
-
- if (!strcmp (s, "localhost"))
- {
- memset (a, 0, sizeof(*a));
- a->type = NA_LOOPBACK;
- return true;
- }
-
- if (!NET_StringToSockaddr (s, (struct sockaddr *)&sadr))
- return false;
-
- SockadrToNetadr (&sadr, a);
-
- return true;
-}
-
-
-qboolean NET_IsLocalAddress (netadr_t adr)
-{
- return NET_CompareAdr (adr, net_local_adr);
-}
-
-/*
-=============================================================================
-
-LOOPBACK BUFFERS FOR LOCAL PLAYER
-
-=============================================================================
-*/
-
-qboolean NET_GetLoopPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
-{
- int i;
- loopback_t *loop;
-
- loop = &loopbacks[sock];
-
- if (loop->send - loop->get > MAX_LOOPBACK)
- loop->get = loop->send - MAX_LOOPBACK;
-
- if (loop->get >= loop->send)
- return false;
-
- i = loop->get & (MAX_LOOPBACK-1);
- loop->get++;
-
- memcpy (net_message->data, loop->msgs[i].data, loop->msgs[i].datalen);
- net_message->cursize = loop->msgs[i].datalen;
- *net_from = net_local_adr;
- return true;
-
-}
-
-
-void NET_SendLoopPacket (netsrc_t sock, int length, void *data, netadr_t to)
-{
- int i;
- loopback_t *loop;
-
- loop = &loopbacks[sock^1];
-
- i = loop->send & (MAX_LOOPBACK-1);
- loop->send++;
-
- memcpy (loop->msgs[i].data, data, length);
- loop->msgs[i].datalen = length;
-}
-
-//=============================================================================
-
-qboolean NET_GetPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
-{
- int ret;
- struct sockaddr_in from;
- int fromlen;
- int net_socket;
- int protocol;
- int err;
-
- if (NET_GetLoopPacket (sock, net_from, net_message))
- return true;
-
- for (protocol = 0 ; protocol < 2 ; protocol++)
- {
- if (protocol == 0)
- net_socket = ip_sockets[sock];
- else
- net_socket = ipx_sockets[sock];
-
- if (!net_socket)
- continue;
-
- fromlen = sizeof(from);
- ret = recvfrom (net_socket, net_message->data, net_message->maxsize
- , 0, (struct sockaddr *)&from, &fromlen);
- if (ret == -1)
- {
- err = errno;
-
- if (err == EWOULDBLOCK || err == ECONNREFUSED)
- continue;
- Com_Printf ("NET_GetPacket: %s", NET_ErrorString());
- continue;
- }
-
- if (ret == net_message->maxsize)
- {
- Com_Printf ("Oversize packet from %s\n", NET_AdrToString (*net_from));
- continue;
- }
-
- net_message->cursize = ret;
- SockadrToNetadr (&from, net_from);
- return true;
- }
-
- return false;
-}
-
-//=============================================================================
-
-void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to)
-{
- int ret;
- struct sockaddr_in addr;
- int net_socket;
-
- if ( to.type == NA_LOOPBACK )
- {
- NET_SendLoopPacket (sock, length, data, to);
- return;
- }
-
- if (to.type == NA_BROADCAST)
- {
- net_socket = ip_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_IP)
- {
- net_socket = ip_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_IPX)
- {
- net_socket = ipx_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_BROADCAST_IPX)
- {
- net_socket = ipx_sockets[sock];
- if (!net_socket)
- return;
- }
- else
- Com_Error (ERR_FATAL, "NET_SendPacket: bad address type");
-
- NetadrToSockadr (&to, &addr);
-
- ret = sendto (net_socket, data, length, 0, (struct sockaddr *)&addr, sizeof(addr) );
- if (ret == -1)
- {
- Com_Printf ("NET_SendPacket ERROR: %i\n", NET_ErrorString());
- }
-}
-
-
-//=============================================================================
-
-
-
-
-/*
-====================
-NET_OpenIP
-====================
-*/
-void NET_OpenIP (void)
-{
- cvar_t *port, *ip;
-
- port = Cvar_Get ("port", va("%i", PORT_SERVER), CVAR_NOSET);
- ip = Cvar_Get ("ip", "localhost", CVAR_NOSET);
-
- if (!ip_sockets[NS_SERVER])
- ip_sockets[NS_SERVER] = NET_Socket (ip->string, port->value);
- if (!ip_sockets[NS_CLIENT])
- ip_sockets[NS_CLIENT] = NET_Socket (ip->string, PORT_ANY);
-}
-
-/*
-====================
-NET_OpenIPX
-====================
-*/
-void NET_OpenIPX (void)
-{
-}
-
-
-/*
-====================
-NET_Config
-
-A single player game will only use the loopback code
-====================
-*/
-void NET_Config (qboolean multiplayer)
-{
- int i;
-
- if (!multiplayer)
- { // shut down any existing sockets
- for (i=0 ; i<2 ; i++)
- {
- if (ip_sockets[i])
- {
- close (ip_sockets[i]);
- ip_sockets[i] = 0;
- }
- if (ipx_sockets[i])
- {
- close (ipx_sockets[i]);
- ipx_sockets[i] = 0;
- }
- }
- }
- else
- { // open sockets
- NET_OpenIP ();
- NET_OpenIPX ();
- }
-}
-
-
-//===================================================================
-
-
-/*
-====================
-NET_Init
-====================
-*/
-void NET_Init (void)
-{
-}
-
-
-/*
-====================
-NET_Socket
-====================
-*/
-int NET_Socket (char *net_interface, int port)
-{
- int newsocket;
- struct sockaddr_in address;
- qboolean _true = true;
- int i = 1;
-
- if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: socket:", NET_ErrorString());
- return 0;
- }
-
- // make it non-blocking
- if (ioctl (newsocket, FIONBIO, &_true) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: ioctl FIONBIO:%s\n", NET_ErrorString());
- return 0;
- }
-
- // make it broadcast capable
- if (setsockopt(newsocket, SOL_SOCKET, SO_BROADCAST, (char *)&i, sizeof(i)) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: setsockopt SO_BROADCAST:%s\n", NET_ErrorString());
- return 0;
- }
-
- if (!net_interface || !net_interface[0] || !stricmp(net_interface, "localhost"))
- address.sin_addr.s_addr = INADDR_ANY;
- else
- NET_StringToSockaddr (net_interface, (struct sockaddr *)&address);
-
- if (port == PORT_ANY)
- address.sin_port = 0;
- else
- address.sin_port = htons((short)port);
-
- address.sin_family = AF_INET;
-
- if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
- {
- Com_Printf ("ERROR: UDP_OpenSocket: bind: %s\n", NET_ErrorString());
- close (newsocket);
- return 0;
- }
-
- return newsocket;
-}
-
-
-/*
-====================
-NET_Shutdown
-====================
-*/
-void NET_Shutdown (void)
-{
- NET_Config (false); // close sockets
-}
-
-
-/*
-====================
-NET_ErrorString
-====================
-*/
-char *NET_ErrorString (void)
-{
- int code;
-
- code = errno;
- return strerror (code);
-}
-
-// sleeps msec or until net socket is ready
-void NET_Sleep(int msec)
-{
- struct timeval timeout;
- fd_set fdset;
- extern cvar_t *dedicated;
- extern qboolean stdin_active;
-
- if (!ip_sockets[NS_SERVER] || (dedicated && !dedicated->value))
- return; // we're not a server, just run full speed
-
- FD_ZERO(&fdset);
- if (stdin_active)
- FD_SET(0, &fdset); // stdin is processed too
- FD_SET(ip_sockets[NS_SERVER], &fdset); // network socket
- timeout.tv_sec = msec/1000;
- timeout.tv_usec = (msec%1000)*1000;
- select(ip_sockets[NS_SERVER]+1, &fdset, NULL, NULL, &timeout);
-}
-
--- a/solaris/q_shsolaris.c
+++ /dev/null
@@ -1,196 +1,0 @@
-#include <sys/types.h>
-#include <errno.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/time.h>
-
-#include "../linux/glob.h"
-
-#include "../qcommon/qcommon.h"
-
-//===============================================================================
-
-byte *membase;
-int maxhunksize;
-int curhunksize;
-
-void *Hunk_Begin (int maxsize)
-{
- // reserve a huge chunk of memory, but don't commit any yet
- maxhunksize = maxsize;
- curhunksize = 0;
- membase = malloc(maxhunksize);
- if (membase == NULL)
- Sys_Error(ERR_FATAL, "unable to allocate %d bytes", maxsize);
-
- return membase;
-}
-
-void *Hunk_Alloc (int size)
-{
- byte *buf;
-
- // round to cacheline
- size = (size+31)&~31;
- if (curhunksize + size > maxhunksize)
- Sys_Error(ERR_FATAL, "Hunk_Alloc overflow");
- buf = membase + curhunksize;
- curhunksize += size;
- return buf;
-}
-
-int Hunk_End (void)
-{
- byte *n;
-
- n = realloc(membase, curhunksize);
- if (n != membase)
- Sys_Error(ERR_FATAL, "Hunk_End: Could not remap virtual block (%d)", errno);
-
- return curhunksize;
-}
-
-void Hunk_Free (void *base)
-{
- if (base)
- free(base);
-}
-
-//===============================================================================
-
-
-/*
-================
-Sys_Milliseconds
-================
-*/
-int curtime;
-int Sys_Milliseconds (void)
-{
- struct timeval tp;
- struct timezone tzp;
- static int secbase;
-
- gettimeofday(&tp, &tzp);
-
- if (!secbase)
- {
- secbase = tp.tv_sec;
- return tp.tv_usec/1000;
- }
-
- curtime = (tp.tv_sec - secbase)*1000 + tp.tv_usec/1000;
-
- return curtime;
-}
-
-void Sys_Mkdir (char *path)
-{
- mkdir (path, 0777);
-}
-
-char *strlwr (char *s)
-{
- while (*s) {
- *s = tolower(*s);
- s++;
- }
-}
-
-//============================================
-
-static char findbase[MAX_OSPATH];
-static char findpath[MAX_OSPATH];
-static char findpattern[MAX_OSPATH];
-static DIR *fdir;
-
-static qboolean CompareAttributes(char *path, char *name,
- unsigned musthave, unsigned canthave )
-{
- struct stat st;
- char fn[MAX_OSPATH];
-
-// . and .. never match
- if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
- return false;
-
- sprintf(fn, "%s/%s", path, name);
- if (stat(fn, &st) == -1)
- return false; // shouldn't happen
-
- if ( ( st.st_mode & S_IFDIR ) && ( canthave & SFF_SUBDIR ) )
- return false;
-
- if ( ( musthave & SFF_SUBDIR ) && !( st.st_mode & S_IFDIR ) )
- return false;
-
- return true;
-}
-
-char *Sys_FindFirst (char *path, unsigned musthave, unsigned canhave)
-{
- struct dirent *d;
- char *p;
-
- if (fdir)
- Sys_Error ("Sys_BeginFind without close");
-
-// COM_FilePath (path, findbase);
- strcpy(findbase, path);
-
- if ((p = strrchr(findbase, '/')) != NULL) {
- *p = 0;
- strcpy(findpattern, p + 1);
- } else
- strcpy(findpattern, "*");
-
- if (strcmp(findpattern, "*.*") == 0)
- strcpy(findpattern, "*");
-
- if ((fdir = opendir(path)) == NULL)
- return NULL;
- while ((d = readdir(fdir)) != NULL) {
- if (!*findpattern || glob_match(findpattern, d->d_name)) {
-// if (*findpattern)
-// printf("%s matched %s\n", findpattern, d->d_name);
- if (CompareAttributes(findbase, d->d_name, musthave, canhave)) {
- sprintf (findpath, "%s/%s", findbase, d->d_name);
- return findpath;
- }
- }
- }
- return NULL;
-}
-
-char *Sys_FindNext (unsigned musthave, unsigned canhave)
-{
- struct dirent *d;
-
- if (fdir == NULL)
- return NULL;
- while ((d = readdir(fdir)) != NULL) {
- if (!*findpattern || glob_match(findpattern, d->d_name)) {
-// if (*findpattern)
-// printf("%s matched %s\n", findpattern, d->d_name);
- if (CompareAttributes(findbase, d->d_name, musthave, canhave)) {
- sprintf (findpath, "%s/%s", findbase, d->d_name);
- return findpath;
- }
- }
- }
- return NULL;
-}
-
-void Sys_FindClose (void)
-{
- if (fdir != NULL)
- closedir(fdir);
- fdir = NULL;
-}
-
-
-//============================================
-
--- a/solaris/sys_solaris.c
+++ /dev/null
@@ -1,337 +1,0 @@
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <sys/file.h>
-
-#include <dlfcn.h>
-
-#include "../qcommon/qcommon.h"
-
-cvar_t *nostdout;
-
-unsigned sys_frame_time;
-
-qboolean stdin_active = true;
-
-// =======================================================================
-// General routines
-// =======================================================================
-
-void Sys_ConsoleOutput (char *string)
-{
- if (nostdout && nostdout->value)
- return;
-
- fputs(string, stdout);
-}
-
-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");
-
- if (nostdout && nostdout->value)
- return;
-
- 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);
- }
-}
-
-void Sys_Quit (void)
-{
- CL_Shutdown ();
- Qcommon_Shutdown ();
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
- _exit(0);
-}
-
-void Sys_Init(void)
-{
-#if id386
-// Sys_SetFPCW();
-#endif
-}
-
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
- char string[1024];
-
-// change stdin to non blocking
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-
- va_start (argptr,error);
- vsprintf (string,error,argptr);
- va_end (argptr);
- fprintf(stderr, "Error: %s\n", string);
-
- CL_Shutdown ();
- Qcommon_Shutdown ();
- _exit (1);
-
-}
-
-void Sys_Warn (char *warning, ...)
-{
- va_list argptr;
- char string[1024];
-
- va_start (argptr,warning);
- vsprintf (string,warning,argptr);
- va_end (argptr);
- fprintf(stderr, "Warning: %s", string);
-}
-
-/*
-============
-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)
-{
-// Sys_Warn("floating point exception\n");
- signal(SIGFPE, floating_point_exception_handler);
-}
-
-char *Sys_ConsoleInput(void)
-{
- static char text[256];
- int len;
- fd_set fdset;
- struct timeval timeout;
-
- if (!dedicated || !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 = false;
- return NULL;
- }
- if (len < 1)
- return NULL;
- text[len-1] = 0; // rip off the /n and terminate
-
- return text;
-}
-
-/*****************************************************************************/
-
-static void *game_library;
-
-/*
-=================
-Sys_UnloadGame
-=================
-*/
-void Sys_UnloadGame (void)
-{
- if (game_library)
- dlclose (game_library);
- game_library = NULL;
-}
-
-/*
-=================
-Sys_GetGameAPI
-
-Loads the game dll
-=================
-*/
-void *Sys_GetGameAPI (void *parms)
-{
- void *(*GetGameAPI) (void *);
-
- char name[MAX_OSPATH];
- char curpath[MAX_OSPATH];
- char *path;
-#ifdef __i386__
- const char *gamename = "gamei386.so";
-#elif defined __sun__
- const char *gamename = "gamesparc.so";
-#else
-#error Unknown arch
-#endif
-
- if (game_library)
- Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
-
- getcwd(curpath, sizeof(curpath));
-
- Com_Printf("------- Loading %s -------", gamename);
-
- // now run through the search paths
- path = NULL;
- while (1)
- {
- path = FS_NextPath (path);
- if (!path)
- return NULL; // couldn't find one anywhere
- sprintf (name, "%s/%s/%s", curpath, path, gamename);
- game_library = dlopen (name, RTLD_NOW );
- if (game_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n",name);
- break;
- } else
- Com_Printf("error: %s\n", dlerror());
- }
-
- GetGameAPI = (void *)dlsym (game_library, "GetGameAPI");
- if (!GetGameAPI)
- {
- Sys_UnloadGame ();
- return NULL;
- }
-
- return GetGameAPI (parms);
-}
-
-/*****************************************************************************/
-
-void Sys_AppActivate (void)
-{
-}
-
-void Sys_SendKeyEvents (void)
-{
- // grab frame time
- sys_frame_time = Sys_Milliseconds();
-}
-
-/*****************************************************************************/
-
-char *Sys_GetClipboardData(void)
-{
- return NULL;
-}
-
-int main (int argc, char **argv)
-{
- int time, oldtime, newtime;
-
-#if 0
- int newargc;
- char **newargv;
- int i;
-
- // force dedicated
- newargc = argc;
- newargv = malloc((argc + 3) * sizeof(char *));
- newargv[0] = argv[0];
- newargv[1] = "+set";
- newargv[2] = "dedicated";
- newargv[3] = "1";
- for (i = 1; i < argc; i++)
- newargv[i + 3] = argv[i];
- newargc += 3;
-
- Qcommon_Init(newargc, newargv);
-#else
- Qcommon_Init(argc, argv);
-#endif
-
- fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-
- nostdout = Cvar_Get("nostdout", "0", 0);
-
- if (!nostdout->value) {
- fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-// printf ("Linux Quake -- Version %0.3f\n", LINUX_VERSION);
- }
-
- oldtime = Sys_Milliseconds ();
- while (1)
- {
-// find time spent rendering last frame
- do {
- newtime = Sys_Milliseconds ();
- time = newtime - oldtime;
- } while (time < 1);
- Qcommon_Frame (time);
- oldtime = newtime;
- }
-
-}
-
-void Sys_CopyProtect(void)
-{
- return;
-}
-
-#if 0
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
-
- int r;
- unsigned long addr;
- int psize = getpagesize();
-
- addr = (startaddr & ~(psize-1)) - psize;
-
-// fprintf(stderr, "writable code %lx(%lx)-%lx, length=%lx\n", startaddr,
-// addr, startaddr+length, length);
-
- r = mprotect((char*)addr, length + startaddr - addr + psize, 7);
-
- if (r < 0)
- Sys_Error("Protection change failed\n");
-
-}
-
-#endif
--- a/unix/makefile
+++ /dev/null
@@ -1,308 +1,0 @@
-
-CFLAGS = -c
-LDFLAGS =
-ODIR = baddir
-
-EXEBASE = quake2
-EXE = $(ODIR)/quake2
-all: $(EXE)
-
-#----------------------------------------------------------------------
-
-SERVERFILES = $(ODIR)/sv_ccmds.o $(ODIR)/sv_ents.o $(ODIR)/sv_game.o $(ODIR)/sv_init.o $(ODIR)/sv_main.o $(ODIR)/sv_send.o $(ODIR)/sv_user.o $(ODIR)/sv_world.o
-
-CLIENTFILES = $(ODIR)/cl_demo.o $(ODIR)/cl_ents.o $(ODIR)/cl_fx.o $(ODIR)/cl_input.o $(ODIR)/cl_inv.o $(ODIR)/cl_main.o $(ODIR)/cl_parse.o $(ODIR)/cl_tent.o $(ODIR)/console.o $(ODIR)/keys.o $(ODIR)/menu.o $(ODIR)/qmenu.o $(ODIR)/screen.o $(ODIR)/scr_cin.o $(ODIR)/snd_dma.o $(ODIR)/snd_mem.o $(ODIR)/snd_mix.o $(ODIR)/view.o
-
-# commonfiles are used by both client and server
-COMMONFILES = $(ODIR)/cmd.o $(ODIR)/cmodel.o $(ODIR)/cvar.o $(ODIR)/files.o $(ODIR)/md4.o $(ODIR)/net_chan.o $(ODIR)/net_udp.o
-
-REFGLFILES = $(ODIR)/gl_draw.o $(ODIR)/gl_inter.o $(ODIR)/gl_light.o $(ODIR)/gl_math.o $(ODIR)/gl_mesh.o $(ODIR)/gl_model.o $(ODIR)/gl_rmain.o $(ODIR)/gl_rmisc.o $(ODIR)/gl_rsurf.o $(ODIR)/gl_textr.o $(ODIR)/gl_warp.
-
-REFSOFTFILES = $(ODIR)/r_aclip.o $(ODIR)/r_alias.o $(ODIR)/r_bsp.o $(ODIR)/r_draw.o $(ODIR)/r_edge.o $(ODIR)/r_image.o $(ODIR)/r_light.o $(ODIR)/r_main.o $(ODIR)/r_misc.o $(ODIR)/r_model.o $(ODIR)/r_part.o $(ODIR)/r_polyse.o $(ODIR)/r_poly.o $(ODIR)/r_rast.o $(ODIR)/r_scan.o $(ODIR)/r_sprite.o $(ODIR)/r_surf.o
-
-# sharedfiles are included in EVERY dll
-SHAREDFILES = $(ODIR)/q_shared
-
-#----------------------------------------------------------------------
-
-_next:
- make "CFLAGS = -c -Wall -g -O" "ODIR = next"
-
-_irix:
- make "CFLAGS = -c -O2 -Xcpluscomm -woff 513 -woff 594 -woff 596" "LDFLAGS = -Ofast=ip32_10k" "ODIR = irix"
-
-_irixdebug:
- make "CFLAGS = -c -O2 -g -Xcpluscomm" "LDFLAGS = -g" "ODIR = irix"
-
-clean:
- rm -f next/*.o next/$(EXEBASE)
- rm -f irix/*.o irix/$(EXEBASE)
-
-#----------------------------------------------------------------------
-
-FILES = $(SERVERFILES) $(COMMONFILES) $(CLIENTFILES) $(REFSOFTFILES) $(SHAREDFILES)
-
-$(EXE) : $(FILES)
- cc -o $(EXE) $(LDFLAGS) $(FILES) -lm
-
-#----------------------------------------------------------------------
-
-$(ODIR)/q_shared.o : ../qcommon/q_shared.c
- cc $(CFLAGS) -o $@ $?
-
-#----------------------------------------------------------------------
-
-$(ODIR)/sv_ccmds.o : ../server/sv_ccmds.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_ents.o : ../server/sv_ents.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_game.o : ../server/sv_game.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_init.o : ../server/sv_init.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_main.o : ../server/sv_main.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_send.o : ../server/sv_send.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_user.o : ../server/sv_user.c
- cc $(CFLAGS) -o $@ $?
-
-$(ODIR)/sv_world.o : ../server/sv_world.c
- cc $(CFLAGS) -o $@ $?
-
-#----------------------------------------------------------------------
-
-$(ODIR)/cl_demo.o : ../client/cl_demo.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_ents.o : ../client/cl_ents.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_fx.o : ../client/cl_fx.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_input.o : ../client/cl_input.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_inv.o : ../client/cl_inv.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_main.o : ../client/cl_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_parse.o : ../client/cl_parse.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_tent.o : ../client/cl_tent.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/console.o : ../client/console.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/keys.o : ../client/keys.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/menu.o : ../client/menu.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/qmenu.o : ../client/qmenu.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sbar2.o : ../client/sbar2.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/screen.o : ../client/screen.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/scr_cin.o : ../client/scr_cin.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_dma.o : ../client/snd_dma.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_mem.o : ../client/snd_mem.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_mix.o : ../client/snd_mix.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/view.o : ../client/view.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/cmd.o : ../qcommon/cmd.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cmodel.o : ../qcommon/cmodel.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cvar.o : ../qcommon/cvar.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/files.o : ../qcommon/files.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/md4.o : ../qcommon/md4.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/net_chan.o : ../qcommon/net_chan.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/net_udp.o : ../qcommon/net_udp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sys_null.o : ../qcommon/sys_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/gl_draw.o : ../ref_gl/gl_draw.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_inter.o : ../ref_gl/gl_inter.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_light.o : ../ref_gl/gl_light.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_math.o : ../ref_gl/gl_math.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_mesh.o : ../ref_gl/gl_mesh.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_model.o : ../ref_gl/gl_model.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_rmain.o : ../ref_gl/gl_rmain.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_rmisc.o : ../ref_gl/gl_rmisc.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_rsurf.o : ../ref_gl/gl_rsurf.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_textr.o : ../ref_gl/gl_textr.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_warp.o : ../ref_gl/gl_warp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/r_aclip.o : ../ref_soft/r_aclip.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_alias.o : ../ref_soft/r_alias.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_bsp.o : ../ref_soft/r_bsp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_draw.o : ../ref_soft/r_draw.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_edge.o : ../ref_soft/r_edge.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_image.o : ../ref_soft/r_image.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_light.o : ../ref_soft/r_light.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_main.o : ../ref_soft/r_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_misc.o : ../ref_soft/r_misc.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_model.o : ../ref_soft/r_model.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_part.o : ../ref_soft/r_part.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_polyse.o : ../ref_soft/r_polyse.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_poly.o : ../ref_soft/r_poly.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_rast.o : ../ref_soft/r_rast.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_scan.o : ../ref_soft/r_scan.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_sprite.o : ../ref_soft/r_sprite.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_surf.o : ../ref_soft/r_surf.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
--- a/unix/makefile_old
+++ /dev/null
@@ -1,317 +1,0 @@
-
-CFLAGS = -c
-LDFLAGS =
-ODIR = baddir
-
-EXEBASE = quake2
-EXE = $(ODIR)/quake2
-all: $(EXE)
-
-#----------------------------------------------------------------------
-
-SERVERFILES = $(ODIR)/sv_ccmds.o $(ODIR)/sv_ents.o $(ODIR)/sv_game.o $(ODIR)/sv_init.o $(ODIR)/sv_main.o $(ODIR)/sv_send.o $(ODIR)/sv_user.o $(ODIR)/sv_world.o
-
-CLIENTFILES = $(ODIR)/cl_demo.o $(ODIR)/cl_ents.o $(ODIR)/cl_fx.o $(ODIR)/cl_input.o $(ODIR)/cl_inv.o $(ODIR)/cl_main.o $(ODIR)/cl_parse.o $(ODIR)/cl_tent.o $(ODIR)/console.o $(ODIR)/keys.o $(ODIR)/menu.o $(ODIR)/qmenu.o $(ODIR)/screen.o $(ODIR)/scr_cin.o $(ODIR)/snd_dma.o $(ODIR)/snd_mem.o $(ODIR)/snd_mix.o $(ODIR)/view.o
-
-# commonfiles are used by both client and server
-COMMONFILES = $(ODIR)/cmd.o $(ODIR)/cmodel.o $(ODIR)/cvar.o $(ODIR)/files.o $(ODIR)/md4.o $(ODIR)/net_chan.o $(ODIR)/net_udp.o
-
-REFGLFILES = $(ODIR)/gl_draw.o $(ODIR)/gl_inter.o $(ODIR)/gl_light.o $(ODIR)/gl_math.o $(ODIR)/gl_mesh.o $(ODIR)/gl_model.o $(ODIR)/gl_rmain.o $(ODIR)/gl_rmisc.o $(ODIR)/gl_rsurf.o $(ODIR)/gl_textr.o $(ODIR)/gl_warp.
-
-REFSOFTFILES = $(ODIR)/r_aclip.o $(ODIR)/r_alias.o $(ODIR)/r_bsp.o $(ODIR)/r_draw.o $(ODIR)/r_edge.o $(ODIR)/r_image.o $(ODIR)/r_light.o $(ODIR)/r_main.o $(ODIR)/r_misc.o $(ODIR)/r_model.o $(ODIR)/r_part.o $(ODIR)/r_polyse.o $(ODIR)/r_poly.o $(ODIR)/r_rast.o $(ODIR)/r_scan.o $(ODIR)/r_sprite.o $(ODIR)/r_surf.o
-
-# sharedfiles are included in EVERY dll
-SHAREDFILES = $(ODIR)/q_shared
-
-#----------------------------------------------------------------------
-
-_next:
- make "CFLAGS = -c -Wall -g -O" "ODIR = next"
-
-_irix:
- make "CFLAGS = -c -woff 513 -Ofast=ip32_10k -Xcpluscomm" "LDFLAGS = -Ofast=ip32_10k" "ODIR = irix"
-
-_irixdebug:
- make "CFLAGS = -c -O2 -g -Xcpluscomm" "LDFLAGS = -g" "ODIR = irix"
-
-clean:
- rm -f next/*.o next/$(EXEBASE)
- rm -f irix/*.o irix/$(EXEBASE)
-
-#----------------------------------------------------------------------
-
-FILES = $(SERVERFILES) $(COMMONFILES) $(CLIENTFILES) $(REFSOFTFILES) $(SHAREDFILES)
-
-$(EXE) : $(FILES)
- cc -o $(EXE) $(LDFLAGS) $(FILES) -lm
-
-#----------------------------------------------------------------------
-
-$(ODIR)/q_shared.o : ../qcommon/q_shared.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/sv_ccmds.o : ../server/sv_ccmds.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_ents.o : ../server/sv_ents.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_game.o : ../server/sv_game.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_init.o : ../server/sv_init.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_main.o : ../server/sv_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_send.o : ../server/sv_send.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_user.o : ../server/sv_user.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sv_world.o : ../server/sv_world.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/cl_demo.o : ../client/cl_demo.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_ents.o : ../client/cl_ents.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_fx.o : ../client/cl_fx.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_input.o : ../client/cl_input.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_inv.o : ../client/cl_inv.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_main.o : ../client/cl_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_parse.o : ../client/cl_parse.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cl_tent.o : ../client/cl_tent.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/console.o : ../client/console.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/keys.o : ../client/keys.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/menu.o : ../client/menu.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/qmenu.o : ../client/qmenu.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sbar2.o : ../client/sbar2.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/screen.o : ../client/screen.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/scr_cin.o : ../client/scr_cin.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_dma.o : ../client/snd_dma.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_mem.o : ../client/snd_mem.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/snd_mix.o : ../client/snd_mix.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/view.o : ../client/view.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/cmd.o : ../qcommon/cmd.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cmodel.o : ../qcommon/cmodel.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/cvar.o : ../qcommon/cvar.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/files.o : ../qcommon/files.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/md4.o : ../qcommon/md4.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/net_chan.o : ../qcommon/net_chan.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/net_udp.o : ../qcommon/net_udp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/sys_null.o : ../qcommon/sys_null.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/gl_draw.o : ../ref_gl/gl_draw.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_inter.o : ../ref_gl/gl_inter.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_light.o : ../ref_gl/gl_light.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_math.o : ../ref_gl/gl_math.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_mesh.o : ../ref_gl/gl_mesh.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_model.o : ../ref_gl/gl_model.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_rmain.o : ../ref_gl/gl_rmain.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_rmisc.o : ../ref_gl/gl_rmisc.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_rsurf.o : ../ref_gl/gl_rsurf.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_textr.o : ../ref_gl/gl_textr.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/gl_warp.o : ../ref_gl/gl_warp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
-$(ODIR)/r_aclip.o : ../ref_soft/r_aclip.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_alias.o : ../ref_soft/r_alias.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_bsp.o : ../ref_soft/r_bsp.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_draw.o : ../ref_soft/r_draw.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_edge.o : ../ref_soft/r_edge.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_image.o : ../ref_soft/r_image.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_light.o : ../ref_soft/r_light.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_main.o : ../ref_soft/r_main.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_misc.o : ../ref_soft/r_misc.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_model.o : ../ref_soft/r_model.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_part.o : ../ref_soft/r_part.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_polyse.o : ../ref_soft/r_polyse.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_poly.o : ../ref_soft/r_poly.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_rast.o : ../ref_soft/r_rast.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_scan.o : ../ref_soft/r_scan.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_sprite.o : ../ref_soft/r_sprite.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-$(ODIR)/r_surf.o : ../ref_soft/r_surf.c
- cc $(CFLAGS) -E $? | tr -d '\015' > /tmp/temp.i
- cc $(CFLAGS) -o $@ /tmp/temp.i
-
-#----------------------------------------------------------------------
-
binary files a/unix/next/sv_ccmds.o /dev/null differ
--- a/win32/cd_win.c
+++ /dev/null
@@ -1,510 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
-// rights reserved.
-
-#include <windows.h>
-#include "../client/client.h"
-
-extern HWND cl_hwnd;
-
-static qboolean cdValid = false;
-static qboolean playing = false;
-static qboolean wasPlaying = false;
-static qboolean initialized = false;
-static qboolean enabled = false;
-static qboolean playLooping = false;
-static byte remap[100];
-static byte cdrom;
-static byte playTrack;
-static byte maxTrack;
-
-cvar_t *cd_nocd;
-cvar_t *cd_loopcount;
-cvar_t *cd_looptrack;
-
-UINT wDeviceID;
-int loopcounter;
-
-
-void CDAudio_Pause(void);
-
-static void CDAudio_Eject(void)
-{
- DWORD dwReturn;
-
- if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD)NULL))
- Com_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
-}
-
-
-static void CDAudio_CloseDoor(void)
-{
- DWORD dwReturn;
-
- if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD)NULL))
- Com_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
-}
-
-
-static int CDAudio_GetAudioDiskInfo(void)
-{
- DWORD dwReturn;
- MCI_STATUS_PARMS mciStatusParms;
-
-
- cdValid = false;
-
- mciStatusParms.dwItem = MCI_STATUS_READY;
- dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
- if (dwReturn)
- {
- Com_DPrintf("CDAudio: drive ready test - get status failed\n");
- return -1;
- }
- if (!mciStatusParms.dwReturn)
- {
- Com_DPrintf("CDAudio: drive not ready\n");
- return -1;
- }
-
- mciStatusParms.dwItem = MCI_STATUS_NUMBER_OF_TRACKS;
- dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
- if (dwReturn)
- {
- Com_DPrintf("CDAudio: get tracks - status failed\n");
- return -1;
- }
- if (mciStatusParms.dwReturn < 1)
- {
- Com_DPrintf("CDAudio: no music tracks\n");
- return -1;
- }
-
- cdValid = true;
- maxTrack = mciStatusParms.dwReturn;
-
- return 0;
-}
-
-
-
-void CDAudio_Play2(int track, qboolean looping)
-{
- DWORD dwReturn;
- MCI_PLAY_PARMS mciPlayParms;
- MCI_STATUS_PARMS mciStatusParms;
-
- if (!enabled)
- return;
-
- if (!cdValid)
- {
- CDAudio_GetAudioDiskInfo();
- if (!cdValid)
- return;
- }
-
- track = remap[track];
-
- if (track < 1 || track > maxTrack)
- {
- CDAudio_Stop();
- return;
- }
-
- // don't try to play a non-audio track
- mciStatusParms.dwItem = MCI_CDA_STATUS_TYPE_TRACK;
- mciStatusParms.dwTrack = track;
- dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
- if (dwReturn)
- {
- Com_DPrintf("MCI_STATUS failed (%i)\n", dwReturn);
- return;
- }
- if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO)
- {
- Com_Printf("CDAudio: track %i is not audio\n", track);
- return;
- }
-
- // get the length of the track to be played
- mciStatusParms.dwItem = MCI_STATUS_LENGTH;
- mciStatusParms.dwTrack = track;
- dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
- if (dwReturn)
- {
- Com_DPrintf("MCI_STATUS failed (%i)\n", dwReturn);
- return;
- }
-
- if (playing)
- {
- if (playTrack == track)
- return;
- CDAudio_Stop();
- }
-
- mciPlayParms.dwFrom = MCI_MAKE_TMSF(track, 0, 0, 0);
- mciPlayParms.dwTo = (mciStatusParms.dwReturn << 8) | track;
- mciPlayParms.dwCallback = (DWORD)cl_hwnd;
- dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD)(LPVOID) &mciPlayParms);
- if (dwReturn)
- {
- Com_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
- return;
- }
-
- playLooping = looping;
- playTrack = track;
- playing = true;
-
- if ( Cvar_VariableValue( "cd_nocd" ) )
- CDAudio_Pause ();
-}
-
-
-void CDAudio_Play(int track, qboolean looping)
-{
- // set a loop counter so that this track will change to the
- // looptrack later
- loopcounter = 0;
- CDAudio_Play2(track, looping);
-}
-
-void CDAudio_Stop(void)
-{
- DWORD dwReturn;
-
- if (!enabled)
- return;
-
- if (!playing)
- return;
-
- if (dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD)NULL))
- Com_DPrintf("MCI_STOP failed (%i)", dwReturn);
-
- wasPlaying = false;
- playing = false;
-}
-
-
-void CDAudio_Pause(void)
-{
- DWORD dwReturn;
- MCI_GENERIC_PARMS mciGenericParms;
-
- if (!enabled)
- return;
-
- if (!playing)
- return;
-
- mciGenericParms.dwCallback = (DWORD)cl_hwnd;
- if (dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD)(LPVOID) &mciGenericParms))
- Com_DPrintf("MCI_PAUSE failed (%i)", dwReturn);
-
- wasPlaying = playing;
- playing = false;
-}
-
-
-void CDAudio_Resume(void)
-{
- DWORD dwReturn;
- MCI_PLAY_PARMS mciPlayParms;
-
- if (!enabled)
- return;
-
- if (!cdValid)
- return;
-
- if (!wasPlaying)
- return;
-
- mciPlayParms.dwFrom = MCI_MAKE_TMSF(playTrack, 0, 0, 0);
- mciPlayParms.dwTo = MCI_MAKE_TMSF(playTrack + 1, 0, 0, 0);
- mciPlayParms.dwCallback = (DWORD)cl_hwnd;
- dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY, (DWORD)(LPVOID) &mciPlayParms);
- if (dwReturn)
- {
- Com_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
- return;
- }
- playing = true;
-}
-
-
-static void CD_f (void)
-{
- char *command;
- int ret;
- int n;
-
- if (Cmd_Argc() < 2)
- return;
-
- command = Cmd_Argv (1);
-
- if (Q_strcasecmp(command, "on") == 0)
- {
- enabled = true;
- return;
- }
-
- if (Q_strcasecmp(command, "off") == 0)
- {
- if (playing)
- CDAudio_Stop();
- enabled = false;
- return;
- }
-
- if (Q_strcasecmp(command, "reset") == 0)
- {
- enabled = true;
- if (playing)
- CDAudio_Stop();
- for (n = 0; n < 100; n++)
- remap[n] = n;
- CDAudio_GetAudioDiskInfo();
- return;
- }
-
- if (Q_strcasecmp(command, "remap") == 0)
- {
- ret = Cmd_Argc() - 2;
- if (ret <= 0)
- {
- for (n = 1; n < 100; n++)
- if (remap[n] != n)
- Com_Printf(" %u -> %u\n", n, remap[n]);
- return;
- }
- for (n = 1; n <= ret; n++)
- remap[n] = atoi(Cmd_Argv (n+1));
- return;
- }
-
- if (Q_strcasecmp(command, "close") == 0)
- {
- CDAudio_CloseDoor();
- return;
- }
-
- if (!cdValid)
- {
- CDAudio_GetAudioDiskInfo();
- if (!cdValid)
- {
- Com_Printf("No CD in player.\n");
- return;
- }
- }
-
- if (Q_strcasecmp(command, "play") == 0)
- {
- CDAudio_Play(atoi(Cmd_Argv (2)), false);
- return;
- }
-
- if (Q_strcasecmp(command, "loop") == 0)
- {
- CDAudio_Play(atoi(Cmd_Argv (2)), true);
- return;
- }
-
- if (Q_strcasecmp(command, "stop") == 0)
- {
- CDAudio_Stop();
- return;
- }
-
- if (Q_strcasecmp(command, "pause") == 0)
- {
- CDAudio_Pause();
- return;
- }
-
- if (Q_strcasecmp(command, "resume") == 0)
- {
- CDAudio_Resume();
- return;
- }
-
- if (Q_strcasecmp(command, "eject") == 0)
- {
- if (playing)
- CDAudio_Stop();
- CDAudio_Eject();
- cdValid = false;
- return;
- }
-
- if (Q_strcasecmp(command, "info") == 0)
- {
- Com_Printf("%u tracks\n", maxTrack);
- if (playing)
- Com_Printf("Currently %s track %u\n", playLooping ? "looping" : "playing", playTrack);
- else if (wasPlaying)
- Com_Printf("Paused %s track %u\n", playLooping ? "looping" : "playing", playTrack);
- return;
- }
-}
-
-
-LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if (lParam != wDeviceID)
- return 1;
-
- switch (wParam)
- {
- case MCI_NOTIFY_SUCCESSFUL:
- if (playing)
- {
- playing = false;
- if (playLooping)
- {
- // if the track has played the given number of times,
- // go to the ambient track
- if (++loopcounter >= cd_loopcount->value)
- CDAudio_Play2(cd_looptrack->value, true);
- else
- CDAudio_Play2(playTrack, true);
- }
- }
- break;
-
- case MCI_NOTIFY_ABORTED:
- case MCI_NOTIFY_SUPERSEDED:
- break;
-
- case MCI_NOTIFY_FAILURE:
- Com_DPrintf("MCI_NOTIFY_FAILURE\n");
- CDAudio_Stop ();
- cdValid = false;
- break;
-
- default:
- Com_DPrintf("Unexpected MM_MCINOTIFY type (%i)\n", wParam);
- return 1;
- }
-
- return 0;
-}
-
-
-void CDAudio_Update(void)
-{
- if ( cd_nocd->value != !enabled )
- {
- if ( cd_nocd->value )
- {
- CDAudio_Stop();
- enabled = false;
- }
- else
- {
- enabled = true;
- CDAudio_Resume ();
- }
- }
-}
-
-
-int CDAudio_Init(void)
-{
- DWORD dwReturn;
- MCI_OPEN_PARMS mciOpenParms;
- MCI_SET_PARMS mciSetParms;
- int n;
-
- cd_nocd = Cvar_Get ("cd_nocd", "0", CVAR_ARCHIVE );
- cd_loopcount = Cvar_Get ("cd_loopcount", "4", 0);
- cd_looptrack = Cvar_Get ("cd_looptrack", "11", 0);
- if ( cd_nocd->value)
- return -1;
-
- mciOpenParms.lpstrDeviceType = "cdaudio";
- if (dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD) (LPVOID) &mciOpenParms))
- {
- Com_Printf("CDAudio_Init: MCI_OPEN failed (%i)\n", dwReturn);
- return -1;
- }
- wDeviceID = mciOpenParms.wDeviceID;
-
- // Set the time format to track/minute/second/frame (TMSF).
- mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF;
- if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID) &mciSetParms))
- {
- Com_Printf("MCI_SET_TIME_FORMAT failed (%i)\n", dwReturn);
- mciSendCommand(wDeviceID, MCI_CLOSE, 0, (DWORD)NULL);
- return -1;
- }
-
- for (n = 0; n < 100; n++)
- remap[n] = n;
- initialized = true;
- enabled = true;
-
- if (CDAudio_GetAudioDiskInfo())
- {
-// Com_Printf("CDAudio_Init: No CD in player.\n");
- cdValid = false;
- enabled = false;
- }
-
- Cmd_AddCommand ("cd", CD_f);
-
- Com_Printf("CD Audio Initialized\n");
-
- return 0;
-}
-
-
-void CDAudio_Shutdown(void)
-{
- if (!initialized)
- return;
- CDAudio_Stop();
- if (mciSendCommand(wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD)NULL))
- Com_DPrintf("CDAudio_Shutdown: MCI_CLOSE failed\n");
-}
-
-
-/*
-===========
-CDAudio_Activate
-
-Called when the main window gains or loses focus.
-The window have been destroyed and recreated
-between a deactivate and an activate.
-===========
-*/
-void CDAudio_Activate (qboolean active)
-{
- if (active)
- CDAudio_Resume ();
- else
- CDAudio_Pause ();
-}
--- a/win32/conproc.c
+++ /dev/null
@@ -1,431 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// conproc.c -- support for qhost
-#include <stdio.h>
-#include <process.h>
-#include <windows.h>
-#include "conproc.h"
-
-#define CCOM_WRITE_TEXT 0x2
-// Param1 : Text
-
-#define CCOM_GET_TEXT 0x3
-// Param1 : Begin line
-// Param2 : End line
-
-#define CCOM_GET_SCR_LINES 0x4
-// No params
-
-#define CCOM_SET_SCR_LINES 0x5
-// Param1 : Number of lines
-
-
-HANDLE heventDone;
-HANDLE hfileBuffer;
-HANDLE heventChildSend;
-HANDLE heventParentSend;
-HANDLE hStdout;
-HANDLE hStdin;
-
-unsigned _stdcall RequestProc (void *arg);
-LPVOID GetMappedBuffer (HANDLE hfileBuffer);
-void ReleaseMappedBuffer (LPVOID pBuffer);
-BOOL GetScreenBufferLines (int *piLines);
-BOOL SetScreenBufferLines (int iLines);
-BOOL ReadText (LPTSTR pszText, int iBeginLine, int iEndLine);
-BOOL WriteText (LPCTSTR szText);
-int CharToCode (char c);
-BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy);
-
-int ccom_argc;
-char **ccom_argv;
-
-/*
-================
-CCheckParm
-
-Returns the position (1 to argc-1) in the program's argument list
-where the given parameter apears, or 0 if not present
-================
-*/
-int CCheckParm (char *parm)
-{
- int i;
-
- for (i=1 ; i<ccom_argc ; i++)
- {
- if (!ccom_argv[i])
- continue;
- if (!strcmp (parm,ccom_argv[i]))
- return i;
- }
-
- return 0;
-}
-
-
-void InitConProc (int argc, char **argv)
-{
- unsigned threadAddr;
- HANDLE hFile;
- HANDLE heventParent;
- HANDLE heventChild;
- int t;
-
- ccom_argc = argc;
- ccom_argv = argv;
-
-// give QHOST a chance to hook into the console
- if ((t = CCheckParm ("-HFILE")) > 0)
- {
- if (t < argc)
- hFile = (HANDLE)atoi (ccom_argv[t+1]);
- }
-
- if ((t = CCheckParm ("-HPARENT")) > 0)
- {
- if (t < argc)
- heventParent = (HANDLE)atoi (ccom_argv[t+1]);
- }
-
- if ((t = CCheckParm ("-HCHILD")) > 0)
- {
- if (t < argc)
- heventChild = (HANDLE)atoi (ccom_argv[t+1]);
- }
-
-
-// ignore if we don't have all the events.
- if (!hFile || !heventParent || !heventChild)
- {
- printf ("Qhost not present.\n");
- return;
- }
-
- printf ("Initializing for qhost.\n");
-
- hfileBuffer = hFile;
- heventParentSend = heventParent;
- heventChildSend = heventChild;
-
-// so we'll know when to go away.
- heventDone = CreateEvent (NULL, FALSE, FALSE, NULL);
-
- if (!heventDone)
- {
- printf ("Couldn't create heventDone\n");
- return;
- }
-
- if (!_beginthreadex (NULL, 0, RequestProc, NULL, 0, &threadAddr))
- {
- CloseHandle (heventDone);
- printf ("Couldn't create QHOST thread\n");
- return;
- }
-
-// save off the input/output handles.
- hStdout = GetStdHandle (STD_OUTPUT_HANDLE);
- hStdin = GetStdHandle (STD_INPUT_HANDLE);
-
-// force 80 character width, at least 25 character height
- SetConsoleCXCY (hStdout, 80, 25);
-}
-
-
-void DeinitConProc (void)
-{
- if (heventDone)
- SetEvent (heventDone);
-}
-
-
-unsigned _stdcall RequestProc (void *arg)
-{
- int *pBuffer;
- DWORD dwRet;
- HANDLE heventWait[2];
- int iBeginLine, iEndLine;
-
- heventWait[0] = heventParentSend;
- heventWait[1] = heventDone;
-
- while (1)
- {
- dwRet = WaitForMultipleObjects (2, heventWait, FALSE, INFINITE);
-
- // heventDone fired, so we're exiting.
- if (dwRet == WAIT_OBJECT_0 + 1)
- break;
-
- pBuffer = (int *) GetMappedBuffer (hfileBuffer);
-
- // hfileBuffer is invalid. Just leave.
- if (!pBuffer)
- {
- printf ("Invalid hfileBuffer\n");
- break;
- }
-
- switch (pBuffer[0])
- {
- case CCOM_WRITE_TEXT:
- // Param1 : Text
- pBuffer[0] = WriteText ((LPCTSTR) (pBuffer + 1));
- break;
-
- case CCOM_GET_TEXT:
- // Param1 : Begin line
- // Param2 : End line
- iBeginLine = pBuffer[1];
- iEndLine = pBuffer[2];
- pBuffer[0] = ReadText ((LPTSTR) (pBuffer + 1), iBeginLine,
- iEndLine);
- break;
-
- case CCOM_GET_SCR_LINES:
- // No params
- pBuffer[0] = GetScreenBufferLines (&pBuffer[1]);
- break;
-
- case CCOM_SET_SCR_LINES:
- // Param1 : Number of lines
- pBuffer[0] = SetScreenBufferLines (pBuffer[1]);
- break;
- }
-
- ReleaseMappedBuffer (pBuffer);
- SetEvent (heventChildSend);
- }
-
- _endthreadex (0);
- return 0;
-}
-
-
-LPVOID GetMappedBuffer (HANDLE hfileBuffer)
-{
- LPVOID pBuffer;
-
- pBuffer = MapViewOfFile (hfileBuffer,
- FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
-
- return pBuffer;
-}
-
-
-void ReleaseMappedBuffer (LPVOID pBuffer)
-{
- UnmapViewOfFile (pBuffer);
-}
-
-
-BOOL GetScreenBufferLines (int *piLines)
-{
- CONSOLE_SCREEN_BUFFER_INFO info;
- BOOL bRet;
-
- bRet = GetConsoleScreenBufferInfo (hStdout, &info);
-
- if (bRet)
- *piLines = info.dwSize.Y;
-
- return bRet;
-}
-
-
-BOOL SetScreenBufferLines (int iLines)
-{
-
- return SetConsoleCXCY (hStdout, 80, iLines);
-}
-
-
-BOOL ReadText (LPTSTR pszText, int iBeginLine, int iEndLine)
-{
- COORD coord;
- DWORD dwRead;
- BOOL bRet;
-
- coord.X = 0;
- coord.Y = iBeginLine;
-
- bRet = ReadConsoleOutputCharacter(
- hStdout,
- pszText,
- 80 * (iEndLine - iBeginLine + 1),
- coord,
- &dwRead);
-
- // Make sure it's null terminated.
- if (bRet)
- pszText[dwRead] = '\0';
-
- return bRet;
-}
-
-
-BOOL WriteText (LPCTSTR szText)
-{
- DWORD dwWritten;
- INPUT_RECORD rec;
- char upper, *sz;
-
- sz = (LPTSTR) szText;
-
- while (*sz)
- {
- // 13 is the code for a carriage return (\n) instead of 10.
- if (*sz == 10)
- *sz = 13;
-
- upper = toupper(*sz);
-
- rec.EventType = KEY_EVENT;
- rec.Event.KeyEvent.bKeyDown = TRUE;
- rec.Event.KeyEvent.wRepeatCount = 1;
- rec.Event.KeyEvent.wVirtualKeyCode = upper;
- rec.Event.KeyEvent.wVirtualScanCode = CharToCode (*sz);
- rec.Event.KeyEvent.uChar.AsciiChar = *sz;
- rec.Event.KeyEvent.uChar.UnicodeChar = *sz;
- rec.Event.KeyEvent.dwControlKeyState = isupper(*sz) ? 0x80 : 0x0;
-
- WriteConsoleInput(
- hStdin,
- &rec,
- 1,
- &dwWritten);
-
- rec.Event.KeyEvent.bKeyDown = FALSE;
-
- WriteConsoleInput(
- hStdin,
- &rec,
- 1,
- &dwWritten);
-
- sz++;
- }
-
- return TRUE;
-}
-
-
-int CharToCode (char c)
-{
- char upper;
-
- upper = toupper(c);
-
- switch (c)
- {
- case 13:
- return 28;
-
- default:
- break;
- }
-
- if (isalpha(c))
- return (30 + upper - 65);
-
- if (isdigit(c))
- return (1 + upper - 47);
-
- return c;
-}
-
-
-BOOL SetConsoleCXCY(HANDLE hStdout, int cx, int cy)
-{
- CONSOLE_SCREEN_BUFFER_INFO info;
- COORD coordMax;
-
- coordMax = GetLargestConsoleWindowSize(hStdout);
-
- if (cy > coordMax.Y)
- cy = coordMax.Y;
-
- if (cx > coordMax.X)
- cx = coordMax.X;
-
- if (!GetConsoleScreenBufferInfo(hStdout, &info))
- return FALSE;
-
-// height
- info.srWindow.Left = 0;
- info.srWindow.Right = info.dwSize.X - 1;
- info.srWindow.Top = 0;
- info.srWindow.Bottom = cy - 1;
-
- if (cy < info.dwSize.Y)
- {
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
-
- info.dwSize.Y = cy;
-
- if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
- }
- else if (cy > info.dwSize.Y)
- {
- info.dwSize.Y = cy;
-
- if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
-
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
- }
-
- if (!GetConsoleScreenBufferInfo(hStdout, &info))
- return FALSE;
-
-// width
- info.srWindow.Left = 0;
- info.srWindow.Right = cx - 1;
- info.srWindow.Top = 0;
- info.srWindow.Bottom = info.dwSize.Y - 1;
-
- if (cx < info.dwSize.X)
- {
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
-
- info.dwSize.X = cx;
-
- if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
- }
- else if (cx > info.dwSize.X)
- {
- info.dwSize.X = cx;
-
- if (!SetConsoleScreenBufferSize(hStdout, info.dwSize))
- return FALSE;
-
- if (!SetConsoleWindowInfo(hStdout, TRUE, &info.srWindow))
- return FALSE;
- }
-
- return TRUE;
-}
-
--- a/win32/conproc.h
+++ /dev/null
@@ -1,24 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// conproc.h -- support for qhost
-
-void InitConProc (int argc, char **argv);
-void DeinitConProc (void);
-
--- a/win32/glw_imp.c
+++ /dev/null
@@ -1,616 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-/*
-** GLW_IMP.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_Shutdown
-** GLimp_SwitchFullscreen
-**
-*/
-#include <assert.h>
-#include <windows.h>
-#include "../ref_gl/gl_local.h"
-#include "glw_win.h"
-#include "winquake.h"
-
-static qboolean GLimp_SwitchFullscreen( int width, int height );
-qboolean GLimp_InitGL (void);
-
-glwstate_t glw_state;
-
-extern cvar_t *vid_fullscreen;
-extern cvar_t *vid_ref;
-
-static qboolean VerifyDriver( void )
-{
- char buffer[1024];
-
- strcpy( buffer, qglGetString( GL_RENDERER ) );
- strlwr( buffer );
- if ( strcmp( buffer, "gdi generic" ) == 0 )
- if ( !glw_state.mcd_accelerated )
- return false;
- return true;
-}
-
-/*
-** VID_CreateWindow
-*/
-#define WINDOW_CLASS_NAME "Quake 2"
-
-qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
-{
- WNDCLASS wc;
- RECT r;
- cvar_t *vid_xpos, *vid_ypos;
- int stylebits;
- int x, y, w, h;
- int exstyle;
-
- /* Register the frame class */
- wc.style = 0;
- wc.lpfnWndProc = (WNDPROC)glw_state.wndproc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = glw_state.hInstance;
- wc.hIcon = 0;
- wc.hCursor = LoadCursor (NULL,IDC_ARROW);
- wc.hbrBackground = (void *)COLOR_GRAYTEXT;
- wc.lpszMenuName = 0;
- wc.lpszClassName = WINDOW_CLASS_NAME;
-
- if (!RegisterClass (&wc) )
- ri.Sys_Error (ERR_FATAL, "Couldn't register window class");
-
- if (fullscreen)
- {
- exstyle = WS_EX_TOPMOST;
- stylebits = WS_POPUP|WS_VISIBLE;
- }
- else
- {
- exstyle = 0;
- stylebits = WINDOW_STYLE;
- }
-
- r.left = 0;
- r.top = 0;
- r.right = width;
- r.bottom = height;
-
- AdjustWindowRect (&r, stylebits, FALSE);
-
- w = r.right - r.left;
- h = r.bottom - r.top;
-
- if (fullscreen)
- {
- x = 0;
- y = 0;
- }
- else
- {
- vid_xpos = ri.Cvar_Get ("vid_xpos", "0", 0);
- vid_ypos = ri.Cvar_Get ("vid_ypos", "0", 0);
- x = vid_xpos->value;
- y = vid_ypos->value;
- }
-
- glw_state.hWnd = CreateWindowEx (
- exstyle,
- WINDOW_CLASS_NAME,
- "Quake 2",
- stylebits,
- x, y, w, h,
- NULL,
- NULL,
- glw_state.hInstance,
- NULL);
-
- if (!glw_state.hWnd)
- ri.Sys_Error (ERR_FATAL, "Couldn't create window");
-
- ShowWindow( glw_state.hWnd, SW_SHOW );
- UpdateWindow( glw_state.hWnd );
-
- // init all the gl stuff for the window
- if (!GLimp_InitGL ())
- {
- ri.Con_Printf( PRINT_ALL, "VID_CreateWindow() - GLimp_InitGL failed\n");
- return false;
- }
-
- SetForegroundWindow( glw_state.hWnd );
- SetFocus( glw_state.hWnd );
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (width, height);
-
- return true;
-}
-
-
-/*
-** GLimp_SetMode
-*/
-rserr_t GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
- int width, height;
- const char *win_fs[] = { "W", "FS" };
-
- ri.Con_Printf( PRINT_ALL, "Initializing OpenGL display\n");
-
- ri.Con_Printf (PRINT_ALL, "...setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( &width, &height, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d %s\n", width, height, win_fs[fullscreen] );
-
- // destroy the existing window
- if (glw_state.hWnd)
- {
- GLimp_Shutdown ();
- }
-
- // do a CDS if needed
- if ( fullscreen )
- {
- DEVMODE dm;
-
- ri.Con_Printf( PRINT_ALL, "...attempting fullscreen\n" );
-
- memset( &dm, 0, sizeof( dm ) );
-
- dm.dmSize = sizeof( dm );
-
- dm.dmPelsWidth = width;
- dm.dmPelsHeight = height;
- dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
-
- if ( gl_bitdepth->value != 0 )
- {
- dm.dmBitsPerPel = gl_bitdepth->value;
- dm.dmFields |= DM_BITSPERPEL;
- ri.Con_Printf( PRINT_ALL, "...using gl_bitdepth of %d\n", ( int ) gl_bitdepth->value );
- }
- else
- {
- HDC hdc = GetDC( NULL );
- int bitspixel = GetDeviceCaps( hdc, BITSPIXEL );
-
- ri.Con_Printf( PRINT_ALL, "...using desktop display depth of %d\n", bitspixel );
-
- ReleaseDC( 0, hdc );
- }
-
- ri.Con_Printf( PRINT_ALL, "...calling CDS: " );
- if ( ChangeDisplaySettings( &dm, CDS_FULLSCREEN ) == DISP_CHANGE_SUCCESSFUL )
- {
- *pwidth = width;
- *pheight = height;
-
- gl_state.fullscreen = true;
-
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- if ( !VID_CreateWindow (width, height, true) )
- return rserr_invalid_mode;
-
- return rserr_ok;
- }
- else
- {
- *pwidth = width;
- *pheight = height;
-
- ri.Con_Printf( PRINT_ALL, "failed\n" );
-
- ri.Con_Printf( PRINT_ALL, "...calling CDS assuming dual monitors:" );
-
- dm.dmPelsWidth = width * 2;
- dm.dmPelsHeight = height;
- dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
-
- if ( gl_bitdepth->value != 0 )
- {
- dm.dmBitsPerPel = gl_bitdepth->value;
- dm.dmFields |= DM_BITSPERPEL;
- }
-
- /*
- ** our first CDS failed, so maybe we're running on some weird dual monitor
- ** system
- */
- if ( ChangeDisplaySettings( &dm, CDS_FULLSCREEN ) != DISP_CHANGE_SUCCESSFUL )
- {
- ri.Con_Printf( PRINT_ALL, " failed\n" );
-
- ri.Con_Printf( PRINT_ALL, "...setting windowed mode\n" );
-
- ChangeDisplaySettings( 0, 0 );
-
- *pwidth = width;
- *pheight = height;
- gl_state.fullscreen = false;
- if ( !VID_CreateWindow (width, height, false) )
- return rserr_invalid_mode;
- return rserr_invalid_fullscreen;
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, " ok\n" );
- if ( !VID_CreateWindow (width, height, true) )
- return rserr_invalid_mode;
-
- gl_state.fullscreen = true;
- return rserr_ok;
- }
- }
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "...setting windowed mode\n" );
-
- ChangeDisplaySettings( 0, 0 );
-
- *pwidth = width;
- *pheight = height;
- gl_state.fullscreen = false;
- if ( !VID_CreateWindow (width, height, false) )
- return rserr_invalid_mode;
- }
-
- return rserr_ok;
-}
-
-/*
-** 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 ( qwglMakeCurrent && !qwglMakeCurrent( NULL, NULL ) )
- ri.Con_Printf( PRINT_ALL, "ref_gl::R_Shutdown() - wglMakeCurrent failed\n");
- if ( glw_state.hGLRC )
- {
- if ( qwglDeleteContext && !qwglDeleteContext( glw_state.hGLRC ) )
- ri.Con_Printf( PRINT_ALL, "ref_gl::R_Shutdown() - wglDeleteContext failed\n");
- glw_state.hGLRC = NULL;
- }
- if (glw_state.hDC)
- {
- if ( !ReleaseDC( glw_state.hWnd, glw_state.hDC ) )
- ri.Con_Printf( PRINT_ALL, "ref_gl::R_Shutdown() - ReleaseDC failed\n" );
- glw_state.hDC = NULL;
- }
- if (glw_state.hWnd)
- {
- DestroyWindow ( glw_state.hWnd );
- glw_state.hWnd = NULL;
- }
-
- if ( glw_state.log_fp )
- {
- fclose( glw_state.log_fp );
- glw_state.log_fp = 0;
- }
-
- UnregisterClass (WINDOW_CLASS_NAME, glw_state.hInstance);
-
- if ( gl_state.fullscreen )
- {
- ChangeDisplaySettings( 0, 0 );
- gl_state.fullscreen = false;
- }
-}
-
-
-/*
-** GLimp_Init
-**
-** This routine is responsible for initializing the OS specific portions
-** of OpenGL. Under Win32 this means dealing with the pixelformats and
-** doing the wgl interface stuff.
-*/
-qboolean GLimp_Init( void *hinstance, void *wndproc )
-{
-#define OSR2_BUILD_NUMBER 1111
-
- OSVERSIONINFO vinfo;
-
- vinfo.dwOSVersionInfoSize = sizeof(vinfo);
-
- glw_state.allowdisplaydepthchange = false;
-
- if ( GetVersionEx( &vinfo) )
- {
- if ( vinfo.dwMajorVersion > 4 )
- {
- glw_state.allowdisplaydepthchange = true;
- }
- else if ( vinfo.dwMajorVersion == 4 )
- {
- if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
- {
- glw_state.allowdisplaydepthchange = true;
- }
- else if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
- {
- if ( LOWORD( vinfo.dwBuildNumber ) >= OSR2_BUILD_NUMBER )
- {
- glw_state.allowdisplaydepthchange = true;
- }
- }
- }
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "GLimp_Init() - GetVersionEx failed\n" );
- return false;
- }
-
- glw_state.hInstance = ( HINSTANCE ) hinstance;
- glw_state.wndproc = wndproc;
-
- return true;
-}
-
-qboolean GLimp_InitGL (void)
-{
- PIXELFORMATDESCRIPTOR pfd =
- {
- 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
- 32, // 32-bit z-buffer
- 0, // no stencil buffer
- 0, // no auxiliary buffer
- PFD_MAIN_PLANE, // main layer
- 0, // reserved
- 0, 0, 0 // layer masks ignored
- };
- int pixelformat;
- cvar_t *stereo;
-
- stereo = ri.Cvar_Get( "cl_stereo", "0", 0 );
-
- /*
- ** set PFD_STEREO if necessary
- */
- if ( stereo->value != 0 )
- {
- ri.Con_Printf( PRINT_ALL, "...attempting to use stereo\n" );
- pfd.dwFlags |= PFD_STEREO;
- gl_state.stereo_enabled = true;
- }
- else
- {
- gl_state.stereo_enabled = false;
- }
-
- /*
- ** figure out if we're running on a minidriver or not
- */
- if ( strstr( gl_driver->string, "opengl32" ) != 0 )
- glw_state.minidriver = false;
- else
- glw_state.minidriver = true;
-
- /*
- ** Get a DC for the specified window
- */
- if ( glw_state.hDC != NULL )
- ri.Con_Printf( PRINT_ALL, "GLimp_Init() - non-NULL DC exists\n" );
-
- if ( ( glw_state.hDC = GetDC( glw_state.hWnd ) ) == NULL )
- {
- ri.Con_Printf( PRINT_ALL, "GLimp_Init() - GetDC failed\n" );
- return false;
- }
-
- if ( glw_state.minidriver )
- {
- if ( (pixelformat = qwglChoosePixelFormat( glw_state.hDC, &pfd)) == 0 )
- {
- ri.Con_Printf (PRINT_ALL, "GLimp_Init() - qwglChoosePixelFormat failed\n");
- return false;
- }
- if ( qwglSetPixelFormat( glw_state.hDC, pixelformat, &pfd) == FALSE )
- {
- ri.Con_Printf (PRINT_ALL, "GLimp_Init() - qwglSetPixelFormat failed\n");
- return false;
- }
- qwglDescribePixelFormat( glw_state.hDC, pixelformat, sizeof( pfd ), &pfd );
- }
- else
- {
- if ( ( pixelformat = ChoosePixelFormat( glw_state.hDC, &pfd)) == 0 )
- {
- ri.Con_Printf (PRINT_ALL, "GLimp_Init() - ChoosePixelFormat failed\n");
- return false;
- }
- if ( SetPixelFormat( glw_state.hDC, pixelformat, &pfd) == FALSE )
- {
- ri.Con_Printf (PRINT_ALL, "GLimp_Init() - SetPixelFormat failed\n");
- return false;
- }
- DescribePixelFormat( glw_state.hDC, pixelformat, sizeof( pfd ), &pfd );
-
- if ( !( pfd.dwFlags & PFD_GENERIC_ACCELERATED ) )
- {
- extern cvar_t *gl_allow_software;
-
- if ( gl_allow_software->value )
- glw_state.mcd_accelerated = true;
- else
- glw_state.mcd_accelerated = false;
- }
- else
- {
- glw_state.mcd_accelerated = true;
- }
- }
-
- /*
- ** report if stereo is desired but unavailable
- */
- if ( !( pfd.dwFlags & PFD_STEREO ) && ( stereo->value != 0 ) )
- {
- ri.Con_Printf( PRINT_ALL, "...failed to select stereo pixel format\n" );
- ri.Cvar_SetValue( "cl_stereo", 0 );
- gl_state.stereo_enabled = false;
- }
-
- /*
- ** startup the OpenGL subsystem by creating a context and making
- ** it current
- */
- if ( ( glw_state.hGLRC = qwglCreateContext( glw_state.hDC ) ) == 0 )
- {
- ri.Con_Printf (PRINT_ALL, "GLimp_Init() - qwglCreateContext failed\n");
-
- goto fail;
- }
-
- if ( !qwglMakeCurrent( glw_state.hDC, glw_state.hGLRC ) )
- {
- ri.Con_Printf (PRINT_ALL, "GLimp_Init() - qwglMakeCurrent failed\n");
-
- goto fail;
- }
-
- if ( !VerifyDriver() )
- {
- ri.Con_Printf( PRINT_ALL, "GLimp_Init() - no hardware acceleration detected\n" );
- goto fail;
- }
-
- /*
- ** print out PFD specifics
- */
- ri.Con_Printf( PRINT_ALL, "GL PFD: color(%d-bits) Z(%d-bit)\n", ( int ) pfd.cColorBits, ( int ) pfd.cDepthBits );
-
- return true;
-
-fail:
- if ( glw_state.hGLRC )
- {
- qwglDeleteContext( glw_state.hGLRC );
- glw_state.hGLRC = NULL;
- }
-
- if ( glw_state.hDC )
- {
- ReleaseDC( glw_state.hWnd, glw_state.hDC );
- glw_state.hDC = NULL;
- }
- return false;
-}
-
-/*
-** GLimp_BeginFrame
-*/
-void GLimp_BeginFrame( float camera_separation )
-{
- if ( gl_bitdepth->modified )
- {
- if ( gl_bitdepth->value != 0 && !glw_state.allowdisplaydepthchange )
- {
- ri.Cvar_SetValue( "gl_bitdepth", 0 );
- ri.Con_Printf( PRINT_ALL, "gl_bitdepth requires Win95 OSR2.x or WinNT 4.x\n" );
- }
- gl_bitdepth->modified = false;
- }
-
- if ( camera_separation < 0 && gl_state.stereo_enabled )
- {
- qglDrawBuffer( GL_BACK_LEFT );
- }
- else if ( camera_separation > 0 && gl_state.stereo_enabled )
- {
- qglDrawBuffer( GL_BACK_RIGHT );
- }
- else
- {
- qglDrawBuffer( GL_BACK );
- }
-}
-
-/*
-** 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)
-{
- int err;
-
- err = qglGetError();
- assert( err == GL_NO_ERROR );
-
- if ( stricmp( gl_drawbuffer->string, "GL_BACK" ) == 0 )
- {
- if ( !qwglSwapBuffers( glw_state.hDC ) )
- ri.Sys_Error( ERR_FATAL, "GLimp_EndFrame() - SwapBuffers() failed!\n" );
- }
-}
-
-/*
-** GLimp_AppActivate
-*/
-void GLimp_AppActivate( qboolean active )
-{
- if ( active )
- {
- SetForegroundWindow( glw_state.hWnd );
- ShowWindow( glw_state.hWnd, SW_RESTORE );
- }
- else
- {
- if ( vid_fullscreen->value )
- ShowWindow( glw_state.hWnd, SW_MINIMIZE );
- }
-}
--- a/win32/glw_win.h
+++ /dev/null
@@ -1,47 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-{
- HINSTANCE hInstance;
- void *wndproc;
-
- HDC hDC; // handle to device context
- HWND hWnd; // handle to window
- HGLRC hGLRC; // handle to GL rendering context
-
- HINSTANCE hinstOpenGL; // HINSTANCE for the OpenGL library
-
- qboolean minidriver;
- qboolean allowdisplaydepthchange;
- qboolean mcd_accelerated;
-
- FILE *log_fp;
-} glwstate_t;
-
-extern glwstate_t glw_state;
-
-#endif
--- a/win32/in_win.c
+++ /dev/null
@@ -1,889 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// in_win.c -- windows 95 mouse and joystick code
-// 02/21/97 JCB Added extended DirectInput code to support external controllers.
-
-#include "../client/client.h"
-#include "winquake.h"
-
-extern unsigned sys_msg_time;
-
-// joystick defines and variables
-// where should defines be moved?
-#define JOY_ABSOLUTE_AXIS 0x00000000 // control like a joystick
-#define JOY_RELATIVE_AXIS 0x00000010 // control like a mouse, spinner, trackball
-#define JOY_MAX_AXES 6 // X, Y, Z, R, U, V
-#define JOY_AXIS_X 0
-#define JOY_AXIS_Y 1
-#define JOY_AXIS_Z 2
-#define JOY_AXIS_R 3
-#define JOY_AXIS_U 4
-#define JOY_AXIS_V 5
-
-enum _ControlList
-{
- AxisNada = 0, AxisForward, AxisLook, AxisSide, AxisTurn, AxisUp
-};
-
-DWORD dwAxisFlags[JOY_MAX_AXES] =
-{
- JOY_RETURNX, JOY_RETURNY, JOY_RETURNZ, JOY_RETURNR, JOY_RETURNU, JOY_RETURNV
-};
-
-DWORD dwAxisMap[JOY_MAX_AXES];
-DWORD dwControlMap[JOY_MAX_AXES];
-PDWORD pdwRawValue[JOY_MAX_AXES];
-
-cvar_t *in_mouse;
-cvar_t *in_joystick;
-
-
-// none of these cvars are saved over a session
-// this means that advanced controller configuration needs to be executed
-// each time. this avoids any problems with getting back to a default usage
-// or when changing from one controller to another. this way at least something
-// works.
-cvar_t *joy_name;
-cvar_t *joy_advanced;
-cvar_t *joy_advaxisx;
-cvar_t *joy_advaxisy;
-cvar_t *joy_advaxisz;
-cvar_t *joy_advaxisr;
-cvar_t *joy_advaxisu;
-cvar_t *joy_advaxisv;
-cvar_t *joy_forwardthreshold;
-cvar_t *joy_sidethreshold;
-cvar_t *joy_pitchthreshold;
-cvar_t *joy_yawthreshold;
-cvar_t *joy_forwardsensitivity;
-cvar_t *joy_sidesensitivity;
-cvar_t *joy_pitchsensitivity;
-cvar_t *joy_yawsensitivity;
-cvar_t *joy_upthreshold;
-cvar_t *joy_upsensitivity;
-
-qboolean joy_avail, joy_advancedinit, joy_haspov;
-DWORD joy_oldbuttonstate, joy_oldpovstate;
-
-int joy_id;
-DWORD joy_flags;
-DWORD joy_numbuttons;
-
-static JOYINFOEX ji;
-
-qboolean in_appactive;
-
-// forward-referenced functions
-void IN_StartupJoystick (void);
-void Joy_AdvancedUpdate_f (void);
-void IN_JoyMove (usercmd_t *cmd);
-
-/*
-============================================================
-
- MOUSE CONTROL
-
-============================================================
-*/
-
-// mouse variables
-cvar_t *m_filter;
-
-qboolean mlooking;
-
-void IN_MLookDown (void) { mlooking = true; }
-void IN_MLookUp (void) {
-mlooking = false;
-if (!freelook->value && lookspring->value)
- IN_CenterView ();
-}
-
-int mouse_buttons;
-int mouse_oldbuttonstate;
-POINT current_pos;
-int mouse_x, mouse_y, old_mouse_x, old_mouse_y, mx_accum, my_accum;
-
-int old_x, old_y;
-
-qboolean mouseactive; // false when not focus app
-
-qboolean restore_spi;
-qboolean mouseinitialized;
-int originalmouseparms[3], newmouseparms[3] = {0, 0, 1};
-qboolean mouseparmsvalid;
-
-int window_center_x, window_center_y;
-RECT window_rect;
-
-
-/*
-===========
-IN_ActivateMouse
-
-Called when the window gains focus or changes in some way
-===========
-*/
-void IN_ActivateMouse (void)
-{
- int width, height;
-
- if (!mouseinitialized)
- return;
- if (!in_mouse->value)
- {
- mouseactive = false;
- return;
- }
- if (mouseactive)
- return;
-
- mouseactive = true;
-
- if (mouseparmsvalid)
- restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
-
- width = GetSystemMetrics (SM_CXSCREEN);
- height = GetSystemMetrics (SM_CYSCREEN);
-
- GetWindowRect ( cl_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);
-
- old_x = window_center_x;
- old_y = window_center_y;
-
- SetCapture ( cl_hwnd );
- ClipCursor (&window_rect);
- while (ShowCursor (FALSE) >= 0)
- ;
-}
-
-
-/*
-===========
-IN_DeactivateMouse
-
-Called when the window loses focus
-===========
-*/
-void IN_DeactivateMouse (void)
-{
- if (!mouseinitialized)
- return;
- if (!mouseactive)
- return;
-
- if (restore_spi)
- SystemParametersInfo (SPI_SETMOUSE, 0, originalmouseparms, 0);
-
- mouseactive = false;
-
- ClipCursor (NULL);
- ReleaseCapture ();
- while (ShowCursor (TRUE) < 0)
- ;
-}
-
-
-
-/*
-===========
-IN_StartupMouse
-===========
-*/
-void IN_StartupMouse (void)
-{
- cvar_t *cv;
-
- cv = Cvar_Get ("in_initmouse", "1", CVAR_NOSET);
- if ( !cv->value )
- return;
-
- mouseinitialized = true;
- mouseparmsvalid = SystemParametersInfo (SPI_GETMOUSE, 0, originalmouseparms, 0);
- mouse_buttons = 3;
-}
-
-/*
-===========
-IN_MouseEvent
-===========
-*/
-void IN_MouseEvent (int mstate)
-{
- int i;
-
- if (!mouseinitialized)
- return;
-
-// perform button actions
- for (i=0 ; i<mouse_buttons ; i++)
- {
- if ( (mstate & (1<<i)) &&
- !(mouse_oldbuttonstate & (1<<i)) )
- {
- Key_Event (K_MOUSE1 + i, true, sys_msg_time);
- }
-
- if ( !(mstate & (1<<i)) &&
- (mouse_oldbuttonstate & (1<<i)) )
- {
- Key_Event (K_MOUSE1 + i, false, sys_msg_time);
- }
- }
-
- mouse_oldbuttonstate = mstate;
-}
-
-
-/*
-===========
-IN_MouseMove
-===========
-*/
-void IN_MouseMove (usercmd_t *cmd)
-{
- int mx, my;
-
- if (!mouseactive)
- return;
-
- // find mouse movement
- if (!GetCursorPos (¤t_pos))
- return;
-
- mx = current_pos.x - window_center_x;
- my = current_pos.y - window_center_y;
-
-#if 0
- if (!mx && !my)
- return;
-#endif
-
- if (m_filter->value)
- {
- mouse_x = (mx + old_mouse_x) * 0.5;
- mouse_y = (my + old_mouse_y) * 0.5;
- }
- else
- {
- mouse_x = mx;
- mouse_y = my;
- }
-
- old_mouse_x = mx;
- old_mouse_y = my;
-
- mouse_x *= sensitivity->value;
- mouse_y *= sensitivity->value;
-
-// add mouse X/Y movement to cmd
- if ( (in_strafe.state & 1) || (lookstrafe->value && mlooking ))
- cmd->sidemove += m_side->value * mouse_x;
- else
- cl.viewangles[YAW] -= m_yaw->value * mouse_x;
-
- if ( (mlooking || freelook->value) && !(in_strafe.state & 1))
- {
- cl.viewangles[PITCH] += m_pitch->value * mouse_y;
- }
- else
- {
- cmd->forwardmove -= m_forward->value * mouse_y;
- }
-
- // force the mouse to the center, so there's room to move
- if (mx || my)
- SetCursorPos (window_center_x, window_center_y);
-}
-
-
-/*
-=========================================================================
-
-VIEW CENTERING
-
-=========================================================================
-*/
-
-cvar_t *v_centermove;
-cvar_t *v_centerspeed;
-
-
-/*
-===========
-IN_Init
-===========
-*/
-void IN_Init (void)
-{
- // mouse variables
- m_filter = Cvar_Get ("m_filter", "0", 0);
- in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
-
- // joystick variables
- in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE);
- joy_name = Cvar_Get ("joy_name", "joystick", 0);
- joy_advanced = Cvar_Get ("joy_advanced", "0", 0);
- joy_advaxisx = Cvar_Get ("joy_advaxisx", "0", 0);
- joy_advaxisy = Cvar_Get ("joy_advaxisy", "0", 0);
- joy_advaxisz = Cvar_Get ("joy_advaxisz", "0", 0);
- joy_advaxisr = Cvar_Get ("joy_advaxisr", "0", 0);
- joy_advaxisu = Cvar_Get ("joy_advaxisu", "0", 0);
- joy_advaxisv = Cvar_Get ("joy_advaxisv", "0", 0);
- joy_forwardthreshold = Cvar_Get ("joy_forwardthreshold", "0.15", 0);
- joy_sidethreshold = Cvar_Get ("joy_sidethreshold", "0.15", 0);
- joy_upthreshold = Cvar_Get ("joy_upthreshold", "0.15", 0);
- joy_pitchthreshold = Cvar_Get ("joy_pitchthreshold", "0.15", 0);
- joy_yawthreshold = Cvar_Get ("joy_yawthreshold", "0.15", 0);
- joy_forwardsensitivity = Cvar_Get ("joy_forwardsensitivity", "-1", 0);
- joy_sidesensitivity = Cvar_Get ("joy_sidesensitivity", "-1", 0);
- joy_upsensitivity = Cvar_Get ("joy_upsensitivity", "-1", 0);
- joy_pitchsensitivity = Cvar_Get ("joy_pitchsensitivity", "1", 0);
- joy_yawsensitivity = Cvar_Get ("joy_yawsensitivity", "-1", 0);
-
- // centering
- v_centermove = Cvar_Get ("v_centermove", "0.15", 0);
- v_centerspeed = Cvar_Get ("v_centerspeed", "500", 0);
-
- Cmd_AddCommand ("+mlook", IN_MLookDown);
- Cmd_AddCommand ("-mlook", IN_MLookUp);
-
- Cmd_AddCommand ("joy_advancedupdate", Joy_AdvancedUpdate_f);
-
- IN_StartupMouse ();
- IN_StartupJoystick ();
-}
-
-/*
-===========
-IN_Shutdown
-===========
-*/
-void IN_Shutdown (void)
-{
- IN_DeactivateMouse ();
-}
-
-
-/*
-===========
-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;
- mouseactive = !active; // force a new window check or turn off
-}
-
-
-/*
-==================
-IN_Frame
-
-Called every frame, even if not generating commands
-==================
-*/
-void IN_Frame (void)
-{
- if (!mouseinitialized)
- return;
-
- if (!in_mouse || !in_appactive)
- {
- IN_DeactivateMouse ();
- return;
- }
-
- if ( !cl.refresh_prepped
- || cls.key_dest == key_console
- || cls.key_dest == key_menu)
- {
- // temporarily deactivate if in fullscreen
- if (Cvar_VariableValue ("vid_fullscreen") == 0)
- {
- IN_DeactivateMouse ();
- return;
- }
- }
-
- IN_ActivateMouse ();
-}
-
-/*
-===========
-IN_Move
-===========
-*/
-void IN_Move (usercmd_t *cmd)
-{
- IN_MouseMove (cmd);
-
- if (ActiveApp)
- IN_JoyMove (cmd);
-}
-
-
-/*
-===================
-IN_ClearStates
-===================
-*/
-void IN_ClearStates (void)
-{
- mx_accum = 0;
- my_accum = 0;
- mouse_oldbuttonstate = 0;
-}
-
-
-/*
-=========================================================================
-
-JOYSTICK
-
-=========================================================================
-*/
-
-/*
-===============
-IN_StartupJoystick
-===============
-*/
-void IN_StartupJoystick (void)
-{
- int numdevs;
- JOYCAPS jc;
- MMRESULT mmr;
- cvar_t *cv;
-
- // assume no joystick
- joy_avail = false;
-
- // abort startup if user requests no joystick
- cv = Cvar_Get ("in_initjoy", "1", CVAR_NOSET);
- if ( !cv->value )
- return;
-
- // verify joystick driver is present
- if ((numdevs = joyGetNumDevs ()) == 0)
- {
-// Com_Printf ("\njoystick not found -- driver not present\n\n");
- return;
- }
-
- // cycle through the joystick ids for the first valid one
- for (joy_id=0 ; joy_id<numdevs ; joy_id++)
- {
- memset (&ji, 0, sizeof(ji));
- ji.dwSize = sizeof(ji);
- ji.dwFlags = JOY_RETURNCENTERED;
-
- if ((mmr = joyGetPosEx (joy_id, &ji)) == JOYERR_NOERROR)
- break;
- }
-
- // abort startup if we didn't find a valid joystick
- if (mmr != JOYERR_NOERROR)
- {
- Com_Printf ("\njoystick not found -- no valid joysticks (%x)\n\n", mmr);
- return;
- }
-
- // get the capabilities of the selected joystick
- // abort startup if command fails
- memset (&jc, 0, sizeof(jc));
- if ((mmr = joyGetDevCaps (joy_id, &jc, sizeof(jc))) != JOYERR_NOERROR)
- {
- Com_Printf ("\njoystick not found -- invalid joystick capabilities (%x)\n\n", mmr);
- return;
- }
-
- // save the joystick's number of buttons and POV status
- joy_numbuttons = jc.wNumButtons;
- joy_haspov = jc.wCaps & JOYCAPS_HASPOV;
-
- // old button and POV states default to no buttons pressed
- joy_oldbuttonstate = joy_oldpovstate = 0;
-
- // mark the joystick as available and advanced initialization not completed
- // this is needed as cvars are not available during initialization
-
- joy_avail = true;
- joy_advancedinit = false;
-
- Com_Printf ("\njoystick detected\n\n");
-}
-
-
-/*
-===========
-RawValuePointer
-===========
-*/
-PDWORD RawValuePointer (int axis)
-{
- switch (axis)
- {
- case JOY_AXIS_X:
- return &ji.dwXpos;
- case JOY_AXIS_Y:
- return &ji.dwYpos;
- case JOY_AXIS_Z:
- return &ji.dwZpos;
- case JOY_AXIS_R:
- return &ji.dwRpos;
- case JOY_AXIS_U:
- return &ji.dwUpos;
- case JOY_AXIS_V:
- return &ji.dwVpos;
- }
-}
-
-
-/*
-===========
-Joy_AdvancedUpdate_f
-===========
-*/
-void Joy_AdvancedUpdate_f (void)
-{
-
- // called once by IN_ReadJoystick and by user whenever an update is needed
- // cvars are now available
- int i;
- DWORD dwTemp;
-
- // initialize all the maps
- for (i = 0; i < JOY_MAX_AXES; i++)
- {
- dwAxisMap[i] = AxisNada;
- dwControlMap[i] = JOY_ABSOLUTE_AXIS;
- pdwRawValue[i] = RawValuePointer(i);
- }
-
- if( joy_advanced->value == 0.0)
- {
- // default joystick initialization
- // 2 axes only with joystick control
- dwAxisMap[JOY_AXIS_X] = AxisTurn;
- // dwControlMap[JOY_AXIS_X] = JOY_ABSOLUTE_AXIS;
- dwAxisMap[JOY_AXIS_Y] = AxisForward;
- // dwControlMap[JOY_AXIS_Y] = JOY_ABSOLUTE_AXIS;
- }
- else
- {
- if (strcmp (joy_name->string, "joystick") != 0)
- {
- // notify user of advanced controller
- Com_Printf ("\n%s configured\n\n", joy_name->string);
- }
-
- // advanced initialization here
- // data supplied by user via joy_axisn cvars
- dwTemp = (DWORD) joy_advaxisx->value;
- dwAxisMap[JOY_AXIS_X] = dwTemp & 0x0000000f;
- dwControlMap[JOY_AXIS_X] = dwTemp & JOY_RELATIVE_AXIS;
- dwTemp = (DWORD) joy_advaxisy->value;
- dwAxisMap[JOY_AXIS_Y] = dwTemp & 0x0000000f;
- dwControlMap[JOY_AXIS_Y] = dwTemp & JOY_RELATIVE_AXIS;
- dwTemp = (DWORD) joy_advaxisz->value;
- dwAxisMap[JOY_AXIS_Z] = dwTemp & 0x0000000f;
- dwControlMap[JOY_AXIS_Z] = dwTemp & JOY_RELATIVE_AXIS;
- dwTemp = (DWORD) joy_advaxisr->value;
- dwAxisMap[JOY_AXIS_R] = dwTemp & 0x0000000f;
- dwControlMap[JOY_AXIS_R] = dwTemp & JOY_RELATIVE_AXIS;
- dwTemp = (DWORD) joy_advaxisu->value;
- dwAxisMap[JOY_AXIS_U] = dwTemp & 0x0000000f;
- dwControlMap[JOY_AXIS_U] = dwTemp & JOY_RELATIVE_AXIS;
- dwTemp = (DWORD) joy_advaxisv->value;
- dwAxisMap[JOY_AXIS_V] = dwTemp & 0x0000000f;
- dwControlMap[JOY_AXIS_V] = dwTemp & JOY_RELATIVE_AXIS;
- }
-
- // compute the axes to collect from DirectInput
- joy_flags = JOY_RETURNCENTERED | JOY_RETURNBUTTONS | JOY_RETURNPOV;
- for (i = 0; i < JOY_MAX_AXES; i++)
- {
- if (dwAxisMap[i] != AxisNada)
- {
- joy_flags |= dwAxisFlags[i];
- }
- }
-}
-
-
-/*
-===========
-IN_Commands
-===========
-*/
-void IN_Commands (void)
-{
- int i, key_index;
- DWORD buttonstate, povstate;
-
- if (!joy_avail)
- {
- return;
- }
-
-
- // loop through the joystick buttons
- // key a joystick event or auxillary event for higher number buttons for each state change
- buttonstate = ji.dwButtons;
- for (i=0 ; i < joy_numbuttons ; i++)
- {
- if ( (buttonstate & (1<<i)) && !(joy_oldbuttonstate & (1<<i)) )
- {
- key_index = (i < 4) ? K_JOY1 : K_AUX1;
- Key_Event (key_index + i, true, 0);
- }
-
- if ( !(buttonstate & (1<<i)) && (joy_oldbuttonstate & (1<<i)) )
- {
- key_index = (i < 4) ? K_JOY1 : K_AUX1;
- Key_Event (key_index + i, false, 0);
- }
- }
- joy_oldbuttonstate = buttonstate;
-
- if (joy_haspov)
- {
- // convert POV information into 4 bits of state information
- // this avoids any potential problems related to moving from one
- // direction to another without going through the center position
- povstate = 0;
- if(ji.dwPOV != JOY_POVCENTERED)
- {
- if (ji.dwPOV == JOY_POVFORWARD)
- povstate |= 0x01;
- if (ji.dwPOV == JOY_POVRIGHT)
- povstate |= 0x02;
- if (ji.dwPOV == JOY_POVBACKWARD)
- povstate |= 0x04;
- if (ji.dwPOV == JOY_POVLEFT)
- povstate |= 0x08;
- }
- // determine which bits have changed and key an auxillary event for each change
- for (i=0 ; i < 4 ; i++)
- {
- if ( (povstate & (1<<i)) && !(joy_oldpovstate & (1<<i)) )
- {
- Key_Event (K_AUX29 + i, true, 0);
- }
-
- if ( !(povstate & (1<<i)) && (joy_oldpovstate & (1<<i)) )
- {
- Key_Event (K_AUX29 + i, false, 0);
- }
- }
- joy_oldpovstate = povstate;
- }
-}
-
-
-/*
-===============
-IN_ReadJoystick
-===============
-*/
-qboolean IN_ReadJoystick (void)
-{
-
- memset (&ji, 0, sizeof(ji));
- ji.dwSize = sizeof(ji);
- ji.dwFlags = joy_flags;
-
- if (joyGetPosEx (joy_id, &ji) == JOYERR_NOERROR)
- {
- return true;
- }
- else
- {
- // 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 false;
- }
-}
-
-
-/*
-===========
-IN_JoyMove
-===========
-*/
-void IN_JoyMove (usercmd_t *cmd)
-{
- float speed, aspeed;
- float fAxisValue;
- int i;
-
- // complete initialization if first time in
- // this is needed as cvars are not available at initialization time
- if( joy_advancedinit != true )
- {
- Joy_AdvancedUpdate_f();
- joy_advancedinit = true;
- }
-
- // verify joystick is available and that the user wants to use it
- if (!joy_avail || !in_joystick->value)
- {
- return;
- }
-
- // collect the joystick data, if possible
- if (IN_ReadJoystick () != true)
- {
- return;
- }
-
- if ( (in_speed.state & 1) ^ (int)cl_run->value)
- speed = 2;
- else
- speed = 1;
- aspeed = speed * cls.frametime;
-
- // loop through the axes
- for (i = 0; i < JOY_MAX_AXES; i++)
- {
- // get the floating point zero-centered, potentially-inverted data for the current axis
- fAxisValue = (float) *pdwRawValue[i];
- // move centerpoint to zero
- fAxisValue -= 32768.0;
-
- // convert range from -32768..32767 to -1..1
- fAxisValue /= 32768.0;
-
- switch (dwAxisMap[i])
- {
- case AxisForward:
- if ((joy_advanced->value == 0.0) && mlooking)
- {
- // user wants forward control to become look control
- if (fabs(fAxisValue) > joy_pitchthreshold->value)
- {
- // if mouse invert is on, invert the joystick pitch value
- // only absolute control support here (joy_advanced is false)
- if (m_pitch->value < 0.0)
- {
- cl.viewangles[PITCH] -= (fAxisValue * joy_pitchsensitivity->value) * aspeed * cl_pitchspeed->value;
- }
- else
- {
- cl.viewangles[PITCH] += (fAxisValue * joy_pitchsensitivity->value) * aspeed * cl_pitchspeed->value;
- }
- }
- }
- else
- {
- // user wants forward control to be forward control
- if (fabs(fAxisValue) > joy_forwardthreshold->value)
- {
- cmd->forwardmove += (fAxisValue * joy_forwardsensitivity->value) * speed * cl_forwardspeed->value;
- }
- }
- break;
-
- case AxisSide:
- if (fabs(fAxisValue) > joy_sidethreshold->value)
- {
- cmd->sidemove += (fAxisValue * joy_sidesensitivity->value) * speed * cl_sidespeed->value;
- }
- break;
-
- case AxisUp:
- if (fabs(fAxisValue) > joy_upthreshold->value)
- {
- cmd->upmove += (fAxisValue * joy_upsensitivity->value) * speed * cl_upspeed->value;
- }
- break;
-
- case AxisTurn:
- if ((in_strafe.state & 1) || (lookstrafe->value && mlooking))
- {
- // user wants turn control to become side control
- if (fabs(fAxisValue) > joy_sidethreshold->value)
- {
- cmd->sidemove -= (fAxisValue * joy_sidesensitivity->value) * speed * cl_sidespeed->value;
- }
- }
- else
- {
- // user wants turn control to be turn control
- if (fabs(fAxisValue) > joy_yawthreshold->value)
- {
- if(dwControlMap[i] == JOY_ABSOLUTE_AXIS)
- {
- cl.viewangles[YAW] += (fAxisValue * joy_yawsensitivity->value) * aspeed * cl_yawspeed->value;
- }
- else
- {
- cl.viewangles[YAW] += (fAxisValue * joy_yawsensitivity->value) * speed * 180.0;
- }
-
- }
- }
- break;
-
- case AxisLook:
- if (mlooking)
- {
- if (fabs(fAxisValue) > joy_pitchthreshold->value)
- {
- // pitch movement detected and pitch movement desired by user
- if(dwControlMap[i] == JOY_ABSOLUTE_AXIS)
- {
- cl.viewangles[PITCH] += (fAxisValue * joy_pitchsensitivity->value) * aspeed * cl_pitchspeed->value;
- }
- else
- {
- cl.viewangles[PITCH] += (fAxisValue * joy_pitchsensitivity->value) * speed * 180.0;
- }
- }
- }
- break;
-
- default:
- break;
- }
- }
-}
-
--- a/win32/net_wins.c
+++ /dev/null
@@ -1,842 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// net_wins.c
-
-#include "winsock.h"
-#include "wsipx.h"
-#include "../qcommon/qcommon.h"
-
-#define MAX_LOOPBACK 4
-
-typedef struct
-{
- byte data[MAX_MSGLEN];
- int datalen;
-} loopmsg_t;
-
-typedef struct
-{
- loopmsg_t msgs[MAX_LOOPBACK];
- int get, send;
-} loopback_t;
-
-
-cvar_t *net_shownet;
-static cvar_t *noudp;
-static cvar_t *noipx;
-
-loopback_t loopbacks[2];
-int ip_sockets[2];
-int ipx_sockets[2];
-
-char *NET_ErrorString (void);
-
-//=============================================================================
-
-void NetadrToSockadr (netadr_t *a, struct sockaddr *s)
-{
- memset (s, 0, sizeof(*s));
-
- if (a->type == NA_BROADCAST)
- {
- ((struct sockaddr_in *)s)->sin_family = AF_INET;
- ((struct sockaddr_in *)s)->sin_port = a->port;
- ((struct sockaddr_in *)s)->sin_addr.s_addr = INADDR_BROADCAST;
- }
- else if (a->type == NA_IP)
- {
- ((struct sockaddr_in *)s)->sin_family = AF_INET;
- ((struct sockaddr_in *)s)->sin_addr.s_addr = *(int *)&a->ip;
- ((struct sockaddr_in *)s)->sin_port = a->port;
- }
- else if (a->type == NA_IPX)
- {
- ((struct sockaddr_ipx *)s)->sa_family = AF_IPX;
- memcpy(((struct sockaddr_ipx *)s)->sa_netnum, &a->ipx[0], 4);
- memcpy(((struct sockaddr_ipx *)s)->sa_nodenum, &a->ipx[4], 6);
- ((struct sockaddr_ipx *)s)->sa_socket = a->port;
- }
- else if (a->type == NA_BROADCAST_IPX)
- {
- ((struct sockaddr_ipx *)s)->sa_family = AF_IPX;
- memset(((struct sockaddr_ipx *)s)->sa_netnum, 0, 4);
- memset(((struct sockaddr_ipx *)s)->sa_nodenum, 0xff, 6);
- ((struct sockaddr_ipx *)s)->sa_socket = a->port;
- }
-}
-
-void SockadrToNetadr (struct sockaddr *s, netadr_t *a)
-{
- if (s->sa_family == AF_INET)
- {
- a->type = NA_IP;
- *(int *)&a->ip = ((struct sockaddr_in *)s)->sin_addr.s_addr;
- a->port = ((struct sockaddr_in *)s)->sin_port;
- }
- else if (s->sa_family == AF_IPX)
- {
- a->type = NA_IPX;
- memcpy(&a->ipx[0], ((struct sockaddr_ipx *)s)->sa_netnum, 4);
- memcpy(&a->ipx[4], ((struct sockaddr_ipx *)s)->sa_nodenum, 6);
- a->port = ((struct sockaddr_ipx *)s)->sa_socket;
- }
-}
-
-
-qboolean NET_CompareAdr (netadr_t a, netadr_t b)
-{
- if (a.type != b.type)
- return false;
-
- if (a.type == NA_LOOPBACK)
- return TRUE;
-
- if (a.type == NA_IP)
- {
- if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3] && a.port == b.port)
- return true;
- return false;
- }
-
- if (a.type == NA_IPX)
- {
- if ((memcmp(a.ipx, b.ipx, 10) == 0) && a.port == b.port)
- return true;
- return false;
- }
-}
-
-/*
-===================
-NET_CompareBaseAdr
-
-Compares without the port
-===================
-*/
-qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b)
-{
- if (a.type != b.type)
- return false;
-
- if (a.type == NA_LOOPBACK)
- return TRUE;
-
- if (a.type == NA_IP)
- {
- if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2] && a.ip[3] == b.ip[3])
- return true;
- return false;
- }
-
- if (a.type == NA_IPX)
- {
- if ((memcmp(a.ipx, b.ipx, 10) == 0))
- return true;
- return false;
- }
-}
-
-char *NET_AdrToString (netadr_t a)
-{
- static char s[64];
-
- if (a.type == NA_LOOPBACK)
- Com_sprintf (s, sizeof(s), "loopback");
- else if (a.type == NA_IP)
- Com_sprintf (s, sizeof(s), "%i.%i.%i.%i:%i", a.ip[0], a.ip[1], a.ip[2], a.ip[3], ntohs(a.port));
- else
- Com_sprintf (s, sizeof(s), "%02x%02x%02x%02x:%02x%02x%02x%02x%02x%02x:%i", a.ipx[0], a.ipx[1], a.ipx[2], a.ipx[3], a.ipx[4], a.ipx[5], a.ipx[6], a.ipx[7], a.ipx[8], a.ipx[9], ntohs(a.port));
-
- return s;
-}
-
-
-/*
-=============
-NET_StringToAdr
-
-localhost
-idnewt
-idnewt:28000
-192.246.40.70
-192.246.40.70:28000
-=============
-*/
-#define DO(src,dest) \
- copy[0] = s[src]; \
- copy[1] = s[src + 1]; \
- sscanf (copy, "%x", &val); \
- ((struct sockaddr_ipx *)sadr)->dest = val
-
-qboolean NET_StringToSockaddr (char *s, struct sockaddr *sadr)
-{
- struct hostent *h;
- char *colon;
- int val;
- char copy[128];
-
- memset (sadr, 0, sizeof(*sadr));
-
- if ((strlen(s) >= 23) && (s[8] == ':') && (s[21] == ':')) // check for an IPX address
- {
- ((struct sockaddr_ipx *)sadr)->sa_family = AF_IPX;
- copy[2] = 0;
- DO(0, sa_netnum[0]);
- DO(2, sa_netnum[1]);
- DO(4, sa_netnum[2]);
- DO(6, sa_netnum[3]);
- DO(9, sa_nodenum[0]);
- DO(11, sa_nodenum[1]);
- DO(13, sa_nodenum[2]);
- DO(15, sa_nodenum[3]);
- DO(17, sa_nodenum[4]);
- DO(19, sa_nodenum[5]);
- sscanf (&s[22], "%u", &val);
- ((struct sockaddr_ipx *)sadr)->sa_socket = htons((unsigned short)val);
- }
- else
- {
- ((struct sockaddr_in *)sadr)->sin_family = AF_INET;
-
- ((struct sockaddr_in *)sadr)->sin_port = 0;
-
- strcpy (copy, s);
- // strip off a trailing :port if present
- for (colon = copy ; *colon ; colon++)
- if (*colon == ':')
- {
- *colon = 0;
- ((struct sockaddr_in *)sadr)->sin_port = htons((short)atoi(colon+1));
- }
-
- if (copy[0] >= '0' && copy[0] <= '9')
- {
- *(int *)&((struct sockaddr_in *)sadr)->sin_addr = inet_addr(copy);
- }
- else
- {
- if (! (h = gethostbyname(copy)) )
- return 0;
- *(int *)&((struct sockaddr_in *)sadr)->sin_addr = *(int *)h->h_addr_list[0];
- }
- }
-
- return true;
-}
-
-#undef DO
-
-/*
-=============
-NET_StringToAdr
-
-localhost
-idnewt
-idnewt:28000
-192.246.40.70
-192.246.40.70:28000
-=============
-*/
-qboolean NET_StringToAdr (char *s, netadr_t *a)
-{
- struct sockaddr sadr;
-
- if (!strcmp (s, "localhost"))
- {
- memset (a, 0, sizeof(*a));
- a->type = NA_LOOPBACK;
- return true;
- }
-
- if (!NET_StringToSockaddr (s, &sadr))
- return false;
-
- SockadrToNetadr (&sadr, a);
-
- return true;
-}
-
-
-qboolean NET_IsLocalAddress (netadr_t adr)
-{
- return adr.type == NA_LOOPBACK;
-}
-
-/*
-=============================================================================
-
-LOOPBACK BUFFERS FOR LOCAL PLAYER
-
-=============================================================================
-*/
-
-qboolean NET_GetLoopPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
-{
- int i;
- loopback_t *loop;
-
- loop = &loopbacks[sock];
-
- if (loop->send - loop->get > MAX_LOOPBACK)
- loop->get = loop->send - MAX_LOOPBACK;
-
- if (loop->get >= loop->send)
- return false;
-
- i = loop->get & (MAX_LOOPBACK-1);
- loop->get++;
-
- memcpy (net_message->data, loop->msgs[i].data, loop->msgs[i].datalen);
- net_message->cursize = loop->msgs[i].datalen;
- memset (net_from, 0, sizeof(*net_from));
- net_from->type = NA_LOOPBACK;
- return true;
-
-}
-
-
-void NET_SendLoopPacket (netsrc_t sock, int length, void *data, netadr_t to)
-{
- int i;
- loopback_t *loop;
-
- loop = &loopbacks[sock^1];
-
- i = loop->send & (MAX_LOOPBACK-1);
- loop->send++;
-
- memcpy (loop->msgs[i].data, data, length);
- loop->msgs[i].datalen = length;
-}
-
-//=============================================================================
-
-qboolean NET_GetPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
-{
- int ret;
- struct sockaddr from;
- int fromlen;
- int net_socket;
- int protocol;
- int err;
-
- if (NET_GetLoopPacket (sock, net_from, net_message))
- return true;
-
- for (protocol = 0 ; protocol < 2 ; protocol++)
- {
- if (protocol == 0)
- net_socket = ip_sockets[sock];
- else
- net_socket = ipx_sockets[sock];
-
- if (!net_socket)
- continue;
-
- fromlen = sizeof(from);
- ret = recvfrom (net_socket, net_message->data, net_message->maxsize
- , 0, (struct sockaddr *)&from, &fromlen);
- if (ret == -1)
- {
- err = WSAGetLastError();
-
- if (err == WSAEWOULDBLOCK)
- continue;
- if (dedicated->value) // let dedicated servers continue after errors
- Com_Printf ("NET_GetPacket: %s", NET_ErrorString());
- else
- Com_Error (ERR_DROP, "NET_GetPacket: %s", NET_ErrorString());
- continue;
- }
-
- SockadrToNetadr (&from, net_from);
-
- if (ret == net_message->maxsize)
- {
- Com_Printf ("Oversize packet from %s\n", NET_AdrToString (*net_from));
- continue;
- }
-
- net_message->cursize = ret;
- return true;
- }
-
- return false;
-}
-
-//=============================================================================
-
-void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to)
-{
- int ret;
- struct sockaddr addr;
- int net_socket;
-
- if ( to.type == NA_LOOPBACK )
- {
- NET_SendLoopPacket (sock, length, data, to);
- return;
- }
-
- if (to.type == NA_BROADCAST)
- {
- net_socket = ip_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_IP)
- {
- net_socket = ip_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_IPX)
- {
- net_socket = ipx_sockets[sock];
- if (!net_socket)
- return;
- }
- else if (to.type == NA_BROADCAST_IPX)
- {
- net_socket = ipx_sockets[sock];
- if (!net_socket)
- return;
- }
- else
- Com_Error (ERR_FATAL, "NET_SendPacket: bad address type");
-
- NetadrToSockadr (&to, &addr);
-
- ret = sendto (net_socket, data, length, 0, &addr, sizeof(addr) );
- if (ret == -1)
- {
- int err = WSAGetLastError();
-
- // wouldblock is silent
- if (err == WSAEWOULDBLOCK)
- return;
-
- // some PPP links dont allow broadcasts
- if ((err == WSAEADDRNOTAVAIL) && ((to.type == NA_BROADCAST) || (to.type == NA_BROADCAST_IPX)))
- return;
-
- if (dedicated->value) // let dedicated servers continue after errors
- {
- Com_Printf ("NET_SendPacket ERROR: %s\n", NET_ErrorString());
- }
- else
- {
- if (err == WSAEADDRNOTAVAIL)
- {
- Com_DPrintf ("NET_SendPacket Warning: %s : %s\n", NET_ErrorString(), NET_AdrToString (to));
- }
- else
- {
- Com_Error (ERR_DROP, "NET_SendPacket ERROR: %s\n", NET_ErrorString());
- }
- }
- }
-}
-
-
-//=============================================================================
-
-
-/*
-====================
-NET_Socket
-====================
-*/
-int NET_IPSocket (char *net_interface, int port)
-{
- int newsocket;
- struct sockaddr_in address;
- qboolean _true = true;
- int i = 1;
- int err;
-
- if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
- {
- err = WSAGetLastError();
- if (err != WSAEAFNOSUPPORT)
- Com_Printf ("WARNING: UDP_OpenSocket: socket: %s", NET_ErrorString());
- return 0;
- }
-
- // make it non-blocking
- if (ioctlsocket (newsocket, FIONBIO, &_true) == -1)
- {
- Com_Printf ("WARNING: UDP_OpenSocket: ioctl FIONBIO: %s\n", NET_ErrorString());
- return 0;
- }
-
- // make it broadcast capable
- if (setsockopt(newsocket, SOL_SOCKET, SO_BROADCAST, (char *)&i, sizeof(i)) == -1)
- {
- Com_Printf ("WARNING: UDP_OpenSocket: setsockopt SO_BROADCAST: %s\n", NET_ErrorString());
- return 0;
- }
-
- if (!net_interface || !net_interface[0] || !stricmp(net_interface, "localhost"))
- address.sin_addr.s_addr = INADDR_ANY;
- else
- NET_StringToSockaddr (net_interface, (struct sockaddr *)&address);
-
- if (port == PORT_ANY)
- address.sin_port = 0;
- else
- address.sin_port = htons((short)port);
-
- address.sin_family = AF_INET;
-
- if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
- {
- Com_Printf ("WARNING: UDP_OpenSocket: bind: %s\n", NET_ErrorString());
- closesocket (newsocket);
- return 0;
- }
-
- return newsocket;
-}
-
-
-/*
-====================
-NET_OpenIP
-====================
-*/
-void NET_OpenIP (void)
-{
- cvar_t *ip;
- int port;
- int dedicated;
-
- ip = Cvar_Get ("ip", "localhost", CVAR_NOSET);
-
- dedicated = Cvar_VariableValue ("dedicated");
-
- if (!ip_sockets[NS_SERVER])
- {
- port = Cvar_Get("ip_hostport", "0", CVAR_NOSET)->value;
- if (!port)
- {
- port = Cvar_Get("hostport", "0", CVAR_NOSET)->value;
- if (!port)
- {
- port = Cvar_Get("port", va("%i", PORT_SERVER), CVAR_NOSET)->value;
- }
- }
- ip_sockets[NS_SERVER] = NET_IPSocket (ip->string, port);
- if (!ip_sockets[NS_SERVER] && dedicated)
- Com_Error (ERR_FATAL, "Couldn't allocate dedicated server IP port");
- }
-
-
- // dedicated servers don't need client ports
- if (dedicated)
- return;
-
- if (!ip_sockets[NS_CLIENT])
- {
- port = Cvar_Get("ip_clientport", "0", CVAR_NOSET)->value;
- if (!port)
- {
- port = Cvar_Get("clientport", va("%i", PORT_CLIENT), CVAR_NOSET)->value;
- if (!port)
- port = PORT_ANY;
- }
- ip_sockets[NS_CLIENT] = NET_IPSocket (ip->string, port);
- if (!ip_sockets[NS_CLIENT])
- ip_sockets[NS_CLIENT] = NET_IPSocket (ip->string, PORT_ANY);
- }
-}
-
-
-/*
-====================
-IPX_Socket
-====================
-*/
-int NET_IPXSocket (int port)
-{
- int newsocket;
- struct sockaddr_ipx address;
- int _true = 1;
- int err;
-
- if ((newsocket = socket (PF_IPX, SOCK_DGRAM, NSPROTO_IPX)) == -1)
- {
- err = WSAGetLastError();
- if (err != WSAEAFNOSUPPORT)
- Com_Printf ("WARNING: IPX_Socket: socket: %s\n", NET_ErrorString());
- return 0;
- }
-
- // make it non-blocking
- if (ioctlsocket (newsocket, FIONBIO, &_true) == -1)
- {
- Com_Printf ("WARNING: IPX_Socket: ioctl FIONBIO: %s\n", NET_ErrorString());
- return 0;
- }
-
- // make it broadcast capable
- if (setsockopt(newsocket, SOL_SOCKET, SO_BROADCAST, (char *)&_true, sizeof(_true)) == -1)
- {
- Com_Printf ("WARNING: IPX_Socket: setsockopt SO_BROADCAST: %s\n", NET_ErrorString());
- return 0;
- }
-
- address.sa_family = AF_IPX;
- memset (address.sa_netnum, 0, 4);
- memset (address.sa_nodenum, 0, 6);
- if (port == PORT_ANY)
- address.sa_socket = 0;
- else
- address.sa_socket = htons((short)port);
-
- if( bind (newsocket, (void *)&address, sizeof(address)) == -1)
- {
- Com_Printf ("WARNING: IPX_Socket: bind: %s\n", NET_ErrorString());
- closesocket (newsocket);
- return 0;
- }
-
- return newsocket;
-}
-
-
-/*
-====================
-NET_OpenIPX
-====================
-*/
-void NET_OpenIPX (void)
-{
- int port;
- int dedicated;
-
- dedicated = Cvar_VariableValue ("dedicated");
-
- if (!ipx_sockets[NS_SERVER])
- {
- port = Cvar_Get("ipx_hostport", "0", CVAR_NOSET)->value;
- if (!port)
- {
- port = Cvar_Get("hostport", "0", CVAR_NOSET)->value;
- if (!port)
- {
- port = Cvar_Get("port", va("%i", PORT_SERVER), CVAR_NOSET)->value;
- }
- }
- ipx_sockets[NS_SERVER] = NET_IPXSocket (port);
- }
-
- // dedicated servers don't need client ports
- if (dedicated)
- return;
-
- if (!ipx_sockets[NS_CLIENT])
- {
- port = Cvar_Get("ipx_clientport", "0", CVAR_NOSET)->value;
- if (!port)
- {
- port = Cvar_Get("clientport", va("%i", PORT_CLIENT), CVAR_NOSET)->value;
- if (!port)
- port = PORT_ANY;
- }
- ipx_sockets[NS_CLIENT] = NET_IPXSocket (port);
- if (!ipx_sockets[NS_CLIENT])
- ipx_sockets[NS_CLIENT] = NET_IPXSocket (PORT_ANY);
- }
-}
-
-
-/*
-====================
-NET_Config
-
-A single player game will only use the loopback code
-====================
-*/
-void NET_Config (qboolean multiplayer)
-{
- int i;
- static qboolean old_config;
-
- if (old_config == multiplayer)
- return;
-
- old_config = multiplayer;
-
- if (!multiplayer)
- { // shut down any existing sockets
- for (i=0 ; i<2 ; i++)
- {
- if (ip_sockets[i])
- {
- closesocket (ip_sockets[i]);
- ip_sockets[i] = 0;
- }
- if (ipx_sockets[i])
- {
- closesocket (ipx_sockets[i]);
- ipx_sockets[i] = 0;
- }
- }
- }
- else
- { // open sockets
- if (! noudp->value)
- NET_OpenIP ();
- if (! noipx->value)
- NET_OpenIPX ();
- }
-}
-
-// sleeps msec or until net socket is ready
-void NET_Sleep(int msec)
-{
- struct timeval timeout;
- fd_set fdset;
- extern cvar_t *dedicated;
- int i;
-
- if (!dedicated || !dedicated->value)
- return; // we're not a server, just run full speed
-
- FD_ZERO(&fdset);
- i = 0;
- if (ip_sockets[NS_SERVER]) {
- FD_SET(ip_sockets[NS_SERVER], &fdset); // network socket
- i = ip_sockets[NS_SERVER];
- }
- if (ipx_sockets[NS_SERVER]) {
- FD_SET(ipx_sockets[NS_SERVER], &fdset); // network socket
- if (ipx_sockets[NS_SERVER] > i)
- i = ipx_sockets[NS_SERVER];
- }
- timeout.tv_sec = msec/1000;
- timeout.tv_usec = (msec%1000)*1000;
- select(i+1, &fdset, NULL, NULL, &timeout);
-}
-
-//===================================================================
-
-
-static WSADATA winsockdata;
-
-/*
-====================
-NET_Init
-====================
-*/
-void NET_Init (void)
-{
- WORD wVersionRequested;
- int r;
-
- wVersionRequested = MAKEWORD(1, 1);
-
- r = WSAStartup (MAKEWORD(1, 1), &winsockdata);
-
- if (r)
- Com_Error (ERR_FATAL,"Winsock initialization failed.");
-
- Com_Printf("Winsock Initialized\n");
-
- noudp = Cvar_Get ("noudp", "0", CVAR_NOSET);
- noipx = Cvar_Get ("noipx", "0", CVAR_NOSET);
-
- net_shownet = Cvar_Get ("net_shownet", "0", 0);
-}
-
-
-/*
-====================
-NET_Shutdown
-====================
-*/
-void NET_Shutdown (void)
-{
- NET_Config (false); // close sockets
-
- WSACleanup ();
-}
-
-
-/*
-====================
-NET_ErrorString
-====================
-*/
-char *NET_ErrorString (void)
-{
- int code;
-
- code = WSAGetLastError ();
- switch (code)
- {
- case WSAEINTR: return "WSAEINTR";
- case WSAEBADF: return "WSAEBADF";
- case WSAEACCES: return "WSAEACCES";
- case WSAEDISCON: return "WSAEDISCON";
- case WSAEFAULT: return "WSAEFAULT";
- case WSAEINVAL: return "WSAEINVAL";
- case WSAEMFILE: return "WSAEMFILE";
- case WSAEWOULDBLOCK: return "WSAEWOULDBLOCK";
- case WSAEINPROGRESS: return "WSAEINPROGRESS";
- case WSAEALREADY: return "WSAEALREADY";
- case WSAENOTSOCK: return "WSAENOTSOCK";
- case WSAEDESTADDRREQ: return "WSAEDESTADDRREQ";
- case WSAEMSGSIZE: return "WSAEMSGSIZE";
- case WSAEPROTOTYPE: return "WSAEPROTOTYPE";
- case WSAENOPROTOOPT: return "WSAENOPROTOOPT";
- case WSAEPROTONOSUPPORT: return "WSAEPROTONOSUPPORT";
- case WSAESOCKTNOSUPPORT: return "WSAESOCKTNOSUPPORT";
- case WSAEOPNOTSUPP: return "WSAEOPNOTSUPP";
- case WSAEPFNOSUPPORT: return "WSAEPFNOSUPPORT";
- case WSAEAFNOSUPPORT: return "WSAEAFNOSUPPORT";
- case WSAEADDRINUSE: return "WSAEADDRINUSE";
- case WSAEADDRNOTAVAIL: return "WSAEADDRNOTAVAIL";
- case WSAENETDOWN: return "WSAENETDOWN";
- case WSAENETUNREACH: return "WSAENETUNREACH";
- case WSAENETRESET: return "WSAENETRESET";
- case WSAECONNABORTED: return "WSWSAECONNABORTEDAEINTR";
- case WSAECONNRESET: return "WSAECONNRESET";
- case WSAENOBUFS: return "WSAENOBUFS";
- case WSAEISCONN: return "WSAEISCONN";
- case WSAENOTCONN: return "WSAENOTCONN";
- case WSAESHUTDOWN: return "WSAESHUTDOWN";
- case WSAETOOMANYREFS: return "WSAETOOMANYREFS";
- case WSAETIMEDOUT: return "WSAETIMEDOUT";
- case WSAECONNREFUSED: return "WSAECONNREFUSED";
- case WSAELOOP: return "WSAELOOP";
- case WSAENAMETOOLONG: return "WSAENAMETOOLONG";
- case WSAEHOSTDOWN: return "WSAEHOSTDOWN";
- case WSASYSNOTREADY: return "WSASYSNOTREADY";
- case WSAVERNOTSUPPORTED: return "WSAVERNOTSUPPORTED";
- case WSANOTINITIALISED: return "WSANOTINITIALISED";
- case WSAHOST_NOT_FOUND: return "WSAHOST_NOT_FOUND";
- case WSATRY_AGAIN: return "WSATRY_AGAIN";
- case WSANO_RECOVERY: return "WSANO_RECOVERY";
- case WSANO_DATA: return "WSANO_DATA";
- default: return "NO ERROR";
- }
-}
binary files a/win32/q2.aps /dev/null differ
binary files a/win32/q2.ico /dev/null differ
--- a/win32/q2.rc
+++ /dev/null
@@ -1,72 +1,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON1 ICON DISCARDABLE "q2.ico"
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
--- a/win32/q_shwin.c
+++ /dev/null
@@ -1,215 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "../qcommon/qcommon.h"
-#include "winquake.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <direct.h>
-#include <io.h>
-#include <conio.h>
-
-//===============================================================================
-
-int hunkcount;
-
-
-byte *membase;
-int hunkmaxsize;
-int cursize;
-
-#define VIRTUAL_ALLOC
-
-void *Hunk_Begin (int maxsize)
-{
- // reserve a huge chunk of memory, but don't commit any yet
- cursize = 0;
- hunkmaxsize = maxsize;
-#ifdef VIRTUAL_ALLOC
- membase = VirtualAlloc (NULL, maxsize, MEM_RESERVE, PAGE_NOACCESS);
-#else
- membase = malloc (maxsize);
- memset (membase, 0, maxsize);
-#endif
- if (!membase)
- Sys_Error ("VirtualAlloc reserve failed");
- return (void *)membase;
-}
-
-void *Hunk_Alloc (int size)
-{
- void *buf;
-
- // round to cacheline
- size = (size+31)&~31;
-
-#ifdef VIRTUAL_ALLOC
- // commit pages as needed
-// buf = VirtualAlloc (membase+cursize, size, MEM_COMMIT, PAGE_READWRITE);
- buf = VirtualAlloc (membase, cursize+size, MEM_COMMIT, PAGE_READWRITE);
- if (!buf)
- {
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL);
- Sys_Error ("VirtualAlloc commit failed.\n%s", buf);
- }
-#endif
- cursize += size;
- if (cursize > hunkmaxsize)
- Sys_Error ("Hunk_Alloc overflow");
-
- return (void *)(membase+cursize-size);
-}
-
-int Hunk_End (void)
-{
-
- // free the remaining unused virtual memory
-#if 0
- void *buf;
-
- // write protect it
- buf = VirtualAlloc (membase, cursize, MEM_COMMIT, PAGE_READONLY);
- if (!buf)
- Sys_Error ("VirtualAlloc commit failed");
-#endif
-
- hunkcount++;
-//Com_Printf ("hunkcount: %i\n", hunkcount);
- return cursize;
-}
-
-void Hunk_Free (void *base)
-{
- if ( base )
-#ifdef VIRTUAL_ALLOC
- VirtualFree (base, 0, MEM_RELEASE);
-#else
- free (base);
-#endif
-
- hunkcount--;
-}
-
-//===============================================================================
-
-
-/*
-================
-Sys_Milliseconds
-================
-*/
-int curtime;
-int Sys_Milliseconds (void)
-{
- static int base;
- static qboolean initialized = false;
-
- if (!initialized)
- { // let base retain 16 bits of effectively random data
- base = timeGetTime() & 0xffff0000;
- initialized = true;
- }
- curtime = timeGetTime() - base;
-
- return curtime;
-}
-
-void Sys_Mkdir (char *path)
-{
- _mkdir (path);
-}
-
-//============================================
-
-char findbase[MAX_OSPATH];
-char findpath[MAX_OSPATH];
-int findhandle;
-
-static qboolean CompareAttributes( unsigned found, unsigned musthave, unsigned canthave )
-{
- if ( ( found & _A_RDONLY ) && ( canthave & SFF_RDONLY ) )
- return false;
- if ( ( found & _A_HIDDEN ) && ( canthave & SFF_HIDDEN ) )
- return false;
- if ( ( found & _A_SYSTEM ) && ( canthave & SFF_SYSTEM ) )
- return false;
- if ( ( found & _A_SUBDIR ) && ( canthave & SFF_SUBDIR ) )
- return false;
- if ( ( found & _A_ARCH ) && ( canthave & SFF_ARCH ) )
- return false;
-
- if ( ( musthave & SFF_RDONLY ) && !( found & _A_RDONLY ) )
- return false;
- if ( ( musthave & SFF_HIDDEN ) && !( found & _A_HIDDEN ) )
- return false;
- if ( ( musthave & SFF_SYSTEM ) && !( found & _A_SYSTEM ) )
- return false;
- if ( ( musthave & SFF_SUBDIR ) && !( found & _A_SUBDIR ) )
- return false;
- if ( ( musthave & SFF_ARCH ) && !( found & _A_ARCH ) )
- return false;
-
- return true;
-}
-
-char *Sys_FindFirst (char *path, unsigned musthave, unsigned canthave )
-{
- struct _finddata_t findinfo;
-
- if (findhandle)
- Sys_Error ("Sys_BeginFind without close");
- findhandle = 0;
-
- COM_FilePath (path, findbase);
- findhandle = _findfirst (path, &findinfo);
- if (findhandle == -1)
- return NULL;
- if ( !CompareAttributes( findinfo.attrib, musthave, canthave ) )
- return NULL;
- Com_sprintf (findpath, sizeof(findpath), "%s/%s", findbase, findinfo.name);
- return findpath;
-}
-
-char *Sys_FindNext ( unsigned musthave, unsigned canthave )
-{
- struct _finddata_t findinfo;
-
- if (findhandle == -1)
- return NULL;
- if (_findnext (findhandle, &findinfo) == -1)
- return NULL;
- if ( !CompareAttributes( findinfo.attrib, musthave, canthave ) )
- return NULL;
-
- Com_sprintf (findpath, sizeof(findpath), "%s/%s", findbase, findinfo.name);
- return findpath;
-}
-
-void Sys_FindClose (void)
-{
- if (findhandle != -1)
- _findclose (findhandle);
- findhandle = 0;
-}
-
-
-//============================================
-
binary files a/win32/qe3.ico /dev/null differ
--- a/win32/qgl_win.c
+++ /dev/null
@@ -1,4133 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-/*
-** QGL_WIN.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
-*/
-#include <float.h>
-#include "../ref_gl/gl_local.h"
-#include "glw_win.h"
-
-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 * qglLockArraysEXT)( int, int);
-void ( APIENTRY * qglUnlockArraysEXT) ( void );
-
-BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval );
-BOOL ( WINAPI * qwglGetDeviceGammaRampEXT)( unsigned char *, unsigned char *, unsigned char * );
-BOOL ( WINAPI * qwglSetDeviceGammaRampEXT)( const unsigned char *, const unsigned char *, const unsigned char * );
-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 * 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", 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", 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 APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor)
-{
- fprintf( glw_state.log_fp, "glBlendFunc( 0x%x, 0x%x )\n", sfactor, dfactor );
- 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\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", 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", 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", 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)
-{
- 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", 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)
-{
- 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.hinstOpenGL )
- {
- FreeLibrary( glw_state.hinstOpenGL );
- glw_state.hinstOpenGL = NULL;
- }
-
- 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;
-
- qwglSwapIntervalEXT = NULL;
-
- qwglGetDeviceGammaRampEXT = NULL;
- qwglSetDeviceGammaRampEXT = NULL;
-}
-
-# pragma warning (disable : 4113 4133 4047 )
-# define GPA( a ) GetProcAddress( glw_state.hinstOpenGL, a )
-
-/*
-** 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 )
-{
- // update 3Dfx gamma irrespective of underlying DLL
- {
- char envbuffer[1024];
- float g;
-
- g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
- Com_sprintf( envbuffer, sizeof(envbuffer), "SSTV2_GAMMA=%f", g );
- putenv( envbuffer );
- Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
- putenv( envbuffer );
- }
-
- if ( ( glw_state.hinstOpenGL = LoadLibrary( dllname ) ) == 0 )
- {
- char *buf = NULL;
-
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL);
- ri.Con_Printf( PRINT_ALL, "%s\n", buf );
- return false;
- }
-
- gl_config.allow_cds = true;
-
- 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" );
- qglGetTexLevelParameterfv = dllGetTexLevelParameterfv = GPA( "glGetLevelParameterfv" );
- qglGetTexLevelParameteriv = dllGetTexLevelParameteriv = GPA( "glGetLevelParameteriv" );
- 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;
- qglPointParameterfEXT = 0;
- qglPointParameterfvEXT = 0;
- qglColorTableEXT = 0;
- qglSelectTextureSGIS = 0;
- qglMTexCoord2fSGIS = 0;
-
- return true;
-}
-
-void GLimp_EnableLogging( qboolean enable )
-{
- if ( enable )
- {
- if ( !glw_state.log_fp )
- {
- struct tm *newtime;
- time_t aclock;
- char buffer[1024];
-
- time( &aclock );
- newtime = localtime( &aclock );
-
- asctime( newtime );
-
- Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", ri.FS_Gamedir() );
- 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
- {
- 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" );
-}
-
-#pragma warning (default : 4113 4133 4047 )
-
-
-
--- a/win32/resource.h
+++ /dev/null
@@ -1,16 +1,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by q2.rc
-//
-#define IDI_ICON1 101
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 103
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
--- a/win32/rw_ddraw.c
+++ /dev/null
@@ -1,556 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-/*
-** RW_DDRAW.C
-**
-** This handles DirecTDraw management under Windows.
-*/
-#ifndef _WIN32
-# error You should not be compiling this file on this platform
-#endif
-
-#include <float.h>
-
-#include "..\ref_soft\r_local.h"
-#define INITGUID
-#include "rw_win.h"
-
-static const char *DDrawError( int code );
-
-/*
-** DDRAW_Init
-**
-** Builds our DDRAW stuff
-*/
-qboolean DDRAW_Init( unsigned char **ppbuffer, int *ppitch )
-{
- HRESULT ddrval;
- DDSURFACEDESC ddsd;
- DDSCAPS ddscaps;
- PALETTEENTRY palentries[256];
- int i;
- extern cvar_t *sw_allow_modex;
-
- HRESULT (WINAPI *QDirectDrawCreate)( GUID FAR *lpGUID, LPDIRECTDRAW FAR * lplpDDRAW, IUnknown FAR * pUnkOuter );
-
-ri.Con_Printf( PRINT_ALL, "Initializing DirectDraw\n");
-
-
- for ( i = 0; i < 256; i++ )
- {
- palentries[i].peRed = ( d_8to24table[i] >> 0 ) & 0xff;
- palentries[i].peGreen = ( d_8to24table[i] >> 8 ) & 0xff;
- palentries[i].peBlue = ( d_8to24table[i] >> 16 ) & 0xff;
- }
-
- /*
- ** load DLL and fetch pointer to entry point
- */
- if ( !sww_state.hinstDDRAW )
- {
- ri.Con_Printf( PRINT_ALL, "...loading DDRAW.DLL: ");
- if ( ( sww_state.hinstDDRAW = LoadLibrary( "ddraw.dll" ) ) == NULL )
- {
- ri.Con_Printf( PRINT_ALL, "failed\n" );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
- }
-
- if ( ( QDirectDrawCreate = ( HRESULT (WINAPI *)( GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR * ) ) GetProcAddress( sww_state.hinstDDRAW, "DirectDrawCreate" ) ) == NULL )
- {
- ri.Con_Printf( PRINT_ALL, "*** DirectDrawCreate == NULL ***\n" );
- goto fail;
- }
-
- /*
- ** create the direct draw object
- */
- ri.Con_Printf( PRINT_ALL, "...creating DirectDraw object: ");
- if ( ( ddrval = QDirectDrawCreate( NULL, &sww_state.lpDirectDraw, NULL ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- /*
- ** see if linear modes exist first
- */
- sww_state.modex = false;
-
- ri.Con_Printf( PRINT_ALL, "...setting exclusive mode: ");
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->SetCooperativeLevel( sww_state.lpDirectDraw,
- sww_state.hWnd,
- DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n",DDrawError (ddrval) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- /*
- ** try changing the display mode normally
- */
- ri.Con_Printf( PRINT_ALL, "...finding display mode\n" );
- ri.Con_Printf( PRINT_ALL, "...setting linear mode: " );
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->SetDisplayMode( sww_state.lpDirectDraw, vid.width, vid.height, 8 ) ) == DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "ok\n" );
- }
- /*
- ** if no linear mode found, go for modex if we're trying 320x240
- */
- else if ( ( sw_mode->value == 0 ) && sw_allow_modex->value )
- {
- ri.Con_Printf( PRINT_ALL, "failed\n" );
- ri.Con_Printf( PRINT_ALL, "...attempting ModeX 320x240: ");
-
- /*
- ** reset to normal cooperative level
- */
- sww_state.lpDirectDraw->lpVtbl->SetCooperativeLevel( sww_state.lpDirectDraw,
- sww_state.hWnd,
- DDSCL_NORMAL );
-
- /*
- ** set exclusive mode
- */
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->SetCooperativeLevel( sww_state.lpDirectDraw,
- sww_state.hWnd,
- DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_NOWINDOWCHANGES | DDSCL_ALLOWMODEX ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed SCL - %s\n",DDrawError (ddrval) );
- goto fail;
- }
-
- /*
- ** change our display mode
- */
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->SetDisplayMode( sww_state.lpDirectDraw, vid.width, vid.height, 8 ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed SDM - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- sww_state.modex = true;
- }
- else
- {
- ri.Con_Printf( PRINT_ALL, "failed\n" );
- goto fail;
- }
-
- /*
- ** create our front buffer
- */
- memset( &ddsd, 0, sizeof( ddsd ) );
- ddsd.dwSize = sizeof( ddsd );
- ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
- ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
- ddsd.dwBackBufferCount = 1;
-
- ri.Con_Printf( PRINT_ALL, "...creating front buffer: ");
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->CreateSurface( sww_state.lpDirectDraw, &ddsd, &sww_state.lpddsFrontBuffer, NULL ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- /*
- ** see if we're a ModeX mode
- */
- sww_state.lpddsFrontBuffer->lpVtbl->GetCaps( sww_state.lpddsFrontBuffer, &ddscaps );
- if ( ddscaps.dwCaps & DDSCAPS_MODEX )
- ri.Con_Printf( PRINT_ALL, "...using ModeX\n" );
-
- /*
- ** create our back buffer
- */
- ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
-
- ri.Con_Printf( PRINT_ALL, "...creating back buffer: " );
- if ( ( ddrval = sww_state.lpddsFrontBuffer->lpVtbl->GetAttachedSurface( sww_state.lpddsFrontBuffer, &ddsd.ddsCaps, &sww_state.lpddsBackBuffer ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- /*
- ** create our rendering buffer
- */
- memset( &ddsd, 0, sizeof( ddsd ) );
- ddsd.dwSize = sizeof( ddsd );
- ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
- ddsd.dwHeight = vid.height;
- ddsd.dwWidth = vid.width;
- ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
-
- ri.Con_Printf( PRINT_ALL, "...creating offscreen buffer: " );
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->CreateSurface( sww_state.lpDirectDraw, &ddsd, &sww_state.lpddsOffScreenBuffer, NULL ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- /*
- ** create our DIRECTDRAWPALETTE
- */
- ri.Con_Printf( PRINT_ALL, "...creating palette: " );
- if ( ( ddrval = sww_state.lpDirectDraw->lpVtbl->CreatePalette( sww_state.lpDirectDraw,
- DDPCAPS_8BIT | DDPCAPS_ALLOW256,
- palentries,
- &sww_state.lpddpPalette,
- NULL ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- ri.Con_Printf( PRINT_ALL, "...setting palette: " );
- if ( ( ddrval = sww_state.lpddsFrontBuffer->lpVtbl->SetPalette( sww_state.lpddsFrontBuffer,
- sww_state.lpddpPalette ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
- ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- DDRAW_SetPalette( ( const unsigned char * ) sw_state.currentpalette );
-
- /*
- ** lock the back buffer
- */
- memset( &ddsd, 0, sizeof( ddsd ) );
- ddsd.dwSize = sizeof( ddsd );
-
-ri.Con_Printf( PRINT_ALL, "...locking backbuffer: " );
- if ( ( ddrval = sww_state.lpddsOffScreenBuffer->lpVtbl->Lock( sww_state.lpddsOffScreenBuffer, NULL, &ddsd, DDLOCK_WAIT, NULL ) ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "failed - %s\n", DDrawError( ddrval ) );
- goto fail;
- }
-ri.Con_Printf( PRINT_ALL, "ok\n" );
-
- *ppbuffer = ddsd.lpSurface;
- *ppitch = ddsd.lPitch;
-
- for ( i = 0; i < vid.height; i++ )
- {
- memset( *ppbuffer + i * *ppitch, 0, *ppitch );
- }
-
- sww_state.palettized = true;
-
- return true;
-fail:
- ri.Con_Printf( PRINT_ALL, "*** DDraw init failure ***\n" );
-
- DDRAW_Shutdown();
- return false;
-}
-
-/*
-** DDRAW_SetPalette
-**
-** Sets the color table in our DIB section, and also sets the system palette
-** into an identity mode if we're running in an 8-bit palettized display mode.
-**
-** The palette is expected to be 1024 bytes, in the format:
-**
-** R = offset 0
-** G = offset 1
-** B = offset 2
-** A = offset 3
-*/
-void DDRAW_SetPalette( const unsigned char *pal )
-{
- PALETTEENTRY palentries[256];
- int i;
-
- if (!sww_state.lpddpPalette)
- return;
-
- for ( i = 0; i < 256; i++, pal += 4 )
- {
- palentries[i].peRed = pal[0];
- palentries[i].peGreen = pal[1];
- palentries[i].peBlue = pal[2];
- palentries[i].peFlags = PC_RESERVED | PC_NOCOLLAPSE;
- }
-
- if ( sww_state.lpddpPalette->lpVtbl->SetEntries( sww_state.lpddpPalette,
- 0,
- 0,
- 256,
- palentries ) != DD_OK )
- {
- ri.Con_Printf( PRINT_ALL, "DDRAW_SetPalette() - SetEntries failed\n" );
- }
-}
-
-/*
-** DDRAW_Shutdown
-*/
-void DDRAW_Shutdown( void )
-{
- if ( sww_state.lpddsOffScreenBuffer )
- {
- ri.Con_Printf( PRINT_ALL, "...releasing offscreen buffer\n");
- sww_state.lpddsOffScreenBuffer->lpVtbl->Unlock( sww_state.lpddsOffScreenBuffer, vid.buffer );
- sww_state.lpddsOffScreenBuffer->lpVtbl->Release( sww_state.lpddsOffScreenBuffer );
- sww_state.lpddsOffScreenBuffer = NULL;
- }
-
- if ( sww_state.lpddsBackBuffer )
- {
- ri.Con_Printf( PRINT_ALL, "...releasing back buffer\n");
- sww_state.lpddsBackBuffer->lpVtbl->Release( sww_state.lpddsBackBuffer );
- sww_state.lpddsBackBuffer = NULL;
- }
-
- if ( sww_state.lpddsFrontBuffer )
- {
- ri.Con_Printf( PRINT_ALL, "...releasing front buffer\n");
- sww_state.lpddsFrontBuffer->lpVtbl->Release( sww_state.lpddsFrontBuffer );
- sww_state.lpddsFrontBuffer = NULL;
- }
-
- if (sww_state.lpddpPalette)
- {
- ri.Con_Printf( PRINT_ALL, "...releasing palette\n");
- sww_state.lpddpPalette->lpVtbl->Release ( sww_state.lpddpPalette );
- sww_state.lpddpPalette = NULL;
- }
-
- if ( sww_state.lpDirectDraw )
- {
- ri.Con_Printf( PRINT_ALL, "...restoring display mode\n");
- sww_state.lpDirectDraw->lpVtbl->RestoreDisplayMode( sww_state.lpDirectDraw );
- ri.Con_Printf( PRINT_ALL, "...restoring normal coop mode\n");
- sww_state.lpDirectDraw->lpVtbl->SetCooperativeLevel( sww_state.lpDirectDraw, sww_state.hWnd, DDSCL_NORMAL );
- ri.Con_Printf( PRINT_ALL, "...releasing lpDirectDraw\n");
- sww_state.lpDirectDraw->lpVtbl->Release( sww_state.lpDirectDraw );
- sww_state.lpDirectDraw = NULL;
- }
-
- if ( sww_state.hinstDDRAW )
- {
- ri.Con_Printf( PRINT_ALL, "...freeing library\n");
- FreeLibrary( sww_state.hinstDDRAW );
- sww_state.hinstDDRAW = NULL;
- }
-}
-
-static const char *DDrawError (int code)
-{
- switch(code) {
- case DD_OK:
- return "DD_OK";
- case DDERR_ALREADYINITIALIZED:
- return "DDERR_ALREADYINITIALIZED";
- case DDERR_BLTFASTCANTCLIP:
- return "DDERR_BLTFASTCANTCLIP";
- case DDERR_CANNOTATTACHSURFACE:
- return "DDER_CANNOTATTACHSURFACE";
- case DDERR_CANNOTDETACHSURFACE:
- return "DDERR_CANNOTDETACHSURFACE";
- case DDERR_CANTCREATEDC:
- return "DDERR_CANTCREATEDC";
- case DDERR_CANTDUPLICATE:
- return "DDER_CANTDUPLICATE";
- case DDERR_CLIPPERISUSINGHWND:
- return "DDER_CLIPPERUSINGHWND";
- case DDERR_COLORKEYNOTSET:
- return "DDERR_COLORKEYNOTSET";
- case DDERR_CURRENTLYNOTAVAIL:
- return "DDERR_CURRENTLYNOTAVAIL";
- case DDERR_DIRECTDRAWALREADYCREATED:
- return "DDERR_DIRECTDRAWALREADYCREATED";
- case DDERR_EXCEPTION:
- return "DDERR_EXCEPTION";
- case DDERR_EXCLUSIVEMODEALREADYSET:
- return "DDERR_EXCLUSIVEMODEALREADYSET";
- case DDERR_GENERIC:
- return "DDERR_GENERIC";
- case DDERR_HEIGHTALIGN:
- return "DDERR_HEIGHTALIGN";
- case DDERR_HWNDALREADYSET:
- return "DDERR_HWNDALREADYSET";
- case DDERR_HWNDSUBCLASSED:
- return "DDERR_HWNDSUBCLASSED";
- case DDERR_IMPLICITLYCREATED:
- return "DDERR_IMPLICITLYCREATED";
- case DDERR_INCOMPATIBLEPRIMARY:
- return "DDERR_INCOMPATIBLEPRIMARY";
- case DDERR_INVALIDCAPS:
- return "DDERR_INVALIDCAPS";
- case DDERR_INVALIDCLIPLIST:
- return "DDERR_INVALIDCLIPLIST";
- case DDERR_INVALIDDIRECTDRAWGUID:
- return "DDERR_INVALIDDIRECTDRAWGUID";
- case DDERR_INVALIDMODE:
- return "DDERR_INVALIDMODE";
- case DDERR_INVALIDOBJECT:
- return "DDERR_INVALIDOBJECT";
- case DDERR_INVALIDPARAMS:
- return "DDERR_INVALIDPARAMS";
- case DDERR_INVALIDPIXELFORMAT:
- return "DDERR_INVALIDPIXELFORMAT";
- case DDERR_INVALIDPOSITION:
- return "DDERR_INVALIDPOSITION";
- case DDERR_INVALIDRECT:
- return "DDERR_INVALIDRECT";
- case DDERR_LOCKEDSURFACES:
- return "DDERR_LOCKEDSURFACES";
- case DDERR_NO3D:
- return "DDERR_NO3D";
- case DDERR_NOALPHAHW:
- return "DDERR_NOALPHAHW";
- case DDERR_NOBLTHW:
- return "DDERR_NOBLTHW";
- case DDERR_NOCLIPLIST:
- return "DDERR_NOCLIPLIST";
- case DDERR_NOCLIPPERATTACHED:
- return "DDERR_NOCLIPPERATTACHED";
- case DDERR_NOCOLORCONVHW:
- return "DDERR_NOCOLORCONVHW";
- case DDERR_NOCOLORKEY:
- return "DDERR_NOCOLORKEY";
- case DDERR_NOCOLORKEYHW:
- return "DDERR_NOCOLORKEYHW";
- case DDERR_NOCOOPERATIVELEVELSET:
- return "DDERR_NOCOOPERATIVELEVELSET";
- case DDERR_NODC:
- return "DDERR_NODC";
- case DDERR_NODDROPSHW:
- return "DDERR_NODDROPSHW";
- case DDERR_NODIRECTDRAWHW:
- return "DDERR_NODIRECTDRAWHW";
- case DDERR_NOEMULATION:
- return "DDERR_NOEMULATION";
- case DDERR_NOEXCLUSIVEMODE:
- return "DDERR_NOEXCLUSIVEMODE";
- case DDERR_NOFLIPHW:
- return "DDERR_NOFLIPHW";
- case DDERR_NOGDI:
- return "DDERR_NOGDI";
- case DDERR_NOHWND:
- return "DDERR_NOHWND";
- case DDERR_NOMIRRORHW:
- return "DDERR_NOMIRRORHW";
- case DDERR_NOOVERLAYDEST:
- return "DDERR_NOOVERLAYDEST";
- case DDERR_NOOVERLAYHW:
- return "DDERR_NOOVERLAYHW";
- case DDERR_NOPALETTEATTACHED:
- return "DDERR_NOPALETTEATTACHED";
- case DDERR_NOPALETTEHW:
- return "DDERR_NOPALETTEHW";
- case DDERR_NORASTEROPHW:
- return "Operation could not be carried out because there is no appropriate raster op hardware present or available.\0";
- case DDERR_NOROTATIONHW:
- return "Operation could not be carried out because there is no rotation hardware present or available.\0";
- case DDERR_NOSTRETCHHW:
- return "Operation could not be carried out because there is no hardware support for stretching.\0";
- case DDERR_NOT4BITCOLOR:
- return "DirectDrawSurface is not in 4 bit color palette and the requested operation requires 4 bit color palette.\0";
- case DDERR_NOT4BITCOLORINDEX:
- return "DirectDrawSurface is not in 4 bit color index palette and the requested operation requires 4 bit color index palette.\0";
- case DDERR_NOT8BITCOLOR:
- return "DDERR_NOT8BITCOLOR";
- case DDERR_NOTAOVERLAYSURFACE:
- return "Returned when an overlay member is called for a non-overlay surface.\0";
- case DDERR_NOTEXTUREHW:
- return "Operation could not be carried out because there is no texture mapping hardware present or available.\0";
- case DDERR_NOTFLIPPABLE:
- return "DDERR_NOTFLIPPABLE";
- case DDERR_NOTFOUND:
- return "DDERR_NOTFOUND";
- case DDERR_NOTLOCKED:
- return "DDERR_NOTLOCKED";
- case DDERR_NOTPALETTIZED:
- return "DDERR_NOTPALETTIZED";
- case DDERR_NOVSYNCHW:
- return "DDERR_NOVSYNCHW";
- case DDERR_NOZBUFFERHW:
- return "Operation could not be carried out because there is no hardware support for zbuffer blitting.\0";
- case DDERR_NOZOVERLAYHW:
- return "Overlay surfaces could not be z layered based on their BltOrder because the hardware does not support z layering of overlays.\0";
- case DDERR_OUTOFCAPS:
- return "The hardware needed for the requested operation has already been allocated.\0";
- case DDERR_OUTOFMEMORY:
- return "DDERR_OUTOFMEMORY";
- case DDERR_OUTOFVIDEOMEMORY:
- return "DDERR_OUTOFVIDEOMEMORY";
- case DDERR_OVERLAYCANTCLIP:
- return "The hardware does not support clipped overlays.\0";
- case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:
- return "Can only have ony color key active at one time for overlays.\0";
- case DDERR_OVERLAYNOTVISIBLE:
- return "Returned when GetOverlayPosition is called on a hidden overlay.\0";
- case DDERR_PALETTEBUSY:
- return "DDERR_PALETTEBUSY";
- case DDERR_PRIMARYSURFACEALREADYEXISTS:
- return "DDERR_PRIMARYSURFACEALREADYEXISTS";
- case DDERR_REGIONTOOSMALL:
- return "Region passed to Clipper::GetClipList is too small.\0";
- case DDERR_SURFACEALREADYATTACHED:
- return "DDERR_SURFACEALREADYATTACHED";
- case DDERR_SURFACEALREADYDEPENDENT:
- return "DDERR_SURFACEALREADYDEPENDENT";
- case DDERR_SURFACEBUSY:
- return "DDERR_SURFACEBUSY";
- case DDERR_SURFACEISOBSCURED:
- return "Access to surface refused because the surface is obscured.\0";
- case DDERR_SURFACELOST:
- return "DDERR_SURFACELOST";
- case DDERR_SURFACENOTATTACHED:
- return "DDERR_SURFACENOTATTACHED";
- case DDERR_TOOBIGHEIGHT:
- return "Height requested by DirectDraw is too large.\0";
- case DDERR_TOOBIGSIZE:
- return "Size requested by DirectDraw is too large, but the individual height and width are OK.\0";
- case DDERR_TOOBIGWIDTH:
- return "Width requested by DirectDraw is too large.\0";
- case DDERR_UNSUPPORTED:
- return "DDERR_UNSUPPORTED";
- case DDERR_UNSUPPORTEDFORMAT:
- return "FOURCC format requested is unsupported by DirectDraw.\0";
- case DDERR_UNSUPPORTEDMASK:
- return "Bitmask in the pixel format requested is unsupported by DirectDraw.\0";
- case DDERR_VERTICALBLANKINPROGRESS:
- return "Vertical blank is in progress.\0";
- case DDERR_WASSTILLDRAWING:
- return "DDERR_WASSTILLDRAWING";
- case DDERR_WRONGMODE:
- return "This surface can not be restored because it was created in a different mode.\0";
- case DDERR_XALIGN:
- return "Rectangle provided was not horizontally aligned on required boundary.\0";
- default:
- return "UNKNOWN\0";
- }
-}
-
--- a/win32/rw_dib.c
+++ /dev/null
@@ -1,375 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-/*
-** RW_DIB.C
-**
-** This handles DIB section management under Windows.
-**
-*/
-#include "..\ref_soft\r_local.h"
-#include "rw_win.h"
-
-#ifndef _WIN32
-# error You should not be trying to compile this file on this platform
-#endif
-
-static qboolean s_systemcolors_saved;
-
-static HGDIOBJ previously_selected_GDI_obj;
-
-static int s_syspalindices[] =
-{
- COLOR_ACTIVEBORDER,
- COLOR_ACTIVECAPTION,
- COLOR_APPWORKSPACE,
- COLOR_BACKGROUND,
- COLOR_BTNFACE,
- COLOR_BTNSHADOW,
- COLOR_BTNTEXT,
- COLOR_CAPTIONTEXT,
- COLOR_GRAYTEXT,
- COLOR_HIGHLIGHT,
- COLOR_HIGHLIGHTTEXT,
- COLOR_INACTIVEBORDER,
-
- COLOR_INACTIVECAPTION,
- COLOR_MENU,
- COLOR_MENUTEXT,
- COLOR_SCROLLBAR,
- COLOR_WINDOW,
- COLOR_WINDOWFRAME,
- COLOR_WINDOWTEXT
-};
-
-#define NUM_SYS_COLORS ( sizeof( s_syspalindices ) / sizeof( int ) )
-
-static int s_oldsyscolors[NUM_SYS_COLORS];
-
-typedef struct dibinfo
-{
- BITMAPINFOHEADER header;
- RGBQUAD acolors[256];
-} dibinfo_t;
-
-typedef struct
-{
- WORD palVersion;
- WORD palNumEntries;
- PALETTEENTRY palEntries[256];
-} identitypalette_t;
-
-static identitypalette_t s_ipal;
-
-static void DIB_SaveSystemColors( void );
-static void DIB_RestoreSystemColors( void );
-
-/*
-** DIB_Init
-**
-** Builds our DIB section
-*/
-qboolean DIB_Init( unsigned char **ppbuffer, int *ppitch )
-{
- dibinfo_t dibheader;
- BITMAPINFO *pbmiDIB = ( BITMAPINFO * ) &dibheader;
- int i;
-
- memset( &dibheader, 0, sizeof( dibheader ) );
-
- /*
- ** grab a DC
- */
- if ( !sww_state.hDC )
- {
- if ( ( sww_state.hDC = GetDC( sww_state.hWnd ) ) == NULL )
- return false;
- }
-
- /*
- ** figure out if we're running in an 8-bit display mode
- */
- if ( GetDeviceCaps( sww_state.hDC, RASTERCAPS ) & RC_PALETTE )
- {
- sww_state.palettized = true;
-
- // save system colors
- if ( !s_systemcolors_saved )
- {
- DIB_SaveSystemColors();
- s_systemcolors_saved = true;
- }
- }
- else
- {
- sww_state.palettized = false;
- }
-
- /*
- ** fill in the BITMAPINFO struct
- */
- pbmiDIB->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- pbmiDIB->bmiHeader.biWidth = vid.width;
- pbmiDIB->bmiHeader.biHeight = vid.height;
- pbmiDIB->bmiHeader.biPlanes = 1;
- pbmiDIB->bmiHeader.biBitCount = 8;
- pbmiDIB->bmiHeader.biCompression = BI_RGB;
- pbmiDIB->bmiHeader.biSizeImage = 0;
- pbmiDIB->bmiHeader.biXPelsPerMeter = 0;
- pbmiDIB->bmiHeader.biYPelsPerMeter = 0;
- pbmiDIB->bmiHeader.biClrUsed = 256;
- pbmiDIB->bmiHeader.biClrImportant = 256;
-
- /*
- ** fill in the palette
- */
- for ( i = 0; i < 256; i++ )
- {
- dibheader.acolors[i].rgbRed = ( d_8to24table[i] >> 0 ) & 0xff;
- dibheader.acolors[i].rgbGreen = ( d_8to24table[i] >> 8 ) & 0xff;
- dibheader.acolors[i].rgbBlue = ( d_8to24table[i] >> 16 ) & 0xff;
- }
-
- /*
- ** create the DIB section
- */
- sww_state.hDIBSection = CreateDIBSection( sww_state.hDC,
- pbmiDIB,
- DIB_RGB_COLORS,
- &sww_state.pDIBBase,
- NULL,
- 0 );
-
- if ( sww_state.hDIBSection == NULL )
- {
- ri.Con_Printf( PRINT_ALL, "DIB_Init() - CreateDIBSection failed\n" );
- goto fail;
- }
-
- if ( pbmiDIB->bmiHeader.biHeight > 0 )
- {
- // bottom up
- *ppbuffer = sww_state.pDIBBase + ( vid.height - 1 ) * vid.width;
- *ppitch = -vid.width;
- }
- else
- {
- // top down
- *ppbuffer = sww_state.pDIBBase;
- *ppitch = vid.width;
- }
-
- /*
- ** clear the DIB memory buffer
- */
- memset( sww_state.pDIBBase, 0xff, vid.width * vid.height );
-
- if ( ( sww_state.hdcDIBSection = CreateCompatibleDC( sww_state.hDC ) ) == NULL )
- {
- ri.Con_Printf( PRINT_ALL, "DIB_Init() - CreateCompatibleDC failed\n" );
- goto fail;
- }
- if ( ( previously_selected_GDI_obj = SelectObject( sww_state.hdcDIBSection, sww_state.hDIBSection ) ) == NULL )
- {
- ri.Con_Printf( PRINT_ALL, "DIB_Init() - SelectObject failed\n" );
- goto fail;
- }
-
- return true;
-
-fail:
- DIB_Shutdown();
- return false;
-
-}
-
-/*
-** DIB_SetPalette
-**
-** Sets the color table in our DIB section, and also sets the system palette
-** into an identity mode if we're running in an 8-bit palettized display mode.
-**
-** The palette is expected to be 1024 bytes, in the format:
-**
-** R = offset 0
-** G = offset 1
-** B = offset 2
-** A = offset 3
-*/
-void DIB_SetPalette( const unsigned char *_pal )
-{
- const unsigned char *pal = _pal;
- LOGPALETTE *pLogPal = ( LOGPALETTE * ) &s_ipal;
- RGBQUAD colors[256];
- int i;
- int ret;
- HDC hDC = sww_state.hDC;
-
- /*
- ** set the DIB color table
- */
- if ( sww_state.hdcDIBSection )
- {
- for ( i = 0; i < 256; i++, pal += 4 )
- {
- colors[i].rgbRed = pal[0];
- colors[i].rgbGreen = pal[1];
- colors[i].rgbBlue = pal[2];
- colors[i].rgbReserved = 0;
- }
-
- colors[0].rgbRed = 0;
- colors[0].rgbGreen = 0;
- colors[0].rgbBlue = 0;
-
- colors[255].rgbRed = 0xff;
- colors[255].rgbGreen = 0xff;
- colors[255].rgbBlue = 0xff;
-
- if ( SetDIBColorTable( sww_state.hdcDIBSection, 0, 256, colors ) == 0 )
- {
- ri.Con_Printf( PRINT_ALL, "DIB_SetPalette() - SetDIBColorTable failed\n" );
- }
- }
-
- /*
- ** for 8-bit color desktop modes we set up the palette for maximum
- ** speed by going into an identity palette mode.
- */
- if ( sww_state.palettized )
- {
- int i;
- HPALETTE hpalOld;
-
- if ( SetSystemPaletteUse( hDC, SYSPAL_NOSTATIC ) == SYSPAL_ERROR )
- {
- ri.Sys_Error( ERR_FATAL, "DIB_SetPalette() - SetSystemPaletteUse() failed\n" );
- }
-
- /*
- ** destroy our old palette
- */
- if ( sww_state.hPal )
- {
- DeleteObject( sww_state.hPal );
- sww_state.hPal = 0;
- }
-
- /*
- ** take up all physical palette entries to flush out anything that's currently
- ** in the palette
- */
- pLogPal->palVersion = 0x300;
- pLogPal->palNumEntries = 256;
-
- for ( i = 0, pal = _pal; i < 256; i++, pal += 4 )
- {
- pLogPal->palPalEntry[i].peRed = pal[0];
- pLogPal->palPalEntry[i].peGreen = pal[1];
- pLogPal->palPalEntry[i].peBlue = pal[2];
- pLogPal->palPalEntry[i].peFlags = PC_RESERVED | PC_NOCOLLAPSE;
- }
- pLogPal->palPalEntry[0].peRed = 0;
- pLogPal->palPalEntry[0].peGreen = 0;
- pLogPal->palPalEntry[0].peBlue = 0;
- pLogPal->palPalEntry[0].peFlags = 0;
- pLogPal->palPalEntry[255].peRed = 0xff;
- pLogPal->palPalEntry[255].peGreen = 0xff;
- pLogPal->palPalEntry[255].peBlue = 0xff;
- pLogPal->palPalEntry[255].peFlags = 0;
-
- if ( ( sww_state.hPal = CreatePalette( pLogPal ) ) == NULL )
- {
- ri.Sys_Error( ERR_FATAL, "DIB_SetPalette() - CreatePalette failed(%x)\n", GetLastError() );
- }
-
- if ( ( hpalOld = SelectPalette( hDC, sww_state.hPal, FALSE ) ) == NULL )
- {
- ri.Sys_Error( ERR_FATAL, "DIB_SetPalette() - SelectPalette failed(%x)\n",GetLastError() );
- }
-
- if ( sww_state.hpalOld == NULL )
- sww_state.hpalOld = hpalOld;
-
- if ( ( ret = RealizePalette( hDC ) ) != pLogPal->palNumEntries )
- {
- ri.Sys_Error( ERR_FATAL, "DIB_SetPalette() - RealizePalette set %d entries\n", ret );
- }
- }
-}
-
-/*
-** DIB_Shutdown
-*/
-void DIB_Shutdown( void )
-{
- if ( sww_state.palettized && s_systemcolors_saved )
- DIB_RestoreSystemColors();
-
- if ( sww_state.hPal )
- {
- DeleteObject( sww_state.hPal );
- sww_state.hPal = 0;
- }
-
- if ( sww_state.hpalOld )
- {
- SelectPalette( sww_state.hDC, sww_state.hpalOld, FALSE );
- RealizePalette( sww_state.hDC );
- sww_state.hpalOld = NULL;
- }
-
- if ( sww_state.hdcDIBSection )
- {
- SelectObject( sww_state.hdcDIBSection, previously_selected_GDI_obj );
- DeleteDC( sww_state.hdcDIBSection );
- sww_state.hdcDIBSection = NULL;
- }
-
- if ( sww_state.hDIBSection )
- {
- DeleteObject( sww_state.hDIBSection );
- sww_state.hDIBSection = NULL;
- sww_state.pDIBBase = NULL;
- }
-
- if ( sww_state.hDC )
- {
- ReleaseDC( sww_state.hWnd, sww_state.hDC );
- sww_state.hDC = 0;
- }
-}
-
-
-/*
-** DIB_Save/RestoreSystemColors
-*/
-static void DIB_RestoreSystemColors( void )
-{
- SetSystemPaletteUse( sww_state.hDC, SYSPAL_STATIC );
- SetSysColors( NUM_SYS_COLORS, s_syspalindices, s_oldsyscolors );
-}
-
-static void DIB_SaveSystemColors( void )
-{
- int i;
-
- for ( i = 0; i < NUM_SYS_COLORS; i++ )
- s_oldsyscolors[i] = GetSysColor( s_syspalindices[i] );
-}
--- a/win32/rw_imp.c
+++ /dev/null
@@ -1,471 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-/*
-** RW_IMP.C
-**
-** This file contains ALL Win32 specific stuff having to do with the
-** software refresh. When a port is being made the following functions
-** must be implemented by the port:
-**
-** SWimp_EndFrame
-** SWimp_Init
-** SWimp_SetPalette
-** SWimp_Shutdown
-*/
-#include "..\ref_soft\r_local.h"
-#include "rw_win.h"
-#include "winquake.h"
-
-// Console variables that we need to access from this module
-
-swwstate_t sww_state;
-
-/*
-** VID_CreateWindow
-*/
-#define WINDOW_CLASS_NAME "Quake 2"
-
-void VID_CreateWindow( int width, int height, int stylebits )
-{
- WNDCLASS wc;
- RECT r;
- cvar_t *vid_xpos, *vid_ypos, *vid_fullscreen;
- int x, y, w, h;
- int exstyle;
-
- vid_xpos = ri.Cvar_Get ("vid_xpos", "0", 0);
- vid_ypos = ri.Cvar_Get ("vid_ypos", "0", 0);
- vid_fullscreen = ri.Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE );
-
- if ( vid_fullscreen->value )
- exstyle = WS_EX_TOPMOST;
- else
- exstyle = 0;
-
- /* Register the frame class */
- wc.style = 0;
- wc.lpfnWndProc = (WNDPROC)sww_state.wndproc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = sww_state.hInstance;
- wc.hIcon = 0;
- wc.hCursor = LoadCursor (NULL,IDC_ARROW);
- wc.hbrBackground = (void *)COLOR_GRAYTEXT;
- wc.lpszMenuName = 0;
- wc.lpszClassName = WINDOW_CLASS_NAME;
-
- if (!RegisterClass (&wc) )
- ri.Sys_Error (ERR_FATAL, "Couldn't register window class");
-
- r.left = 0;
- r.top = 0;
- r.right = width;
- r.bottom = height;
-
- AdjustWindowRect (&r, stylebits, FALSE);
-
- w = r.right - r.left;
- h = r.bottom - r.top;
- x = vid_xpos->value;
- y = vid_ypos->value;
-
- sww_state.hWnd = CreateWindowEx (
- exstyle,
- WINDOW_CLASS_NAME,
- "Quake 2",
- stylebits,
- x, y, w, h,
- NULL,
- NULL,
- sww_state.hInstance,
- NULL);
-
- if (!sww_state.hWnd)
- ri.Sys_Error (ERR_FATAL, "Couldn't create window");
-
- ShowWindow( sww_state.hWnd, SW_SHOWNORMAL );
- UpdateWindow( sww_state.hWnd );
- SetForegroundWindow( sww_state.hWnd );
- SetFocus( sww_state.hWnd );
-
- // let the sound and input subsystems know about the new window
- ri.Vid_NewWindow (width, height);
-}
-
-/*
-** SWimp_Init
-**
-** This routine is responsible for initializing the implementation
-** specific stuff in a software rendering subsystem.
-*/
-int SWimp_Init( void *hInstance, void *wndProc )
-{
- sww_state.hInstance = ( HINSTANCE ) hInstance;
- sww_state.wndproc = wndProc;
-
- return true;
-}
-
-/*
-** SWimp_InitGraphics
-**
-** This initializes the software refresh's implementation specific
-** graphics subsystem. In the case of Windows it creates DIB or
-** DDRAW surfaces.
-**
-** The necessary width and height parameters are grabbed from
-** vid.width and vid.height.
-*/
-static qboolean SWimp_InitGraphics( qboolean fullscreen )
-{
- // free resources in use
- SWimp_Shutdown ();
-
- // create a new window
- VID_CreateWindow (vid.width, vid.height, WINDOW_STYLE);
-
- // initialize the appropriate subsystem
- if ( !fullscreen )
- {
- if ( !DIB_Init( &vid.buffer, &vid.rowbytes ) )
- {
- vid.buffer = 0;
- vid.rowbytes = 0;
-
- return false;
- }
- }
- else
- {
- if ( !DDRAW_Init( &vid.buffer, &vid.rowbytes ) )
- {
- vid.buffer = 0;
- vid.rowbytes = 0;
-
- return false;
- }
- }
-
- return true;
-}
-
-/*
-** SWimp_EndFrame
-**
-** This does an implementation specific copy from the backbuffer to the
-** front buffer. In the Win32 case it uses BitBlt or BltFast depending
-** on whether we're using DIB sections/GDI or DDRAW.
-*/
-void SWimp_EndFrame (void)
-{
- if ( !sw_state.fullscreen )
- {
- if ( sww_state.palettized )
- {
-// holdpal = SelectPalette(hdcScreen, hpalDIB, FALSE);
-// RealizePalette(hdcScreen);
- }
-
-
- BitBlt( sww_state.hDC,
- 0, 0,
- vid.width,
- vid.height,
- sww_state.hdcDIBSection,
- 0, 0,
- SRCCOPY );
-
- if ( sww_state.palettized )
- {
-// SelectPalette(hdcScreen, holdpal, FALSE);
- }
- }
- else
- {
- RECT r;
- HRESULT rval;
- DDSURFACEDESC ddsd;
-
- r.left = 0;
- r.top = 0;
- r.right = vid.width;
- r.bottom = vid.height;
-
- sww_state.lpddsOffScreenBuffer->lpVtbl->Unlock( sww_state.lpddsOffScreenBuffer, vid.buffer );
-
- if ( sww_state.modex )
- {
- if ( ( rval = sww_state.lpddsBackBuffer->lpVtbl->BltFast( sww_state.lpddsBackBuffer,
- 0, 0,
- sww_state.lpddsOffScreenBuffer,
- &r,
- DDBLTFAST_WAIT ) ) == DDERR_SURFACELOST )
- {
- sww_state.lpddsBackBuffer->lpVtbl->Restore( sww_state.lpddsBackBuffer );
- sww_state.lpddsBackBuffer->lpVtbl->BltFast( sww_state.lpddsBackBuffer,
- 0, 0,
- sww_state.lpddsOffScreenBuffer,
- &r,
- DDBLTFAST_WAIT );
- }
-
- if ( ( rval = sww_state.lpddsFrontBuffer->lpVtbl->Flip( sww_state.lpddsFrontBuffer,
- NULL, DDFLIP_WAIT ) ) == DDERR_SURFACELOST )
- {
- sww_state.lpddsFrontBuffer->lpVtbl->Restore( sww_state.lpddsFrontBuffer );
- sww_state.lpddsFrontBuffer->lpVtbl->Flip( sww_state.lpddsFrontBuffer, NULL, DDFLIP_WAIT );
- }
- }
- else
- {
- if ( ( rval = sww_state.lpddsBackBuffer->lpVtbl->BltFast( sww_state.lpddsFrontBuffer,
- 0, 0,
- sww_state.lpddsOffScreenBuffer,
- &r,
- DDBLTFAST_WAIT ) ) == DDERR_SURFACELOST )
- {
- sww_state.lpddsBackBuffer->lpVtbl->Restore( sww_state.lpddsFrontBuffer );
- sww_state.lpddsBackBuffer->lpVtbl->BltFast( sww_state.lpddsFrontBuffer,
- 0, 0,
- sww_state.lpddsOffScreenBuffer,
- &r,
- DDBLTFAST_WAIT );
- }
- }
-
- memset( &ddsd, 0, sizeof( ddsd ) );
- ddsd.dwSize = sizeof( ddsd );
-
- sww_state.lpddsOffScreenBuffer->lpVtbl->Lock( sww_state.lpddsOffScreenBuffer, NULL, &ddsd, DDLOCK_WAIT, NULL );
-
- vid.buffer = ddsd.lpSurface;
- vid.rowbytes = ddsd.lPitch;
- }
-}
-
-/*
-** SWimp_SetMode
-*/
-rserr_t SWimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
-{
- const char *win_fs[] = { "W", "FS" };
- rserr_t retval = rserr_ok;
-
- ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode );
-
- if ( !ri.Vid_GetModeInfo( pwidth, pheight, mode ) )
- {
- ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
- return rserr_invalid_mode;
- }
-
- ri.Con_Printf( PRINT_ALL, " %d %d %s\n", *pwidth, *pheight, win_fs[fullscreen] );
-
- sww_state.initializing = true;
- if ( fullscreen )
- {
- if ( !SWimp_InitGraphics( 1 ) )
- {
- if ( SWimp_InitGraphics( 0 ) )
- {
- // mode is legal but not as fullscreen
- fullscreen = 0;
- retval = rserr_invalid_fullscreen;
- }
- else
- {
- // failed to set a valid mode in windowed mode
- retval = rserr_unknown;
- }
- }
- }
- else
- {
- // failure to set a valid mode in windowed mode
- if ( !SWimp_InitGraphics( fullscreen ) )
- {
- sww_state.initializing = true;
- return rserr_unknown;
- }
- }
-
- sw_state.fullscreen = fullscreen;
-#if 0
- if ( retval != rserr_unknown )
- {
- if ( retval == rserr_invalid_fullscreen ||
- ( retval == rserr_ok && !fullscreen ) )
- {
- SetWindowLong( sww_state.hWnd, GWL_STYLE, WINDOW_STYLE );
- }
- }
-#endif
- R_GammaCorrectAndSetPalette( ( const unsigned char * ) d_8to24table );
- sww_state.initializing = true;
-
- return retval;
-}
-
-/*
-** SWimp_SetPalette
-**
-** System specific palette setting routine. A NULL palette means
-** to use the existing palette. The palette is expected to be in
-** a padded 4-byte xRGB format.
-*/
-void SWimp_SetPalette( const unsigned char *palette )
-{
- // MGL - what the fuck was kendall doing here?!
- // clear screen to black and change palette
- // for (i=0 ; i<vid.height ; i++)
- // memset (vid.buffer + i*vid.rowbytes, 0, vid.width);
-
- if ( !palette )
- palette = ( const unsigned char * ) sw_state.currentpalette;
-
- if ( !sw_state.fullscreen )
- {
- DIB_SetPalette( ( const unsigned char * ) palette );
- }
- else
- {
- DDRAW_SetPalette( ( const unsigned char * ) palette );
- }
-}
-
-/*
-** SWimp_Shutdown
-**
-** System specific graphics subsystem shutdown routine. Destroys
-** DIBs or DDRAW surfaces as appropriate.
-*/
-void SWimp_Shutdown( void )
-{
- ri.Con_Printf( PRINT_ALL, "Shutting down SW imp\n" );
- DIB_Shutdown();
- DDRAW_Shutdown();
-
- if ( sww_state.hWnd )
- {
- ri.Con_Printf( PRINT_ALL, "...destroying window\n" );
- ShowWindow( sww_state.hWnd, SW_SHOWNORMAL ); // prevents leaving empty slots in the taskbar
- DestroyWindow (sww_state.hWnd);
- sww_state.hWnd = NULL;
- UnregisterClass (WINDOW_CLASS_NAME, sww_state.hInstance);
- }
-}
-
-/*
-** SWimp_AppActivate
-*/
-void SWimp_AppActivate( qboolean active )
-{
- if ( active )
- {
- if ( sww_state.hWnd )
- {
- SetForegroundWindow( sww_state.hWnd );
- ShowWindow( sww_state.hWnd, SW_RESTORE );
- }
- }
- else
- {
- if ( sww_state.hWnd )
- {
- if ( sww_state.initializing )
- return;
- if ( vid_fullscreen->value )
- ShowWindow( sww_state.hWnd, SW_MINIMIZE );
- }
- }
-}
-
-//===============================================================================
-
-
-/*
-================
-Sys_MakeCodeWriteable
-================
-*/
-void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
-{
- DWORD flOldProtect;
-
- if (!VirtualProtect((LPVOID)startaddr, length, PAGE_READWRITE, &flOldProtect))
- ri.Sys_Error(ERR_FATAL, "Protection change failed\n");
-}
-
-/*
-** Sys_SetFPCW
-**
-** For reference:
-**
-** 1
-** 5 0
-** xxxxRRPP.xxxxxxxx
-**
-** PP = 00 = 24-bit single precision
-** PP = 01 = reserved
-** PP = 10 = 53-bit double precision
-** PP = 11 = 64-bit extended precision
-**
-** RR = 00 = round to nearest
-** RR = 01 = round down (towards -inf, floor)
-** RR = 10 = round up (towards +inf, ceil)
-** RR = 11 = round to zero (truncate/towards 0)
-**
-*/
-#if !id386
-void Sys_SetFPCW (void)
-{
-}
-#else
-unsigned fpu_ceil_cw, fpu_chop_cw, fpu_full_cw, fpu_cw, fpu_pushed_cw;
-unsigned fpu_sp24_cw, fpu_sp24_ceil_cw;
-
-void Sys_SetFPCW( void )
-{
- __asm xor eax, eax
-
- __asm fnstcw word ptr fpu_cw
- __asm mov ax, word ptr fpu_cw
-
- __asm and ah, 0f0h
- __asm or ah, 003h ; round to nearest mode, extended precision
- __asm mov fpu_full_cw, eax
-
- __asm and ah, 0f0h
- __asm or ah, 00fh ; RTZ/truncate/chop mode, extended precision
- __asm mov fpu_chop_cw, eax
-
- __asm and ah, 0f0h
- __asm or ah, 00bh ; ceil mode, extended precision
- __asm mov fpu_ceil_cw, eax
-
- __asm and ah, 0f0h ; round to nearest, 24-bit single precision
- __asm mov fpu_sp24_cw, eax
-
- __asm and ah, 0f0h ; ceil mode, 24-bit single precision
- __asm or ah, 008h ;
- __asm mov fpu_sp24_ceil_cw, eax
-}
-#endif
-
--- a/win32/rw_win.h
+++ /dev/null
@@ -1,68 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-#ifndef __RW_WIN_H__
-#define __RW_WIN_H__
-
-#include <windows.h>
-#include <ddraw.h>
-
-typedef struct
-{
- HINSTANCE hInstance;
- void *wndproc;
- HDC hDC; // global DC we're using
- HWND hWnd; // HWND of parent window
-
- HDC hdcDIBSection; // DC compatible with DIB section
- HBITMAP hDIBSection; // DIB section
- unsigned char *pDIBBase; // DIB base pointer, NOT used directly for rendering!
-
- HPALETTE hPal; // palette we're using
- HPALETTE hpalOld; // original system palette
- COLORREF oldsyscolors[20]; // original system colors
-
- HINSTANCE hinstDDRAW; // library instance for DDRAW.DLL
- LPDIRECTDRAW lpDirectDraw; // pointer to DirectDraw object
-
- LPDIRECTDRAWSURFACE lpddsFrontBuffer; // video card display memory front buffer
- LPDIRECTDRAWSURFACE lpddsBackBuffer; // system memory backbuffer
- LPDIRECTDRAWSURFACE lpddsOffScreenBuffer; // system memory backbuffer
- LPDIRECTDRAWPALETTE lpddpPalette; // DirectDraw palette
-
- qboolean palettized; // true if desktop is paletted
- qboolean modex;
-
- qboolean initializing;
-} swwstate_t;
-
-extern swwstate_t sww_state;
-
-/*
-** DIB code
-*/
-qboolean DIB_Init( unsigned char **ppbuffer, int *ppitch );
-void DIB_Shutdown( void );
-void DIB_SetPalette( const unsigned char *palette );
-
-qboolean DDRAW_Init( unsigned char **ppbuffer, int *ppitch );
-void DDRAW_Shutdown( void );
-void DDRAW_SetPalette( const unsigned char *palette );
-
-#endif
--- a/win32/snd_win.c
+++ /dev/null
@@ -1,861 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-#include <float.h>
-
-#include "../client/client.h"
-#include "../client/snd_loc.h"
-#include "winquake.h"
-
-#define iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c)
-
-HRESULT (WINAPI *pDirectSoundCreate)(GUID FAR *lpGUID, LPDIRECTSOUND FAR *lplpDS, IUnknown FAR *pUnkOuter);
-
-// 64K is > 1 second at 16-bit, 22050 Hz
-#define WAV_BUFFERS 64
-#define WAV_MASK 0x3F
-#define WAV_BUFFER_SIZE 0x0400
-#define SECONDARY_BUFFER_SIZE 0x10000
-
-typedef enum {SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL} sndinitstat;
-
-cvar_t *s_wavonly;
-
-static qboolean dsound_init;
-static qboolean wav_init;
-static qboolean snd_firsttime = true, snd_isdirect, snd_iswave;
-static qboolean primary_format_set;
-
-// starts at 0 for disabled
-static int snd_buffer_count = 0;
-static int sample16;
-static int snd_sent, snd_completed;
-
-/*
- * Global variables. Must be visible to window-procedure function
- * so it can unlock and free the data block after it has been played.
- */
-
-
-HANDLE hData;
-HPSTR lpData, lpData2;
-
-HGLOBAL hWaveHdr;
-LPWAVEHDR lpWaveHdr;
-
-HWAVEOUT hWaveOut;
-
-WAVEOUTCAPS wavecaps;
-
-DWORD gSndBufSize;
-
-MMTIME mmstarttime;
-
-LPDIRECTSOUND pDS;
-LPDIRECTSOUNDBUFFER pDSBuf, pDSPBuf;
-
-HINSTANCE hInstDS;
-
-qboolean SNDDMA_InitDirect (void);
-qboolean SNDDMA_InitWav (void);
-
-void FreeSound( void );
-
-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";
-}
-
-/*
-** DS_CreateBuffers
-*/
-static qboolean DS_CreateBuffers( void )
-{
- DSBUFFERDESC dsbuf;
- DSBCAPS dsbcaps;
- WAVEFORMATEX pformat, format;
- DWORD dwWrite;
-
- 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;
-
- Com_Printf( "Creating DS buffers\n" );
-
- Com_DPrintf("...setting EXCLUSIVE coop level: " );
- if ( DS_OK != pDS->lpVtbl->SetCooperativeLevel( pDS, cl_hwnd, DSSCL_EXCLUSIVE ) )
- {
- Com_Printf ("failed\n");
- FreeSound ();
- return false;
- }
- Com_DPrintf("ok\n" );
-
-// get access to the primary buffer, if possible, so we can set the
-// sound hardware format
- memset (&dsbuf, 0, sizeof(dsbuf));
- dsbuf.dwSize = sizeof(DSBUFFERDESC);
- dsbuf.dwFlags = DSBCAPS_PRIMARYBUFFER;
- dsbuf.dwBufferBytes = 0;
- dsbuf.lpwfxFormat = NULL;
-
- memset(&dsbcaps, 0, sizeof(dsbcaps));
- dsbcaps.dwSize = sizeof(dsbcaps);
- primary_format_set = false;
-
- Com_DPrintf( "...creating primary buffer: " );
- if (DS_OK == pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSPBuf, NULL))
- {
- pformat = format;
-
- Com_DPrintf( "ok\n" );
- if (DS_OK != pDSPBuf->lpVtbl->SetFormat (pDSPBuf, &pformat))
- {
- if (snd_firsttime)
- Com_DPrintf ("...setting primary sound format: failed\n");
- }
- else
- {
- if (snd_firsttime)
- Com_DPrintf ("...setting primary sound format: ok\n");
-
- primary_format_set = true;
- }
- }
- else
- Com_Printf( "failed\n" );
-
- if ( !primary_format_set || !s_primary->value)
- {
- // create the secondary buffer we'll actually work with
- memset (&dsbuf, 0, sizeof(dsbuf));
- dsbuf.dwSize = sizeof(DSBUFFERDESC);
- dsbuf.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_LOCSOFTWARE;
- 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( "failed\n" );
- FreeSound ();
- return false;
- }
- Com_DPrintf( "ok\n" );
-
- dma.channels = format.nChannels;
- dma.samplebits = format.wBitsPerSample;
- dma.speed = format.nSamplesPerSec;
-
- if (DS_OK != pDSBuf->lpVtbl->GetCaps (pDSBuf, &dsbcaps))
- {
- Com_Printf ("*** GetCaps failed ***\n");
- FreeSound ();
- return false;
- }
-
- Com_Printf ("...using secondary sound buffer\n");
- }
- else
- {
- Com_Printf( "...using primary buffer\n" );
-
- Com_DPrintf( "...setting WRITEPRIMARY coop level: " );
- if (DS_OK != pDS->lpVtbl->SetCooperativeLevel (pDS, cl_hwnd, DSSCL_WRITEPRIMARY))
- {
- Com_Printf( "failed\n" );
- FreeSound ();
- return false;
- }
- Com_DPrintf( "ok\n" );
-
- if (DS_OK != pDSPBuf->lpVtbl->GetCaps (pDSPBuf, &dsbcaps))
- {
- Com_Printf ("*** GetCaps failed ***\n");
- return false;
- }
-
- pDSBuf = pDSPBuf;
- }
-
- // Make sure mixer is active
- pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
-
- if (snd_firsttime)
- Com_Printf(" %d channel(s)\n"
- " %d bits/sample\n"
- " %d bytes/sec\n",
- dma.channels, dma.samplebits, dma.speed);
-
- gSndBufSize = dsbcaps.dwBufferBytes;
-
- /* we don't want anyone to access the buffer directly w/o locking it first. */
- lpData = NULL;
-
- pDSBuf->lpVtbl->Stop(pDSBuf);
- pDSBuf->lpVtbl->GetCurrentPosition(pDSBuf, &mmstarttime.u.sample, &dwWrite);
- pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
-
- dma.samples = gSndBufSize/(dma.samplebits/8);
- dma.samplepos = 0;
- dma.submission_chunk = 1;
- dma.buffer = (unsigned char *) lpData;
- sample16 = (dma.samplebits/8) - 1;
-
- return true;
-}
-
-/*
-** DS_DestroyBuffers
-*/
-static void DS_DestroyBuffers( void )
-{
- Com_DPrintf( "Destroying DS buffers\n" );
- if ( pDS )
- {
- Com_DPrintf( "...setting NORMAL coop level\n" );
- pDS->lpVtbl->SetCooperativeLevel( pDS, cl_hwnd, DSSCL_NORMAL );
- }
-
- 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;
-}
-
-/*
-==================
-FreeSound
-==================
-*/
-void FreeSound (void)
-{
- int i;
-
- Com_DPrintf( "Shutting down sound system\n" );
-
- if ( pDS )
- DS_DestroyBuffers();
-
- if ( hWaveOut )
- {
- Com_DPrintf( "...resetting waveOut\n" );
- waveOutReset (hWaveOut);
-
- if (lpWaveHdr)
- {
- Com_DPrintf( "...unpreparing headers\n" );
- for (i=0 ; i< WAV_BUFFERS ; i++)
- waveOutUnprepareHeader (hWaveOut, lpWaveHdr+i, sizeof(WAVEHDR));
- }
-
- Com_DPrintf( "...closing waveOut\n" );
- waveOutClose (hWaveOut);
-
- if (hWaveHdr)
- {
- Com_DPrintf( "...freeing WAV header\n" );
- GlobalUnlock(hWaveHdr);
- GlobalFree(hWaveHdr);
- }
-
- if (hData)
- {
- Com_DPrintf( "...freeing WAV buffer\n" );
- GlobalUnlock(hData);
- GlobalFree(hData);
- }
-
- }
-
- if ( pDS )
- {
- 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;
- hWaveOut = 0;
- hData = 0;
- hWaveHdr = 0;
- lpData = NULL;
- lpWaveHdr = NULL;
- dsound_init = false;
- wav_init = false;
-}
-
-/*
-==================
-SNDDMA_InitDirect
-
-Direct-Sound support
-==================
-*/
-sndinitstat SNDDMA_InitDirect (void)
-{
- DSCAPS dscaps;
- HRESULT hresult;
-
- dma.channels = 2;
- dma.samplebits = 16;
-
- if (s_khz->value == 44)
- dma.speed = 44100;
- if (s_khz->value == 22)
- dma.speed = 22050;
- else
- dma.speed = 11025;
-
- Com_Printf( "Initializing DirectSound\n");
-
- if ( !hInstDS )
- {
- Com_DPrintf( "...loading dsound.dll: " );
-
- hInstDS = LoadLibrary("dsound.dll");
-
- if (hInstDS == NULL)
- {
- Com_Printf ("failed\n");
- return SIS_FAILURE;
- }
-
- Com_DPrintf ("ok\n");
- pDirectSoundCreate = (void *)GetProcAddress(hInstDS,"DirectSoundCreate");
-
- if (!pDirectSoundCreate)
- {
- Com_Printf ("*** couldn't get DS proc addr ***\n");
- return SIS_FAILURE;
- }
- }
-
- Com_DPrintf( "...creating DS object: " );
- while ( ( hresult = iDirectSoundCreate( NULL, &pDS, NULL ) ) != DS_OK )
- {
- if (hresult != DSERR_ALLOCATED)
- {
- Com_Printf( "failed\n" );
- return SIS_FAILURE;
- }
-
- if (MessageBox (NULL,
- "The sound hardware is in use by another app.\n\n"
- "Select Retry to try to start sound again or Cancel to run Quake with no sound.",
- "Sound not available",
- MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
- {
- Com_Printf ("failed, hardware already in use\n" );
- return SIS_NOTAVAIL;
- }
- }
- Com_DPrintf( "ok\n" );
-
- dscaps.dwSize = sizeof(dscaps);
-
- if ( DS_OK != pDS->lpVtbl->GetCaps( pDS, &dscaps ) )
- {
- Com_Printf ("*** couldn't get DS caps ***\n");
- }
-
- if ( dscaps.dwFlags & DSCAPS_EMULDRIVER )
- {
- Com_DPrintf ("...no DSound driver found\n" );
- FreeSound();
- return SIS_FAILURE;
- }
-
- if ( !DS_CreateBuffers() )
- return SIS_FAILURE;
-
- dsound_init = true;
-
- Com_DPrintf("...completed successfully\n" );
-
- return SIS_SUCCESS;
-}
-
-
-/*
-==================
-SNDDM_InitWav
-
-Crappy windows multimedia base
-==================
-*/
-qboolean SNDDMA_InitWav (void)
-{
- WAVEFORMATEX format;
- int i;
- HRESULT hr;
-
- Com_Printf( "Initializing wave sound\n" );
-
- snd_sent = 0;
- snd_completed = 0;
-
- dma.channels = 2;
- dma.samplebits = 16;
-
- if (s_khz->value == 44)
- dma.speed = 44100;
- if (s_khz->value == 22)
- dma.speed = 22050;
- else
- dma.speed = 11025;
-
- 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;
-
- /* Open a waveform device for output using window callback. */
- Com_DPrintf ("...opening waveform device: ");
- while ((hr = waveOutOpen((LPHWAVEOUT)&hWaveOut, WAVE_MAPPER,
- &format,
- 0, 0L, CALLBACK_NULL)) != MMSYSERR_NOERROR)
- {
- if (hr != MMSYSERR_ALLOCATED)
- {
- Com_Printf ("failed\n");
- return false;
- }
-
- if (MessageBox (NULL,
- "The sound hardware is in use by another app.\n\n"
- "Select Retry to try to start sound again or Cancel to run Quake 2 with no sound.",
- "Sound not available",
- MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
- {
- Com_Printf ("hw in use\n" );
- return false;
- }
- }
- Com_DPrintf( "ok\n" );
-
- /*
- * Allocate and lock memory for the waveform data. The memory
- * for waveform data must be globally allocated with
- * GMEM_MOVEABLE and GMEM_SHARE flags.
-
- */
- Com_DPrintf ("...allocating waveform buffer: ");
- gSndBufSize = WAV_BUFFERS*WAV_BUFFER_SIZE;
- hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, gSndBufSize);
- if (!hData)
- {
- Com_Printf( " failed\n" );
- FreeSound ();
- return false;
- }
- Com_DPrintf( "ok\n" );
-
- Com_DPrintf ("...locking waveform buffer: ");
- lpData = GlobalLock(hData);
- if (!lpData)
- {
- Com_Printf( " failed\n" );
- FreeSound ();
- return false;
- }
- memset (lpData, 0, gSndBufSize);
- Com_DPrintf( "ok\n" );
-
- /*
- * Allocate and lock memory for the header. This memory must
- * also be globally allocated with GMEM_MOVEABLE and
- * GMEM_SHARE flags.
- */
- Com_DPrintf ("...allocating waveform header: ");
- hWaveHdr = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE,
- (DWORD) sizeof(WAVEHDR) * WAV_BUFFERS);
-
- if (hWaveHdr == NULL)
- {
- Com_Printf( "failed\n" );
- FreeSound ();
- return false;
- }
- Com_DPrintf( "ok\n" );
-
- Com_DPrintf ("...locking waveform header: ");
- lpWaveHdr = (LPWAVEHDR) GlobalLock(hWaveHdr);
-
- if (lpWaveHdr == NULL)
- {
- Com_Printf( "failed\n" );
- FreeSound ();
- return false;
- }
- memset (lpWaveHdr, 0, sizeof(WAVEHDR) * WAV_BUFFERS);
- Com_DPrintf( "ok\n" );
-
- /* After allocation, set up and prepare headers. */
- Com_DPrintf ("...preparing headers: ");
- for (i=0 ; i<WAV_BUFFERS ; i++)
- {
- lpWaveHdr[i].dwBufferLength = WAV_BUFFER_SIZE;
- lpWaveHdr[i].lpData = lpData + i*WAV_BUFFER_SIZE;
-
- if (waveOutPrepareHeader(hWaveOut, lpWaveHdr+i, sizeof(WAVEHDR)) !=
- MMSYSERR_NOERROR)
- {
- Com_Printf ("failed\n");
- FreeSound ();
- return false;
- }
- }
- Com_DPrintf ("ok\n");
-
- dma.samples = gSndBufSize/(dma.samplebits/8);
- dma.samplepos = 0;
- dma.submission_chunk = 512;
- dma.buffer = (unsigned char *) lpData;
- sample16 = (dma.samplebits/8) - 1;
-
- wav_init = true;
-
- return true;
-}
-
-/*
-==================
-SNDDMA_Init
-
-Try to find a sound device to mix for.
-Returns false if nothing is found.
-==================
-*/
-int SNDDMA_Init(void)
-{
- sndinitstat stat;
-
- memset ((void *)&dma, 0, sizeof (dma));
-
- s_wavonly = Cvar_Get ("s_wavonly", "0", 0);
-
- dsound_init = wav_init = 0;
-
- stat = SIS_FAILURE; // assume DirectSound won't initialize
-
- /* Init DirectSound */
- if (!s_wavonly->value)
- {
- if (snd_firsttime || snd_isdirect)
- {
- stat = SNDDMA_InitDirect ();
-
- if (stat == SIS_SUCCESS)
- {
- snd_isdirect = true;
-
- if (snd_firsttime)
- Com_Printf ("dsound init succeeded\n" );
- }
- else
- {
- snd_isdirect = false;
- Com_Printf ("*** dsound init failed ***\n");
- }
- }
- }
-
-// if DirectSound didn't succeed in initializing, try to initialize
-// waveOut sound, unless DirectSound failed because the hardware is
-// already allocated (in which case the user has already chosen not
-// to have sound)
- if (!dsound_init && (stat != SIS_NOTAVAIL))
- {
- if (snd_firsttime || snd_iswave)
- {
-
- snd_iswave = SNDDMA_InitWav ();
-
- if (snd_iswave)
- {
- if (snd_firsttime)
- Com_Printf ("Wave sound init succeeded\n");
- }
- else
- {
- Com_Printf ("Wave sound init failed\n");
- }
- }
- }
-
- snd_firsttime = false;
-
- snd_buffer_count = 1;
-
- if (!dsound_init && !wav_init)
- {
- if (snd_firsttime)
- Com_Printf ("*** No sound device initialized ***\n");
-
- return 0;
- }
-
- 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)
- {
- mmtime.wType = TIME_SAMPLES;
- pDSBuf->lpVtbl->GetCurrentPosition(pDSBuf, &mmtime.u.sample, &dwWrite);
- s = mmtime.u.sample - mmstarttime.u.sample;
- }
- else if (wav_init)
- {
- s = snd_sent * WAV_BUFFER_SIZE;
- }
-
-
- s >>= sample16;
-
- s &= (dma.samples-1);
-
- return s;
-}
-
-/*
-==============
-SNDDMA_BeginPainting
-
-Makes sure dma.buffer is valid
-===============
-*/
-DWORD locksize;
-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, &pbuf, &locksize,
- &pbuf2, &dwSize2, 0)) != DS_OK)
- {
- if (hresult != DSERR_BUFFERLOST)
- {
- Com_Printf( "S_TransferStereo16: 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)
-{
- LPWAVEHDR h;
- int wResult;
-
- if (!dma.buffer)
- return;
-
- // unlock the dsound buffer
- if (pDSBuf)
- pDSBuf->lpVtbl->Unlock(pDSBuf, dma.buffer, locksize, NULL, 0);
-
- if (!wav_init)
- return;
-
- //
- // find which sound blocks have completed
- //
- while (1)
- {
- if ( snd_completed == snd_sent )
- {
- Com_DPrintf ("Sound overrun\n");
- break;
- }
-
- if ( ! (lpWaveHdr[ snd_completed & WAV_MASK].dwFlags & WHDR_DONE) )
- {
- break;
- }
-
- snd_completed++; // this buffer has been played
- }
-
-//Com_Printf ("completed %i\n", snd_completed);
- //
- // submit a few new sound blocks
- //
- while (((snd_sent - snd_completed) >> sample16) < 8)
- {
- h = lpWaveHdr + ( snd_sent&WAV_MASK );
- if (paintedtime/256 <= snd_sent)
- break; // Com_Printf ("submit overrun\n");
-//Com_Printf ("send %i\n", snd_sent);
- snd_sent++;
- /*
- * Now the data block can be sent to the output device. The
- * waveOutWrite function returns immediately and waveform
- * data is sent to the output device in the background.
- */
- wResult = waveOutWrite(hWaveOut, h, sizeof(WAVEHDR));
-
- if (wResult != MMSYSERR_NOERROR)
- {
- Com_Printf ("Failed to write block to device\n");
- FreeSound ();
- return;
- }
- }
-}
-
-/*
-==============
-SNDDMA_Shutdown
-
-Reset the sound device for exiting
-===============
-*/
-void SNDDMA_Shutdown(void)
-{
- FreeSound ();
-}
-
-
-/*
-===========
-S_Activate
-
-Called when the main window gains or loses focus.
-The window have been destroyed and recreated
-between a deactivate and an activate.
-===========
-*/
-void S_Activate (qboolean active)
-{
- if ( active )
- {
- if ( pDS && cl_hwnd && snd_isdirect )
- {
- DS_CreateBuffers();
- }
- }
- else
- {
- if ( pDS && cl_hwnd && snd_isdirect )
- {
- DS_DestroyBuffers();
- }
- }
-}
-
--- a/win32/sys_win.c
+++ /dev/null
@@ -1,663 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// sys_win.h
-
-#include "../qcommon/qcommon.h"
-#include "winquake.h"
-#include "resource.h"
-#include <errno.h>
-#include <float.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <direct.h>
-#include <io.h>
-#include <conio.h>
-#include "../win32/conproc.h"
-
-#define MINIMUM_WIN_MEMORY 0x0a00000
-#define MAXIMUM_WIN_MEMORY 0x1000000
-
-//#define DEMO
-
-qboolean s_win95;
-
-int starttime;
-int ActiveApp;
-qboolean Minimized;
-
-static HANDLE hinput, houtput;
-
-unsigned sys_msg_time;
-unsigned sys_frame_time;
-
-
-static HANDLE qwclsemaphore;
-
-#define MAX_NUM_ARGVS 128
-int argc;
-char *argv[MAX_NUM_ARGVS];
-
-
-/*
-===============================================================================
-
-SYSTEM IO
-
-===============================================================================
-*/
-
-
-void Sys_Error (char *error, ...)
-{
- va_list argptr;
- char text[1024];
-
- CL_Shutdown ();
- Qcommon_Shutdown ();
-
- va_start (argptr, error);
- vsprintf (text, error, argptr);
- va_end (argptr);
-
- MessageBox(NULL, text, "Error", 0 /* MB_OK */ );
-
- if (qwclsemaphore)
- CloseHandle (qwclsemaphore);
-
-// shut down QHOST hooks if necessary
- DeinitConProc ();
-
- exit (1);
-}
-
-void Sys_Quit (void)
-{
- timeEndPeriod( 1 );
-
- CL_Shutdown();
- Qcommon_Shutdown ();
- CloseHandle (qwclsemaphore);
- if (dedicated && dedicated->value)
- FreeConsole ();
-
-// shut down QHOST hooks if necessary
- DeinitConProc ();
-
- exit (0);
-}
-
-
-void WinError (void)
-{
- LPVOID lpMsgBuf;
-
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL
- );
-
- // Display the string.
- MessageBox( NULL, lpMsgBuf, "GetLastError", MB_OK|MB_ICONINFORMATION );
-
- // Free the buffer.
- LocalFree( lpMsgBuf );
-}
-
-//================================================================
-
-
-/*
-================
-Sys_ScanForCD
-
-================
-*/
-char *Sys_ScanForCD (void)
-{
- static char cddir[MAX_OSPATH];
- static qboolean done;
-#ifndef DEMO
- char drive[4];
- FILE *f;
- char test[MAX_QPATH];
-
- if (done) // don't re-check
- return cddir;
-
- // no abort/retry/fail errors
- SetErrorMode (SEM_FAILCRITICALERRORS);
-
- drive[0] = 'c';
- drive[1] = ':';
- drive[2] = '\\';
- drive[3] = 0;
-
- done = true;
-
- // scan the drives
- for (drive[0] = 'c' ; drive[0] <= 'z' ; drive[0]++)
- {
- // where activision put the stuff...
- sprintf (cddir, "%sinstall\\data", drive);
- sprintf (test, "%sinstall\\data\\quake2.exe", drive);
- f = fopen(test, "r");
- if (f)
- {
- fclose (f);
- if (GetDriveType (drive) == DRIVE_CDROM)
- return cddir;
- }
- }
-#endif
-
- cddir[0] = 0;
-
- return NULL;
-}
-
-/*
-================
-Sys_CopyProtect
-
-================
-*/
-void Sys_CopyProtect (void)
-{
-#ifndef DEMO
- char *cddir;
-
- cddir = Sys_ScanForCD();
- if (!cddir[0])
- Com_Error (ERR_FATAL, "You must have the Quake2 CD in the drive to play.");
-#endif
-}
-
-
-//================================================================
-
-
-/*
-================
-Sys_Init
-================
-*/
-void Sys_Init (void)
-{
- OSVERSIONINFO vinfo;
-
-#if 0
- // allocate a named semaphore on the client so the
- // front end can tell if it is alive
-
- // mutex will fail if semephore already exists
- qwclsemaphore = CreateMutex(
- NULL, /* Security attributes */
- 0, /* owner */
- "qwcl"); /* Semaphore name */
- if (!qwclsemaphore)
- Sys_Error ("QWCL is already running on this system");
- CloseHandle (qwclsemaphore);
-
- qwclsemaphore = CreateSemaphore(
- NULL, /* Security attributes */
- 0, /* Initial count */
- 1, /* Maximum count */
- "qwcl"); /* Semaphore name */
-#endif
-
- timeBeginPeriod( 1 );
-
- vinfo.dwOSVersionInfoSize = sizeof(vinfo);
-
- if (!GetVersionEx (&vinfo))
- Sys_Error ("Couldn't get OS info");
-
- if (vinfo.dwMajorVersion < 4)
- Sys_Error ("Quake2 requires windows version 4 or greater");
- if (vinfo.dwPlatformId == VER_PLATFORM_WIN32s)
- Sys_Error ("Quake2 doesn't run on Win32s");
- else if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
- s_win95 = true;
-
- if (dedicated->value)
- {
- if (!AllocConsole ())
- Sys_Error ("Couldn't create dedicated server console");
- hinput = GetStdHandle (STD_INPUT_HANDLE);
- houtput = GetStdHandle (STD_OUTPUT_HANDLE);
-
- // let QHOST hook in
- InitConProc (argc, argv);
- }
-}
-
-
-static char console_text[256];
-static int console_textlen;
-
-/*
-================
-Sys_ConsoleInput
-================
-*/
-char *Sys_ConsoleInput (void)
-{
- INPUT_RECORD recs[1024];
- int dummy;
- int ch, numread, numevents;
-
- if (!dedicated || !dedicated->value)
- return NULL;
-
-
- for ( ;; )
- {
- if (!GetNumberOfConsoleInputEvents (hinput, &numevents))
- Sys_Error ("Error getting # of console events");
-
- if (numevents <= 0)
- break;
-
- if (!ReadConsoleInput(hinput, recs, 1, &numread))
- Sys_Error ("Error reading console input");
-
- if (numread != 1)
- Sys_Error ("Couldn't read console input");
-
- if (recs[0].EventType == KEY_EVENT)
- {
- if (!recs[0].Event.KeyEvent.bKeyDown)
- {
- ch = recs[0].Event.KeyEvent.uChar.AsciiChar;
-
- switch (ch)
- {
- case '\r':
- WriteFile(houtput, "\r\n", 2, &dummy, NULL);
-
- if (console_textlen)
- {
- console_text[console_textlen] = 0;
- console_textlen = 0;
- return console_text;
- }
- break;
-
- case '\b':
- if (console_textlen)
- {
- console_textlen--;
- WriteFile(houtput, "\b \b", 3, &dummy, NULL);
- }
- break;
-
- default:
- if (ch >= ' ')
- {
- if (console_textlen < sizeof(console_text)-2)
- {
- WriteFile(houtput, &ch, 1, &dummy, NULL);
- console_text[console_textlen] = ch;
- console_textlen++;
- }
- }
-
- break;
-
- }
- }
- }
- }
-
- return NULL;
-}
-
-
-/*
-================
-Sys_ConsoleOutput
-
-Print text to the dedicated console
-================
-*/
-void Sys_ConsoleOutput (char *string)
-{
- int dummy;
- char text[256];
-
- if (!dedicated || !dedicated->value)
- return;
-
- if (console_textlen)
- {
- text[0] = '\r';
- memset(&text[1], ' ', console_textlen);
- text[console_textlen+1] = '\r';
- text[console_textlen+2] = 0;
- WriteFile(houtput, text, console_textlen+2, &dummy, NULL);
- }
-
- WriteFile(houtput, string, strlen(string), &dummy, NULL);
-
- if (console_textlen)
- WriteFile(houtput, console_text, console_textlen, &dummy, NULL);
-}
-
-
-/*
-================
-Sys_SendKeyEvents
-
-Send Key_Event calls
-================
-*/
-void Sys_SendKeyEvents (void)
-{
- MSG msg;
-
- while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))
- {
- if (!GetMessage (&msg, NULL, 0, 0))
- Sys_Quit ();
- sys_msg_time = msg.time;
- TranslateMessage (&msg);
- DispatchMessage (&msg);
- }
-
- // grab frame time
- sys_frame_time = timeGetTime(); // FIXME: should this be at start?
-}
-
-
-
-/*
-================
-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 = malloc( GlobalSize( hClipboardData ) + 1 );
- strcpy( data, cliptext );
- GlobalUnlock( hClipboardData );
- }
- }
- CloseClipboard();
- }
- return data;
-}
-
-/*
-==============================================================================
-
- WINDOWS CRAP
-
-==============================================================================
-*/
-
-/*
-=================
-Sys_AppActivate
-=================
-*/
-void Sys_AppActivate (void)
-{
- ShowWindow ( cl_hwnd, SW_RESTORE);
- SetForegroundWindow ( cl_hwnd );
-}
-
-/*
-========================================================================
-
-GAME DLL
-
-========================================================================
-*/
-
-static HINSTANCE game_library;
-
-/*
-=================
-Sys_UnloadGame
-=================
-*/
-void Sys_UnloadGame (void)
-{
- if (!FreeLibrary (game_library))
- Com_Error (ERR_FATAL, "FreeLibrary failed for game library");
- game_library = NULL;
-}
-
-/*
-=================
-Sys_GetGameAPI
-
-Loads the game dll
-=================
-*/
-void *Sys_GetGameAPI (void *parms)
-{
- void *(*GetGameAPI) (void *);
- char name[MAX_OSPATH];
- char *path;
- char cwd[MAX_OSPATH];
-#if defined _M_IX86
- const char *gamename = "gamex86.dll";
-
-#ifdef NDEBUG
- const char *debugdir = "release";
-#else
- const char *debugdir = "debug";
-#endif
-
-#elif defined _M_ALPHA
- const char *gamename = "gameaxp.dll";
-
-#ifdef NDEBUG
- const char *debugdir = "releaseaxp";
-#else
- const char *debugdir = "debugaxp";
-#endif
-
-#endif
-
- if (game_library)
- Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
-
- // check the current debug directory first for development purposes
- _getcwd (cwd, sizeof(cwd));
- Com_sprintf (name, sizeof(name), "%s/%s/%s", cwd, debugdir, gamename);
- game_library = LoadLibrary ( name );
- if (game_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n", name);
- }
- else
- {
- // check the current directory for other development purposes
- Com_sprintf (name, sizeof(name), "%s/%s", cwd, gamename);
- game_library = LoadLibrary ( name );
- if (game_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n", name);
- }
- else
- {
- // now run through the search paths
- path = NULL;
- while (1)
- {
- path = FS_NextPath (path);
- if (!path)
- return NULL; // couldn't find one anywhere
- Com_sprintf (name, sizeof(name), "%s/%s", path, gamename);
- game_library = LoadLibrary (name);
- if (game_library)
- {
- Com_DPrintf ("LoadLibrary (%s)\n",name);
- break;
- }
- }
- }
- }
-
- GetGameAPI = (void *)GetProcAddress (game_library, "GetGameAPI");
- if (!GetGameAPI)
- {
- Sys_UnloadGame ();
- return NULL;
- }
-
- return GetGameAPI (parms);
-}
-
-//=======================================================================
-
-
-/*
-==================
-ParseCommandLine
-
-==================
-*/
-void ParseCommandLine (LPSTR lpCmdLine)
-{
- argc = 1;
- argv[0] = "exe";
-
- while (*lpCmdLine && (argc < MAX_NUM_ARGVS))
- {
- while (*lpCmdLine && ((*lpCmdLine <= 32) || (*lpCmdLine > 126)))
- lpCmdLine++;
-
- if (*lpCmdLine)
- {
- argv[argc] = lpCmdLine;
- argc++;
-
- while (*lpCmdLine && ((*lpCmdLine > 32) && (*lpCmdLine <= 126)))
- lpCmdLine++;
-
- if (*lpCmdLine)
- {
- *lpCmdLine = 0;
- lpCmdLine++;
- }
-
- }
- }
-
-}
-
-/*
-==================
-WinMain
-
-==================
-*/
-HINSTANCE global_hInstance;
-
-int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
-{
- MSG msg;
- int time, oldtime, newtime;
- char *cddir;
-
- /* previous instances do not exist in Win32 */
- if (hPrevInstance)
- return 0;
-
- global_hInstance = hInstance;
-
- ParseCommandLine (lpCmdLine);
-
- // if we find the CD, add a +set cddir xxx command line
- cddir = Sys_ScanForCD ();
- if (cddir && argc < MAX_NUM_ARGVS - 3)
- {
- int i;
-
- // don't override a cddir on the command line
- for (i=0 ; i<argc ; i++)
- if (!strcmp(argv[i], "cddir"))
- break;
- if (i == argc)
- {
- argv[argc++] = "+set";
- argv[argc++] = "cddir";
- argv[argc++] = cddir;
- }
- }
-
- Qcommon_Init (argc, argv);
- oldtime = Sys_Milliseconds ();
-
- /* main window message loop */
- while (1)
- {
- // if at a full screen console, don't update unless needed
- if (Minimized || (dedicated && dedicated->value) )
- {
- Sleep (1);
- }
-
- while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))
- {
- if (!GetMessage (&msg, NULL, 0, 0))
- Com_Quit ();
- sys_msg_time = msg.time;
- TranslateMessage (&msg);
- DispatchMessage (&msg);
- }
-
- do
- {
- newtime = Sys_Milliseconds ();
- time = newtime - oldtime;
- } while (time < 1);
-// Con_Printf ("time:%5.2f - %5.2f = %5.2f\n", newtime, oldtime, time);
-
- // _controlfp( ~( _EM_ZERODIVIDE /*| _EM_INVALID*/ ), _MCW_EM );
- _controlfp( _PC_24, _MCW_PC );
- Qcommon_Frame (time);
-
- oldtime = newtime;
- }
-
- // never gets here
- return TRUE;
-}
--- a/win32/vid_dll.c
+++ /dev/null
@@ -1,760 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// Main windowed and fullscreen graphics interface module. This module
-// is used for both the software and OpenGL rendering versions of the
-// Quake refresh engine.
-#include <assert.h>
-#include <float.h>
-
-#include "..\client\client.h"
-#include "winquake.h"
-//#include "zmouse.h"
-
-// Structure containing functions exported from refresh DLL
-refexport_t re;
-
-cvar_t *win_noalttab;
-
-#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_gamma;
-cvar_t *vid_ref; // Name of Refresh DLL loaded
-cvar_t *vid_xpos; // X coordinate of window position
-cvar_t *vid_ypos; // Y coordinate of window position
-cvar_t *vid_fullscreen;
-
-// Global variables used internally by this module
-viddef_t viddef; // global video state; used by other modules
-HINSTANCE reflib_library; // Handle to refresh DLL
-qboolean reflib_active = 0;
-
-HWND cl_hwnd; // Main window handle for life of program
-
-#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;
-
-extern unsigned sys_msg_time;
-
-/*
-** WIN32 helper functions
-*/
-extern qboolean s_win95;
-
-static void WIN_DisableAltTab( void )
-{
- if ( s_alttab_disabled )
- return;
-
- if ( s_win95 )
- {
- BOOL old;
-
- SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0 );
- }
- else
- {
- RegisterHotKey( 0, 0, MOD_ALT, VK_TAB );
- RegisterHotKey( 0, 1, MOD_ALT, VK_RETURN );
- }
- s_alttab_disabled = true;
-}
-
-static void WIN_EnableAltTab( void )
-{
- if ( s_alttab_disabled )
- {
- if ( s_win95 )
- {
- BOOL old;
-
- SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0 );
- }
- else
- {
- UnregisterHotKey( 0, 0 );
- UnregisterHotKey( 0, 1 );
- }
-
- s_alttab_disabled = false;
- }
-}
-
-/*
-==========================================================================
-
-DLL GLUE
-
-==========================================================================
-*/
-
-#define MAXPRINTMSG 4096
-void VID_Printf (int print_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
- static qboolean inupdate;
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- if (print_level == PRINT_ALL)
- {
- Com_Printf ("%s", msg);
- }
- else if ( print_level == PRINT_DEVELOPER )
- {
- Com_DPrintf ("%s", msg);
- }
- else if ( print_level == PRINT_ALERT )
- {
- MessageBox( 0, msg, "PRINT_ALERT", MB_ICONWARNING );
- OutputDebugString( msg );
- }
-}
-
-void VID_Error (int err_level, char *fmt, ...)
-{
- va_list argptr;
- char msg[MAXPRINTMSG];
- static qboolean inupdate;
-
- va_start (argptr,fmt);
- vsprintf (msg,fmt,argptr);
- va_end (argptr);
-
- Com_Error (err_level,"%s", msg);
-}
-
-//==========================================================================
-
-byte 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,' ', 0 , 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
-=======
-*/
-int MapKey (int key)
-{
- int result;
- int modified = ( key >> 16 ) & 255;
- qboolean is_extended = false;
-
- if ( modified > 127)
- return 0;
-
- if ( key & ( 1 << 24 ) )
- is_extended = true;
-
- result = 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 0x0D:
- return K_KP_ENTER;
- case 0x2F:
- return K_KP_SLASH;
- case 0xAF:
- return K_KP_PLUS;
- }
- return result;
- }
-}
-
-void AppActivate(BOOL fActive, BOOL minimize)
-{
- Minimized = minimize;
-
- Key_ClearStates();
-
- // we don't want to act like we're active if we're minimized
- if (fActive && !Minimized)
- ActiveApp = true;
- else
- ActiveApp = false;
-
- // minimize/restore mouse-capture on demand
- if (!ActiveApp)
- {
- IN_Activate (false);
- CDAudio_Activate (false);
- S_Activate (false);
-
- if ( win_noalttab->value )
- {
- WIN_EnableAltTab();
- }
- }
- else
- {
- IN_Activate (true);
- CDAudio_Activate (true);
- S_Activate (true);
- if ( win_noalttab->value )
- {
- WIN_DisableAltTab();
- }
- }
-}
-
-/*
-====================
-MainWndProc
-
-main window procedure
-====================
-*/
-LONG WINAPI MainWndProc (
- HWND hWnd,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam)
-{
- LONG lRet = 0;
-
- if ( uMsg == MSH_MOUSEWHEEL )
- {
- if ( ( ( int ) wParam ) > 0 )
- {
- Key_Event( K_MWHEELUP, true, sys_msg_time );
- Key_Event( K_MWHEELUP, false, sys_msg_time );
- }
- else
- {
- Key_Event( K_MWHEELDOWN, true, sys_msg_time );
- Key_Event( K_MWHEELDOWN, false, sys_msg_time );
- }
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
- }
-
- switch (uMsg)
- {
- case WM_MOUSEWHEEL:
- /*
- ** this chunk of code theoretically only works under NT4 and Win98
- ** since this message doesn't exist under Win95
- */
- if ( ( short ) HIWORD( wParam ) > 0 )
- {
- Key_Event( K_MWHEELUP, true, sys_msg_time );
- Key_Event( K_MWHEELUP, false, sys_msg_time );
- }
- else
- {
- Key_Event( K_MWHEELDOWN, true, sys_msg_time );
- Key_Event( K_MWHEELDOWN, false, sys_msg_time );
- }
- break;
-
- case WM_HOTKEY:
- return 0;
-
- case WM_CREATE:
- cl_hwnd = hWnd;
-
- MSH_MOUSEWHEEL = RegisterWindowMessage("MSWHEEL_ROLLMSG");
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
-
- case WM_PAINT:
- SCR_DirtyScreen (); // force entire screen to update next frame
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
-
- case WM_DESTROY:
- // let sound and input know about this?
- cl_hwnd = NULL;
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
-
- case WM_ACTIVATE:
- {
- int fActive, fMinimized;
-
- // KJB: Watch this for problems in fullscreen modes with Alt-tabbing.
- fActive = LOWORD(wParam);
- fMinimized = (BOOL) HIWORD(wParam);
-
- AppActivate( fActive != WA_INACTIVE, fMinimized);
-
- if ( reflib_active )
- re.AppActivate( !( fActive == WA_INACTIVE ) );
- }
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
-
- case WM_MOVE:
- {
- int xPos, yPos;
- RECT r;
- int style;
-
- if (!vid_fullscreen->value)
- {
- 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 = false;
- vid_ypos->modified = false;
- if (ActiveApp)
- IN_Activate (true);
- }
- }
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
-
-// 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;
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
- case WM_SYSKEYDOWN:
- if ( wParam == 13 )
- {
- if ( vid_fullscreen )
- {
- Cvar_SetValue( "vid_fullscreen", !vid_fullscreen->value );
- }
- return 0;
- }
- // fall through
- case WM_KEYDOWN:
- Key_Event( MapKey( lParam ), true, sys_msg_time);
- break;
-
- case WM_SYSKEYUP:
- case WM_KEYUP:
- Key_Event( MapKey( lParam ), false, sys_msg_time);
- break;
-
- case MM_MCINOTIFY:
- {
- LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
- lRet = CDAudio_MessageHandler (hWnd, uMsg, wParam, lParam);
- }
- break;
-
- default: // pass all unhandled messages to DefWindowProc
- return DefWindowProc (hWnd, uMsg, wParam, lParam);
- }
-
- /* return 0 if handled message, 1 if not */
- return DefWindowProc( hWnd, uMsg, wParam, lParam );
-}
-
-/*
-============
-VID_Restart_f
-
-Console command to re-start the video mode and refresh DLL. We do this
-simply by setting the modified flag for the vid_ref variable, which will
-cause the entire video mode and refresh DLL to be reset on the next frame.
-============
-*/
-void VID_Restart_f (void)
-{
- vid_ref->modified = true;
-}
-
-void VID_Front_f( void )
-{
- SetWindowLong( cl_hwnd, GWL_EXSTYLE, WS_EX_TOPMOST );
- SetForegroundWindow( cl_hwnd );
-}
-
-/*
-** VID_GetModeInfo
-*/
-typedef struct vidmode_s
-{
- const char *description;
- int width, height;
- int mode;
-} vidmode_t;
-
-vidmode_t vid_modes[] =
-{
- { "Mode 0: 320x240", 320, 240, 0 },
- { "Mode 1: 400x300", 400, 300, 1 },
- { "Mode 2: 512x384", 512, 384, 2 },
- { "Mode 3: 640x480", 640, 480, 3 },
- { "Mode 4: 800x600", 800, 600, 4 },
- { "Mode 5: 960x720", 960, 720, 5 },
- { "Mode 6: 1024x768", 1024, 768, 6 },
- { "Mode 7: 1152x864", 1152, 864, 7 },
- { "Mode 8: 1280x960", 1280, 960, 8 },
- { "Mode 9: 1600x1200", 1600, 1200, 9 }
-};
-
-qboolean VID_GetModeInfo( int *width, int *height, int mode )
-{
- if ( mode < 0 || mode >= VID_NUM_MODES )
- return false;
-
- *width = vid_modes[mode].width;
- *height = vid_modes[mode].height;
-
- return true;
-}
-
-/*
-** VID_UpdateWindowPosAndSize
-*/
-void VID_UpdateWindowPosAndSize( int x, int y )
-{
- RECT r;
- int style;
- int w, h;
-
- r.left = 0;
- r.top = 0;
- r.right = viddef.width;
- r.bottom = viddef.height;
-
- style = GetWindowLong( cl_hwnd, GWL_STYLE );
- AdjustWindowRect( &r, style, FALSE );
-
- w = r.right - r.left;
- h = r.bottom - r.top;
-
- MoveWindow( cl_hwnd, vid_xpos->value, vid_ypos->value, w, h, TRUE );
-}
-
-/*
-** VID_NewWindow
-*/
-void VID_NewWindow ( int width, int height)
-{
- viddef.width = width;
- viddef.height = height;
-
- cl.force_refdef = true; // can't use a paused refdef
-}
-
-void VID_FreeReflib (void)
-{
- if ( !FreeLibrary( reflib_library ) )
- Com_Error( ERR_FATAL, "Reflib FreeLibrary failed" );
- memset (&re, 0, sizeof(re));
- reflib_library = NULL;
- reflib_active = false;
-}
-
-/*
-==============
-VID_LoadRefresh
-==============
-*/
-qboolean VID_LoadRefresh( char *name )
-{
- refimport_t ri;
- GetRefAPI_t GetRefAPI;
-
- if ( reflib_active )
- {
- re.Shutdown();
- VID_FreeReflib ();
- }
-
- Com_Printf( "------- Loading %s -------\n", name );
-
- if ( ( reflib_library = LoadLibrary( name ) ) == 0 )
- {
- Com_Printf( "LoadLibrary(\"%s\") failed\n", name );
-
- return false;
- }
-
- ri.Cmd_AddCommand = Cmd_AddCommand;
- ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
- ri.Cmd_Argc = Cmd_Argc;
- ri.Cmd_Argv = Cmd_Argv;
- ri.Cmd_ExecuteText = Cbuf_ExecuteText;
- ri.Con_Printf = VID_Printf;
- ri.Sys_Error = VID_Error;
- ri.FS_LoadFile = FS_LoadFile;
- ri.FS_FreeFile = FS_FreeFile;
- ri.FS_Gamedir = FS_Gamedir;
- ri.Cvar_Get = Cvar_Get;
- ri.Cvar_Set = Cvar_Set;
- ri.Cvar_SetValue = Cvar_SetValue;
- ri.Vid_GetModeInfo = VID_GetModeInfo;
- ri.Vid_MenuInit = VID_MenuInit;
- ri.Vid_NewWindow = VID_NewWindow;
-
- if ( ( GetRefAPI = (void *) GetProcAddress( reflib_library, "GetRefAPI" ) ) == 0 )
- Com_Error( ERR_FATAL, "GetProcAddress failed on %s", name );
-
- re = GetRefAPI( ri );
-
- if (re.api_version != API_VERSION)
- {
- VID_FreeReflib ();
- Com_Error (ERR_FATAL, "%s has incompatible api_version", name);
- }
-
- if ( re.Init( global_hInstance, MainWndProc ) == -1 )
- {
- re.Shutdown();
- VID_FreeReflib ();
- return false;
- }
-
- Com_Printf( "------------------------------------\n");
- reflib_active = true;
-
-//======
-//PGM
- vidref_val = VIDREF_OTHER;
- if(vid_ref)
- {
- if(!strcmp (vid_ref->string, "gl"))
- vidref_val = VIDREF_GL;
- else if(!strcmp(vid_ref->string, "soft"))
- vidref_val = VIDREF_SOFT;
- }
-//PGM
-//======
-
- return true;
-}
-
-/*
-============
-VID_CheckChanges
-
-This function gets called once just before drawing each frame, and it's sole purpose in life
-is to check to see if any of the video mode parameters have changed, and if they have to
-update the rendering DLL and/or video mode to match.
-============
-*/
-void VID_CheckChanges (void)
-{
- char name[100];
-
- if ( win_noalttab->modified )
- {
- if ( win_noalttab->value )
- {
- WIN_DisableAltTab();
- }
- else
- {
- WIN_EnableAltTab();
- }
- win_noalttab->modified = false;
- }
-
- if ( vid_ref->modified )
- {
- cl.force_refdef = true; // can't use a paused refdef
- S_StopAllSounds();
- }
- while (vid_ref->modified)
- {
- /*
- ** refresh has changed
- */
- vid_ref->modified = false;
- vid_fullscreen->modified = true;
- cl.refresh_prepped = false;
- cls.disable_screen = true;
-
- Com_sprintf( name, sizeof(name), "ref_%s.dll", vid_ref->string );
- if ( !VID_LoadRefresh( name ) )
- {
- if ( strcmp (vid_ref->string, "soft") == 0 )
- Com_Error (ERR_FATAL, "Couldn't fall back to software refresh!");
- Cvar_Set( "vid_ref", "soft" );
-
- /*
- ** drop the console if we fail to load a refresh
- */
- if ( cls.key_dest != key_console )
- {
- Con_ToggleConsole_f();
- }
- }
- cls.disable_screen = false;
- }
-
- /*
- ** update our window position
- */
- if ( vid_xpos->modified || vid_ypos->modified )
- {
- if (!vid_fullscreen->value)
- VID_UpdateWindowPosAndSize( vid_xpos->value, vid_ypos->value );
-
- vid_xpos->modified = false;
- vid_ypos->modified = false;
- }
-}
-
-/*
-============
-VID_Init
-============
-*/
-void VID_Init (void)
-{
- /* Create the video variables so we know how to start the graphics drivers */
- vid_ref = Cvar_Get ("vid_ref", "soft", CVAR_ARCHIVE);
- vid_xpos = Cvar_Get ("vid_xpos", "3", CVAR_ARCHIVE);
- vid_ypos = Cvar_Get ("vid_ypos", "22", CVAR_ARCHIVE);
- vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE);
- vid_gamma = Cvar_Get( "vid_gamma", "1", CVAR_ARCHIVE );
- win_noalttab = Cvar_Get( "win_noalttab", "0", CVAR_ARCHIVE );
-
- /* Add some console commands that we want to handle */
- Cmd_AddCommand ("vid_restart", VID_Restart_f);
- Cmd_AddCommand ("vid_front", VID_Front_f);
-
- /*
- ** this is a gross hack but necessary to clamp the mode for 3Dfx
- */
-#if 0
- {
- cvar_t *gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
- cvar_t *gl_mode = Cvar_Get( "gl_mode", "3", 0 );
-
- if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 )
- {
- Cvar_SetValue( "gl_mode", 3 );
- viddef.width = 640;
- viddef.height = 480;
- }
- }
-#endif
-
- /* Disable the 3Dfx splash screen */
- putenv("FX_GLIDE_NO_SPLASH=0");
-
- /* Start the graphics mode and load refresh DLL */
- VID_CheckChanges();
-}
-
-/*
-============
-VID_Shutdown
-============
-*/
-void VID_Shutdown (void)
-{
- if ( reflib_active )
- {
- re.Shutdown ();
- VID_FreeReflib ();
- }
-}
-
-
--- a/win32/vid_menu.c
+++ /dev/null
@@ -1,473 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-#include "../client/client.h"
-#include "../client/qmenu.h"
-
-#define REF_SOFT 0
-#define REF_OPENGL 1
-#define REF_3DFX 2
-#define REF_POWERVR 3
-#define REF_VERITE 4
-
-extern cvar_t *vid_ref;
-extern cvar_t *vid_fullscreen;
-extern cvar_t *vid_gamma;
-extern cvar_t *scr_viewsize;
-
-static cvar_t *gl_mode;
-static cvar_t *gl_driver;
-static cvar_t *gl_picmip;
-static cvar_t *gl_ext_palettedtexture;
-static cvar_t *gl_finish;
-
-static cvar_t *sw_mode;
-static cvar_t *sw_stipplealpha;
-
-extern void M_ForceMenuOff( void );
-
-/*
-====================================================================
-
-MENU INTERACTION
-
-====================================================================
-*/
-#define SOFTWARE_MENU 0
-#define OPENGL_MENU 1
-
-static menuframework_s s_software_menu;
-static menuframework_s s_opengl_menu;
-static menuframework_s *s_current_menu;
-static int s_current_menu_index;
-
-static menulist_s s_mode_list[2];
-static menulist_s s_ref_list[2];
-static menuslider_s s_tq_slider;
-static menuslider_s s_screensize_slider[2];
-static menuslider_s s_brightness_slider[2];
-static menulist_s s_fs_box[2];
-static menulist_s s_stipple_box;
-static menulist_s s_paletted_texture_box;
-static menulist_s s_finish_box;
-static menuaction_s s_cancel_action[2];
-static menuaction_s s_defaults_action[2];
-
-static void DriverCallback( void *unused )
-{
- s_ref_list[!s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue;
-
- if ( s_ref_list[s_current_menu_index].curvalue == 0 )
- {
- s_current_menu = &s_software_menu;
- s_current_menu_index = 0;
- }
- else
- {
- s_current_menu = &s_opengl_menu;
- s_current_menu_index = 1;
- }
-
-}
-
-static void ScreenSizeCallback( void *s )
-{
- menuslider_s *slider = ( menuslider_s * ) s;
-
- Cvar_SetValue( "viewsize", slider->curvalue * 10 );
-}
-
-static void BrightnessCallback( void *s )
-{
- menuslider_s *slider = ( menuslider_s * ) s;
-
- if ( s_current_menu_index == SOFTWARE_MENU )
- s_brightness_slider[1].curvalue = s_brightness_slider[0].curvalue;
- else
- s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue;
-
- if ( stricmp( vid_ref->string, "soft" ) == 0 )
- {
- float gamma = ( 0.8 - ( slider->curvalue/10.0 - 0.5 ) ) + 0.5;
-
- Cvar_SetValue( "vid_gamma", gamma );
- }
-}
-
-static void ResetDefaults( void *unused )
-{
- VID_MenuInit();
-}
-
-static void ApplyChanges( void *unused )
-{
- float gamma;
-
- /*
- ** make values consistent
- */
- s_fs_box[!s_current_menu_index].curvalue = s_fs_box[s_current_menu_index].curvalue;
- s_brightness_slider[!s_current_menu_index].curvalue = s_brightness_slider[s_current_menu_index].curvalue;
- s_ref_list[!s_current_menu_index].curvalue = s_ref_list[s_current_menu_index].curvalue;
-
- /*
- ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3
- */
- gamma = ( 0.8 - ( s_brightness_slider[s_current_menu_index].curvalue/10.0 - 0.5 ) ) + 0.5;
-
- Cvar_SetValue( "vid_gamma", gamma );
- Cvar_SetValue( "sw_stipplealpha", s_stipple_box.curvalue );
- Cvar_SetValue( "gl_picmip", 3 - s_tq_slider.curvalue );
- Cvar_SetValue( "vid_fullscreen", s_fs_box[s_current_menu_index].curvalue );
- Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue );
- Cvar_SetValue( "gl_finish", s_finish_box.curvalue );
- Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue );
- Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue );
-
- switch ( s_ref_list[s_current_menu_index].curvalue )
- {
- case REF_SOFT:
- Cvar_Set( "vid_ref", "soft" );
- break;
- case REF_OPENGL:
- Cvar_Set( "vid_ref", "gl" );
- Cvar_Set( "gl_driver", "opengl32" );
- break;
- case REF_3DFX:
- Cvar_Set( "vid_ref", "gl" );
- Cvar_Set( "gl_driver", "3dfxgl" );
- break;
- case REF_POWERVR:
- Cvar_Set( "vid_ref", "gl" );
- Cvar_Set( "gl_driver", "pvrgl" );
- break;
- case REF_VERITE:
- Cvar_Set( "vid_ref", "gl" );
- Cvar_Set( "gl_driver", "veritegl" );
- break;
- }
-
- /*
- ** update appropriate stuff if we're running OpenGL and gamma
- ** has been modified
- */
- if ( stricmp( vid_ref->string, "gl" ) == 0 )
- {
- if ( vid_gamma->modified )
- {
- vid_ref->modified = true;
- if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 )
- {
- char envbuffer[1024];
- float g;
-
- vid_ref->modified = true;
-
- g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
- Com_sprintf( envbuffer, sizeof(envbuffer), "SSTV2_GAMMA=%f", g );
- putenv( envbuffer );
- Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
- putenv( envbuffer );
-
- vid_gamma->modified = false;
- }
- }
-
- if ( gl_driver->modified )
- vid_ref->modified = true;
- }
-
- M_ForceMenuOff();
-}
-
-static void CancelChanges( void *unused )
-{
- extern void M_PopMenu( void );
-
- M_PopMenu();
-}
-
-/*
-** VID_MenuInit
-*/
-void VID_MenuInit( void )
-{
- static const char *resolutions[] =
- {
- "[320 240 ]",
- "[400 300 ]",
- "[512 384 ]",
- "[640 480 ]",
- "[800 600 ]",
- "[960 720 ]",
- "[1024 768 ]",
- "[1152 864 ]",
- "[1280 960 ]",
- "[1600 1200]",
- 0
- };
- static const char *refs[] =
- {
- "[software ]",
- "[default OpenGL]",
- "[3Dfx OpenGL ]",
- "[PowerVR OpenGL]",
-// "[Rendition OpenGL]",
- 0
- };
- static const char *yesno_names[] =
- {
- "no",
- "yes",
- 0
- };
- int i;
-
- if ( !gl_driver )
- gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
- if ( !gl_picmip )
- gl_picmip = Cvar_Get( "gl_picmip", "0", 0 );
- if ( !gl_mode )
- gl_mode = Cvar_Get( "gl_mode", "3", 0 );
- if ( !sw_mode )
- sw_mode = Cvar_Get( "sw_mode", "0", 0 );
- if ( !gl_ext_palettedtexture )
- gl_ext_palettedtexture = Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE );
- if ( !gl_finish )
- gl_finish = Cvar_Get( "gl_finish", "0", CVAR_ARCHIVE );
-
- if ( !sw_stipplealpha )
- sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE );
-
- s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value;
- s_mode_list[OPENGL_MENU].curvalue = gl_mode->value;
-
- if ( !scr_viewsize )
- scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);
-
- s_screensize_slider[SOFTWARE_MENU].curvalue = scr_viewsize->value/10;
- s_screensize_slider[OPENGL_MENU].curvalue = scr_viewsize->value/10;
-
- if ( strcmp( vid_ref->string, "soft" ) == 0 )
- {
- s_current_menu_index = SOFTWARE_MENU;
- s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFT;
- }
- else if ( strcmp( vid_ref->string, "gl" ) == 0 )
- {
- s_current_menu_index = OPENGL_MENU;
- if ( strcmp( gl_driver->string, "3dfxgl" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_3DFX;
- else if ( strcmp( gl_driver->string, "pvrgl" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_POWERVR;
- else if ( strcmp( gl_driver->string, "opengl32" ) == 0 )
- s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
- else
-// s_ref_list[s_current_menu_index].curvalue = REF_VERITE;
- s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
- }
-
- s_software_menu.x = viddef.width * 0.50;
- s_software_menu.nitems = 0;
- s_opengl_menu.x = viddef.width * 0.50;
- s_opengl_menu.nitems = 0;
-
- for ( i = 0; i < 2; i++ )
- {
- s_ref_list[i].generic.type = MTYPE_SPINCONTROL;
- s_ref_list[i].generic.name = "driver";
- s_ref_list[i].generic.x = 0;
- s_ref_list[i].generic.y = 0;
- s_ref_list[i].generic.callback = DriverCallback;
- s_ref_list[i].itemnames = refs;
-
- s_mode_list[i].generic.type = MTYPE_SPINCONTROL;
- s_mode_list[i].generic.name = "video mode";
- s_mode_list[i].generic.x = 0;
- s_mode_list[i].generic.y = 10;
- s_mode_list[i].itemnames = resolutions;
-
- s_screensize_slider[i].generic.type = MTYPE_SLIDER;
- s_screensize_slider[i].generic.x = 0;
- s_screensize_slider[i].generic.y = 20;
- s_screensize_slider[i].generic.name = "screen size";
- s_screensize_slider[i].minvalue = 3;
- s_screensize_slider[i].maxvalue = 12;
- s_screensize_slider[i].generic.callback = ScreenSizeCallback;
-
- s_brightness_slider[i].generic.type = MTYPE_SLIDER;
- s_brightness_slider[i].generic.x = 0;
- s_brightness_slider[i].generic.y = 30;
- s_brightness_slider[i].generic.name = "brightness";
- s_brightness_slider[i].generic.callback = BrightnessCallback;
- s_brightness_slider[i].minvalue = 5;
- s_brightness_slider[i].maxvalue = 13;
- s_brightness_slider[i].curvalue = ( 1.3 - vid_gamma->value + 0.5 ) * 10;
-
- s_fs_box[i].generic.type = MTYPE_SPINCONTROL;
- s_fs_box[i].generic.x = 0;
- s_fs_box[i].generic.y = 40;
- s_fs_box[i].generic.name = "fullscreen";
- s_fs_box[i].itemnames = yesno_names;
- s_fs_box[i].curvalue = vid_fullscreen->value;
-
- s_defaults_action[i].generic.type = MTYPE_ACTION;
- s_defaults_action[i].generic.name = "reset to defaults";
- s_defaults_action[i].generic.x = 0;
- s_defaults_action[i].generic.y = 90;
- s_defaults_action[i].generic.callback = ResetDefaults;
-
- s_cancel_action[i].generic.type = MTYPE_ACTION;
- s_cancel_action[i].generic.name = "cancel";
- s_cancel_action[i].generic.x = 0;
- s_cancel_action[i].generic.y = 100;
- s_cancel_action[i].generic.callback = CancelChanges;
- }
-
- s_stipple_box.generic.type = MTYPE_SPINCONTROL;
- s_stipple_box.generic.x = 0;
- s_stipple_box.generic.y = 60;
- s_stipple_box.generic.name = "stipple alpha";
- s_stipple_box.curvalue = sw_stipplealpha->value;
- s_stipple_box.itemnames = yesno_names;
-
- s_tq_slider.generic.type = MTYPE_SLIDER;
- s_tq_slider.generic.x = 0;
- s_tq_slider.generic.y = 60;
- s_tq_slider.generic.name = "texture quality";
- s_tq_slider.minvalue = 0;
- s_tq_slider.maxvalue = 3;
- s_tq_slider.curvalue = 3-gl_picmip->value;
-
- s_paletted_texture_box.generic.type = MTYPE_SPINCONTROL;
- s_paletted_texture_box.generic.x = 0;
- s_paletted_texture_box.generic.y = 70;
- s_paletted_texture_box.generic.name = "8-bit textures";
- s_paletted_texture_box.itemnames = yesno_names;
- s_paletted_texture_box.curvalue = gl_ext_palettedtexture->value;
-
- s_finish_box.generic.type = MTYPE_SPINCONTROL;
- s_finish_box.generic.x = 0;
- s_finish_box.generic.y = 80;
- s_finish_box.generic.name = "sync every frame";
- s_finish_box.curvalue = gl_finish->value;
- s_finish_box.itemnames = yesno_names;
-
- Menu_AddItem( &s_software_menu, ( void * ) &s_ref_list[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_mode_list[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_screensize_slider[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_brightness_slider[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_fs_box[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_stipple_box );
-
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_ref_list[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_mode_list[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_screensize_slider[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_brightness_slider[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_fs_box[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_tq_slider );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_paletted_texture_box );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_finish_box );
-
- Menu_AddItem( &s_software_menu, ( void * ) &s_defaults_action[SOFTWARE_MENU] );
- Menu_AddItem( &s_software_menu, ( void * ) &s_cancel_action[SOFTWARE_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_defaults_action[OPENGL_MENU] );
- Menu_AddItem( &s_opengl_menu, ( void * ) &s_cancel_action[OPENGL_MENU] );
-
- Menu_Center( &s_software_menu );
- Menu_Center( &s_opengl_menu );
- s_opengl_menu.x -= 8;
- s_software_menu.x -= 8;
-}
-
-/*
-================
-VID_MenuDraw
-================
-*/
-void VID_MenuDraw (void)
-{
- int w, h;
-
- if ( s_current_menu_index == 0 )
- s_current_menu = &s_software_menu;
- else
- s_current_menu = &s_opengl_menu;
-
- /*
- ** draw the banner
- */
- re.DrawGetPicSize( &w, &h, "m_banner_video" );
- re.DrawPic( viddef.width / 2 - w / 2, viddef.height /2 - 110, "m_banner_video" );
-
- /*
- ** move cursor to a reasonable starting position
- */
- Menu_AdjustCursor( s_current_menu, 1 );
-
- /*
- ** draw the menu
- */
- Menu_Draw( s_current_menu );
-}
-
-/*
-================
-VID_MenuKey
-================
-*/
-const char *VID_MenuKey( int key )
-{
- menuframework_s *m = s_current_menu;
- static const char *sound = "misc/menu1.wav";
-
- switch ( key )
- {
- case K_ESCAPE:
- ApplyChanges( 0 );
- return NULL;
- case K_KP_UPARROW:
- case K_UPARROW:
- m->cursor--;
- Menu_AdjustCursor( m, -1 );
- break;
- case K_KP_DOWNARROW:
- case K_DOWNARROW:
- m->cursor++;
- Menu_AdjustCursor( m, 1 );
- break;
- case K_KP_LEFTARROW:
- case K_LEFTARROW:
- Menu_SlideItem( m, -1 );
- break;
- case K_KP_RIGHTARROW:
- case K_RIGHTARROW:
- Menu_SlideItem( m, 1 );
- break;
- case K_KP_ENTER:
- case K_ENTER:
- if ( !Menu_SelectItem( m ) )
- ApplyChanges( NULL );
- break;
- }
-
- return sound;
-}
-
-
binary files a/win32/winquake.aps /dev/null differ
--- a/win32/winquake.h
+++ /dev/null
@@ -1,44 +1,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program 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.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-// winquake.h: Win32-specific Quake header file
-
-#pragma warning( disable : 4229 ) // mgraph gets this
-
-#include <windows.h>
-
-#include <dsound.h>
-
-#define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE)
-
-extern HINSTANCE global_hInstance;
-
-extern LPDIRECTSOUND pDS;
-extern LPDIRECTSOUNDBUFFER pDSBuf;
-
-extern DWORD gSndBufSize;
-
-extern HWND cl_hwnd;
-extern qboolean ActiveApp, Minimized;
-
-void IN_Activate (qboolean active);
-void IN_MouseEvent (int mstate);
-
-extern int window_center_x, window_center_y;
-extern RECT window_rect;
--- a/win32/winquake.rc
+++ /dev/null
@@ -1,98 +1,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON1 ICON DISCARDABLE "q2.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG1 DIALOGEX 0, 0, 62, 21
-STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
- WS_VISIBLE
-EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
-FONT 16, "Times New Roman", 0, 0, 0x1
-BEGIN
- CTEXT "Starting QW...",IDC_STATIC,4,6,54,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_STRING1 "WinQuake"
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-