mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2025-01-31 04:50:50 +00:00
Update to 3.21-level source code.
This commit is contained in:
parent
596b1e77ce
commit
49ae964011
108 changed files with 6493 additions and 5634 deletions
60
3.19_Changes.txt
Normal file
60
3.19_Changes.txt
Normal file
|
@ -0,0 +1,60 @@
|
|||
Changes since v3.17
|
||||
-------------------
|
||||
|
||||
- Updated VWEP models
|
||||
- Fixed sound config strings getting out of sync on loadgame. This caused
|
||||
the wrong sound to be played.
|
||||
- Fixed a bug in ref_soft that caused the menu system's bottom of screen
|
||||
help text not to be displayed
|
||||
- Added a missing Rogue DM option
|
||||
- "Water surfing" that was present in 3.17 has been fixed (holding jump while
|
||||
on the surface of water let you swim at full speed).
|
||||
- Environment maps (env) are now autodownloaded (if allow_download_maps is set).
|
||||
- Spectator support added. A new cvar is built into the client, "spectator"
|
||||
Setting it to value other than "0" will allow you join a game as a spectator.
|
||||
While in spectator mode, you can press the attack button to enter a chasecam
|
||||
mode and follow other players. Using the inventory keys (by default the
|
||||
left and right square brackets) you can switch between players in the game
|
||||
while using the chasecam.
|
||||
You may enter and leave spectator mode while connected. Doing so resets
|
||||
your score to zero.
|
||||
***The new spectator support requires a new game.dll and may not work for
|
||||
user mods until they update their code. The default game.dll that comes
|
||||
with 3.19 supports chasecam as well as the new included Xatrix game.dll.
|
||||
- Fixed it so that when a model defaults to male/grunt (don't have the
|
||||
necessary model or skin for the player), VWep support is still enabled.
|
||||
- New console command for players, "playerlist". This will cause the server
|
||||
to give you a text list of the players on the server, including their
|
||||
connect time, score, ping and spectator status. This is handy if not
|
||||
everyone fits on the scoreboard on busy servers.
|
||||
- New cvar for the game.dll: spectator_password. If set to a value (other
|
||||
than "none"), users must set their spectator variable to this value in order
|
||||
to join the server as a spectator. This password is independant of the
|
||||
normal user password.
|
||||
- New cvar for the game.dll: maxspectators (defaults to 4). This value is
|
||||
not seperate from maxclients (a spectator is still a client).
|
||||
- New cvar for the game.dll: sv_maplist. This can be set to a list of map
|
||||
names that the server should autorotate through, rather than using the
|
||||
nextmap set in the actual map files themselves.
|
||||
For example: set sv_maplist "base1 q2dm1 q2dm3 fact3" will cause the server
|
||||
to rotate through those maps.
|
||||
***This requires a game.dll update and will not work with user mods until
|
||||
they update their code.
|
||||
- A new facility has been added to ClientConnect() in the game.dll to allow
|
||||
the game.dll to pass a message back to the user for the reason of disallowing
|
||||
a connection. It is done by setting a key of "rejmsg" in the passed userinfo.
|
||||
For example:
|
||||
Info_SetValueforKey(userinfo, "rejmsg", "Password required or incorrect.");
|
||||
- The server cvar, password, may be set to "none" to clear the password. This
|
||||
is needed because rcon can not set a blank password.
|
||||
- New server cvar: sv_airaccelerate. This controls the optional air
|
||||
acceleration facility. The default value is 0, which disables air control.
|
||||
The usual value to replicate the air control seen in the original Quake and
|
||||
later versions of Quakeworld is 10. 10 allows for much more
|
||||
air control (as was seen in 3.15). This value is ignored in single player
|
||||
and coop.
|
||||
- Fixed NoSuchFrame/BAD_MODELTYPE errors when doing a vid_restart while
|
||||
connected.
|
||||
- NoSuchFrame errors now include model name to assist in debugging user mods.
|
||||
- Fixed the remote status query response (ServerInfo) to not include error
|
||||
messages and be more consistent.
|
69
3.20_Changes.txt
Normal file
69
3.20_Changes.txt
Normal file
|
@ -0,0 +1,69 @@
|
|||
3.20 Changes:
|
||||
- Fixed a network problem where and oversize packet could cause a client
|
||||
crash.
|
||||
- Fixed the long standing Quake2 bug of where you would occasionally spawn
|
||||
or teleport and find yourself either looking straight at the ceiling or
|
||||
down at the floor.
|
||||
- Changed it so that the function keys (F1 through F12) now get executed when
|
||||
depressed during demo playback or attract modes. This allows you to take
|
||||
screen shots (F12) during demos and other features. An example of other
|
||||
features is a fast forward for demos:
|
||||
alias +ff "timedemo 1"
|
||||
alias -ff "timedemo 0"
|
||||
bind f7 +ff
|
||||
This binding will cause the current demo playing to zip into timedemo mode
|
||||
while F7 is depressed, effectively acting like a fast forward key.
|
||||
- Wrong packaging of 3.19 patch. The Rogue CD has a 45k pak2 and vwep .md2
|
||||
files in baseq2/players, but the 3.19 x86 patch we released has a 2.7MB
|
||||
pak2. 3.20 has a 45k pak2 and the vwep models go in baseq2/players.
|
||||
- VWep code has been added to Xatrix dll, new VWep models for the Xatrix
|
||||
specific weapons (Ion Ripper and Phalanx) have been included.
|
||||
- Rogue Linux game library was wrong version and had some unlinked symbols,
|
||||
this has been corrected.
|
||||
- Occasional error of: "D_SCAlloc: bad cache width 16384" in software renderer.
|
||||
This had to do with surfaces to SURF_FLOWING and were transparent. This
|
||||
has been fixed in the refs now so flowing transparent textures now works.
|
||||
- [Unix] Net_ErrorToString calls were wrong, was using %i and not %s resulting
|
||||
in random numbers being printed for error messages.
|
||||
- Color shell mixing restored to the same blends as previous versions. This
|
||||
was changed in 3.19 for the new color shells the Rogue mission pack
|
||||
introduced.
|
||||
- Fixed a possible server crash in the new "playerlist" command.
|
||||
- Fixed a case where a person joining a server could be invisible (left over
|
||||
setting of SVF_NOCLIENT from previous spectator).
|
||||
- Invalid pak files no longer cause a crash and are just ignored
|
||||
- Fixed a 3.19 bug where linked models (modelindex2) who's modelindex was
|
||||
greater than 0x7f causes the wrong model to be drawn (in some cases, the
|
||||
world would be drawn twice). This was the cause of many of the "extreme"
|
||||
frame lag people were seeing in 3.19 on servers using old-style VWep code.
|
||||
- Linux: Complete rewrite of the OpenGL library handling. This was needed
|
||||
to cleanly integrate OpenGL extension checking. Linux now supports
|
||||
extensions such as multitexture and better dynamic loading of libraries.
|
||||
It's cleaner now in that you don't have to preload hack stuff to use the
|
||||
3DFX Miniport rather than libMesa3D. The Linux version now uses the
|
||||
gl_driver to specify the 3D library to dynamically load. For example, to
|
||||
use the lib3dfxgl.so miniport, one would now use:
|
||||
./quake2 +set vid_ref gl +set gl_driver lib3dfxgl.so
|
||||
This change fixes several bugs that were apparant in the older method, such
|
||||
as a segfault occasionally when connecting to a server with a different game
|
||||
directory.
|
||||
The vid menu in the Linux version has been changed to reflect the new
|
||||
options, the current list of supported video drivers are now: software,
|
||||
software X11, Mesa 3-D 3DFX, 3DFXGL Miniport, OpenGL glX, and Mesa 3-D glX,
|
||||
- Railgun shots now go through gibs as well as other players.
|
||||
- New server variable, "needpass" that can been seen with server browser
|
||||
tools such as GameSpy. This variable indicates whether a password or
|
||||
spectator password is needed to get onto a server. Bit 0 is password and
|
||||
bit 1 is spectator password.
|
||||
- Quake2 will no longer look for gamex86.dll in the main Quake2 directory.
|
||||
It will always load out of the game directory first.
|
||||
- Players joining a server during an intermission are now moved to the
|
||||
intermission position.
|
||||
- The "logfile" cvar has been extended with the following values:
|
||||
0 - don't log (default)
|
||||
1 - overwrite qconsole.log and use buffered writes
|
||||
2 - overwrite qconsole.log and flush write every line
|
||||
3 - append to existing qconsole.log and flush write every line
|
||||
- Several minor bug fixes to the Rogue mission pack gamex86.dll
|
||||
- Linux: Rebuild of Rogue mission pack shared library to correct some
|
||||
dynamic symbol errors (is NAN errors).
|
80
3.21_Changes.txt
Normal file
80
3.21_Changes.txt
Normal file
|
@ -0,0 +1,80 @@
|
|||
12-22-2001, for source release under GPL licensing:
|
||||
- Tweaked linux/Makefile for easier build
|
||||
added linux/README-3.21-RELEASE
|
||||
|
||||
3.21 Changes:
|
||||
- Support for GL_ARB_multitexture added. This supports the new multitexture
|
||||
extensions and deprecates GL_SGIS_multitexture.
|
||||
- Linux OpenGL X11 handling completely rewritten. Support for XF86DGA Mouse
|
||||
and fullscreen resolution support added. Please see the README file for
|
||||
Linux about the new features of this handling.
|
||||
|
||||
3.20 Changes:
|
||||
- Fixed a network problem where and oversize packet could cause a client
|
||||
crash.
|
||||
- Fixed the long standing Quake2 bug of where you would occasionally spawn
|
||||
or teleport and find yourself either looking straight at the ceiling or
|
||||
down at the floor.
|
||||
- Changed it so that the function keys (F1 through F12) now get executed when
|
||||
depressed during demo playback or attract modes. This allows you to take
|
||||
screen shots (F12) during demos and other features. An example of other
|
||||
features is a fast forward for demos:
|
||||
alias +ff "timedemo 1"
|
||||
alias -ff "timedemo 0"
|
||||
bind f7 +ff
|
||||
This binding will cause the current demo playing to zip into timedemo mode
|
||||
while F7 is depressed, effectively acting like a fast forward key.
|
||||
- Wrong packaging of 3.19 patch. The Rogue CD has a 45k pak2 and vwep .md2
|
||||
files in baseq2/players, but the 3.19 x86 patch we released has a 2.7MB
|
||||
pak2. 3.20 has a 45k pak2 and the vwep models go in baseq2/players.
|
||||
- VWep code has been added to Xatrix dll, new VWep models for the Xatrix
|
||||
specific weapons (Ion Ripper and Phalanx) have been included.
|
||||
- Rogue Linux game library was wrong version and had some unlinked symbols,
|
||||
this has been corrected.
|
||||
- Occasional error of: "D_SCAlloc: bad cache width 16384" in software renderer.
|
||||
This had to do with surfaces to SURF_FLOWING and were transparent. This
|
||||
has been fixed in the refs now so flowing transparent textures now works.
|
||||
- [Unix] Net_ErrorToString calls were wrong, was using %i and not %s resulting
|
||||
in random numbers being printed for error messages.
|
||||
- Color shell mixing restored to the same blends as previous versions. This
|
||||
was changed in 3.19 for the new color shells the Rogue mission pack
|
||||
introduced.
|
||||
- Fixed a possible server crash in the new "playerlist" command.
|
||||
- Fixed a case where a person joining a server could be invisible (left over
|
||||
setting of SVF_NOCLIENT from previous spectator).
|
||||
- Invalid pak files no longer cause a crash and are just ignored
|
||||
- Fixed a 3.19 bug where linked models (modelindex2) who's modelindex was
|
||||
greater than 0x7f causes the wrong model to be drawn (in some cases, the
|
||||
world would be drawn twice). This was the cause of many of the "extreme"
|
||||
frame lag people were seeing in 3.19 on servers using old-style VWep code.
|
||||
- Linux: Complete rewrite of the OpenGL library handling. This was needed
|
||||
to cleanly integrate OpenGL extension checking. Linux now supports
|
||||
extensions such as multitexture and better dynamic loading of libraries.
|
||||
It's cleaner now in that you don't have to preload hack stuff to use the
|
||||
3DFX Miniport rather than libMesa3D. The Linux version now uses the
|
||||
gl_driver to specify the 3D library to dynamically load. For example, to
|
||||
use the lib3dfxgl.so miniport, one would now use:
|
||||
./quake2 +set vid_ref gl +set gl_driver lib3dfxgl.so
|
||||
This change fixes several bugs that were apparant in the older method, such
|
||||
as a segfault occasionally when connecting to a server with a different game
|
||||
directory.
|
||||
The vid menu in the Linux version has been changed to reflect the new
|
||||
options, the current list of supported video drivers are now: software,
|
||||
software X11, Mesa 3-D 3DFX, 3DFXGL Miniport, OpenGL glX, and Mesa 3-D glX,
|
||||
- Railgun shots now go through gibs as well as other players.
|
||||
- New server variable, "needpass" that can been seen with server browser
|
||||
tools such as GameSpy. This variable indicates whether a password or
|
||||
spectator password is needed to get onto a server. Bit 0 is password and
|
||||
bit 1 is spectator password.
|
||||
- Quake2 will no longer look for gamex86.dll in the main Quake2 directory.
|
||||
It will always load out of the game directory first.
|
||||
- Players joining a server during an intermission are now moved to the
|
||||
intermission position.
|
||||
- The "logfile" cvar has been extended with the following values:
|
||||
0 - don't log (default)
|
||||
1 - overwrite qconsole.log and use buffered writes
|
||||
2 - overwrite qconsole.log and flush write every line
|
||||
3 - append to existing qconsole.log and flush write every line
|
||||
- Several minor bug fixes to the Rogue mission pack gamex86.dll
|
||||
- Linux: Rebuild of Rogue mission pack shared library to correct some
|
||||
dynamic symbol errors (is NAN errors).
|
|
@ -825,6 +825,9 @@ struct model_s *S_RegisterSexedModel (entity_state_t *ent, char *base)
|
|||
return mdl;
|
||||
}
|
||||
|
||||
// PMM - used in shell code
|
||||
extern int Developer_searchpath (int who);
|
||||
// pmm
|
||||
/*
|
||||
===============
|
||||
CL_AddPacketEntities
|
||||
|
@ -1068,9 +1071,48 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
// add to refresh list
|
||||
V_AddEntity (&ent);
|
||||
|
||||
|
||||
// color shells generate a seperate entity for the main model
|
||||
if (effects & EF_COLOR_SHELL)
|
||||
{
|
||||
// PMM - at this point, all of the shells have been handled
|
||||
// if we're in the rogue pack, set up the custom mixing, otherwise just
|
||||
// keep going
|
||||
// if(Developer_searchpath(2) == 2)
|
||||
// {
|
||||
// all of the solo colors are fine. we need to catch any of the combinations that look bad
|
||||
// (double & half) and turn them into the appropriate color, and make double/quad something special
|
||||
if (renderfx & RF_SHELL_HALF_DAM)
|
||||
{
|
||||
if(Developer_searchpath(2) == 2)
|
||||
{
|
||||
// ditch the half damage shell if any of red, blue, or double are on
|
||||
if (renderfx & (RF_SHELL_RED|RF_SHELL_BLUE|RF_SHELL_DOUBLE))
|
||||
renderfx &= ~RF_SHELL_HALF_DAM;
|
||||
}
|
||||
}
|
||||
|
||||
if (renderfx & RF_SHELL_DOUBLE)
|
||||
{
|
||||
if(Developer_searchpath(2) == 2)
|
||||
{
|
||||
// lose the yellow shell if we have a red, blue, or green shell
|
||||
if (renderfx & (RF_SHELL_RED|RF_SHELL_BLUE|RF_SHELL_GREEN))
|
||||
renderfx &= ~RF_SHELL_DOUBLE;
|
||||
// if we have a red shell, turn it to purple by adding blue
|
||||
if (renderfx & RF_SHELL_RED)
|
||||
renderfx |= RF_SHELL_BLUE;
|
||||
// if we have a blue shell (and not a red shell), turn it to cyan by adding green
|
||||
else if (renderfx & RF_SHELL_BLUE)
|
||||
// go to green if it's on already, otherwise do cyan (flash green)
|
||||
if (renderfx & RF_SHELL_GREEN)
|
||||
renderfx &= ~RF_SHELL_BLUE;
|
||||
else
|
||||
renderfx |= RF_SHELL_GREEN;
|
||||
}
|
||||
}
|
||||
// }
|
||||
// pmm
|
||||
ent.flags = renderfx | RF_TRANSLUCENT;
|
||||
ent.alpha = 0.30;
|
||||
V_AddEntity (&ent);
|
||||
|
@ -1098,17 +1140,18 @@ void CL_AddPacketEntities (frame_t *frame)
|
|||
ent.model = cl.baseclientinfo.weaponmodel[0];
|
||||
}
|
||||
}
|
||||
//PGM - hack to allow translucent linked models (defender sphere's shell)
|
||||
// set the high bit 0x80 on modelindex2 to enable translucency
|
||||
else if(s1->modelindex2 & 0x80)
|
||||
else
|
||||
ent.model = cl.model_draw[s1->modelindex2];
|
||||
|
||||
// PMM - check for the defender sphere shell .. make it translucent
|
||||
// replaces the previous version which used the high bit on modelindex2 to determine transparency
|
||||
if (!Q_strcasecmp (cl.configstrings[CS_MODELS+(s1->modelindex2)], "models/items/shell/tris.md2"))
|
||||
{
|
||||
ent.model = cl.model_draw[s1->modelindex2 & 0x7F];
|
||||
ent.alpha = 0.32;
|
||||
ent.flags = RF_TRANSLUCENT;
|
||||
}
|
||||
//PGM
|
||||
else
|
||||
ent.model = cl.model_draw[s1->modelindex2];
|
||||
// pmm
|
||||
|
||||
V_AddEntity (&ent);
|
||||
|
||||
//PGM - make sure these get reset.
|
||||
|
|
|
@ -316,6 +316,12 @@ void CL_ClampPitch (void)
|
|||
pitch = SHORT2ANGLE(cl.frame.playerstate.pmove.delta_angles[PITCH]);
|
||||
if (pitch > 180)
|
||||
pitch -= 360;
|
||||
|
||||
if (cl.viewangles[PITCH] + pitch < -360)
|
||||
cl.viewangles[PITCH] += 360; // wrapped
|
||||
if (cl.viewangles[PITCH] + pitch > 360)
|
||||
cl.viewangles[PITCH] -= 360; // wrapped
|
||||
|
||||
if (cl.viewangles[PITCH] + pitch > 89)
|
||||
cl.viewangles[PITCH] = 89 - pitch;
|
||||
if (cl.viewangles[PITCH] + pitch < -89)
|
||||
|
|
|
@ -520,11 +520,16 @@ void CL_ParseConfigString (void)
|
|||
{
|
||||
int i;
|
||||
char *s;
|
||||
char olds[MAX_QPATH];
|
||||
|
||||
i = MSG_ReadShort (&net_message);
|
||||
if (i < 0 || i >= MAX_CONFIGSTRINGS)
|
||||
Com_Error (ERR_DROP, "configstring > MAX_CONFIGSTRINGS");
|
||||
s = MSG_ReadString(&net_message);
|
||||
|
||||
strncpy (olds, cl.configstrings[i], sizeof(olds));
|
||||
olds[sizeof(olds) - 1] = 0;
|
||||
|
||||
strcpy (cl.configstrings[i], s);
|
||||
|
||||
// do something apropriate
|
||||
|
@ -559,7 +564,7 @@ void CL_ParseConfigString (void)
|
|||
}
|
||||
else if (i >= CS_PLAYERSKINS && i < CS_PLAYERSKINS+MAX_CLIENTS)
|
||||
{
|
||||
if (cl.refresh_prepped)
|
||||
if (cl.refresh_prepped && strcmp(olds, s))
|
||||
CL_ParseClientinfo (i-CS_PLAYERSKINS);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,9 +158,9 @@ void CL_RegisterTEntSounds (void)
|
|||
cl_sfx_lightning = S_RegisterSound ("weapons/tesla.wav");
|
||||
cl_sfx_disrexp = S_RegisterSound ("weapons/disrupthit.wav");
|
||||
// version stuff
|
||||
sprintf (name, "weapons/sound%d.wav", ROGUE_VERSION_ID);
|
||||
if (name[0] == 'w')
|
||||
name[0] = 'W';
|
||||
// sprintf (name, "weapons/sound%d.wav", ROGUE_VERSION_ID);
|
||||
// if (name[0] == 'w')
|
||||
// name[0] = 'W';
|
||||
//PGM
|
||||
}
|
||||
|
||||
|
|
|
@ -784,7 +784,8 @@ void Key_Event (int key, qboolean down, unsigned time)
|
|||
}
|
||||
|
||||
// any key during the attract mode will bring up the menu
|
||||
if (cl.attractloop && cls.key_dest != key_menu)
|
||||
if (cl.attractloop && cls.key_dest != key_menu &&
|
||||
!(key >= K_F1 && key <= K_F12))
|
||||
key = K_ESCAPE;
|
||||
|
||||
// menu key is hardcoded, so the user can never unbind it
|
||||
|
|
|
@ -1115,24 +1115,17 @@ static void ControlsResetDefaultsFunc( void *unused )
|
|||
|
||||
static void InvertMouseFunc( void *unused )
|
||||
{
|
||||
if ( s_options_invertmouse_box.curvalue == 0 )
|
||||
{
|
||||
Cvar_SetValue( "m_pitch", fabs( m_pitch->value ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvar_SetValue( "m_pitch", -fabs( m_pitch->value ) );
|
||||
}
|
||||
Cvar_SetValue( "m_pitch", -m_pitch->value );
|
||||
}
|
||||
|
||||
static void LookspringFunc( void *unused )
|
||||
{
|
||||
Cvar_SetValue( "lookspring", s_options_lookspring_box.curvalue );
|
||||
Cvar_SetValue( "lookspring", !lookspring->value );
|
||||
}
|
||||
|
||||
static void LookstrafeFunc( void *unused )
|
||||
{
|
||||
Cvar_SetValue( "lookstrafe", s_options_lookstrafe_box.curvalue );
|
||||
Cvar_SetValue( "lookstrafe", !lookstrafe->value );
|
||||
}
|
||||
|
||||
static void UpdateVolumeFunc( void *unused )
|
||||
|
|
|
@ -17,6 +17,8 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#ifndef __REF_H
|
||||
#define __REF_H
|
||||
|
||||
#include "../qcommon/qcommon.h"
|
||||
|
||||
|
@ -222,3 +224,5 @@ typedef struct
|
|||
|
||||
// this is the only function actually exported at the linker level
|
||||
typedef refexport_t (*GetRefAPI_t) (refimport_t);
|
||||
|
||||
#endif // __REF_H
|
||||
|
|
|
@ -378,8 +378,10 @@ void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset)
|
|||
if (ch->rightvol > 255)
|
||||
ch->rightvol = 255;
|
||||
|
||||
lscale = snd_scaletable[ ch->leftvol >> 11];
|
||||
rscale = snd_scaletable[ ch->rightvol >> 11];
|
||||
//ZOID-- >>11 has been changed to >>3, >>11 didn't make much sense
|
||||
//as it would always be zero.
|
||||
lscale = snd_scaletable[ ch->leftvol >> 3];
|
||||
rscale = snd_scaletable[ ch->rightvol >> 3];
|
||||
sfx = (signed char *)sc->data + ch->pos;
|
||||
|
||||
samp = &paintbuffer[offset];
|
||||
|
|
|
@ -26,8 +26,7 @@ typedef struct vrect_s
|
|||
|
||||
typedef struct
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
unsigned int width, height; // coordinates from main game
|
||||
} viddef_t;
|
||||
|
||||
extern viddef_t viddef; // global video state
|
||||
|
|
279
ctf/g_ctf.c
279
ctf/g_ctf.c
|
@ -45,6 +45,7 @@ typedef struct ctfgame_s
|
|||
match_t match; // match state
|
||||
float matchtime; // time for match start/end (depends on state)
|
||||
int lasttime; // last time update
|
||||
qboolean countdown; // has audio countdown started?
|
||||
|
||||
elect_t election; // election type
|
||||
edict_t *etarget; // for admin election, who's being elected
|
||||
|
@ -53,6 +54,7 @@ typedef struct ctfgame_s
|
|||
int needvotes; // votes needed
|
||||
float electtime; // remaining time until election times out
|
||||
char emsg[256]; // election name
|
||||
int warnactive; // true if stat string 30 is active
|
||||
|
||||
|
||||
ghost_t ghosts[MAX_CLIENTS]; // ghost codes
|
||||
|
@ -70,7 +72,25 @@ cvar_t *matchtime;
|
|||
cvar_t *matchsetuptime;
|
||||
cvar_t *matchstarttime;
|
||||
cvar_t *admin_password;
|
||||
cvar_t *allow_admin;
|
||||
cvar_t *warp_list;
|
||||
cvar_t *warn_unbalanced;
|
||||
|
||||
// Index for various CTF pics, this saves us from calling gi.imageindex
|
||||
// all the time and saves a few CPU cycles since we don't have to do
|
||||
// a bunch of string compares all the time.
|
||||
// These are set in CTFPrecache() called from worldspawn
|
||||
int imageindex_i_ctf1;
|
||||
int imageindex_i_ctf2;
|
||||
int imageindex_i_ctf1d;
|
||||
int imageindex_i_ctf2d;
|
||||
int imageindex_i_ctf1t;
|
||||
int imageindex_i_ctf2t;
|
||||
int imageindex_i_ctfj;
|
||||
int imageindex_sbfctf1;
|
||||
int imageindex_sbfctf2;
|
||||
int imageindex_ctfsb1;
|
||||
int imageindex_ctfsb2;
|
||||
|
||||
char *ctf_statusbar =
|
||||
"yb -24 "
|
||||
|
@ -179,18 +199,28 @@ char *ctf_statusbar =
|
|||
|
||||
// id view state
|
||||
"if 27 "
|
||||
"xv 0 "
|
||||
"xv 112 "
|
||||
"yb -58 "
|
||||
"string \"Viewing\" "
|
||||
"xv 64 "
|
||||
"stat_string 27 "
|
||||
"endif "
|
||||
|
||||
"if 29 "
|
||||
"xv 96 "
|
||||
"yb -58 "
|
||||
"pic 29 "
|
||||
"endif "
|
||||
|
||||
"if 28 "
|
||||
"xl 0 "
|
||||
"yb -78 "
|
||||
"stat_string 28 "
|
||||
"endif "
|
||||
|
||||
"if 30 "
|
||||
"xl 0 "
|
||||
"yb -88 "
|
||||
"stat_string 30 "
|
||||
"endif "
|
||||
;
|
||||
|
||||
static char *tnames[] = {
|
||||
|
@ -319,7 +349,28 @@ void CTFInit(void)
|
|||
matchsetuptime = gi.cvar("matchsetuptime", "10", 0);
|
||||
matchstarttime = gi.cvar("matchstarttime", "20", 0);
|
||||
admin_password = gi.cvar("admin_password", "", 0);
|
||||
allow_admin = gi.cvar("allow_admin", "1", 0);
|
||||
warp_list = gi.cvar("warp_list", "q2ctf1 q2ctf2 q2ctf3 q2ctf4 q2ctf5", 0);
|
||||
warn_unbalanced = gi.cvar("warn_unbalanced", "1", 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Precache CTF items
|
||||
*/
|
||||
|
||||
void CTFPrecache(void)
|
||||
{
|
||||
imageindex_i_ctf1 = gi.imageindex("i_ctf1");
|
||||
imageindex_i_ctf2 = gi.imageindex("i_ctf2");
|
||||
imageindex_i_ctf1d = gi.imageindex("i_ctf1d");
|
||||
imageindex_i_ctf2d = gi.imageindex("i_ctf2d");
|
||||
imageindex_i_ctf1t = gi.imageindex("i_ctf1t");
|
||||
imageindex_i_ctf2t = gi.imageindex("i_ctf2t");
|
||||
imageindex_i_ctfj = gi.imageindex("i_ctfj");
|
||||
imageindex_sbfctf1 = gi.imageindex("sbfctf1");
|
||||
imageindex_sbfctf2 = gi.imageindex("sbfctf2");
|
||||
imageindex_ctfsb1 = gi.imageindex("ctfsb1");
|
||||
imageindex_ctfsb2 = gi.imageindex("ctfsb2");
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
@ -332,7 +383,7 @@ char *CTFTeamName(int team)
|
|||
case CTF_TEAM2:
|
||||
return "BLUE";
|
||||
}
|
||||
return "UKNOWN";
|
||||
return "UNKNOWN"; // Hanzo pointed out this was spelled wrong as "UKNOWN"
|
||||
}
|
||||
|
||||
char *CTFOtherTeamName(int team)
|
||||
|
@ -343,7 +394,7 @@ char *CTFOtherTeamName(int team)
|
|||
case CTF_TEAM2:
|
||||
return "RED";
|
||||
}
|
||||
return "UKNOWN";
|
||||
return "UNKNOWN"; // Hanzo pointed out this was spelled wrong as "UKNOWN"
|
||||
}
|
||||
|
||||
int CTFOtherTeam(int team)
|
||||
|
@ -371,7 +422,7 @@ void CTFAssignSkin(edict_t *ent, char *s)
|
|||
|
||||
Com_sprintf(t, sizeof(t), "%s", s);
|
||||
|
||||
if ((p = strrchr(t, '/')) != NULL)
|
||||
if ((p = strchr(t, '/')) != NULL)
|
||||
p[1] = 0;
|
||||
else
|
||||
strcpy(t, "male/");
|
||||
|
@ -982,7 +1033,13 @@ static void CTFSetIDView(edict_t *ent)
|
|||
float bd = 0, d;
|
||||
int i;
|
||||
|
||||
// only check every few frames
|
||||
if (level.time - ent->client->resp.lastidtime < 0.25)
|
||||
return;
|
||||
ent->client->resp.lastidtime = level.time;
|
||||
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW] = 0;
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW_COLOR] = 0;
|
||||
|
||||
AngleVectors(ent->client->v_angle, forward, NULL, NULL);
|
||||
VectorScale(forward, 1024, forward);
|
||||
|
@ -990,7 +1047,11 @@ static void CTFSetIDView(edict_t *ent)
|
|||
tr = gi.trace(ent->s.origin, NULL, NULL, forward, ent, MASK_SOLID);
|
||||
if (tr.fraction < 1 && tr.ent && tr.ent->client) {
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW] =
|
||||
CS_PLAYERSKINS + (ent - g_edicts - 1);
|
||||
CS_GENERAL + (tr.ent - g_edicts - 1);
|
||||
if (tr.ent->client->resp.ctf_team == CTF_TEAM1)
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW_COLOR] = imageindex_sbfctf1;
|
||||
else if (tr.ent->client->resp.ctf_team == CTF_TEAM2)
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW_COLOR] = imageindex_sbfctf2;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1008,9 +1069,14 @@ static void CTFSetIDView(edict_t *ent)
|
|||
best = who;
|
||||
}
|
||||
}
|
||||
if (bd > 0.90)
|
||||
if (bd > 0.90) {
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW] =
|
||||
CS_PLAYERSKINS + (best - g_edicts - 1);
|
||||
CS_GENERAL + (best - g_edicts - 1);
|
||||
if (best->client->resp.ctf_team == CTF_TEAM1)
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW_COLOR] = imageindex_sbfctf1;
|
||||
else if (best->client->resp.ctf_team == CTF_TEAM2)
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW_COLOR] = imageindex_sbfctf2;
|
||||
}
|
||||
}
|
||||
|
||||
void SetCTFStats(edict_t *ent)
|
||||
|
@ -1025,6 +1091,11 @@ void SetCTFStats(edict_t *ent)
|
|||
else
|
||||
ent->client->ps.stats[STAT_CTF_MATCH] = 0;
|
||||
|
||||
if (ctfgame.warnactive)
|
||||
ent->client->ps.stats[STAT_CTF_TEAMINFO] = CONFIG_CTF_TEAMINFO;
|
||||
else
|
||||
ent->client->ps.stats[STAT_CTF_TEAMINFO] = 0;
|
||||
|
||||
//ghosting
|
||||
if (ent->client->resp.ghost) {
|
||||
ent->client->resp.ghost->score = ent->client->resp.score;
|
||||
|
@ -1033,8 +1104,8 @@ void SetCTFStats(edict_t *ent)
|
|||
}
|
||||
|
||||
// logo headers for the frag display
|
||||
ent->client->ps.stats[STAT_CTF_TEAM1_HEADER] = gi.imageindex ("ctfsb1");
|
||||
ent->client->ps.stats[STAT_CTF_TEAM2_HEADER] = gi.imageindex ("ctfsb2");
|
||||
ent->client->ps.stats[STAT_CTF_TEAM1_HEADER] = imageindex_ctfsb1;
|
||||
ent->client->ps.stats[STAT_CTF_TEAM2_HEADER] = imageindex_ctfsb2;
|
||||
|
||||
// if during intermission, we must blink the team header of the winning team
|
||||
if (level.intermissiontime && (level.framenum & 8)) { // blink 1/8th second
|
||||
|
@ -1070,7 +1141,7 @@ void SetCTFStats(edict_t *ent)
|
|||
// flag at base
|
||||
// flag taken
|
||||
// flag dropped
|
||||
p1 = gi.imageindex ("i_ctf1");
|
||||
p1 = imageindex_i_ctf1;
|
||||
e = G_Find(NULL, FOFS(classname), "item_flag_team1");
|
||||
if (e != NULL) {
|
||||
if (e->solid == SOLID_NOT) {
|
||||
|
@ -1078,18 +1149,18 @@ void SetCTFStats(edict_t *ent)
|
|||
|
||||
// not at base
|
||||
// check if on player
|
||||
p1 = gi.imageindex ("i_ctf1d"); // default to dropped
|
||||
p1 = imageindex_i_ctf1d; // default to dropped
|
||||
for (i = 1; i <= maxclients->value; i++)
|
||||
if (g_edicts[i].inuse &&
|
||||
g_edicts[i].client->pers.inventory[ITEM_INDEX(flag1_item)]) {
|
||||
// enemy has it
|
||||
p1 = gi.imageindex ("i_ctf1t");
|
||||
p1 = imageindex_i_ctf1t;
|
||||
break;
|
||||
}
|
||||
} else if (e->spawnflags & DROPPED_ITEM)
|
||||
p1 = gi.imageindex ("i_ctf1d"); // must be dropped
|
||||
p1 = imageindex_i_ctf1d; // must be dropped
|
||||
}
|
||||
p2 = gi.imageindex ("i_ctf2");
|
||||
p2 = imageindex_i_ctf2;
|
||||
e = G_Find(NULL, FOFS(classname), "item_flag_team2");
|
||||
if (e != NULL) {
|
||||
if (e->solid == SOLID_NOT) {
|
||||
|
@ -1097,16 +1168,16 @@ void SetCTFStats(edict_t *ent)
|
|||
|
||||
// not at base
|
||||
// check if on player
|
||||
p2 = gi.imageindex ("i_ctf2d"); // default to dropped
|
||||
p2 = imageindex_i_ctf2d; // default to dropped
|
||||
for (i = 1; i <= maxclients->value; i++)
|
||||
if (g_edicts[i].inuse &&
|
||||
g_edicts[i].client->pers.inventory[ITEM_INDEX(flag2_item)]) {
|
||||
// enemy has it
|
||||
p2 = gi.imageindex ("i_ctf2t");
|
||||
p2 = imageindex_i_ctf2t;
|
||||
break;
|
||||
}
|
||||
} else if (e->spawnflags & DROPPED_ITEM)
|
||||
p2 = gi.imageindex ("i_ctf2d"); // must be dropped
|
||||
p2 = imageindex_i_ctf2d; // must be dropped
|
||||
}
|
||||
|
||||
|
||||
|
@ -1133,23 +1204,26 @@ void SetCTFStats(edict_t *ent)
|
|||
if (ent->client->resp.ctf_team == CTF_TEAM1 &&
|
||||
ent->client->pers.inventory[ITEM_INDEX(flag2_item)] &&
|
||||
(level.framenum & 8))
|
||||
ent->client->ps.stats[STAT_CTF_FLAG_PIC] = gi.imageindex ("i_ctf2");
|
||||
ent->client->ps.stats[STAT_CTF_FLAG_PIC] = imageindex_i_ctf2;
|
||||
|
||||
else if (ent->client->resp.ctf_team == CTF_TEAM2 &&
|
||||
ent->client->pers.inventory[ITEM_INDEX(flag1_item)] &&
|
||||
(level.framenum & 8))
|
||||
ent->client->ps.stats[STAT_CTF_FLAG_PIC] = gi.imageindex ("i_ctf1");
|
||||
ent->client->ps.stats[STAT_CTF_FLAG_PIC] = imageindex_i_ctf1;
|
||||
|
||||
ent->client->ps.stats[STAT_CTF_JOINED_TEAM1_PIC] = 0;
|
||||
ent->client->ps.stats[STAT_CTF_JOINED_TEAM2_PIC] = 0;
|
||||
if (ent->client->resp.ctf_team == CTF_TEAM1)
|
||||
ent->client->ps.stats[STAT_CTF_JOINED_TEAM1_PIC] = gi.imageindex ("i_ctfj");
|
||||
ent->client->ps.stats[STAT_CTF_JOINED_TEAM1_PIC] = imageindex_i_ctfj;
|
||||
else if (ent->client->resp.ctf_team == CTF_TEAM2)
|
||||
ent->client->ps.stats[STAT_CTF_JOINED_TEAM2_PIC] = gi.imageindex ("i_ctfj");
|
||||
ent->client->ps.stats[STAT_CTF_JOINED_TEAM2_PIC] = imageindex_i_ctfj;
|
||||
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW] = 0;
|
||||
if (ent->client->resp.id_state)
|
||||
CTFSetIDView(ent);
|
||||
else {
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW] = 0;
|
||||
ent->client->ps.stats[STAT_CTF_ID_VIEW_COLOR] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
@ -2385,8 +2459,8 @@ static void CTFSay_Team_Sight(edict_t *who, char *buf)
|
|||
|
||||
void CTFSay_Team(edict_t *who, char *msg)
|
||||
{
|
||||
char outmsg[1024];
|
||||
char buf[1024];
|
||||
char outmsg[256];
|
||||
char buf[256];
|
||||
int i;
|
||||
char *p;
|
||||
edict_t *cl_ent;
|
||||
|
@ -2401,45 +2475,57 @@ void CTFSay_Team(edict_t *who, char *msg)
|
|||
msg++;
|
||||
}
|
||||
|
||||
for (p = outmsg; *msg && (p - outmsg) < sizeof(outmsg) - 1; msg++) {
|
||||
for (p = outmsg; *msg && (p - outmsg) < sizeof(outmsg) - 2; msg++) {
|
||||
if (*msg == '%') {
|
||||
switch (*++msg) {
|
||||
case 'l' :
|
||||
case 'L' :
|
||||
CTFSay_Team_Location(who, buf);
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
if (strlen(buf) + (p - outmsg) < sizeof(outmsg) - 2) {
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
}
|
||||
break;
|
||||
case 'a' :
|
||||
case 'A' :
|
||||
CTFSay_Team_Armor(who, buf);
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
if (strlen(buf) + (p - outmsg) < sizeof(outmsg) - 2) {
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
}
|
||||
break;
|
||||
case 'h' :
|
||||
case 'H' :
|
||||
CTFSay_Team_Health(who, buf);
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
if (strlen(buf) + (p - outmsg) < sizeof(outmsg) - 2) {
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
}
|
||||
break;
|
||||
case 't' :
|
||||
case 'T' :
|
||||
CTFSay_Team_Tech(who, buf);
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
if (strlen(buf) + (p - outmsg) < sizeof(outmsg) - 2) {
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
}
|
||||
break;
|
||||
case 'w' :
|
||||
case 'W' :
|
||||
CTFSay_Team_Weapon(who, buf);
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
if (strlen(buf) + (p - outmsg) < sizeof(outmsg) - 2) {
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'n' :
|
||||
case 'N' :
|
||||
CTFSay_Team_Sight(who, buf);
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
if (strlen(buf) + (p - outmsg) < sizeof(outmsg) - 2) {
|
||||
strcpy(p, buf);
|
||||
p += strlen(buf);
|
||||
}
|
||||
break;
|
||||
|
||||
default :
|
||||
|
@ -2653,6 +2739,7 @@ void CTFStartMatch(void)
|
|||
|
||||
ctfgame.match = MATCH_GAME;
|
||||
ctfgame.matchtime = level.time + matchtime->value * 60;
|
||||
ctfgame.countdown = false;
|
||||
|
||||
ctfgame.team1 = ctfgame.team2 = 0;
|
||||
|
||||
|
@ -2847,6 +2934,8 @@ void CTFReady(edict_t *ent)
|
|||
gi.bprintf(PRINT_CHAT, "All players have commited. Match starting\n");
|
||||
ctfgame.match = MATCH_PREGAME;
|
||||
ctfgame.matchtime = level.time + matchstarttime->value;
|
||||
ctfgame.countdown = false;
|
||||
gi.positioned_sound (world->s.origin, world, CHAN_AUTO | CHAN_RELIABLE, gi.soundindex("misc/talk1.wav"), 1, ATTN_NONE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3054,6 +3143,7 @@ void CTFChaseCam(edict_t *ent, pmenuhnd_t *p)
|
|||
|
||||
if (ent->client->chase_target) {
|
||||
ent->client->chase_target = NULL;
|
||||
ent->client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
|
||||
PMenu_Close(ent);
|
||||
return;
|
||||
}
|
||||
|
@ -3238,22 +3328,25 @@ qboolean CTFStartClient(edict_t *ent)
|
|||
|
||||
void CTFObserver(edict_t *ent)
|
||||
{
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
|
||||
// start as 'observer'
|
||||
if (ent->movetype == MOVETYPE_NOCLIP) {
|
||||
gi.cprintf(ent, PRINT_HIGH, "You are already an observer.\n");
|
||||
return;
|
||||
}
|
||||
if (ent->movetype == MOVETYPE_NOCLIP)
|
||||
|
||||
CTFPlayerResetGrapple(ent);
|
||||
CTFDeadDropFlag(ent);
|
||||
CTFDeadDropTech(ent);
|
||||
|
||||
ent->deadflag = DEAD_NO;
|
||||
ent->movetype = MOVETYPE_NOCLIP;
|
||||
ent->solid = SOLID_NOT;
|
||||
ent->svflags |= SVF_NOCLIENT;
|
||||
ent->client->resp.ctf_team = CTF_NOTEAM;
|
||||
ent->client->ps.gunindex = 0;
|
||||
ent->client->resp.score = 0;
|
||||
memcpy (userinfo, ent->client->pers.userinfo, sizeof(userinfo));
|
||||
InitClientPersistant(ent->client);
|
||||
ClientUserinfoChanged (ent, userinfo);
|
||||
gi.linkentity (ent);
|
||||
CTFOpenJoinMenu(ent);
|
||||
}
|
||||
|
@ -3280,6 +3373,9 @@ qboolean CTFCheckRules(void)
|
|||
if (ctfgame.match != MATCH_NONE) {
|
||||
t = ctfgame.matchtime - level.time;
|
||||
|
||||
// no team warnings in match mode
|
||||
ctfgame.warnactive = 0;
|
||||
|
||||
if (t <= 0) { // time ended on something
|
||||
switch (ctfgame.match) {
|
||||
case MATCH_SETUP :
|
||||
|
@ -3297,11 +3393,13 @@ qboolean CTFCheckRules(void)
|
|||
case MATCH_PREGAME :
|
||||
// match started!
|
||||
CTFStartMatch();
|
||||
gi.positioned_sound (world->s.origin, world, CHAN_AUTO | CHAN_RELIABLE, gi.soundindex("misc/tele_up.wav"), 1, ATTN_NONE, 0);
|
||||
return false;
|
||||
|
||||
case MATCH_GAME :
|
||||
// match ended!
|
||||
CTFEndMatch();
|
||||
gi.positioned_sound (world->s.origin, world, CHAN_AUTO | CHAN_RELIABLE, gi.soundindex("misc/bigtele.wav"), 1, ATTN_NONE, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3336,17 +3434,64 @@ qboolean CTFCheckRules(void)
|
|||
sprintf(text, "%02d:%02d UNTIL START",
|
||||
t / 60, t % 60);
|
||||
gi.configstring (CONFIG_CTF_MATCH, text);
|
||||
|
||||
if (t <= 10 && !ctfgame.countdown) {
|
||||
ctfgame.countdown = true;
|
||||
gi.positioned_sound (world->s.origin, world, CHAN_AUTO | CHAN_RELIABLE, gi.soundindex("world/10_0.wav"), 1, ATTN_NONE, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case MATCH_GAME:
|
||||
sprintf(text, "%02d:%02d MATCH",
|
||||
t / 60, t % 60);
|
||||
gi.configstring (CONFIG_CTF_MATCH, text);
|
||||
if (t <= 10 && !ctfgame.countdown) {
|
||||
ctfgame.countdown = true;
|
||||
gi.positioned_sound (world->s.origin, world, CHAN_AUTO | CHAN_RELIABLE, gi.soundindex("world/10_0.wav"), 1, ATTN_NONE, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
||||
} else {
|
||||
int team1 = 0, team2 = 0;
|
||||
|
||||
if (level.time == ctfgame.lasttime)
|
||||
return false;
|
||||
ctfgame.lasttime = level.time;
|
||||
// this is only done in non-match (public) mode
|
||||
|
||||
if (warn_unbalanced->value) {
|
||||
// count up the team totals
|
||||
for (i = 1; i <= maxclients->value; i++) {
|
||||
ent = g_edicts + i;
|
||||
if (!ent->inuse)
|
||||
continue;
|
||||
if (ent->client->resp.ctf_team == CTF_TEAM1)
|
||||
team1++;
|
||||
else if (ent->client->resp.ctf_team == CTF_TEAM2)
|
||||
team2++;
|
||||
}
|
||||
|
||||
if (team1 - team2 >= 2 && team2 >= 2) {
|
||||
if (ctfgame.warnactive != CTF_TEAM1) {
|
||||
ctfgame.warnactive = CTF_TEAM1;
|
||||
gi.configstring (CONFIG_CTF_TEAMINFO, "WARNING: Red has too many players");
|
||||
}
|
||||
} else if (team2 - team1 >= 2 && team1 >= 2) {
|
||||
if (ctfgame.warnactive != CTF_TEAM2) {
|
||||
ctfgame.warnactive = CTF_TEAM2;
|
||||
gi.configstring (CONFIG_CTF_TEAMINFO, "WARNING: Blue has too many players");
|
||||
}
|
||||
} else
|
||||
ctfgame.warnactive = 0;
|
||||
} else
|
||||
ctfgame.warnactive = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (capturelimit->value &&
|
||||
(ctfgame.team1 >= capturelimit->value ||
|
||||
ctfgame.team2 >= capturelimit->value)) {
|
||||
|
@ -3736,6 +3881,8 @@ void CTFAdmin_MatchSet(edict_t *ent, pmenuhnd_t *p)
|
|||
gi.bprintf(PRINT_CHAT, "Match has been forced to start.\n");
|
||||
ctfgame.match = MATCH_PREGAME;
|
||||
ctfgame.matchtime = level.time + matchstarttime->value;
|
||||
gi.positioned_sound (world->s.origin, world, CHAN_AUTO | CHAN_RELIABLE, gi.soundindex("misc/talk1.wav"), 1, ATTN_NONE, 0);
|
||||
ctfgame.countdown = false;
|
||||
} else if (ctfgame.match == MATCH_GAME) {
|
||||
gi.bprintf(PRINT_CHAT, "Match has been forced to terminate.\n");
|
||||
ctfgame.match = MATCH_SETUP;
|
||||
|
@ -3756,6 +3903,17 @@ void CTFAdmin_MatchMode(edict_t *ent, pmenuhnd_t *p)
|
|||
}
|
||||
}
|
||||
|
||||
void CTFAdmin_Reset(edict_t *ent, pmenuhnd_t *p)
|
||||
{
|
||||
PMenu_Close(ent);
|
||||
|
||||
// go back to normal mode
|
||||
gi.bprintf(PRINT_CHAT, "Match mode has been terminated, reseting to normal game.\n");
|
||||
ctfgame.match = MATCH_NONE;
|
||||
gi.cvar_set("competition", "1");
|
||||
CTFResetAllPlayers();
|
||||
}
|
||||
|
||||
void CTFAdmin_Cancel(edict_t *ent, pmenuhnd_t *p)
|
||||
{
|
||||
PMenu_Close(ent);
|
||||
|
@ -3776,10 +3934,14 @@ void CTFOpenAdminMenu(edict_t *ent)
|
|||
{
|
||||
adminmenu[3].text = NULL;
|
||||
adminmenu[3].SelectFunc = NULL;
|
||||
adminmenu[4].text = NULL;
|
||||
adminmenu[4].SelectFunc = NULL;
|
||||
if (ctfgame.match == MATCH_SETUP) {
|
||||
adminmenu[3].text = "Force start match";
|
||||
adminmenu[3].SelectFunc = CTFAdmin_MatchSet;
|
||||
} else if (ctfgame.match == MATCH_GAME) {
|
||||
adminmenu[4].text = "Reset to pickup mode";
|
||||
adminmenu[4].SelectFunc = CTFAdmin_Reset;
|
||||
} else if (ctfgame.match == MATCH_GAME || ctfgame.match == MATCH_PREGAME) {
|
||||
adminmenu[3].text = "Cancel match";
|
||||
adminmenu[3].SelectFunc = CTFAdmin_MatchSet;
|
||||
} else if (ctfgame.match == MATCH_NONE && competition->value) {
|
||||
|
@ -3787,6 +3949,7 @@ void CTFOpenAdminMenu(edict_t *ent)
|
|||
adminmenu[3].SelectFunc = CTFAdmin_MatchMode;
|
||||
}
|
||||
|
||||
|
||||
// if (ent->client->menu)
|
||||
// PMenu_Close(ent->client->menu);
|
||||
|
||||
|
@ -3797,6 +3960,11 @@ void CTFAdmin(edict_t *ent)
|
|||
{
|
||||
char text[1024];
|
||||
|
||||
if (!allow_admin->value) {
|
||||
gi.cprintf(ent, PRINT_HIGH, "Administration is disabled\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (gi.argc() > 1 && admin_password->string && *admin_password->string &&
|
||||
!ent->client->resp.admin && strcmp(admin_password->string, gi.argv(1)) == 0) {
|
||||
ent->client->resp.admin = true;
|
||||
|
@ -3824,7 +3992,7 @@ void CTFStats(edict_t *ent)
|
|||
int i, e;
|
||||
ghost_t *g;
|
||||
char st[80];
|
||||
char text[1400];
|
||||
char text[1024];
|
||||
edict_t *e2;
|
||||
|
||||
*text = 0;
|
||||
|
@ -3888,6 +4056,7 @@ void CTFPlayerList(edict_t *ent)
|
|||
char text[1400];
|
||||
edict_t *e2;
|
||||
|
||||
#if 0
|
||||
*text = 0;
|
||||
if (ctfgame.match == MATCH_SETUP) {
|
||||
for (i = 1; i <= maxclients->value; i++) {
|
||||
|
@ -3901,16 +4070,18 @@ void CTFPlayerList(edict_t *ent)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// number, name, connect time, ping, score, admin
|
||||
|
||||
*text = 0;
|
||||
for (i = 0, e2 = g_edicts + 1; i < maxclients->value; i++, e2++) {
|
||||
for (i = 1; i <= maxclients->value; i++) {
|
||||
e2 = g_edicts + i;
|
||||
if (!e2->inuse)
|
||||
continue;
|
||||
|
||||
sprintf(st, "%3d %-16.16s %02d:%02d %4d %3d%s%s\n",
|
||||
i + 1,
|
||||
Com_sprintf(st, sizeof(st), "%3d %-16.16s %02d:%02d %4d %3d%s%s\n",
|
||||
i,
|
||||
e2->client->pers.netname,
|
||||
(level.framenum - e2->client->resp.enterframe) / 600,
|
||||
((level.framenum - e2->client->resp.enterframe) % 600)/10,
|
||||
|
@ -3919,6 +4090,7 @@ void CTFPlayerList(edict_t *ent)
|
|||
(ctfgame.match == MATCH_SETUP || ctfgame.match == MATCH_PREGAME) ?
|
||||
(e2->client->resp.ready ? " (ready)" : " (notready)") : "",
|
||||
e2->client->resp.admin ? " (admin)" : "");
|
||||
|
||||
if (strlen(text) + strlen(st) > sizeof(text) - 50) {
|
||||
sprintf(text+strlen(text), "And more...\n");
|
||||
gi.cprintf(ent, PRINT_HIGH, "%s", text);
|
||||
|
@ -4013,4 +4185,13 @@ void CTFBoot(edict_t *ent)
|
|||
}
|
||||
|
||||
|
||||
|
||||
void CTFSetPowerUpEffect(edict_t *ent, int def)
|
||||
{
|
||||
if (ent->client->resp.ctf_team == CTF_TEAM1)
|
||||
ent->s.effects |= EF_PENT; // red
|
||||
else if (ent->client->resp.ctf_team == CTF_TEAM2)
|
||||
ent->s.effects |= EF_QUAD; // red
|
||||
else
|
||||
ent->s.effects |= def;
|
||||
}
|
||||
|
||||
|
|
11
ctf/g_ctf.h
11
ctf/g_ctf.h
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#define CTF_VERSION 1.09b
|
||||
#define CTF_VERSION 1.52
|
||||
#define CTF_VSTRING2(x) #x
|
||||
#define CTF_VSTRING(x) CTF_VSTRING2(x)
|
||||
#define CTF_STRING_VERSION CTF_VSTRING(CTF_VERSION)
|
||||
|
@ -35,8 +35,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define STAT_CTF_TECH 26
|
||||
#define STAT_CTF_ID_VIEW 27
|
||||
#define STAT_CTF_MATCH 28
|
||||
#define STAT_CTF_ID_VIEW_COLOR 29
|
||||
#define STAT_CTF_TEAMINFO 30
|
||||
|
||||
#define CONFIG_CTF_MATCH (CS_MAXCLIENTS-1)
|
||||
#define CONFIG_CTF_MATCH (CS_AIRACCEL-1)
|
||||
#define CONFIG_CTF_TEAMINFO (CS_AIRACCEL-2)
|
||||
|
||||
typedef enum {
|
||||
CTF_NOTEAM,
|
||||
|
@ -105,6 +108,7 @@ extern cvar_t *ctf;
|
|||
|
||||
void CTFInit(void);
|
||||
void CTFSpawn(void);
|
||||
void CTFPrecache(void);
|
||||
|
||||
void SP_info_player_team1(edict_t *self);
|
||||
void SP_info_player_team2(edict_t *self);
|
||||
|
@ -183,3 +187,6 @@ void CTFObserver(edict_t *ent);
|
|||
|
||||
void SP_trigger_teleport (edict_t *ent);
|
||||
void SP_info_teleport_destination (edict_t *ent);
|
||||
|
||||
void CTFSetPowerUpEffect(edict_t *ent, int def);
|
||||
|
||||
|
|
|
@ -537,6 +537,8 @@ extern cvar_t *password;
|
|||
extern cvar_t *g_select_empty;
|
||||
extern cvar_t *dedicated;
|
||||
|
||||
extern cvar_t *filterban;
|
||||
|
||||
extern cvar_t *sv_gravity;
|
||||
extern cvar_t *sv_maxvelocity;
|
||||
|
||||
|
@ -767,6 +769,7 @@ void InitClientPersistant (gclient_t *client);
|
|||
void InitClientResp (gclient_t *client);
|
||||
void InitBodyQue (void);
|
||||
void ClientBeginServerFrame (edict_t *ent);
|
||||
void ClientUserinfoChanged (edict_t *ent, char *userinfo);
|
||||
|
||||
//
|
||||
// g_player.c
|
||||
|
@ -819,6 +822,10 @@ void SaveClientData (void);
|
|||
void FetchClientEntData (edict_t *ent);
|
||||
void EndDMLevel (void);
|
||||
|
||||
//
|
||||
// g_svcmds.c
|
||||
//
|
||||
qboolean SV_FilterPacket (char *from);
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
@ -845,7 +852,7 @@ typedef struct
|
|||
// values saved and restored from edicts when changing levels
|
||||
int health;
|
||||
int max_health;
|
||||
qboolean powerArmorActive;
|
||||
int savedFlags;
|
||||
|
||||
int selected_item;
|
||||
int inventory[MAX_ITEMS];
|
||||
|
@ -879,6 +886,7 @@ typedef struct
|
|||
float ctf_flagsince;
|
||||
float ctf_lastfraggedcarrier;
|
||||
qboolean id_state;
|
||||
float lastidtime;
|
||||
qboolean voted; // for elections
|
||||
qboolean ready;
|
||||
qboolean admin;
|
||||
|
|
|
@ -48,6 +48,8 @@ cvar_t *maxentities;
|
|||
cvar_t *g_select_empty;
|
||||
cvar_t *dedicated;
|
||||
|
||||
cvar_t *filterban;
|
||||
|
||||
cvar_t *sv_maxvelocity;
|
||||
cvar_t *sv_gravity;
|
||||
|
||||
|
|
|
@ -193,6 +193,7 @@ void InitGame (void)
|
|||
instantweap = gi.cvar ("instantweap", "0", CVAR_SERVERINFO);
|
||||
//ZOID
|
||||
password = gi.cvar ("password", "", CVAR_USERINFO);
|
||||
filterban = gi.cvar ("filterban", "1", 0);
|
||||
|
||||
g_select_empty = gi.cvar ("g_select_empty", "0", CVAR_ARCHIVE);
|
||||
|
||||
|
|
|
@ -838,17 +838,10 @@ void SP_worldspawn (edict_t *ent)
|
|||
//ZOID
|
||||
if (ctf->value) {
|
||||
gi.configstring (CS_STATUSBAR, ctf_statusbar);
|
||||
//precaches
|
||||
gi.imageindex("i_ctf1");
|
||||
gi.imageindex("i_ctf2");
|
||||
gi.imageindex("i_ctf1d");
|
||||
gi.imageindex("i_ctf2d");
|
||||
gi.imageindex("i_ctf1t");
|
||||
gi.imageindex("i_ctf2t");
|
||||
gi.imageindex("i_ctfj");
|
||||
CTFPrecache();
|
||||
} else
|
||||
//ZOID
|
||||
gi.configstring (CS_STATUSBAR, dm_statusbar);
|
||||
gi.configstring (CS_STATUSBAR, dm_statusbar);
|
||||
else
|
||||
gi.configstring (CS_STATUSBAR, single_statusbar);
|
||||
|
||||
|
@ -900,7 +893,6 @@ void SP_worldspawn (edict_t *ent)
|
|||
gi.soundindex ("*pain100_1.wav");
|
||||
gi.soundindex ("*pain100_2.wav");
|
||||
|
||||
#if 0 //DISABLED
|
||||
// sexed models
|
||||
// THIS ORDER MUST MATCH THE DEFINES IN g_local.h
|
||||
// you can add more, max 15
|
||||
|
@ -916,7 +908,6 @@ void SP_worldspawn (edict_t *ent)
|
|||
gi.modelindex ("#w_railgun.md2");
|
||||
gi.modelindex ("#w_bfg.md2");
|
||||
gi.modelindex ("#w_grapple.md2");
|
||||
#endif
|
||||
|
||||
//-------------------
|
||||
|
||||
|
|
252
ctf/g_svcmds.c
252
ctf/g_svcmds.c
|
@ -26,6 +26,250 @@ void Svcmd_Test_f (void)
|
|||
gi.cprintf (NULL, PRINT_HIGH, "Svcmd_Test_f()\n");
|
||||
}
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
PACKET FILTERING
|
||||
|
||||
|
||||
You can add or remove addresses from the filter list with:
|
||||
|
||||
addip <ip>
|
||||
removeip <ip>
|
||||
|
||||
The ip address is specified in dot format, and any unspecified digits will match any value, so you can specify an entire class C network with "addip 192.246.40".
|
||||
|
||||
Removeip will only remove an address specified exactly the same way. You cannot addip a subnet, then removeip a single host.
|
||||
|
||||
listip
|
||||
Prints the current list of filters.
|
||||
|
||||
writeip
|
||||
Dumps "addip <ip>" commands to listip.cfg so it can be execed at a later date. The filter lists are not saved and restored by default, because I beleive it would cause too much confusion.
|
||||
|
||||
filterban <0 or 1>
|
||||
|
||||
If 1 (the default), then ip addresses matching the current list will be prohibited from entering the game. This is the default setting.
|
||||
|
||||
If 0, then only addresses matching the list will be allowed. This lets you easily set up a private game, or a game that only allows players from your local network.
|
||||
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned mask;
|
||||
unsigned compare;
|
||||
} ipfilter_t;
|
||||
|
||||
#define MAX_IPFILTERS 1024
|
||||
|
||||
ipfilter_t ipfilters[MAX_IPFILTERS];
|
||||
int numipfilters;
|
||||
|
||||
/*
|
||||
=================
|
||||
StringToFilter
|
||||
=================
|
||||
*/
|
||||
static qboolean StringToFilter (char *s, ipfilter_t *f)
|
||||
{
|
||||
char num[128];
|
||||
int i, j;
|
||||
byte b[4];
|
||||
byte m[4];
|
||||
|
||||
for (i=0 ; i<4 ; i++)
|
||||
{
|
||||
b[i] = 0;
|
||||
m[i] = 0;
|
||||
}
|
||||
|
||||
for (i=0 ; i<4 ; i++)
|
||||
{
|
||||
if (*s < '0' || *s > '9')
|
||||
{
|
||||
gi.cprintf(NULL, PRINT_HIGH, "Bad filter address: %s\n", s);
|
||||
return false;
|
||||
}
|
||||
|
||||
j = 0;
|
||||
while (*s >= '0' && *s <= '9')
|
||||
{
|
||||
num[j++] = *s++;
|
||||
}
|
||||
num[j] = 0;
|
||||
b[i] = atoi(num);
|
||||
if (b[i] != 0)
|
||||
m[i] = 255;
|
||||
|
||||
if (!*s)
|
||||
break;
|
||||
s++;
|
||||
}
|
||||
|
||||
f->mask = *(unsigned *)m;
|
||||
f->compare = *(unsigned *)b;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SV_FilterPacket
|
||||
=================
|
||||
*/
|
||||
qboolean SV_FilterPacket (char *from)
|
||||
{
|
||||
int i;
|
||||
unsigned in;
|
||||
byte m[4];
|
||||
char *p;
|
||||
|
||||
i = 0;
|
||||
p = from;
|
||||
while (*p && i < 4) {
|
||||
m[i] = 0;
|
||||
while (*p >= '0' && *p <= '9') {
|
||||
m[i] = m[i]*10 + (*p - '0');
|
||||
p++;
|
||||
}
|
||||
if (!*p || *p == ':')
|
||||
break;
|
||||
i++, p++;
|
||||
}
|
||||
|
||||
in = *(unsigned *)m;
|
||||
|
||||
for (i=0 ; i<numipfilters ; i++)
|
||||
if ( (in & ipfilters[i].mask) == ipfilters[i].compare)
|
||||
return (int)filterban->value;
|
||||
|
||||
return (int)!filterban->value;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
SV_AddIP_f
|
||||
=================
|
||||
*/
|
||||
void SVCmd_AddIP_f (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (gi.argc() < 3) {
|
||||
gi.cprintf(NULL, PRINT_HIGH, "Usage: addip <ip-mask>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i=0 ; i<numipfilters ; i++)
|
||||
if (ipfilters[i].compare == 0xffffffff)
|
||||
break; // free spot
|
||||
if (i == numipfilters)
|
||||
{
|
||||
if (numipfilters == MAX_IPFILTERS)
|
||||
{
|
||||
gi.cprintf (NULL, PRINT_HIGH, "IP filter list is full\n");
|
||||
return;
|
||||
}
|
||||
numipfilters++;
|
||||
}
|
||||
|
||||
if (!StringToFilter (gi.argv(2), &ipfilters[i]))
|
||||
ipfilters[i].compare = 0xffffffff;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SV_RemoveIP_f
|
||||
=================
|
||||
*/
|
||||
void SVCmd_RemoveIP_f (void)
|
||||
{
|
||||
ipfilter_t f;
|
||||
int i, j;
|
||||
|
||||
if (gi.argc() < 3) {
|
||||
gi.cprintf(NULL, PRINT_HIGH, "Usage: sv removeip <ip-mask>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!StringToFilter (gi.argv(2), &f))
|
||||
return;
|
||||
|
||||
for (i=0 ; i<numipfilters ; i++)
|
||||
if (ipfilters[i].mask == f.mask
|
||||
&& ipfilters[i].compare == f.compare)
|
||||
{
|
||||
for (j=i+1 ; j<numipfilters ; j++)
|
||||
ipfilters[j-1] = ipfilters[j];
|
||||
numipfilters--;
|
||||
gi.cprintf (NULL, PRINT_HIGH, "Removed.\n");
|
||||
return;
|
||||
}
|
||||
gi.cprintf (NULL, PRINT_HIGH, "Didn't find %s.\n", gi.argv(2));
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SV_ListIP_f
|
||||
=================
|
||||
*/
|
||||
void SVCmd_ListIP_f (void)
|
||||
{
|
||||
int i;
|
||||
byte b[4];
|
||||
|
||||
gi.cprintf (NULL, PRINT_HIGH, "Filter list:\n");
|
||||
for (i=0 ; i<numipfilters ; i++)
|
||||
{
|
||||
*(unsigned *)b = ipfilters[i].compare;
|
||||
gi.cprintf (NULL, PRINT_HIGH, "%3i.%3i.%3i.%3i\n", b[0], b[1], b[2], b[3]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SV_WriteIP_f
|
||||
=================
|
||||
*/
|
||||
void SVCmd_WriteIP_f (void)
|
||||
{
|
||||
FILE *f;
|
||||
char name[MAX_OSPATH];
|
||||
byte b[4];
|
||||
int i;
|
||||
cvar_t *game;
|
||||
|
||||
game = gi.cvar("game", "", 0);
|
||||
|
||||
if (!*game->string)
|
||||
sprintf (name, "%s/listip.cfg", GAMEVERSION);
|
||||
else
|
||||
sprintf (name, "%s/listip.cfg", game->string);
|
||||
|
||||
gi.cprintf (NULL, PRINT_HIGH, "Writing %s.\n", name);
|
||||
|
||||
f = fopen (name, "wb");
|
||||
if (!f)
|
||||
{
|
||||
gi.cprintf (NULL, PRINT_HIGH, "Couldn't open %s\n", name);
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(f, "set filterban %d\n", (int)filterban->value);
|
||||
|
||||
for (i=0 ; i<numipfilters ; i++)
|
||||
{
|
||||
*(unsigned *)b = ipfilters[i].compare;
|
||||
fprintf (f, "sv addip %i.%i.%i.%i\n", b[0], b[1], b[2], b[3]);
|
||||
}
|
||||
|
||||
fclose (f);
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerCommand
|
||||
|
@ -42,6 +286,14 @@ void ServerCommand (void)
|
|||
cmd = gi.argv(1);
|
||||
if (Q_stricmp (cmd, "test") == 0)
|
||||
Svcmd_Test_f ();
|
||||
else if (Q_stricmp (cmd, "addip") == 0)
|
||||
SVCmd_AddIP_f ();
|
||||
else if (Q_stricmp (cmd, "removeip") == 0)
|
||||
SVCmd_RemoveIP_f ();
|
||||
else if (Q_stricmp (cmd, "listip") == 0)
|
||||
SVCmd_ListIP_f ();
|
||||
else if (Q_stricmp (cmd, "writeip") == 0)
|
||||
SVCmd_WriteIP_f ();
|
||||
else
|
||||
gi.cprintf (NULL, PRINT_HIGH, "Unknown server command \"%s\"\n", cmd);
|
||||
}
|
||||
|
|
|
@ -675,7 +675,9 @@ void fire_rail (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client))
|
||||
//ZOID--added so rail goes through SOLID_BBOX entities (gibs, etc)
|
||||
if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client) ||
|
||||
(tr.ent->solid == SOLID_BBOX))
|
||||
ignore = tr.ent;
|
||||
else
|
||||
ignore = NULL;
|
||||
|
|
|
@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "g_local.h"
|
||||
#include "m_player.h"
|
||||
|
||||
void ClientUserinfoChanged (edict_t *ent, char *userinfo);
|
||||
|
||||
void SP_misc_teleporter_dest (edict_t *ent);
|
||||
|
||||
//
|
||||
|
@ -543,6 +541,7 @@ void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
|
|||
self->client->invincible_framenum = 0;
|
||||
self->client->breather_framenum = 0;
|
||||
self->client->enviro_framenum = 0;
|
||||
self->flags &= ~FL_POWER_ARMOR;
|
||||
|
||||
// clear inventory
|
||||
memset(self->client->pers.inventory, 0, sizeof(self->client->pers.inventory));
|
||||
|
@ -686,7 +685,7 @@ void SaveClientData (void)
|
|||
continue;
|
||||
game.clients[i].pers.health = ent->health;
|
||||
game.clients[i].pers.max_health = ent->max_health;
|
||||
game.clients[i].pers.powerArmorActive = (ent->flags & FL_POWER_ARMOR);
|
||||
game.clients[i].pers.savedFlags = (ent->flags & (FL_GODMODE|FL_NOTARGET|FL_POWER_ARMOR));
|
||||
if (coop->value)
|
||||
game.clients[i].pers.score = ent->client->resp.score;
|
||||
}
|
||||
|
@ -696,8 +695,7 @@ void FetchClientEntData (edict_t *ent)
|
|||
{
|
||||
ent->health = ent->client->pers.health;
|
||||
ent->max_health = ent->client->pers.max_health;
|
||||
if (ent->client->pers.powerArmorActive)
|
||||
ent->flags |= FL_POWER_ARMOR;
|
||||
ent->flags |= ent->client->pers.savedFlags;
|
||||
if (coop->value)
|
||||
ent->client->resp.score = ent->client->pers.score;
|
||||
}
|
||||
|
@ -1217,11 +1215,18 @@ void ClientBeginDeathmatch (edict_t *ent)
|
|||
// locate ent at a spawn point
|
||||
PutClientInServer (ent);
|
||||
|
||||
// send effect
|
||||
gi.WriteByte (svc_muzzleflash);
|
||||
gi.WriteShort (ent-g_edicts);
|
||||
gi.WriteByte (MZ_LOGIN);
|
||||
gi.multicast (ent->s.origin, MULTICAST_PVS);
|
||||
if (level.intermissiontime)
|
||||
{
|
||||
MoveClientToIntermission (ent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// send effect
|
||||
gi.WriteByte (svc_muzzleflash);
|
||||
gi.WriteShort (ent-g_edicts);
|
||||
gi.WriteByte (MZ_LOGIN);
|
||||
gi.multicast (ent->s.origin, MULTICAST_PVS);
|
||||
}
|
||||
|
||||
gi.bprintf (PRINT_HIGH, "%s entered the game\n", ent->client->pers.netname);
|
||||
|
||||
|
@ -1332,6 +1337,11 @@ void ClientUserinfoChanged (edict_t *ent, char *userinfo)
|
|||
//ZOID
|
||||
gi.configstring (CS_PLAYERSKINS+playernum, va("%s\\%s", ent->client->pers.netname, s) );
|
||||
|
||||
//ZOID
|
||||
// set player name field (used in id_state view)
|
||||
gi.configstring (CS_GENERAL+playernum, ent->client->pers.netname);
|
||||
//ZOID
|
||||
|
||||
// fov
|
||||
if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
|
||||
{
|
||||
|
@ -1376,6 +1386,11 @@ qboolean ClientConnect (edict_t *ent, char *userinfo)
|
|||
|
||||
// check to see if they are on the banned IP list
|
||||
value = Info_ValueForKey (userinfo, "ip");
|
||||
if (SV_FilterPacket(value)) {
|
||||
Info_SetValueForKey(userinfo, "rejmsg", "Banned.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// check for a password
|
||||
value = Info_ValueForKey (userinfo, "password");
|
||||
|
@ -1395,7 +1410,7 @@ qboolean ClientConnect (edict_t *ent, char *userinfo)
|
|||
// clear the respawning variables
|
||||
//ZOID -- force team join
|
||||
ent->client->resp.ctf_team = -1;
|
||||
ent->client->resp.id_state = false;
|
||||
ent->client->resp.id_state = true;
|
||||
//ZOID
|
||||
InitClientResp (ent->client);
|
||||
if (!game.autosaved || !ent->client->pers.weapon)
|
||||
|
|
18
ctf/p_view.c
18
ctf/p_view.c
|
@ -779,26 +779,20 @@ void G_SetClientEffects (edict_t *ent)
|
|||
CTFEffects(ent);
|
||||
//ZOID
|
||||
|
||||
if (ent->client->quad_framenum > level.framenum
|
||||
//ZOID
|
||||
&& (level.framenum & 8)
|
||||
//ZOID
|
||||
)
|
||||
if (ent->client->quad_framenum > level.framenum)
|
||||
{
|
||||
remaining = ent->client->quad_framenum - level.framenum;
|
||||
if (remaining > 30 || (remaining & 4) )
|
||||
ent->s.effects |= EF_QUAD;
|
||||
// ent->s.effects |= EF_QUAD;
|
||||
CTFSetPowerUpEffect(ent, EF_QUAD);
|
||||
}
|
||||
|
||||
if (ent->client->invincible_framenum > level.framenum
|
||||
//ZOID
|
||||
&& (level.framenum & 8)
|
||||
//ZOID
|
||||
)
|
||||
if (ent->client->invincible_framenum > level.framenum)
|
||||
{
|
||||
remaining = ent->client->invincible_framenum - level.framenum;
|
||||
if (remaining > 30 || (remaining & 4) )
|
||||
ent->s.effects |= EF_PENT;
|
||||
// ent->s.effects |= EF_PENT;
|
||||
CTFSetPowerUpEffect(ent, EF_PENT);
|
||||
}
|
||||
|
||||
// show cheaters!!!
|
||||
|
|
|
@ -419,10 +419,6 @@ static void Weapon_Generic2 (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FI
|
|||
{
|
||||
ent->client->weaponstate = WEAPON_READY;
|
||||
ent->client->ps.gunframe = FRAME_IDLE_FIRST;
|
||||
// we go recursive here to instant ready the weapon
|
||||
Weapon_Generic2 (ent, FRAME_ACTIVATE_LAST, FRAME_FIRE_LAST,
|
||||
FRAME_IDLE_LAST, FRAME_DEACTIVATE_LAST, pause_frames,
|
||||
fire_frames, fire);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1421,7 +1417,7 @@ void weapon_bfg_fire (edict_t *ent)
|
|||
|
||||
ent->client->ps.gunframe++;
|
||||
|
||||
PlayerNoise(ent, ent->s.origin, PNOISE_WEAPON);
|
||||
PlayerNoise(ent, start, PNOISE_WEAPON);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -345,7 +345,7 @@ BoxOnPlaneSide
|
|||
Returns 1, 2, or 1 + 2
|
||||
==================
|
||||
*/
|
||||
#if !id386
|
||||
#if !id386 || defined __linux__
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
float dist1, dist2;
|
||||
|
|
|
@ -882,7 +882,7 @@ void Cmd_PlayerList_f(edict_t *ent)
|
|||
if (!e2->inuse)
|
||||
continue;
|
||||
|
||||
sprintf(st, "%02d:%02d %4d %3d %s%s\n",
|
||||
Com_sprintf(st, sizeof(st), "%02d:%02d %4d %3d %s%s\n",
|
||||
(level.framenum - e2->client->resp.enterframe) / 600,
|
||||
((level.framenum - e2->client->resp.enterframe) % 600)/10,
|
||||
e2->client->ping,
|
||||
|
|
|
@ -522,6 +522,7 @@ extern cvar_t *fraglimit;
|
|||
extern cvar_t *timelimit;
|
||||
extern cvar_t *password;
|
||||
extern cvar_t *spectator_password;
|
||||
extern cvar_t *needpass;
|
||||
extern cvar_t *g_select_empty;
|
||||
extern cvar_t *dedicated;
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ cvar_t *fraglimit;
|
|||
cvar_t *timelimit;
|
||||
cvar_t *password;
|
||||
cvar_t *spectator_password;
|
||||
cvar_t *needpass;
|
||||
cvar_t *maxclients;
|
||||
cvar_t *maxspectators;
|
||||
cvar_t *maxentities;
|
||||
|
@ -268,6 +269,33 @@ void EndDMLevel (void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
CheckNeedPass
|
||||
=================
|
||||
*/
|
||||
void CheckNeedPass (void)
|
||||
{
|
||||
int need;
|
||||
|
||||
// if password or spectator_password has changed, update needpass
|
||||
// as needed
|
||||
if (password->modified || spectator_password->modified)
|
||||
{
|
||||
password->modified = spectator_password->modified = false;
|
||||
|
||||
need = 0;
|
||||
|
||||
if (*password->string && Q_stricmp(password->string, "none"))
|
||||
need |= 1;
|
||||
if (*spectator_password->string && Q_stricmp(spectator_password->string, "none"))
|
||||
need |= 2;
|
||||
|
||||
gi.cvar_set("needpass", va("%d", need));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CheckDMRules
|
||||
|
@ -405,6 +433,9 @@ void G_RunFrame (void)
|
|||
// see if it is time to end a deathmatch
|
||||
CheckDMRules ();
|
||||
|
||||
// see if needpass needs updated
|
||||
CheckNeedPass ();
|
||||
|
||||
// build the playerstate_t structures for all players
|
||||
ClientEndServerFrames ();
|
||||
}
|
||||
|
|
|
@ -1812,7 +1812,9 @@ void teleporter_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_
|
|||
|
||||
// set angles
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
other->client->ps.pmove.delta_angles[i] = ANGLE2SHORT(dest->s.angles[i] - other->client->resp.cmd_angles[i]);
|
||||
}
|
||||
|
||||
VectorClear (other->s.angles);
|
||||
VectorClear (other->client->ps.viewangles);
|
||||
|
|
|
@ -184,6 +184,7 @@ void InitGame (void)
|
|||
timelimit = gi.cvar ("timelimit", "0", CVAR_SERVERINFO);
|
||||
password = gi.cvar ("password", "", CVAR_USERINFO);
|
||||
spectator_password = gi.cvar ("spectator_password", "", CVAR_USERINFO);
|
||||
needpass = gi.cvar ("needpass", "0", CVAR_SERVERINFO);
|
||||
filterban = gi.cvar ("filterban", "1", 0);
|
||||
|
||||
g_select_empty = gi.cvar ("g_select_empty", "0", CVAR_ARCHIVE);
|
||||
|
|
|
@ -680,7 +680,9 @@ void fire_rail (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client))
|
||||
//ZOID--added so rail goes through SOLID_BBOX entities (gibs, etc)
|
||||
if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client) ||
|
||||
(tr.ent->solid == SOLID_BBOX))
|
||||
ignore = tr.ent;
|
||||
else
|
||||
ignore = NULL;
|
||||
|
|
1619
game/game.001
1619
game/game.001
File diff suppressed because it is too large
Load diff
19
game/game.h
19
game/game.h
|
@ -16,25 +16,6 @@ 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.
|
||||
|
||||
*/
|
||||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
// game.h -- game dll information visible to server
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
--------------------Configuration: game - Win32 Release Alpha--------------------
|
||||
Begining build with project "G:\quake2\code\game\game.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/game.pch" /YX /Fo".\ReleaseAXP/" /Fd".\ReleaseAXP/" /FD /c "
|
||||
"Win32 Resource Compiler" with flags "/l 0x409 /d "NDEBUG" "
|
||||
"Browser Database Maker" with flags "/nologo /o"..\ReleaseAXP/game.bsc" "
|
||||
"COFF Linker for Alpha" with flags "kernel32.lib user32.lib gdi32.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"..\ReleaseAXP/gameaxp.pdb" /debug /machine:ALPHA /def:".\game.def" /out:"..\ReleaseAXP/gameaxp.dll" /implib:"..\ReleaseAXP/gameaxp.lib" "
|
||||
"Custom Build" with flags ""
|
||||
"<Component 0xa>" with flags ""
|
||||
|
||||
Creating temp file "C:\TEMP\RSPA6.tmp" with contents </nologo /QA21164 /MT /Gt0 /W3 /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "C_ONLY" /Fp".\ReleaseAXP/game.pch" /YX /Fo".\ReleaseAXP/" /Fd".\ReleaseAXP/" /c
|
||||
"G:\quake2\code\game\p_weapon.c"
|
||||
>
|
||||
Creating command line "cl.exe @C:\TEMP\RSPA6.tmp"
|
||||
Creating temp file "C:\TEMP\RSPA7.tmp" with contents <kernel32.lib user32.lib gdi32.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"..\ReleaseAXP/gameaxp.pdb" /debug /machine:ALPHA /def:".\game.def" /out:"..\ReleaseAXP/gameaxp.dll" /implib:"..\ReleaseAXP/gameaxp.lib"
|
||||
.\ReleaseAXP\g_ai.obj
|
||||
.\ReleaseAXP\g_chase.obj
|
||||
.\ReleaseAXP\g_cmds.obj
|
||||
.\ReleaseAXP\g_combat.obj
|
||||
.\ReleaseAXP\g_func.obj
|
||||
.\ReleaseAXP\g_items.obj
|
||||
.\ReleaseAXP\g_main.obj
|
||||
.\ReleaseAXP\g_misc.obj
|
||||
.\ReleaseAXP\g_monster.obj
|
||||
.\ReleaseAXP\g_phys.obj
|
||||
.\ReleaseAXP\g_save.obj
|
||||
.\ReleaseAXP\g_spawn.obj
|
||||
.\ReleaseAXP\g_svcmds.obj
|
||||
.\ReleaseAXP\g_target.obj
|
||||
.\ReleaseAXP\g_trigger.obj
|
||||
.\ReleaseAXP\g_turret.obj
|
||||
.\ReleaseAXP\g_utils.obj
|
||||
.\ReleaseAXP\g_weapon.obj
|
||||
.\ReleaseAXP\m_actor.obj
|
||||
.\ReleaseAXP\m_berserk.obj
|
||||
.\ReleaseAXP\m_boss2.obj
|
||||
.\ReleaseAXP\m_boss3.obj
|
||||
.\ReleaseAXP\m_boss31.obj
|
||||
.\ReleaseAXP\m_boss32.obj
|
||||
.\ReleaseAXP\m_brain.obj
|
||||
.\ReleaseAXP\m_chick.obj
|
||||
.\ReleaseAXP\m_flash.obj
|
||||
.\ReleaseAXP\m_flipper.obj
|
||||
.\ReleaseAXP\m_float.obj
|
||||
.\ReleaseAXP\m_flyer.obj
|
||||
.\ReleaseAXP\m_gladiator.obj
|
||||
.\ReleaseAXP\m_gunner.obj
|
||||
.\ReleaseAXP\m_hover.obj
|
||||
.\ReleaseAXP\m_infantry.obj
|
||||
.\ReleaseAXP\m_insane.obj
|
||||
.\ReleaseAXP\m_medic.obj
|
||||
.\ReleaseAXP\m_move.obj
|
||||
.\ReleaseAXP\m_mutant.obj
|
||||
.\ReleaseAXP\m_parasite.obj
|
||||
.\ReleaseAXP\m_soldier.obj
|
||||
.\ReleaseAXP\m_supertank.obj
|
||||
.\ReleaseAXP\m_tank.obj
|
||||
.\ReleaseAXP\p_client.obj
|
||||
.\ReleaseAXP\p_hud.obj
|
||||
.\ReleaseAXP\p_trail.obj
|
||||
.\ReleaseAXP\p_view.obj
|
||||
.\ReleaseAXP\p_weapon.obj
|
||||
.\ReleaseAXP\q_shared.obj>
|
||||
Creating command line "link.exe @C:\TEMP\RSPA7.tmp"
|
||||
Compiling...
|
||||
p_weapon.c
|
||||
Linking...
|
||||
Creating library ..\ReleaseAXP/gameaxp.lib and object ..\ReleaseAXP/gameaxp.exp
|
||||
|
||||
|
||||
|
||||
gameaxp.dll - 0 error(s), 0 warning(s)
|
|
@ -1056,8 +1056,8 @@ void spectator_respawn (edict_t *ent)
|
|||
}
|
||||
}
|
||||
|
||||
// clear score on respawn
|
||||
ent->client->pers.score = ent->client->resp.score = 0;
|
||||
// clear client on respawn
|
||||
ent->client->resp.score = ent->client->pers.score = 0;
|
||||
|
||||
ent->svflags &= ~SVF_NOCLIENT;
|
||||
PutClientInServer (ent);
|
||||
|
@ -1221,7 +1221,9 @@ void PutClientInServer (edict_t *ent)
|
|||
|
||||
// set the delta angle
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
client->ps.pmove.delta_angles[i] = ANGLE2SHORT(spawn_angles[i] - client->resp.cmd_angles[i]);
|
||||
}
|
||||
|
||||
ent->s.angles[PITCH] = 0;
|
||||
ent->s.angles[YAW] = spawn_angles[YAW];
|
||||
|
@ -1272,11 +1274,18 @@ void ClientBeginDeathmatch (edict_t *ent)
|
|||
// locate ent at a spawn point
|
||||
PutClientInServer (ent);
|
||||
|
||||
// send effect
|
||||
gi.WriteByte (svc_muzzleflash);
|
||||
gi.WriteShort (ent-g_edicts);
|
||||
gi.WriteByte (MZ_LOGIN);
|
||||
gi.multicast (ent->s.origin, MULTICAST_PVS);
|
||||
if (level.intermissiontime)
|
||||
{
|
||||
MoveClientToIntermission (ent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// send effect
|
||||
gi.WriteByte (svc_muzzleflash);
|
||||
gi.WriteShort (ent-g_edicts);
|
||||
gi.WriteByte (MZ_LOGIN);
|
||||
gi.multicast (ent->s.origin, MULTICAST_PVS);
|
||||
}
|
||||
|
||||
gi.bprintf (PRINT_HIGH, "%s entered the game\n", ent->client->pers.netname);
|
||||
|
||||
|
@ -1489,6 +1498,7 @@ qboolean ClientConnect (edict_t *ent, char *userinfo)
|
|||
if (game.maxclients > 1)
|
||||
gi.dprintf ("%s connected\n", ent->client->pers.netname);
|
||||
|
||||
ent->svflags = 0; // make sure we start with known default
|
||||
ent->client->pers.connected = true;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1386,7 +1386,7 @@ void weapon_bfg_fire (edict_t *ent)
|
|||
|
||||
ent->client->ps.gunframe++;
|
||||
|
||||
PlayerNoise(ent, ent->s.origin, PNOISE_WEAPON);
|
||||
PlayerNoise(ent, start, PNOISE_WEAPON);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <sys/types.h>
|
||||
#include <cdaudio.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,23 @@
|
|||
/*
|
||||
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 Linux specific stuff having to do with the
|
||||
|
|
1054
irix/makefile.txt
Normal file
1054
irix/makefile.txt
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,4 +1,23 @@
|
|||
/*
|
||||
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
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <dmedia/dmedia.h>
|
||||
#include <dmedia/audio.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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"
|
||||
|
||||
|
@ -177,6 +196,7 @@ void VID_MenuInit( void )
|
|||
"[1152 864 ]",
|
||||
"[1280 1024]",
|
||||
"[1600 1200]",
|
||||
"[2048 1536]",
|
||||
0
|
||||
};
|
||||
static const char *refs[] =
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
@ -131,7 +150,8 @@ vidmode_t vid_modes[] =
|
|||
{ "Mode 6: 1024x768", 1024, 768, 6 },
|
||||
{ "Mode 7: 1152x864", 1152, 864, 7 },
|
||||
{ "Mode 8: 1280x1024", 1280, 1024, 8 },
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 9 }
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 9 },
|
||||
{ "Mode 10: 2048x1536", 2048, 1536, 10 }
|
||||
};
|
||||
|
||||
qboolean VID_GetModeInfo( int *width, int *height, int mode )
|
||||
|
|
3
linux/.gitignore
vendored
3
linux/.gitignore
vendored
|
@ -1,3 +1,6 @@
|
|||
*.d
|
||||
*.map
|
||||
debugi386
|
||||
debugi386-glibc
|
||||
releasei386
|
||||
releasei386-glibc
|
||||
|
|
495
linux/Makefile
495
linux/Makefile
|
@ -6,12 +6,20 @@
|
|||
# ELF only
|
||||
#
|
||||
|
||||
ifneq (,$(findstring libc6,$(shell if test -e /lib/libc.so.6*; then echo libc6; fi)))
|
||||
GLIBC=-glibc
|
||||
else
|
||||
GLIBC=
|
||||
endif
|
||||
|
||||
ARCH=i386
|
||||
MOUNT_DIR=../../quake2
|
||||
MOUNT_DIR=..
|
||||
GAME_DIR=$(shell if test -f /etc/quake2.conf; then cat /etc/quake2.conf; else echo .; fi)
|
||||
|
||||
BUILD_DEBUG_DIR=debug$(ARCH)
|
||||
BUILD_RELEASE_DIR=release$(ARCH)
|
||||
DOFXMESA=0
|
||||
|
||||
BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC)
|
||||
BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC)
|
||||
CLIENT_DIR=$(MOUNT_DIR)/client
|
||||
SERVER_DIR=$(MOUNT_DIR)/server
|
||||
REF_SOFT_DIR=$(MOUNT_DIR)/ref_soft
|
||||
|
@ -19,8 +27,12 @@ REF_GL_DIR=$(MOUNT_DIR)/ref_gl
|
|||
COMMON_DIR=$(MOUNT_DIR)/qcommon
|
||||
LINUX_DIR=$(MOUNT_DIR)/linux
|
||||
GAME_DIR=$(MOUNT_DIR)/game
|
||||
NULL_DIR=$(MOUNT_DIR)/null
|
||||
CTF_DIR=$(MOUNT_DIR)/ctf
|
||||
XATRIX_DIR=$(MOUNT_DIR)/xatrix
|
||||
ROGUE_DIR=$(MOUNT_DIR)/rogue
|
||||
|
||||
MESA_DIR=/usr/local/src/Mesa-2.6
|
||||
|
||||
CC=gcc
|
||||
BASE_CFLAGS=-Dstricmp=strcasecmp
|
||||
|
@ -30,19 +42,23 @@ RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
|
|||
-fomit-frame-pointer -fexpensive-optimizations
|
||||
else
|
||||
RELEASE_CFLAGS=$(BASE_CFLAGS) -march=i686 -O6 -ffast-math -funroll-loops \
|
||||
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
||||
-malign-jumps=2 -malign-functions=2
|
||||
-fomit-frame-pointer -fexpensive-optimizations
|
||||
endif
|
||||
|
||||
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
|
||||
LDFLAGS=-ldl -lm
|
||||
SVGALDFLAGS=-lvga
|
||||
XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext
|
||||
SVGALDFLAGS=-lvga -ldl -lm
|
||||
XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -ldl -lm
|
||||
XCFLAGS=
|
||||
|
||||
GLLDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib \
|
||||
-lGL -lX11 -lXext -lpthread
|
||||
GLLDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lvga -ldl -lm
|
||||
GLXLDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm
|
||||
|
||||
ifeq ($(DOFXMESA),1)
|
||||
GLCFLAGS=-I$(MESA_DIR)/include -I/usr/include/glide
|
||||
else
|
||||
GLCFLAGS=
|
||||
endif
|
||||
|
||||
SHLIBEXT=so
|
||||
|
||||
|
@ -50,8 +66,15 @@ SHLIBCFLAGS=-fPIC
|
|||
SHLIBLDFLAGS=-shared
|
||||
|
||||
DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
|
||||
DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $<
|
||||
DO_DED_CC=$(CC) $(CFLAGS) -DDEDICATED_ONLY -o $@ -c $<
|
||||
DO_DED_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -DDEDICATED_ONLY -o $@ -c $<
|
||||
#DO_O_CC=$(CC) $(CFLAGS) -O -o $@ -c $<
|
||||
DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_SHLIB_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
#DO_SHLIB_O_CC=$(CC) $(CFLAGS) -O $(SHLIBCFLAGS) -o $@ -c $<
|
||||
DO_GL_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) $(GLCFLAGS) -o $@ -c $<
|
||||
#DO_GL_SHLIB_O_CC=$(CC) $(CFLAGS) -O $(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 $<
|
||||
|
||||
|
@ -60,31 +83,38 @@ DO_SHLIB_AS=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -DELF -x assembler-with-cpp -o $@ -c
|
|||
#############################################################################
|
||||
|
||||
TARGETS=$(BUILDDIR)/quake2 \
|
||||
$(BUILDDIR)/q2ded \
|
||||
$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) \
|
||||
$(BUILDDIR)/ref_soft.$(SHLIBEXT) \
|
||||
$(BUILDDIR)/ref_softx.$(SHLIBEXT) \
|
||||
$(BUILDDIR)/ref_gl.$(SHLIBEXT)
|
||||
# $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
|
||||
# $(BUILDDIR)/ref_soft.$(SHLIBEXT) \
|
||||
# $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
|
||||
$(BUILDDIR)/ref_gl.$(SHLIBEXT) \
|
||||
$(BUILDDIR)/ref_glx.$(SHLIBEXT) \
|
||||
$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) \
|
||||
# $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) \
|
||||
# $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
|
||||
|
||||
build_debug:
|
||||
@-mkdir -p $(BUILD_DEBUG_DIR) \
|
||||
$(BUILD_DEBUG_DIR)/client \
|
||||
$(BUILD_DEBUG_DIR)/ded \
|
||||
$(BUILD_DEBUG_DIR)/ref_soft \
|
||||
$(BUILD_DEBUG_DIR)/ref_gl \
|
||||
$(BUILD_DEBUG_DIR)/game \
|
||||
$(BUILD_DEBUG_DIR)/ctf \
|
||||
$(BUILD_DEBUG_DIR)/xatrix
|
||||
# $(BUILD_DEBUG_DIR)/xatrix \
|
||||
# $(BUILD_DEBUG_DIR)/rogue
|
||||
$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
|
||||
|
||||
build_release:
|
||||
@-mkdir -p $(BUILD_RELEASE_DIR) \
|
||||
$(BUILD_RELEASE_DIR)/client \
|
||||
$(BUILD_RELEASE_DIR)/ded \
|
||||
$(BUILD_RELEASE_DIR)/ref_soft \
|
||||
$(BUILD_RELEASE_DIR)/ref_gl \
|
||||
$(BUILD_RELEASE_DIR)/game \
|
||||
$(BUILD_RELEASE_DIR)/ctf \
|
||||
$(BUILD_RELEASE_DIR)/xatrix
|
||||
# $(BUILD_RELEASE_DIR)/xatrix \
|
||||
# $(BUILD_RELEASE_DIR)/rogue
|
||||
$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
|
||||
|
||||
all: build_debug build_release
|
||||
|
@ -167,7 +197,7 @@ $(BUILDDIR)/client/cl_ents.o : $(CLIENT_DIR)/cl_ents.c
|
|||
$(BUILDDIR)/client/cl_fx.o : $(CLIENT_DIR)/cl_fx.c
|
||||
$(DO_CC)
|
||||
|
||||
$(BUILDDIR)/client/cl_newfx.o : $(CLIENT_DIR)/cl_newfx.c
|
||||
$(BUILDDIR)/client/cl_newfx.o : $(CLIENT_DIR)/cl_newfx.c
|
||||
$(DO_CC)
|
||||
|
||||
$(BUILDDIR)/client/cl_input.o : $(CLIENT_DIR)/cl_input.c
|
||||
|
@ -246,7 +276,7 @@ $(BUILDDIR)/client/net_chan.o : $(COMMON_DIR)/net_chan.c
|
|||
$(DO_CC)
|
||||
|
||||
$(BUILDDIR)/client/q_shared.o : $(GAME_DIR)/q_shared.c
|
||||
$(DO_CC)
|
||||
$(DO_DEBUG_CC)
|
||||
|
||||
$(BUILDDIR)/client/pmove.o : $(COMMON_DIR)/pmove.c
|
||||
$(DO_CC)
|
||||
|
@ -302,16 +332,131 @@ $(BUILDDIR)/client/glob.o : $(LINUX_DIR)/glob.c
|
|||
$(BUILDDIR)/client/net_udp.o : $(LINUX_DIR)/net_udp.c
|
||||
$(DO_CC)
|
||||
|
||||
#############################################################################
|
||||
# DEDICATED SERVER
|
||||
#############################################################################
|
||||
|
||||
Q2DED_OBJS = \
|
||||
\
|
||||
$(BUILDDIR)/ded/cmd.o \
|
||||
$(BUILDDIR)/ded/cmodel.o \
|
||||
$(BUILDDIR)/ded/common.o \
|
||||
$(BUILDDIR)/ded/crc.o \
|
||||
$(BUILDDIR)/ded/cvar.o \
|
||||
$(BUILDDIR)/ded/files.o \
|
||||
$(BUILDDIR)/ded/checksum.o \
|
||||
$(BUILDDIR)/ded/mdfour.o \
|
||||
$(BUILDDIR)/ded/net_chan.o \
|
||||
\
|
||||
$(BUILDDIR)/ded/sv_ccmds.o \
|
||||
$(BUILDDIR)/ded/sv_ents.o \
|
||||
$(BUILDDIR)/ded/sv_game.o \
|
||||
$(BUILDDIR)/ded/sv_init.o \
|
||||
$(BUILDDIR)/ded/sv_main.o \
|
||||
$(BUILDDIR)/ded/sv_send.o \
|
||||
$(BUILDDIR)/ded/sv_user.o \
|
||||
$(BUILDDIR)/ded/sv_world.o \
|
||||
\
|
||||
$(BUILDDIR)/ded/q_shlinux.o \
|
||||
$(BUILDDIR)/ded/sys_linux.o \
|
||||
$(BUILDDIR)/ded/glob.o \
|
||||
$(BUILDDIR)/ded/net_udp.o \
|
||||
\
|
||||
$(BUILDDIR)/ded/q_shared.o \
|
||||
$(BUILDDIR)/ded/pmove.o \
|
||||
\
|
||||
$(BUILDDIR)/ded/cl_null.o \
|
||||
$(BUILDDIR)/ded/cd_null.o
|
||||
|
||||
$(BUILDDIR)/q2ded : $(Q2DED_OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDFLAGS)
|
||||
|
||||
$(BUILDDIR)/ded/cmd.o : $(COMMON_DIR)/cmd.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/cmodel.o : $(COMMON_DIR)/cmodel.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/common.o : $(COMMON_DIR)/common.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/crc.o : $(COMMON_DIR)/crc.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/cvar.o : $(COMMON_DIR)/cvar.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/files.o : $(COMMON_DIR)/files.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/checksum.o : $(COMMON_DIR)/checksum.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/mdfour.o : $(COMMON_DIR)/mdfour.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/net_chan.o : $(COMMON_DIR)/net_chan.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/q_shared.o : $(GAME_DIR)/q_shared.c
|
||||
$(DO_DED_DEBUG_CC)
|
||||
|
||||
$(BUILDDIR)/ded/pmove.o : $(COMMON_DIR)/pmove.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_ccmds.o : $(SERVER_DIR)/sv_ccmds.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_ents.o : $(SERVER_DIR)/sv_ents.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_game.o : $(SERVER_DIR)/sv_game.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_init.o : $(SERVER_DIR)/sv_init.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_main.o : $(SERVER_DIR)/sv_main.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_send.o : $(SERVER_DIR)/sv_send.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_user.o : $(SERVER_DIR)/sv_user.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sv_world.o : $(SERVER_DIR)/sv_world.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/q_shlinux.o : $(LINUX_DIR)/q_shlinux.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/sys_linux.o : $(LINUX_DIR)/sys_linux.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/glob.o : $(LINUX_DIR)/glob.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/net_udp.o : $(LINUX_DIR)/net_udp.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/cd_null.o : $(NULL_DIR)/cd_null.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
$(BUILDDIR)/ded/cl_null.o : $(NULL_DIR)/cl_null.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
#############################################################################
|
||||
# GAME
|
||||
#############################################################################
|
||||
|
||||
GAME_OBJS = \
|
||||
$(BUILDDIR)/game/q_shared.o \
|
||||
$(BUILDDIR)/game/g_ai.o \
|
||||
$(BUILDDIR)/game/p_client.o \
|
||||
$(BUILDDIR)/game/g_chase.o \
|
||||
$(BUILDDIR)/game/g_cmds.o \
|
||||
$(BUILDDIR)/game/g_svcmds.o \
|
||||
$(BUILDDIR)/game/g_chase.o \
|
||||
$(BUILDDIR)/game/g_combat.o \
|
||||
$(BUILDDIR)/game/g_func.o \
|
||||
$(BUILDDIR)/game/g_items.o \
|
||||
|
@ -353,7 +498,6 @@ GAME_OBJS = \
|
|||
$(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)
|
||||
|
@ -365,15 +509,15 @@ $(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
|
|||
$(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_chase.o : $(GAME_DIR)/g_chase.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/game/g_combat.o : $(GAME_DIR)/g_combat.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
|
@ -498,7 +642,7 @@ $(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)
|
||||
$(DO_SHLIB_DEBUG_CC)
|
||||
|
||||
$(BUILDDIR)/game/m_flash.o : $(GAME_DIR)/m_flash.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
@ -614,7 +758,7 @@ $(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)
|
||||
$(DO_SHLIB_DEBUG_CC)
|
||||
|
||||
#############################################################################
|
||||
# XATRIX
|
||||
|
@ -623,6 +767,7 @@ $(BUILDDIR)/ctf/q_shared.o : $(CTF_DIR)/q_shared.c
|
|||
XATRIX_OBJS = \
|
||||
$(BUILDDIR)/xatrix/g_ai.o \
|
||||
$(BUILDDIR)/xatrix/g_cmds.o \
|
||||
$(BUILDDIR)/xatrix/g_chase.o \
|
||||
$(BUILDDIR)/xatrix/g_combat.o \
|
||||
$(BUILDDIR)/xatrix/g_func.o \
|
||||
$(BUILDDIR)/xatrix/g_items.o \
|
||||
|
@ -682,6 +827,9 @@ $(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
|
|||
$(BUILDDIR)/xatrix/g_cmds.o : $(XATRIX_DIR)/g_cmds.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/xatrix/g_chase.o : $(XATRIX_DIR)/g_chase.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/xatrix/g_combat.o : $(XATRIX_DIR)/g_combat.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
|
@ -827,8 +975,264 @@ $(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_DEBUG_CC)
|
||||
|
||||
#############################################################################
|
||||
# ROGUE
|
||||
#############################################################################
|
||||
|
||||
ROGUE_OBJS = \
|
||||
$(BUILDDIR)/rogue/dm_ball.o \
|
||||
$(BUILDDIR)/rogue/dm_tag.o \
|
||||
$(BUILDDIR)/rogue/g_ai.o \
|
||||
$(BUILDDIR)/rogue/g_chase.o \
|
||||
$(BUILDDIR)/rogue/g_cmds.o \
|
||||
$(BUILDDIR)/rogue/g_combat.o \
|
||||
$(BUILDDIR)/rogue/g_func.o \
|
||||
$(BUILDDIR)/rogue/g_items.o \
|
||||
$(BUILDDIR)/rogue/g_main.o \
|
||||
$(BUILDDIR)/rogue/g_misc.o \
|
||||
$(BUILDDIR)/rogue/g_monster.o \
|
||||
$(BUILDDIR)/rogue/g_newai.o \
|
||||
$(BUILDDIR)/rogue/g_newdm.o \
|
||||
$(BUILDDIR)/rogue/g_newfnc.o \
|
||||
$(BUILDDIR)/rogue/g_newtarg.o \
|
||||
$(BUILDDIR)/rogue/g_newtrig.o \
|
||||
$(BUILDDIR)/rogue/g_newweap.o \
|
||||
$(BUILDDIR)/rogue/g_phys.o \
|
||||
$(BUILDDIR)/rogue/g_save.o \
|
||||
$(BUILDDIR)/rogue/g_spawn.o \
|
||||
$(BUILDDIR)/rogue/g_sphere.o \
|
||||
$(BUILDDIR)/rogue/g_svcmds.o \
|
||||
$(BUILDDIR)/rogue/g_target.o \
|
||||
$(BUILDDIR)/rogue/g_trigger.o \
|
||||
$(BUILDDIR)/rogue/g_turret.o \
|
||||
$(BUILDDIR)/rogue/g_utils.o \
|
||||
$(BUILDDIR)/rogue/g_weapon.o \
|
||||
$(BUILDDIR)/rogue/m_actor.o \
|
||||
$(BUILDDIR)/rogue/m_berserk.o \
|
||||
$(BUILDDIR)/rogue/m_boss2.o \
|
||||
$(BUILDDIR)/rogue/m_boss3.o \
|
||||
$(BUILDDIR)/rogue/m_boss31.o \
|
||||
$(BUILDDIR)/rogue/m_boss32.o \
|
||||
$(BUILDDIR)/rogue/m_brain.o \
|
||||
$(BUILDDIR)/rogue/m_carrier.o \
|
||||
$(BUILDDIR)/rogue/m_chick.o \
|
||||
$(BUILDDIR)/rogue/m_flash.o \
|
||||
$(BUILDDIR)/rogue/m_flipper.o \
|
||||
$(BUILDDIR)/rogue/m_float.o \
|
||||
$(BUILDDIR)/rogue/m_flyer.o \
|
||||
$(BUILDDIR)/rogue/m_gladiator.o \
|
||||
$(BUILDDIR)/rogue/m_gunner.o \
|
||||
$(BUILDDIR)/rogue/m_hover.o \
|
||||
$(BUILDDIR)/rogue/m_infantry.o \
|
||||
$(BUILDDIR)/rogue/m_insane.o \
|
||||
$(BUILDDIR)/rogue/m_medic.o \
|
||||
$(BUILDDIR)/rogue/m_move.o \
|
||||
$(BUILDDIR)/rogue/m_mutant.o \
|
||||
$(BUILDDIR)/rogue/m_parasite.o \
|
||||
$(BUILDDIR)/rogue/m_soldier.o \
|
||||
$(BUILDDIR)/rogue/m_stalker.o \
|
||||
$(BUILDDIR)/rogue/m_supertank.o \
|
||||
$(BUILDDIR)/rogue/m_tank.o \
|
||||
$(BUILDDIR)/rogue/m_turret.o \
|
||||
$(BUILDDIR)/rogue/m_widow.o \
|
||||
$(BUILDDIR)/rogue/m_widow2.o \
|
||||
$(BUILDDIR)/rogue/p_client.o \
|
||||
$(BUILDDIR)/rogue/p_hud.o \
|
||||
$(BUILDDIR)/rogue/p_trail.o \
|
||||
$(BUILDDIR)/rogue/p_view.o \
|
||||
$(BUILDDIR)/rogue/p_weapon.o \
|
||||
$(BUILDDIR)/rogue/q_shared.o
|
||||
|
||||
$(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT) : $(ROGUE_OBJS)
|
||||
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS)
|
||||
|
||||
$(BUILDDIR)/rogue/dm_ball.o : $(ROGUE_DIR)/dm_ball.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/dm_tag.o : $(ROGUE_DIR)/dm_tag.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_ai.o : $(ROGUE_DIR)/g_ai.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_chase.o : $(ROGUE_DIR)/g_chase.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_cmds.o : $(ROGUE_DIR)/g_cmds.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_combat.o : $(ROGUE_DIR)/g_combat.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_func.o : $(ROGUE_DIR)/g_func.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_items.o : $(ROGUE_DIR)/g_items.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_main.o : $(ROGUE_DIR)/g_main.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_misc.o : $(ROGUE_DIR)/g_misc.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_monster.o : $(ROGUE_DIR)/g_monster.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newai.o : $(ROGUE_DIR)/g_newai.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newdm.o : $(ROGUE_DIR)/g_newdm.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newfnc.o : $(ROGUE_DIR)/g_newfnc.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newtarg.o : $(ROGUE_DIR)/g_newtarg.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newtrig.o : $(ROGUE_DIR)/g_newtrig.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_newweap.o : $(ROGUE_DIR)/g_newweap.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_phys.o : $(ROGUE_DIR)/g_phys.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_save.o : $(ROGUE_DIR)/g_save.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_spawn.o : $(ROGUE_DIR)/g_spawn.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_sphere.o : $(ROGUE_DIR)/g_sphere.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_svcmds.o : $(ROGUE_DIR)/g_svcmds.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_target.o : $(ROGUE_DIR)/g_target.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_trigger.o : $(ROGUE_DIR)/g_trigger.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_turret.o : $(ROGUE_DIR)/g_turret.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_utils.o : $(ROGUE_DIR)/g_utils.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/g_weapon.o : $(ROGUE_DIR)/g_weapon.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_actor.o : $(ROGUE_DIR)/m_actor.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_berserk.o : $(ROGUE_DIR)/m_berserk.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss2.o : $(ROGUE_DIR)/m_boss2.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss3.o : $(ROGUE_DIR)/m_boss3.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss31.o : $(ROGUE_DIR)/m_boss31.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_boss32.o : $(ROGUE_DIR)/m_boss32.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_brain.o : $(ROGUE_DIR)/m_brain.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_carrier.o : $(ROGUE_DIR)/m_carrier.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_chick.o : $(ROGUE_DIR)/m_chick.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_flash.o : $(ROGUE_DIR)/m_flash.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_flipper.o : $(ROGUE_DIR)/m_flipper.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_float.o : $(ROGUE_DIR)/m_float.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_flyer.o : $(ROGUE_DIR)/m_flyer.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_gladiator.o : $(ROGUE_DIR)/m_gladiator.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_gunner.o : $(ROGUE_DIR)/m_gunner.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_hover.o : $(ROGUE_DIR)/m_hover.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_infantry.o : $(ROGUE_DIR)/m_infantry.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_insane.o : $(ROGUE_DIR)/m_insane.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_medic.o : $(ROGUE_DIR)/m_medic.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_move.o : $(ROGUE_DIR)/m_move.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_mutant.o : $(ROGUE_DIR)/m_mutant.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_parasite.o : $(ROGUE_DIR)/m_parasite.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_soldier.o : $(ROGUE_DIR)/m_soldier.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_stalker.o : $(ROGUE_DIR)/m_stalker.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_supertank.o : $(ROGUE_DIR)/m_supertank.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_tank.o : $(ROGUE_DIR)/m_tank.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_turret.o : $(ROGUE_DIR)/m_turret.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_widow.o : $(ROGUE_DIR)/m_widow.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/m_widow2.o : $(ROGUE_DIR)/m_widow2.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_client.o : $(ROGUE_DIR)/p_client.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_hud.o : $(ROGUE_DIR)/p_hud.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_trail.o : $(ROGUE_DIR)/p_trail.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_view.o : $(ROGUE_DIR)/p_view.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/p_weapon.o : $(ROGUE_DIR)/p_weapon.c
|
||||
$(DO_SHLIB_CC)
|
||||
|
||||
$(BUILDDIR)/rogue/q_shared.o : $(ROGUE_DIR)/q_shared.c
|
||||
$(DO_SHLIB_DEBUG_CC)
|
||||
|
||||
#############################################################################
|
||||
# REF_SOFT
|
||||
|
@ -869,20 +1273,20 @@ REF_SOFT_OBJS = \
|
|||
$(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_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) \
|
||||
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -Xlinker -Map -Xlinker ref_soft.map -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) \
|
||||
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -Xlinker -Map -Xlinker ref_softx.map -o $@ $(REF_SOFT_OBJS) \
|
||||
$(REF_SOFT_X11_OBJS) $(XLDFLAGS)
|
||||
|
||||
$(BUILDDIR)/ref_soft/r_aclip.o : $(REF_SOFT_DIR)/r_aclip.c
|
||||
|
@ -1006,13 +1410,28 @@ REF_GL_OBJS = \
|
|||
$(BUILDDIR)/ref_gl/gl_warp.o \
|
||||
\
|
||||
$(BUILDDIR)/ref_gl/qgl_linux.o \
|
||||
$(BUILDDIR)/ref_gl/gl_glx.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)
|
||||
# TTimo: taking out Mesa
|
||||
ifeq ($(DOFXMESA),1)
|
||||
REF_GL_FXMESA_OBJS = \
|
||||
$(BUILDDIR)/ref_gl/gl_fxmesa.o \
|
||||
$(BUILDDIR)/ref_gl/rw_in_svgalib.o
|
||||
else
|
||||
REF_GL_FXMESA_OBJS = \
|
||||
$(BUILDDIR)/ref_gl/rw_in_svgalib.o
|
||||
endif
|
||||
|
||||
REF_GL_GLX_OBJS = \
|
||||
$(BUILDDIR)/ref_gl/gl_glx.o
|
||||
|
||||
$(BUILDDIR)/ref_gl.$(SHLIBEXT) : $(REF_GL_OBJS) $(REF_GL_FXMESA_OBJS)
|
||||
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(REF_GL_FXMESA_OBJS) $(GLLDFLAGS)
|
||||
|
||||
$(BUILDDIR)/ref_glx.$(SHLIBEXT) : $(REF_GL_OBJS) $(REF_GL_GLX_OBJS)
|
||||
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(REF_GL_OBJS) $(REF_GL_GLX_OBJS) $(GLXLDFLAGS)
|
||||
|
||||
$(BUILDDIR)/ref_gl/gl_draw.o : $(REF_GL_DIR)/gl_draw.c
|
||||
$(DO_GL_SHLIB_CC)
|
||||
|
@ -1044,6 +1463,9 @@ $(BUILDDIR)/ref_gl/gl_warp.o : $(REF_GL_DIR)/gl_warp.c
|
|||
$(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/gl_glx.o : $(LINUX_DIR)/gl_glx.c
|
||||
$(DO_GL_SHLIB_CC)
|
||||
|
||||
|
@ -1074,12 +1496,15 @@ clean-release:
|
|||
clean2:
|
||||
-rm -f \
|
||||
$(QUAKE2_OBJS) \
|
||||
$(Q2DED_OBJS) \
|
||||
$(QUAKE2_AS_OBJS) \
|
||||
$(GAME_OBJS) \
|
||||
$(CTF_OBJS) \
|
||||
$(XATRIX_OBJS) \
|
||||
$(ROGUE_OBJS) \
|
||||
$(REF_SOFT_OBJS) \
|
||||
$(REF_SOFT_SVGA_OBJS) \
|
||||
$(REF_SOFT_X11_OBJS) \
|
||||
$(REF_GL_OBJS)
|
||||
|
||||
$(REF_GL_OBJS) \
|
||||
$(REF_GL_FXMESA_OBJS) \
|
||||
$(REF_GL_GLX_OBJS)
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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_ifacea.h
|
||||
//
|
||||
|
|
|
@ -1,4 +1,23 @@
|
|||
/*
|
||||
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 Linux specific stuff having to do with the
|
||||
|
@ -24,10 +43,14 @@
|
|||
#include "../client/keys.h"
|
||||
#include "../linux/rw_linux.h"
|
||||
|
||||
#include "../linux/glw_linux.h"
|
||||
|
||||
#include <GL/fxmesa.h>
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
glwstate_t glw_state;
|
||||
|
||||
static qboolean GLimp_SwitchFullscreen( int width, int height );
|
||||
qboolean GLimp_InitGL (void);
|
||||
|
||||
|
@ -36,12 +59,25 @@ extern cvar_t *vid_ref;
|
|||
|
||||
static fxMesaContext fc = NULL;
|
||||
|
||||
#define NUM_RESOLUTIONS 3
|
||||
#define NUM_RESOLUTIONS 16
|
||||
|
||||
static resolutions[NUM_RESOLUTIONS][3]={
|
||||
{ 512, 384, GR_RESOLUTION_512x384 },
|
||||
{ 640, 400, GR_RESOLUTION_640x400 },
|
||||
{ 640, 480, GR_RESOLUTION_640x480 }
|
||||
{ 320,200, GR_RESOLUTION_320x200 },
|
||||
{ 320,240, GR_RESOLUTION_320x240 },
|
||||
{ 400,256, GR_RESOLUTION_400x256 },
|
||||
{ 400,300, GR_RESOLUTION_400x300 },
|
||||
{ 512,384, GR_RESOLUTION_512x384 },
|
||||
{ 640,200, GR_RESOLUTION_640x200 },
|
||||
{ 640,350, GR_RESOLUTION_640x350 },
|
||||
{ 640,400, GR_RESOLUTION_640x400 },
|
||||
{ 640,480, GR_RESOLUTION_640x480 },
|
||||
{ 800,600, GR_RESOLUTION_800x600 },
|
||||
{ 960,720, GR_RESOLUTION_960x720 },
|
||||
{ 856,480, GR_RESOLUTION_856x480 },
|
||||
{ 512,256, GR_RESOLUTION_512x256 },
|
||||
{ 1024,768, GR_RESOLUTION_1024x768 },
|
||||
{ 1280,1024,GR_RESOLUTION_1280x1024 },
|
||||
{ 1600,1200,GR_RESOLUTION_1600x1200 }
|
||||
};
|
||||
|
||||
static int findres(int *width, int *height)
|
||||
|
@ -111,7 +147,7 @@ int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
|
|||
attribs[4] = 1;
|
||||
attribs[5] = FXMESA_NONE;
|
||||
|
||||
fc = fxMesaCreateContext(0, findres(&width, &height), GR_REFRESH_75Hz,
|
||||
fc = qfxMesaCreateContext(0, findres(&width, &height), GR_REFRESH_75Hz,
|
||||
attribs);
|
||||
if (!fc)
|
||||
return rserr_invalid_mode;
|
||||
|
@ -122,7 +158,7 @@ int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
|
|||
// let the sound and input subsystems know about the new window
|
||||
ri.Vid_NewWindow (width, height);
|
||||
|
||||
fxMesaMakeCurrent(fc);
|
||||
qfxMesaMakeCurrent(fc);
|
||||
|
||||
return rserr_ok;
|
||||
}
|
||||
|
@ -139,7 +175,7 @@ int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
|
|||
void GLimp_Shutdown( void )
|
||||
{
|
||||
if (fc) {
|
||||
fxMesaDestroyContext(fc);
|
||||
qfxMesaDestroyContext(fc);
|
||||
fc = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -173,8 +209,8 @@ void GLimp_BeginFrame( float camera_seperation )
|
|||
*/
|
||||
void GLimp_EndFrame (void)
|
||||
{
|
||||
glFlush();
|
||||
fxMesaSwapBuffers();
|
||||
qglFlush();
|
||||
qfxMesaSwapBuffers();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -184,8 +220,6 @@ 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 )
|
||||
|
@ -200,7 +234,7 @@ void Fake_glColorTableEXT( GLenum target, GLenum internalformat,
|
|||
temptable[i][0] = *intbl++;
|
||||
temptable[i][3] = 255;
|
||||
}
|
||||
gl3DfxSetPaletteEXT((GLuint *)temptable);
|
||||
qglEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
|
||||
qgl3DfxSetPaletteEXT((GLuint *)temptable);
|
||||
}
|
||||
|
||||
|
||||
|
|
1236
linux/gl_glx.c
1236
linux/gl_glx.c
File diff suppressed because it is too large
Load diff
19
linux/glob.c
19
linux/glob.c
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <stdio.h>
|
||||
#include "../linux/glob.h"
|
||||
|
|
19
linux/glob.h
19
linux/glob.h
|
@ -1 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
int glob_match(char *pattern, char *text);
|
||||
|
|
36
linux/glw_linux.h
Normal file
36
linux/glw_linux.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
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 __linux__
|
||||
#error You shouldnt be including this file on non-Linux platforms
|
||||
#endif
|
||||
|
||||
#ifndef __GLW_LINUX_H__
|
||||
#define __GLW_LINUX_H__
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *OpenGLLib; // instance of OpenGL library
|
||||
|
||||
FILE *log_fp;
|
||||
} glwstate_t;
|
||||
|
||||
extern glwstate_t glw_state;
|
||||
|
||||
#endif
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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_null.c -- for systems without a mouse
|
||||
|
||||
#include "../client/client.h"
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 "../qcommon/qcommon.h"
|
||||
|
@ -280,13 +299,17 @@ qboolean NET_GetPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_messag
|
|||
fromlen = sizeof(from);
|
||||
ret = recvfrom (net_socket, net_message->data, net_message->maxsize
|
||||
, 0, (struct sockaddr *)&from, &fromlen);
|
||||
|
||||
SockadrToNetadr (&from, net_from);
|
||||
|
||||
if (ret == -1)
|
||||
{
|
||||
err = errno;
|
||||
|
||||
if (err == EWOULDBLOCK || err == ECONNREFUSED)
|
||||
continue;
|
||||
Com_Printf ("NET_GetPacket: %s", NET_ErrorString());
|
||||
Com_Printf ("NET_GetPacket: %s from %s\n", NET_ErrorString(),
|
||||
NET_AdrToString(*net_from));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -297,7 +320,6 @@ qboolean NET_GetPacket (netsrc_t sock, netadr_t *net_from, sizebuf_t *net_messag
|
|||
}
|
||||
|
||||
net_message->cursize = ret;
|
||||
SockadrToNetadr (&from, net_from);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -350,7 +372,8 @@ void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to)
|
|||
ret = sendto (net_socket, data, length, 0, (struct sockaddr *)&addr, sizeof(addr) );
|
||||
if (ret == -1)
|
||||
{
|
||||
Com_Printf ("NET_SendPacket ERROR: %i\n", NET_ErrorString());
|
||||
Com_Printf ("NET_SendPacket ERROR: %s to %s\n", NET_ErrorString(),
|
||||
NET_AdrToString (to));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -450,7 +473,7 @@ int NET_Socket (char *net_interface, int port)
|
|||
|
||||
if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
|
||||
{
|
||||
Com_Printf ("ERROR: UDP_OpenSocket: socket:", NET_ErrorString());
|
||||
Com_Printf ("ERROR: UDP_OpenSocket: socket: %s", NET_ErrorString());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -468,7 +491,7 @@ int NET_Socket (char *net_interface, int port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!net_interface || !net_interface[0] || !strcasecmp(net_interface, "localhost"))
|
||||
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);
|
||||
|
|
|
@ -1,8 +1,27 @@
|
|||
/*
|
||||
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 <sys/types.h>
|
||||
#include <sys/stat.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>
|
||||
|
@ -126,7 +145,12 @@ static qboolean CompareAttributes(char *path, char *name,
|
|||
if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
|
||||
return false;
|
||||
|
||||
#if 1
|
||||
sprintf(fn, "%s/%s", path, name);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
||||
if (stat(fn, &st) == -1)
|
||||
return false; // shouldn't happen
|
||||
|
||||
|
|
19
linux/qasm.h
19
linux/qasm.h
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 __ASM_I386__
|
||||
#define __ASM_I386__
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
219
linux/readme
Normal file
219
linux/readme
Normal file
|
@ -0,0 +1,219 @@
|
|||
Quake2 3.20 For Linux
|
||||
---------------------
|
||||
|
||||
Please see the readme.txt file included for general information about the
|
||||
game. This file contains Linux specific information.
|
||||
|
||||
Please see the file 3.20_Changes.txt for changes from previous versions.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Quake2 for Linux supports the following video subsystems:
|
||||
|
||||
- SVGALib Console Graphics (ref_soft.so)
|
||||
- Requires SVGALib 1.2.0 or later
|
||||
- X11 Window Graphics (ref_softx.so)
|
||||
- X11R5 or later, XShm shared memory extension supported
|
||||
- 3DFX fxMesa with Mesa 3-D or 3DFX Miniport (ref_gl.so)
|
||||
- Mesa 3-D 2.6 or later, specifically compiled for 3DFX support
|
||||
Mesa 3-D 2.6 compiled with 3DFX support is provided with this archive.
|
||||
- Generic glX (X11) based OpenGL (ref_glx.so)
|
||||
- Requires a glX based hardware accelerated OpenGL implementation.
|
||||
Mesa 3-D 2.6 supports this on 3DFX hardware.
|
||||
|
||||
Also included is a specific 3DFX mini-OpenGL implementation for running Quake2
|
||||
on 3DFX hardware.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Make sure you have the appropirate hardware, drivers and libraries installed
|
||||
for the renderer you are going to play on.
|
||||
|
||||
Quake2 for Linux supports the following renderers:
|
||||
|
||||
- ref_soft
|
||||
Software rendering under SVGALib (console only). SVGALib 1.2.10 or later
|
||||
is required. Note that SVGALib 1.2.11 supports the ability to run a
|
||||
SVGALib application under X11 as it will automatically allocate a new
|
||||
console. The default mode is 320x240 (ModeX) since that is the lowest
|
||||
resolution supported by Quake2. If SVGALib supports your video card, higher
|
||||
resolution modes such as 640x480 and 800x600 are also supported.
|
||||
|
||||
Please note that you may need to configure your mouse for SVGALib in
|
||||
/etc/vga/libvga.config (or /etc/libvga.config).
|
||||
|
||||
- ref_softx
|
||||
Software rendering under X11. This uses the MITSHM Extension and should
|
||||
work will virtually all Linux X Servers. **NOTE: Do not resize the window
|
||||
under X11. You must use the Video menu to change resolution/window size.
|
||||
|
||||
By default, the mouse will not be 'tied' to the Quake2 window. To cause
|
||||
Quake2 to grab the mouse, select 'Windowed Mouse' from the video menu,
|
||||
or type '_windowed_mouse 0' at the console. Do the reverse to release it.
|
||||
You can bind keys to grab and release the mouse in the console, like so:
|
||||
bind i "_windowed_mouse 1"
|
||||
bind o "_windowed_mouse 0"
|
||||
Then "i" will grab the mouse and "o" will release it.
|
||||
|
||||
- ref_gl
|
||||
This render can be run with two different OpenGL drivers: Mesa 3-D
|
||||
ontop of Linux GLIDE, or 3DFX's mini-OpenGL Quake driver.
|
||||
For Mesa 3-D, the necessary libMesaGL.so.2.6 is included with this archive.
|
||||
You must copy it to /usr/lib or /usr/local/lib and run ldconfig (as root)
|
||||
in order to use it. You can do this as follows:
|
||||
tar cf - lib*GL* | (cd /usr/lib; tar xf -)
|
||||
You should use tar to keep the symlinks intact. Once you copy them over
|
||||
run ldconfig.
|
||||
You must also download and install the Linux GLIDE drivers at
|
||||
http://www.3dfx.com/software/download_glidel.html
|
||||
And install them as instructed.
|
||||
RPMs for GLIDE are available at :
|
||||
http://glide.xxedgexx.com/3DfxRPMS.html
|
||||
With version 3.20, the GL library is entirely runtime loaded. This means
|
||||
you can specify what shared object to load for GL display.
|
||||
To use Mesa 3-D GL (console), run quake with:
|
||||
./quake2 +set vid_ref gl +set gl_driver libMesaGL.so.2
|
||||
To use the 3DFX OpenGL Miniport, run the included quake2.3dfxgl:
|
||||
./quake2 +set vid_ref gl +set gl_driver lib3dfxgl.so
|
||||
The gl_driver cvar indicates the name of the library to load for GL
|
||||
functions. It can be in any directory listed in /etc/ld.so.conf
|
||||
or in /etc/quake2.conf
|
||||
|
||||
**NOTE: There is a problem on libc5 systems where a vid_restart (causing
|
||||
a reload of the video system) will crash. There doesn't seem to be a
|
||||
solution to this yet. It looks to be some sort of ld.so dynamic loading
|
||||
interaction with SVGALib and ref_gl.so. A work around is to start in
|
||||
software mode (./quake2 +set vid_ref soft), then use the menu to set your
|
||||
mode and a vid_restart will work when going from software to GL. Exit
|
||||
out then and save your video mode settings.
|
||||
This problem does not occur on libc6 (glibc) based systems; vid_restart
|
||||
works fine on there.
|
||||
|
||||
- ref_glx
|
||||
ref_glx should run on many different hardward OpenGL implementations under
|
||||
Linux and X11. This binary is an X11 application and must be run under
|
||||
X11. It will work with Mesa 3-D as a standard glX based OpenGL
|
||||
applications. If the Mesa 3-D library is compiled with 3DFX support,
|
||||
you can have Mesa 3-D support 3DFX hardware under X11 by setting the
|
||||
enviroment variable "MESA_GLX_FX" to "fullscreen" for fullscreen mode
|
||||
and "window" for windowed mode, eg. "export MESA_GLX_FX=fullscreen" for sh
|
||||
or "setenv MESA_GLX_FX fullscreen" for csh.
|
||||
|
||||
As with ref_gl, the "gl_driver" cvar indicates the shared library to load
|
||||
for OpenGL functions (the glX functions must provided in that library
|
||||
as well).
|
||||
|
||||
To install the Quake2 data files, mount your Quake2 CD and copy
|
||||
the directory install/data to the location where you want Quake2. You
|
||||
can also symlink it, but I don't recommend that. Around 200MB of disk
|
||||
space is required for a full installation.
|
||||
|
||||
For example:
|
||||
cp -r /mnt/cdrom/install/data/* /usr/games/quake2
|
||||
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
Quake2 requires root permissions to use the software (SVGALib) and GL (MesaGL
|
||||
w/3dfx) renders. In order to make this secure, some special considerations
|
||||
must be made.
|
||||
|
||||
Quake2 should get setuid root:
|
||||
chown root quake2
|
||||
chmod 4711 quake2
|
||||
|
||||
And the ref_soft.so and ref_gl.so files must owned by root.
|
||||
|
||||
The file /etc/quake2.conf must be installed. This file contains a single
|
||||
line with the path of where the ref shared libraries can be found.
|
||||
A sample one is included that lists /usr/games/quake2 as the default
|
||||
path. The libraries are only loaded out of the directory listed in
|
||||
/etc/quake2.conf for security considerations.
|
||||
|
||||
Special permissions are not required for the softx renderer, but quake2 may
|
||||
still need to be setuid root to open the sound device (quake2 will give up
|
||||
setuid root permissions before loading softx).
|
||||
|
||||
NOTE: If you use a setuid quake2 binary and run it as a normal user, it
|
||||
will NOT be able to switch renderers on the fly because root permissions
|
||||
are given up after the renderer is loaded. You can switch renderers on the
|
||||
fly if you run quake2 as root (su or log in as root).
|
||||
|
||||
NOTE: When the quake2 binary is run in dedicated server mode
|
||||
(+set dedicated 1), no special permissions are required and
|
||||
/etc/quake2.conf is not read since no renderer is loaded.
|
||||
|
||||
----
|
||||
|
||||
The first time you run Quake2, it will use ref_soft or ref_softx based
|
||||
on whether a DISPLAY environment variable exists.
|
||||
|
||||
To force the loading of a specific renderer at load time, use the following
|
||||
command lines:
|
||||
|
||||
./quake2 +set vid_ref soft
|
||||
./quake2 +set vid_ref softx
|
||||
./quake2 +set vid_ref gl
|
||||
./quake2 +set vid_ref glx
|
||||
|
||||
Linux Specific Cvars
|
||||
--------------------
|
||||
|
||||
To set this, use +set on the command line, i.e.:
|
||||
./quake2 +set cd_dev /dev/hdc +set sndmono 1
|
||||
|
||||
nocdaudio (defaults to 0)
|
||||
Do not enable cd audio if not zero
|
||||
|
||||
sndbits (defaults to 16)
|
||||
Set sound bit sample size.
|
||||
|
||||
sndspeed (defaults to 0)
|
||||
Set sound speed. Usual values are 8000, 11025, 22051 and 44100.
|
||||
If set to zero, causes the sound driver to attempt speeds in the following
|
||||
order: 11025, 22051, 44100, 8000.
|
||||
|
||||
sndchannels (defaults to 2)
|
||||
Indicates stereo or mono sound. Defaults to 2 (stereo). Use 1 for mono.
|
||||
|
||||
nostdout (defaults to 0)
|
||||
Whether to output console msgs to standard out. Non-zero is cease output.
|
||||
|
||||
Dedicated server
|
||||
----------------
|
||||
|
||||
To run Linux Quake2 as a dedicated server, just run it as follows:
|
||||
|
||||
./quake2 +set dedicated 1
|
||||
|
||||
You can also set dmflags, timelimit, etc. in a config file, like so:
|
||||
set timelimit 20
|
||||
set fraglimit 25
|
||||
set dmflags 532
|
||||
map fact3
|
||||
|
||||
Then exec that config file on load, like so:
|
||||
|
||||
./quake2 +set dedicated 1 +exec server.cfg
|
||||
|
||||
If you use a config file, you must put a 'map' command in it or the
|
||||
server won't load a map.
|
||||
|
||||
To run a dedicated server in the background, use this;
|
||||
|
||||
nohup ./quake2 +set dedicated 1 +exec server.cfg &
|
||||
|
||||
A better way is to run Quake2 on a tty via screen. screen can be found
|
||||
at ftp://prep.ai.mit.edu/pub/gnu/screen-3.7.4.tar.gz, but it comes with
|
||||
most modern Linux installations now.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Linux Quake2 is an unsupported product. Usage of this product is bound by
|
||||
the legal notice found on the distribution Quake2 CDROM.
|
||||
|
||||
/// Zoid
|
||||
zoid@idsoftware.com
|
||||
|
23
linux/readme-3.21-release
Normal file
23
linux/readme-3.21-release
Normal file
|
@ -0,0 +1,23 @@
|
|||
12-22-2001
|
||||
|
||||
Some notes about this release on linux:
|
||||
|
||||
#1: it is recommended that you have a working Quake2 installation already
|
||||
(i.e. download precompiled binaries and stuff, have /usr/local/games/quake2
|
||||
with all the files etc.)
|
||||
|
||||
#2: it builds in debug, only ref_glx.so has been tested
|
||||
|
||||
once compiled, you need to create baseq2/ directory,
|
||||
and symlink the pak, symlink debugi386-glibc/gamei386.so
|
||||
|
||||
then to start Q2, in debugi386-glibc:
|
||||
ln -s /usr/local/games/quake2/baseq2
|
||||
./quake2 +set vid_ref glx +set gl_driver /usr/lib/libGL.so
|
||||
|
||||
you will need to edit /etc/quake2.conf, make it point to the right place
|
||||
for loading of ref_glx.so
|
||||
(I just put '.' in my quake2.conf to rely on current dir)
|
||||
|
||||
TTimo (ttimo@idsoftware.com)
|
||||
|
53
linux/readme.axp
Normal file
53
linux/readme.axp
Normal file
|
@ -0,0 +1,53 @@
|
|||
Quake2 Dedicated 3.18 For Linux AXP
|
||||
-----------------------------------
|
||||
|
||||
Please see the readme.txt file included for general information about the
|
||||
game. This file contains Linux/AXP specific information.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Linux Alpha kernel 2.0.30 or later, Redhat 5.0 (glibc) or later.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
To install the Quake2 data files, mount your Quake2 CD and copy
|
||||
the directory install/data to the location where you want Quake2. You
|
||||
can also symlink it, but I don't recommend that. Around 200MB of disk
|
||||
space is required for a full installation.
|
||||
|
||||
For example:
|
||||
cp -r /mnt/cdrom/install/data/* /usr/games/quake2
|
||||
|
||||
This binary only runs as a dedicated server and requires no special
|
||||
user permissions.
|
||||
|
||||
You can also set dmflags, timelimit, etc. in a config file, like so:
|
||||
set timelimit 20
|
||||
set fraglimit 25
|
||||
set dmflags 532
|
||||
map fact3
|
||||
|
||||
Then exec that config file on load, like so:
|
||||
|
||||
./q2ded +exec server.cfg
|
||||
|
||||
If you use a config file, you must put a 'map' command in it or the
|
||||
server won't load a map.
|
||||
|
||||
To run a dedicated server in the background, use this;
|
||||
|
||||
nohup ./q2ded +exec server.cfg &
|
||||
|
||||
A better way is to run Quake2 on a tty via screen. screen can be found
|
||||
at ftp://prep.ai.mit.edu/pub/gnu/screen-3.7.4.tar.gz.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Linux Quake2 is an unsupported product. Usage of this product is bound by
|
||||
the legal notice found on the distribution Quake2 CDROM.
|
||||
|
||||
/// Zoid
|
||||
zoid@idsoftware.com
|
||||
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
typedef void (*Key_Event_fp_t)(int key, qboolean down);
|
||||
|
|
|
@ -1,4 +1,23 @@
|
|||
/*
|
||||
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_SVGALBI.C
|
||||
**
|
||||
** This file contains ALL Linux specific stuff having to do with the
|
||||
|
|
752
linux/rw_x11.c
752
linux/rw_x11.c
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -216,7 +235,7 @@ void *Sys_GetGameAPI (void *parms)
|
|||
|
||||
getcwd(curpath, sizeof(curpath));
|
||||
|
||||
Com_Printf("------- Loading %s -------", gamename);
|
||||
Com_Printf("------- Loading %s -------\n", gamename);
|
||||
|
||||
// now run through the search paths
|
||||
path = NULL;
|
||||
|
@ -226,10 +245,10 @@ void *Sys_GetGameAPI (void *parms)
|
|||
if (!path)
|
||||
return NULL; // couldn't find one anywhere
|
||||
sprintf (name, "%s/%s/%s", curpath, path, gamename);
|
||||
game_library = dlopen (name, RTLD_NOW );
|
||||
game_library = dlopen (name, RTLD_LAZY );
|
||||
if (game_library)
|
||||
{
|
||||
Com_DPrintf ("LoadLibrary (%s)\n",name);
|
||||
Com_Printf ("LoadLibrary (%s)\n",name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,31 @@
|
|||
/*
|
||||
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_SOFTX11 1
|
||||
#define REF_OPENGL 2
|
||||
#define REF_MESA3D 2
|
||||
#define REF_3DFXGL 3
|
||||
#define REF_OPENGLX 4
|
||||
#define REF_MESA3DGLX 5
|
||||
|
||||
extern cvar_t *vid_ref;
|
||||
extern cvar_t *vid_fullscreen;
|
||||
|
@ -82,8 +104,8 @@ static void BrightnessCallback( void *s )
|
|||
else
|
||||
s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue;
|
||||
|
||||
if ( strcasecmp( vid_ref->string, "soft" ) == 0 ||
|
||||
strcasecmp( vid_ref->string, "softx" ) == 0 )
|
||||
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;
|
||||
|
||||
|
@ -129,9 +151,33 @@ static void ApplyChanges( void *unused )
|
|||
case REF_SOFTX11:
|
||||
Cvar_Set( "vid_ref", "softx" );
|
||||
break;
|
||||
case REF_OPENGL:
|
||||
|
||||
case REF_MESA3D :
|
||||
Cvar_Set( "vid_ref", "gl" );
|
||||
Cvar_Set( "gl_driver", "opengl32" );
|
||||
Cvar_Set( "gl_driver", "libMesaGL.so.2" );
|
||||
if (gl_driver->modified)
|
||||
vid_ref->modified = true;
|
||||
break;
|
||||
|
||||
case REF_OPENGLX :
|
||||
Cvar_Set( "vid_ref", "glx" );
|
||||
Cvar_Set( "gl_driver", "libGL.so" );
|
||||
if (gl_driver->modified)
|
||||
vid_ref->modified = true;
|
||||
break;
|
||||
|
||||
case REF_MESA3DGLX :
|
||||
Cvar_Set( "vid_ref", "glx" );
|
||||
Cvar_Set( "gl_driver", "libMesaGL.so.2" );
|
||||
if (gl_driver->modified)
|
||||
vid_ref->modified = true;
|
||||
break;
|
||||
|
||||
case REF_3DFXGL :
|
||||
Cvar_Set( "vid_ref", "gl" );
|
||||
Cvar_Set( "gl_driver", "lib3dfxgl.so" );
|
||||
if (gl_driver->modified)
|
||||
vid_ref->modified = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -140,12 +186,12 @@ static void ApplyChanges( void *unused )
|
|||
** update appropriate stuff if we're running OpenGL and gamma
|
||||
** has been modified
|
||||
*/
|
||||
if ( strcasecmp( vid_ref->string, "gl" ) == 0 )
|
||||
if ( stricmp( vid_ref->string, "gl" ) == 0 )
|
||||
{
|
||||
if ( vid_gamma->modified )
|
||||
{
|
||||
vid_ref->modified = true;
|
||||
if ( strcasecmp( gl_driver->string, "3dfxgl" ) == 0 )
|
||||
if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 )
|
||||
{
|
||||
char envbuffer[1024];
|
||||
float g;
|
||||
|
@ -182,13 +228,17 @@ void VID_MenuInit( void )
|
|||
"[1152 864 ]",
|
||||
"[1280 1024]",
|
||||
"[1600 1200]",
|
||||
"[2048 1536]",
|
||||
0
|
||||
};
|
||||
static const char *refs[] =
|
||||
{
|
||||
"[software ]",
|
||||
"[software X11 ]",
|
||||
"[default OpenGL]",
|
||||
"[software ]",
|
||||
"[software X11 ]",
|
||||
"[Mesa 3-D 3DFX ]",
|
||||
"[3DFXGL Miniport]",
|
||||
"[OpenGL glX ]",
|
||||
"[Mesa 3-D glX ]",
|
||||
0
|
||||
};
|
||||
static const char *yesno_names[] =
|
||||
|
@ -200,7 +250,7 @@ void VID_MenuInit( void )
|
|||
int i;
|
||||
|
||||
if ( !gl_driver )
|
||||
gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
|
||||
gl_driver = Cvar_Get( "gl_driver", "libMesaGL.so.2", 0 );
|
||||
if ( !gl_picmip )
|
||||
gl_picmip = Cvar_Get( "gl_picmip", "0", 0 );
|
||||
if ( !gl_mode )
|
||||
|
@ -238,17 +288,18 @@ void VID_MenuInit( void )
|
|||
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;
|
||||
if ( strcmp( gl_driver->string, "lib3dfxgl.so" ) == 0 )
|
||||
s_ref_list[s_current_menu_index].curvalue = REF_3DFXGL;
|
||||
else
|
||||
s_ref_list[s_current_menu_index].curvalue = REF_VERITE;
|
||||
#endif
|
||||
s_ref_list[s_current_menu_index].curvalue = REF_MESA3D;
|
||||
}
|
||||
else if ( strcmp( vid_ref->string, "glx" ) == 0 )
|
||||
{
|
||||
s_current_menu_index = OPENGL_MENU;
|
||||
if ( strcmp( gl_driver->string, "libMesaGL.so.2" ) == 0 )
|
||||
s_ref_list[s_current_menu_index].curvalue = REF_MESA3DGLX;
|
||||
else
|
||||
s_ref_list[s_current_menu_index].curvalue = REF_OPENGLX;
|
||||
}
|
||||
|
||||
s_software_menu.x = viddef.width * 0.50;
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
#define SO_FILE "/etc/quake2.conf"
|
||||
|
||||
#include <assert.h>
|
||||
#include <dlfcn.h> // ELF dl loader
|
||||
#include <sys/stat.h>
|
||||
|
@ -31,6 +48,8 @@ qboolean reflib_active = 0;
|
|||
|
||||
#define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
|
||||
|
||||
const char so_file[] = "/etc/quake2.conf";
|
||||
|
||||
/** KEYBOARD **************************************************************/
|
||||
|
||||
void Do_Key_Event(int key, qboolean down);
|
||||
|
@ -127,7 +146,8 @@ vidmode_t vid_modes[] =
|
|||
{ "Mode 6: 1024x768", 1024, 768, 6 },
|
||||
{ "Mode 7: 1152x864", 1152, 864, 7 },
|
||||
{ "Mode 8: 1280x1024", 1280, 1024, 8 },
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 9 }
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 9 },
|
||||
{ "Mode 10: 2048x1536", 2048, 1536, 10 }
|
||||
};
|
||||
|
||||
qboolean VID_GetModeInfo( int *width, int *height, int mode )
|
||||
|
@ -206,29 +226,29 @@ qboolean VID_LoadRefresh( char *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);
|
||||
if ((fp = fopen(so_file, "r")) == NULL) {
|
||||
Com_Printf( "LoadLibrary(\"%s\") failed: can't open %s (required for location of ref libraries)\n", name, so_file);
|
||||
return false;
|
||||
}
|
||||
fgets(fn, sizeof(fn), fp);
|
||||
fclose(fp);
|
||||
if (*fn && fn[strlen(fn) - 1] == '\n')
|
||||
while (*fn && isspace(fn[strlen(fn) - 1]))
|
||||
fn[strlen(fn) - 1] = 0;
|
||||
|
||||
strcat(fn, "/");
|
||||
strcat(fn, name);
|
||||
|
||||
// permission checking
|
||||
if (0 && strstr(fn, "softx") == NULL) { // softx doesn't require root
|
||||
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 0
|
||||
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;
|
||||
|
@ -240,12 +260,14 @@ qboolean VID_LoadRefresh( char *name )
|
|||
setegid(getgid());
|
||||
}
|
||||
|
||||
if ( ( reflib_library = dlopen( fn, RTLD_NOW ) ) == 0 )
|
||||
if ( ( reflib_library = dlopen( fn, RTLD_LAZY | RTLD_GLOBAL ) ) == 0 )
|
||||
{
|
||||
Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name , dlerror());
|
||||
return false;
|
||||
}
|
||||
|
||||
Com_Printf( "LoadLibrary(\"%s\")\n", fn );
|
||||
|
||||
ri.Cmd_AddCommand = Cmd_AddCommand;
|
||||
ri.Cmd_RemoveCommand = Cmd_RemoveCommand;
|
||||
ri.Cmd_Argc = Cmd_Argc;
|
||||
|
@ -440,7 +462,7 @@ void VID_Shutdown (void)
|
|||
|
||||
cvar_t *in_joystick;
|
||||
|
||||
// This if fake, it's acutally done by the Refresh load
|
||||
// This is fake, it's acutally done by the Refresh load
|
||||
void IN_Init (void)
|
||||
{
|
||||
in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE);
|
||||
|
@ -472,14 +494,20 @@ void IN_Move (usercmd_t *cmd)
|
|||
|
||||
void IN_Frame (void)
|
||||
{
|
||||
if (RW_IN_Activate_fp)
|
||||
{
|
||||
if ( !cl.refresh_prepped || cls.key_dest == key_console || cls.key_dest == key_menu)
|
||||
RW_IN_Activate_fp(false);
|
||||
else
|
||||
RW_IN_Activate_fp(true);
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
3
makezip
3
makezip
|
@ -1,2 +1 @@
|
|||
zip -9 -r code .
|
||||
|
||||
zip -9r code .
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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"
|
||||
|
||||
void CDAudio_Play(int track, qboolean looping)
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
// cl_null.c -- this file can stub out the entire client system
|
||||
// for pure dedicated servers
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 "../ref_gl/gl_local.h"
|
||||
|
||||
void GLimp_BeginFrame( float camera_separation )
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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_null.c -- for systems without a mouse
|
||||
|
||||
#include "../client/client.h"
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
// snddma_null.c
|
||||
// all other sound mixing is portable
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 "../ref_soft/r_local.h"
|
||||
|
||||
void SWimp_BeginFrame( float camera_separation )
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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_null.h -- null system driver to aid porting efforts
|
||||
|
||||
#include "../qcommon/qcommon.h"
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
// vid_null.c -- null video driver to aid porting efforts
|
||||
// this assumes that one of the refs is statically linked to the executable
|
||||
|
||||
|
@ -72,7 +91,8 @@ vidmode_t vid_modes[] =
|
|||
{ "Mode 6: 1024x768", 1024, 768, 6 },
|
||||
{ "Mode 7: 1152x864", 1152, 864, 7 },
|
||||
{ "Mode 8: 1280x960", 1280, 960, 8 },
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 9 }
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 9 },
|
||||
{ "Mode 10: 2048x1536", 2048, 1536, 10 }
|
||||
};
|
||||
#define VID_NUM_MODES ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
This is the complete source code for Quake 2, version 3.19, buildable with
|
||||
This is the complete source code for Quake 2, version 3.21, buildable with
|
||||
visual C++ 6.0. The linux version should be buildable, but we haven't
|
||||
tested it for the release.
|
||||
|
||||
|
|
|
@ -49,15 +49,15 @@ 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 )
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
qglColorTableEXT( GL_SHARED_TEXTURE_PALETTE_EXT,
|
||||
GL_RGB,
|
||||
256,
|
||||
|
@ -69,22 +69,22 @@ void GL_SetTexturePalette( unsigned palette[256] )
|
|||
|
||||
void GL_EnableMultitexture( qboolean enable )
|
||||
{
|
||||
if ( !qglSelectTextureSGIS )
|
||||
if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
|
||||
return;
|
||||
|
||||
if ( enable )
|
||||
{
|
||||
GL_SelectTexture( GL_TEXTURE1_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE1 );
|
||||
qglEnable( GL_TEXTURE_2D );
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL_SelectTexture( GL_TEXTURE1_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE1 );
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
}
|
||||
GL_SelectTexture( GL_TEXTURE0_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE0 );
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
}
|
||||
|
||||
|
@ -92,23 +92,34 @@ void GL_SelectTexture( GLenum texture )
|
|||
{
|
||||
int tmu;
|
||||
|
||||
if ( !qglSelectTextureSGIS )
|
||||
if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
|
||||
return;
|
||||
|
||||
if ( texture == GL_TEXTURE0_SGIS )
|
||||
if ( texture == GL_TEXTURE0 )
|
||||
{
|
||||
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 );
|
||||
if ( qglSelectTextureSGIS )
|
||||
{
|
||||
qglSelectTextureSGIS( texture );
|
||||
}
|
||||
else if ( qglActiveTextureARB )
|
||||
{
|
||||
qglActiveTextureARB( texture );
|
||||
qglClientActiveTextureARB( texture );
|
||||
}
|
||||
}
|
||||
|
||||
void GL_TexEnv( GLenum mode )
|
||||
|
@ -137,7 +148,7 @@ void GL_Bind (int texnum)
|
|||
void GL_MBind( GLenum target, int texnum )
|
||||
{
|
||||
GL_SelectTexture( target );
|
||||
if ( target == GL_TEXTURE0_SGIS )
|
||||
if ( target == GL_TEXTURE0 )
|
||||
{
|
||||
if ( gl_state.currenttextures[0] == texnum )
|
||||
return;
|
||||
|
|
|
@ -17,13 +17,6 @@ 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>
|
||||
|
@ -35,9 +28,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <GL/glu.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifndef __linux__
|
||||
#ifndef GL_COLOR_INDEX8_EXT
|
||||
#define GL_COLOR_INDEX8_EXT GL_COLOR_INDEX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../client/ref.h"
|
||||
|
||||
|
@ -55,10 +50,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define ROLL 2
|
||||
|
||||
|
||||
#ifndef __VIDDEF_T
|
||||
#define __VIDDEF_T
|
||||
typedef struct
|
||||
{
|
||||
unsigned width, height; // coordinates from main game
|
||||
} viddef_t;
|
||||
#endif
|
||||
|
||||
extern viddef_t vid;
|
||||
|
||||
|
|
|
@ -542,9 +542,30 @@ void R_DrawAliasModel (entity_t *e)
|
|||
// get lighting information
|
||||
//
|
||||
// PMM - rewrote, reordered to handle new shells & mixing
|
||||
// PMM - 3.20 code .. replaced with original way of doing it to keep mod authors happy
|
||||
//
|
||||
if ( currententity->flags & ( RF_SHELL_HALF_DAM | RF_SHELL_GREEN | RF_SHELL_RED | RF_SHELL_BLUE | RF_SHELL_DOUBLE ) )
|
||||
{
|
||||
VectorClear (shadelight);
|
||||
if (currententity->flags & RF_SHELL_HALF_DAM)
|
||||
{
|
||||
shadelight[0] = 0.56;
|
||||
shadelight[1] = 0.59;
|
||||
shadelight[2] = 0.45;
|
||||
}
|
||||
if ( currententity->flags & RF_SHELL_DOUBLE )
|
||||
{
|
||||
shadelight[0] = 0.9;
|
||||
shadelight[1] = 0.7;
|
||||
}
|
||||
if ( currententity->flags & RF_SHELL_RED )
|
||||
shadelight[0] = 1.0;
|
||||
if ( currententity->flags & RF_SHELL_GREEN )
|
||||
shadelight[1] = 1.0;
|
||||
if ( currententity->flags & RF_SHELL_BLUE )
|
||||
shadelight[2] = 1.0;
|
||||
}
|
||||
/*
|
||||
// PMM -special case for godmode
|
||||
if ( (currententity->flags & RF_SHELL_RED) &&
|
||||
(currententity->flags & RF_SHELL_BLUE) &&
|
||||
|
@ -607,6 +628,7 @@ void R_DrawAliasModel (entity_t *e)
|
|||
// }
|
||||
// }
|
||||
// pmm
|
||||
*/
|
||||
else if ( currententity->flags & RF_FULLBRIGHT )
|
||||
{
|
||||
for (i=0 ; i<3 ; i++)
|
||||
|
|
|
@ -26,6 +26,8 @@ viddef_t vid;
|
|||
|
||||
refimport_t ri;
|
||||
|
||||
int GL_TEXTURE0, GL_TEXTURE1;
|
||||
|
||||
model_t *r_worldmodel;
|
||||
|
||||
float gldepthmin, gldepthmax;
|
||||
|
@ -1217,6 +1219,10 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
ri.Cvar_Set( "scr_drawall", "0" );
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
ri.Cvar_SetValue( "gl_finish", 1 );
|
||||
#endif
|
||||
|
||||
// MCD has buffering issues
|
||||
if ( gl_config.renderer == GL_RENDERER_MCD )
|
||||
{
|
||||
|
@ -1243,7 +1249,6 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
/*
|
||||
** 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" ) )
|
||||
{
|
||||
|
@ -1256,6 +1261,7 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
ri.Con_Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" );
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if ( strstr( gl_config.extensions_string, "WGL_EXT_swap_control" ) )
|
||||
{
|
||||
qwglSwapIntervalEXT = ( BOOL (WINAPI *)(int)) qwglGetProcAddress( "wglSwapIntervalEXT" );
|
||||
|
@ -1265,6 +1271,7 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...WGL_EXT_swap_control not found\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( strstr( gl_config.extensions_string, "GL_EXT_point_parameters" ) )
|
||||
{
|
||||
|
@ -1284,8 +1291,29 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
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" ) )
|
||||
#ifdef __linux__
|
||||
if ( strstr( gl_config.extensions_string, "3DFX_set_global_palette" ))
|
||||
{
|
||||
if ( gl_ext_palettedtexture->value )
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...using 3DFX_set_global_palette\n" );
|
||||
qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" );
|
||||
qglColorTableEXT = Fake_glColorTableEXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...3DFX_set_global_palette not found\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !qglColorTableEXT &&
|
||||
strstr( gl_config.extensions_string, "GL_EXT_paletted_texture" ) &&
|
||||
strstr( gl_config.extensions_string, "GL_EXT_shared_texture_palette" ) )
|
||||
{
|
||||
if ( gl_ext_palettedtexture->value )
|
||||
{
|
||||
|
@ -1302,13 +1330,40 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
ri.Con_Printf( PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n" );
|
||||
}
|
||||
|
||||
if ( strstr( gl_config.extensions_string, "GL_SGIS_multitexture" ) )
|
||||
if ( strstr( gl_config.extensions_string, "GL_ARB_multitexture" ) )
|
||||
{
|
||||
if ( gl_ext_multitexture->value )
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" );
|
||||
qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" );
|
||||
qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" );
|
||||
qglClientActiveTextureARB = ( void * ) qwglGetProcAddress( "glClientActiveTextureARB" );
|
||||
GL_TEXTURE0 = GL_TEXTURE0_ARB;
|
||||
GL_TEXTURE1 = GL_TEXTURE1_ARB;
|
||||
}
|
||||
else
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" );
|
||||
}
|
||||
|
||||
if ( strstr( gl_config.extensions_string, "GL_SGIS_multitexture" ) )
|
||||
{
|
||||
if ( qglActiveTextureARB )
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n" );
|
||||
}
|
||||
else if ( gl_ext_multitexture->value )
|
||||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...using GL_SGIS_multitexture\n" );
|
||||
qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" );
|
||||
qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" );
|
||||
GL_TEXTURE0 = GL_TEXTURE0_SGIS;
|
||||
GL_TEXTURE1 = GL_TEXTURE1_SGIS;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1319,7 +1374,6 @@ int R_Init( void *hinstance, void *hWnd )
|
|||
{
|
||||
ri.Con_Printf( PRINT_ALL, "...GL_SGIS_multitexture not found\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
GL_SetDefaultState();
|
||||
|
||||
|
|
|
@ -613,6 +613,8 @@ void R_DrawAlphaSurfaces (void)
|
|||
qglColor4f (intens,intens,intens,1);
|
||||
if (s->flags & SURF_DRAWTURB)
|
||||
EmitWaterPolys (s);
|
||||
else if(s->texinfo->flags & SURF_FLOWING) // PGM 9/16/98
|
||||
DrawGLFlowingPoly (s); // PGM
|
||||
else
|
||||
DrawGLPoly (s->polys);
|
||||
}
|
||||
|
@ -639,7 +641,7 @@ void DrawTextureChains (void)
|
|||
|
||||
// GL_TexEnv( GL_REPLACE );
|
||||
|
||||
if ( !qglSelectTextureSGIS )
|
||||
if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
|
||||
{
|
||||
for ( i = 0, image=gltextures ; i<numgltextures ; i++,image++)
|
||||
{
|
||||
|
@ -739,7 +741,7 @@ dynamic:
|
|||
R_BuildLightMap( surf, (void *)temp, smax*4 );
|
||||
R_SetCacheState( surf );
|
||||
|
||||
GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + surf->lightmaptexturenum );
|
||||
GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + surf->lightmaptexturenum );
|
||||
|
||||
lmtex = surf->lightmaptexturenum;
|
||||
|
||||
|
@ -757,7 +759,7 @@ dynamic:
|
|||
|
||||
R_BuildLightMap( surf, (void *)temp, smax*4 );
|
||||
|
||||
GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + 0 );
|
||||
GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + 0 );
|
||||
|
||||
lmtex = 0;
|
||||
|
||||
|
@ -771,8 +773,8 @@ dynamic:
|
|||
|
||||
c_brush_polys++;
|
||||
|
||||
GL_MBind( GL_TEXTURE0_SGIS, image->texnum );
|
||||
GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + lmtex );
|
||||
GL_MBind( GL_TEXTURE0, image->texnum );
|
||||
GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex );
|
||||
|
||||
//==========
|
||||
//PGM
|
||||
|
@ -790,8 +792,8 @@ dynamic:
|
|||
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]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE0, (v[3]+scroll), v[4]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
|
||||
qglVertex3fv (v);
|
||||
}
|
||||
qglEnd ();
|
||||
|
@ -805,8 +807,8 @@ dynamic:
|
|||
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]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
|
||||
qglVertex3fv (v);
|
||||
}
|
||||
qglEnd ();
|
||||
|
@ -819,8 +821,8 @@ dynamic:
|
|||
{
|
||||
c_brush_polys++;
|
||||
|
||||
GL_MBind( GL_TEXTURE0_SGIS, image->texnum );
|
||||
GL_MBind( GL_TEXTURE1_SGIS, gl_state.lightmap_textures + lmtex );
|
||||
GL_MBind( GL_TEXTURE0, image->texnum );
|
||||
GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex );
|
||||
|
||||
//==========
|
||||
//PGM
|
||||
|
@ -838,8 +840,8 @@ dynamic:
|
|||
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]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE0, (v[3]+scroll), v[4]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
|
||||
qglVertex3fv (v);
|
||||
}
|
||||
qglEnd ();
|
||||
|
@ -855,8 +857,8 @@ dynamic:
|
|||
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]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE0, v[3], v[4]);
|
||||
qglMTexCoord2fSGIS( GL_TEXTURE1, v[5], v[6]);
|
||||
qglVertex3fv (v);
|
||||
}
|
||||
qglEnd ();
|
||||
|
@ -1006,9 +1008,9 @@ 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_SelectTexture( GL_TEXTURE0);
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
GL_SelectTexture( GL_TEXTURE1_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE1);
|
||||
GL_TexEnv( GL_MODULATE );
|
||||
|
||||
R_DrawInlineBModel ();
|
||||
|
@ -1220,9 +1222,9 @@ void R_DrawWorld (void)
|
|||
{
|
||||
GL_EnableMultitexture( true );
|
||||
|
||||
GL_SelectTexture( GL_TEXTURE0_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE0);
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
GL_SelectTexture( GL_TEXTURE1_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE1);
|
||||
|
||||
if ( gl_lightmap->value )
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
|
@ -1570,7 +1572,7 @@ void GL_BeginBuildingLightmaps (model_t *m)
|
|||
r_framecount = 1; // no dlightcache
|
||||
|
||||
GL_EnableMultitexture( true );
|
||||
GL_SelectTexture( GL_TEXTURE1_SGIS );
|
||||
GL_SelectTexture( GL_TEXTURE1);
|
||||
|
||||
/*
|
||||
** setup the base lightstyles so the lightmaps won't have to be regenerated
|
||||
|
|
44
ref_gl/qgl.h
44
ref_gl/qgl.h
|
@ -30,6 +30,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#ifdef __linux__
|
||||
//#include <GL/fxmesa.h>
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
|
||||
qboolean QGL_Init( const char *dllname );
|
||||
void QGL_Shutdown( void );
|
||||
|
||||
|
@ -384,6 +389,9 @@ extern void ( APIENTRY * qglUnlockArraysEXT) (void);
|
|||
extern void ( APIENTRY * qglMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat );
|
||||
extern void ( APIENTRY * qglSelectTextureSGIS)( GLenum );
|
||||
|
||||
extern void ( APIENTRY * qglActiveTextureARB)( GLenum );
|
||||
extern void ( APIENTRY * qglClientActiveTextureARB)( GLenum );
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
extern int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *);
|
||||
|
@ -422,6 +430,38 @@ extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT ) ( const unsigned char *pRed,
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
// local function in dll
|
||||
extern void *qwglGetProcAddress(char *symbol);
|
||||
|
||||
extern void (*qgl3DfxSetPaletteEXT)(GLuint *);
|
||||
|
||||
/*
|
||||
//FX Mesa Functions
|
||||
extern fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
|
||||
extern fxMesaContext (*qfxMesaCreateBestContext)(GLuint win, GLint width, GLint height, const GLint attribList[]);
|
||||
extern void (*qfxMesaDestroyContext)(fxMesaContext ctx);
|
||||
extern void (*qfxMesaMakeCurrent)(fxMesaContext ctx);
|
||||
extern fxMesaContext (*qfxMesaGetCurrentContext)(void);
|
||||
extern void (*qfxMesaSwapBuffers)(void);
|
||||
*/
|
||||
|
||||
//GLX Functions
|
||||
extern XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
|
||||
extern GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
|
||||
extern void (*qglXDestroyContext)( Display *dpy, GLXContext ctx );
|
||||
extern Bool (*qglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
||||
extern void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask );
|
||||
extern void (*qglXSwapBuffers)( Display *dpy, GLXDrawable drawable );
|
||||
|
||||
// 3dfxSetPaletteEXT shunt
|
||||
void Fake_glColorTableEXT( GLenum target, GLenum internalformat,
|
||||
GLsizei width, GLenum format, GLenum type,
|
||||
const GLvoid *table );
|
||||
|
||||
#endif // linux
|
||||
|
||||
/*
|
||||
** extension constants
|
||||
*/
|
||||
|
@ -438,5 +478,9 @@ extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT ) ( const unsigned char *pRed,
|
|||
|
||||
#define GL_TEXTURE0_SGIS 0x835E
|
||||
#define GL_TEXTURE1_SGIS 0x835F
|
||||
#define GL_TEXTURE0_ARB 0x84C0
|
||||
#define GL_TEXTURE1_ARB 0x84C1
|
||||
|
||||
extern int GL_TEXTURE0, GL_TEXTURE1;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,752 +0,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
|
|
@ -1,17 +0,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)
|
|
@ -1108,8 +1108,8 @@ void R_AliasDrawModel (void)
|
|||
|
||||
// PMM - added double
|
||||
color = currententity->flags & ( RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM);
|
||||
// PMM - reordered, old code first
|
||||
/*
|
||||
// PMM - reordered, new shells after old shells (so they get overriden)
|
||||
|
||||
if ( color == RF_SHELL_RED )
|
||||
r_aliasblendcolor = SHELL_RED_COLOR;
|
||||
else if ( color == RF_SHELL_GREEN )
|
||||
|
@ -1130,8 +1130,7 @@ void R_AliasDrawModel (void)
|
|||
// pmm
|
||||
else
|
||||
r_aliasblendcolor = SHELL_WHITE_COLOR;
|
||||
*/
|
||||
if ( color & RF_SHELL_RED )
|
||||
/* if ( color & RF_SHELL_RED )
|
||||
{
|
||||
if ( ( color & RF_SHELL_BLUE) && ( color & RF_SHELL_GREEN) )
|
||||
r_aliasblendcolor = SHELL_WHITE_COLOR;
|
||||
|
@ -1155,7 +1154,7 @@ void R_AliasDrawModel (void)
|
|||
r_aliasblendcolor = SHELL_GREEN_COLOR;
|
||||
else
|
||||
r_aliasblendcolor = SHELL_WHITE_COLOR;
|
||||
|
||||
*/
|
||||
|
||||
if ( currententity->alpha > 0.33 )
|
||||
d_pdrawspans = R_PolysetDrawSpansConstant8_66;
|
||||
|
|
|
@ -51,7 +51,7 @@ vec5_t r_clip_verts[2][MAXWORKINGVERTS+2];
|
|||
|
||||
static int s_minindex, s_maxindex;
|
||||
|
||||
static void R_DrawPoly( qboolean iswater );
|
||||
static void R_DrawPoly( int iswater );
|
||||
|
||||
/*
|
||||
** R_DrawSpanletOpaque
|
||||
|
@ -583,7 +583,8 @@ int R_ClipPolyFace (int nump, clipplane_t *pclipplane)
|
|||
/*
|
||||
** R_PolygonDrawSpans
|
||||
*/
|
||||
void R_PolygonDrawSpans(espan_t *pspan, qboolean iswater )
|
||||
// PGM - iswater was qboolean. changed to allow passing more flags
|
||||
void R_PolygonDrawSpans(espan_t *pspan, int iswater )
|
||||
{
|
||||
int count;
|
||||
fixed16_t snext, tnext;
|
||||
|
@ -592,8 +593,12 @@ void R_PolygonDrawSpans(espan_t *pspan, qboolean iswater )
|
|||
|
||||
s_spanletvars.pbase = cacheblock;
|
||||
|
||||
if ( iswater )
|
||||
//PGM
|
||||
if ( iswater & SURF_WARP)
|
||||
r_turb_turb = sintable + ((int)(r_newrefdef.time*SPEED)&(CYCLE-1));
|
||||
else if (iswater & SURF_FLOWING)
|
||||
r_turb_turb = blanktable;
|
||||
//PGM
|
||||
|
||||
sdivzspanletstepu = d_sdivzstepu * AFFINE_SPANLET_SIZE;
|
||||
tdivzspanletstepu = d_tdivzstepu * AFFINE_SPANLET_SIZE;
|
||||
|
@ -889,7 +894,8 @@ void R_PolygonScanRightEdge (void)
|
|||
/*
|
||||
** R_ClipAndDrawPoly
|
||||
*/
|
||||
void R_ClipAndDrawPoly( float alpha, qboolean isturbulent, qboolean textured )
|
||||
// PGM - isturbulent was qboolean. changed to int to allow passing more flags
|
||||
void R_ClipAndDrawPoly ( float alpha, int isturbulent, qboolean textured )
|
||||
{
|
||||
emitpoint_t outverts[MAXWORKINGVERTS+3], *pout;
|
||||
float *pv;
|
||||
|
@ -1047,12 +1053,14 @@ void R_BuildPolygonFromSurface(msurface_t *fa)
|
|||
VectorSubtract( vec3_origin, r_polydesc.vpn, r_polydesc.vpn );
|
||||
}
|
||||
|
||||
if ( fa->texinfo->flags & SURF_WARP )
|
||||
// PGM 09/16/98
|
||||
if ( fa->texinfo->flags & (SURF_WARP|SURF_FLOWING) )
|
||||
{
|
||||
r_polydesc.pixels = fa->texinfo->image->pixels[0];
|
||||
r_polydesc.pixel_width = fa->texinfo->image->width;
|
||||
r_polydesc.pixel_height = fa->texinfo->image->height;
|
||||
}
|
||||
// PGM 09/16/98
|
||||
else
|
||||
{
|
||||
surfcache_t *scache;
|
||||
|
@ -1123,7 +1131,8 @@ void R_PolygonCalculateGradients (void)
|
|||
**
|
||||
** This should NOT be called externally since it doesn't do clipping!
|
||||
*/
|
||||
static void R_DrawPoly( qboolean iswater )
|
||||
// PGM - iswater was qboolean. changed to support passing more flags
|
||||
static void R_DrawPoly( int iswater )
|
||||
{
|
||||
int i, nump;
|
||||
float ymin, ymax;
|
||||
|
@ -1194,10 +1203,20 @@ void R_DrawAlphaSurfaces( void )
|
|||
{
|
||||
R_BuildPolygonFromSurface( s );
|
||||
|
||||
//=======
|
||||
//PGM
|
||||
// if (s->texinfo->flags & SURF_TRANS66)
|
||||
// R_ClipAndDrawPoly( 0.60f, ( s->texinfo->flags & SURF_WARP) != 0, true );
|
||||
// else
|
||||
// R_ClipAndDrawPoly( 0.30f, ( s->texinfo->flags & SURF_WARP) != 0, true );
|
||||
|
||||
// PGM - pass down all the texinfo flags, not just SURF_WARP.
|
||||
if (s->texinfo->flags & SURF_TRANS66)
|
||||
R_ClipAndDrawPoly( 0.60f, ( s->texinfo->flags & SURF_WARP) != 0, true );
|
||||
R_ClipAndDrawPoly( 0.60f, (s->texinfo->flags & SURF_WARP|SURF_FLOWING), true );
|
||||
else
|
||||
R_ClipAndDrawPoly( 0.30f, ( s->texinfo->flags & SURF_WARP) != 0, true );
|
||||
R_ClipAndDrawPoly( 0.30f, (s->texinfo->flags & SURF_WARP|SURF_FLOWING), true );
|
||||
//PGM
|
||||
//=======
|
||||
|
||||
s = s->nextalphasurface;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,17 +0,0 @@
|
|||
--------------------Configuration: ref_soft - Win32 Release Alpha--------------------
|
||||
Begining build with project "G:\quake2\code\ref_soft\ref_soft.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_soft.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_soft.bsc" "
|
||||
"COFF Linker for Alpha" with flags "kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"..\ReleaseAXP/ref_soft.pdb" /debug /machine:ALPHA /def:".\ref_soft.def" /out:"..\ReleaseAXP/ref_soft.dll" /implib:"..\ReleaseAXP/ref_soft.lib" "
|
||||
"Custom Build" with flags ""
|
||||
"<Component 0xa>" with flags ""
|
||||
|
||||
|
||||
|
||||
|
||||
ref_soft.dll - 0 error(s), 0 warning(s)
|
|
@ -199,6 +199,7 @@ void PF_Configstring (int index, char *val)
|
|||
|
||||
// change the string in sv
|
||||
strcpy (sv.configstrings[index], val);
|
||||
|
||||
|
||||
if (sv.state != ss_loading)
|
||||
{ // send the update to everyone
|
||||
|
|
|
@ -829,11 +829,12 @@ void Master_Heartbeat (void)
|
|||
char *string;
|
||||
int i;
|
||||
|
||||
|
||||
if (!dedicated->value)
|
||||
// pgm post3.19 change, cvar pointer not validated before dereferencing
|
||||
if (!dedicated || !dedicated->value)
|
||||
return; // only dedicated servers send heartbeats
|
||||
|
||||
if (!public_server->value)
|
||||
// pgm post3.19 change, cvar pointer not validated before dereferencing
|
||||
if (!public_server || !public_server->value)
|
||||
return; // a private dedicated game
|
||||
|
||||
// check for time wraparound
|
||||
|
@ -868,10 +869,12 @@ void Master_Shutdown (void)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (!dedicated->value)
|
||||
// pgm post3.19 change, cvar pointer not validated before dereferencing
|
||||
if (!dedicated || !dedicated->value)
|
||||
return; // only dedicated servers send heartbeats
|
||||
|
||||
if (!public_server->value)
|
||||
// pgm post3.19 change, cvar pointer not validated before dereferencing
|
||||
if (!public_server || !public_server->value)
|
||||
return; // a private dedicated game
|
||||
|
||||
// send to group master
|
||||
|
@ -963,7 +966,7 @@ void SV_Init (void)
|
|||
sv_paused = Cvar_Get ("paused", "0", 0);
|
||||
sv_timedemo = Cvar_Get ("timedemo", "0", 0);
|
||||
sv_enforcetime = Cvar_Get ("sv_enforcetime", "0", 0);
|
||||
allow_download = Cvar_Get ("allow_download", "0", CVAR_ARCHIVE);
|
||||
allow_download = Cvar_Get ("allow_download", "1", CVAR_ARCHIVE);
|
||||
allow_download_players = Cvar_Get ("allow_download_players", "0", CVAR_ARCHIVE);
|
||||
allow_download_models = Cvar_Get ("allow_download_models", "1", CVAR_ARCHIVE);
|
||||
allow_download_sounds = Cvar_Get ("allow_download_sounds", "1", CVAR_ARCHIVE);
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
// sv_null.c -- this file can stub out the entire server system
|
||||
// for pure net-only clients
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
int main(int argc, char *argv)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 <stdio.h>
|
||||
#include "../linux/glob.h"
|
||||
|
|
|
@ -1 +1,20 @@
|
|||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
int glob_match(char *pattern, char *text);
|
||||
|
|
1031
solaris/makefile.solaris
Normal file
1031
solaris/makefile.solaris
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
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 "../qcommon/qcommon.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue