New config system, cleanups etc. launch Xuake with -data id1
This commit is contained in:
parent
94b2f40da1
commit
2bc780359b
122 changed files with 397 additions and 1693 deletions
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// rights reserved.
|
||||
|
||||
#include <dpmi.h>
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "dosisms.h"
|
||||
|
||||
extern cvar_t *bgmvolume;
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
void CDAudio_Play(byte track, qboolean looping)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h> // 2001-12-10 Compilable with LCC-Win32 by Jeff Ford
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
extern HWND mainwindow;
|
||||
extern cvar_t *bgmvolume;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// snd_dma.c -- main control for any streaming sound output device
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winquake.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "dosisms.h"
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// Author(s): Jayeson Lee-Steere
|
||||
//=============================================================================
|
||||
|
||||
#include "../engine/quakedef.h"
|
||||
#include "../engine/globaldef.h"
|
||||
#include "dosisms.h"
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <linux/soundcard.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#define Q_strcpy(dest, src, size) Q_strncpy((dest), (size), (src), Q_MAXINT)
|
||||
#ifndef SNDCTL_DSP_COOKEDMODE
|
||||
# define SNDCTL_DSP_COOKEDMODE _SIOW ('P', 30, int)
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// snd_mem.c: sound caching
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
int cache_full_cycle;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// snd_mix.c -- portable code to mix sounds for snd_dma.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winquake.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "../engine/quakedef.h"
|
||||
#include "../engine/globaldef.h"
|
||||
|
||||
extern int desired_speed;
|
||||
extern int desired_bits;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// snd_null.c -- include this instead of all the other snd_* files to have
|
||||
// no sound code whatsoever
|
||||
|
||||
#include "../engine/quakedef.h"
|
||||
#include "../engine/globaldef.h"
|
||||
|
||||
cvar_t *bgmvolume;
|
||||
cvar_t *midivolume;
|
||||
|
|
|
@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <stdio.h>
|
||||
#include <sys/audioio.h>
|
||||
#include <errno.h>
|
||||
#include "../engine/quakedef.h"
|
||||
#include "../engine/globaldef.h"
|
||||
|
||||
int audio_fd;
|
||||
int snd_inited;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
|
||||
|
||||
#include "../engine/quakedef.h"
|
||||
#include "../engine/globaldef.h"
|
||||
#include "winquake.h"
|
||||
|
||||
#define iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c)
|
||||
|
|
Binary file not shown.
|
@ -17,7 +17,12 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
|
||||
//TODO: Support for COOP behaviour
|
||||
// Handle botname parsing via COM routines
|
||||
// Weapons - make them less Xuake specific
|
||||
|
||||
#include "globaldef.h"
|
||||
#ifdef GLOBOT
|
||||
#include "bot.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// chase.c -- chase camera code
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
cvar_t *chase_back;
|
||||
cvar_t *chase_up;
|
||||
|
@ -48,7 +48,6 @@ vec3_t deathcam_angles; // this'll update chase angles when we're dead so we don
|
|||
// player - so we can rotate the death cam in cl_diecam 3.
|
||||
int deathcam_yesiamdead; // pretty stupid indicator of dead.
|
||||
|
||||
// 2001-09-18 New cvar system by Maddes (Init) start
|
||||
void Chase_Init_Cvars (void)
|
||||
{
|
||||
chase_back = Cvar_Get ("chase_back", "100", CVAR_ORIGINAL);
|
||||
|
@ -58,19 +57,6 @@ void Chase_Init_Cvars (void)
|
|||
|
||||
cl_diecam = Cvar_Get ("cl_diecam", "0", CVAR_ORIGINAL | CVAR_ARCHIVE); // leilei
|
||||
}
|
||||
// 2001-09-18 New cvar system by Maddes (Init) end
|
||||
|
||||
void Chase_Init (void)
|
||||
{
|
||||
// 2001-09-18 New cvar system by Maddes (Init) start
|
||||
/*
|
||||
chase_back = Cvar_Get ("chase_back", "100", CVAR_ORIGINAL);
|
||||
chase_up = Cvar_Get ("chase_up", "16", CVAR_ORIGINAL);
|
||||
chase_right = Cvar_Get ("chase_right", "0", CVAR_ORIGINAL);
|
||||
chase_active = Cvar_Get ("chase_active", "0", CVAR_ORIGINAL);
|
||||
*/
|
||||
// 2001-09-18 New cvar system by Maddes (Init) end
|
||||
}
|
||||
|
||||
#ifdef VMTOC
|
||||
|
||||
|
@ -307,4 +293,4 @@ void Chase_Update (void)
|
|||
VectorCopy (chase_dest, r_refdef.vieworg);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
void CL_FinishTimeDemo (void);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// Quake is a trademark of Id Software, Inc., (c) 1996 Id Software, Inc. All
|
||||
// rights reserved.
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// cl_main.c -- client main loop
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
// we need to declare some mouse variables here, because the menu system
|
||||
// references them even when on a unix system.
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// cl_parse.c -- parse a message received from the server
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#ifdef DUMB
|
||||
#include <dumb.h>
|
||||
|
@ -1608,8 +1608,6 @@ typedef struct mentity_s {
|
|||
static mentity_t entities[8192];
|
||||
static int num_entities;
|
||||
|
||||
|
||||
|
||||
static void ParseEpair (mentity_t *mapent, char *key, char *value)
|
||||
{
|
||||
double vec[3];
|
||||
|
@ -1653,6 +1651,7 @@ static void ParseEpair (mentity_t *mapent, char *key, char *value)
|
|||
}
|
||||
extern vec3_t lightcolor;
|
||||
extern cvar_t *temp2;
|
||||
|
||||
// A botched up FTEQW version just to load realtime point lights for r_shading 3
|
||||
void LoadPointLighting (char *entstring)
|
||||
{
|
||||
|
@ -1800,16 +1799,9 @@ void LoadPointLighting (char *entstring)
|
|||
|
||||
}
|
||||
|
||||
{
|
||||
int reqdlights;
|
||||
|
||||
|
||||
if (gamemode == GAME_FIGHT)
|
||||
reqdlights = 1; // leilei - light ents are minimal in our fighty game
|
||||
else
|
||||
reqdlights = 58; // we need this many light entities to determine if we can utilize them
|
||||
// for normal shading to avoid false positives (black lighting etc)
|
||||
|
||||
if (num_lights > reqdlights){
|
||||
if (num_lights > 58){
|
||||
lightingavailable = 1;
|
||||
lightingcantbeavailable = 0;
|
||||
}
|
||||
|
@ -1819,6 +1811,5 @@ void LoadPointLighting (char *entstring)
|
|||
lightingcantbeavailable = 1;
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// cl_tent.c -- client side temporary entities
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
int num_temp_entities;
|
||||
// 2001-09-20 Configurable entity limits by Maddes start
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// cmd.c -- Quake script command processing module
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
void Cmd_ForwardToServer (void);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// common.c -- misc functions used in client and server
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#define NUM_SAFE_ARGVS 7
|
||||
|
||||
|
@ -1977,6 +1977,7 @@ void COM_InitFilesystem (void)
|
|||
basedir[j-1] = 0;
|
||||
}
|
||||
|
||||
printf("Base directory set to '%s'.\n", basedir);
|
||||
//
|
||||
// -cachedir <path>
|
||||
// Overrides the system supplied cache directory (NULL or /qcache)
|
||||
|
@ -1995,33 +1996,10 @@ void COM_InitFilesystem (void)
|
|||
else
|
||||
com_cachedir[0] = 0;
|
||||
|
||||
//
|
||||
// start up with GAMENAME by default (id1)
|
||||
//
|
||||
// start up with GAMENAME by default
|
||||
|
||||
COM_AddGameDirectory (va("%s/"GAMENAME, basedir) );
|
||||
|
||||
if (COM_CheckParm ("-rogue"))
|
||||
COM_AddGameDirectory (va("%s/rogue", basedir) );
|
||||
if (COM_CheckParm ("-hipnotic"))
|
||||
COM_AddGameDirectory (va("%s/hipnotic", basedir) );
|
||||
if (COM_CheckParm ("-quoth"))
|
||||
COM_AddGameDirectory (va("%s/quoth", basedir) );
|
||||
if (COM_CheckParm ("-transfusion")){
|
||||
COM_AddGameDirectory (va("%s/basetf", basedir) );
|
||||
gamemode = GAME_TRANSFUSION;
|
||||
}
|
||||
if (COM_CheckParm ("-fight")){
|
||||
COM_AddGameDirectory (va("%s/fite", basedir) );
|
||||
gamemode = GAME_FIGHT;
|
||||
}
|
||||
if (COM_CheckParm ("-laserarena")){
|
||||
COM_AddGameDirectory (va("%s/main", basedir) );
|
||||
gamemode = GAME_LASER_ARENA;
|
||||
}
|
||||
if (COM_CheckParm ("-kurok")){
|
||||
COM_AddGameDirectory (va("%s/kurok", basedir) );
|
||||
gamemode = GAME_KUROK;
|
||||
}
|
||||
// 1999-12-23 Multiple "-data" parameters by Maddes start
|
||||
//
|
||||
// -data <datadir>
|
||||
|
@ -2051,11 +2029,6 @@ void COM_InitFilesystem (void)
|
|||
{
|
||||
com_modified = true;
|
||||
COM_AddGameDirectory (va("%s/%s", basedir, com_argv[i+1]));
|
||||
|
||||
if(strcmp(com_gamedir, "hipnotic") == 0)
|
||||
hipnotic = true;
|
||||
else if(strcmp(com_gamedir, "rogue") == 0);
|
||||
rogue = true;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include <windows.h>
|
||||
#include "conproc.h"
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
HANDLE heventDone;
|
||||
HANDLE hfileBuffer;
|
||||
|
|
|
@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif // 2001-12-10 Compilable with LCC-Win32 by Jeff Ford
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
extern int console_scaled;
|
||||
extern int sb_scaled;
|
||||
int con_linewidth;
|
||||
|
@ -612,14 +612,10 @@ void Con_DrawInput (void)
|
|||
for (i=0 ; i<con_linewidth ; i++)
|
||||
// 2001-12-10 Reduced compiler warnings by Jeff Ford start
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (console_scaled)
|
||||
Draw_Character_Scaled ( (i+1)<<3, y, text[i]);
|
||||
else
|
||||
Draw_Character ( (i+1)<<3, y, text[i]);
|
||||
#else
|
||||
Draw_Character ( (i+1)<<3, y, text[i]);
|
||||
#endif
|
||||
}
|
||||
// 2001-12-10 Reduced compiler warnings by Jeff Ford end
|
||||
|
||||
|
@ -662,7 +658,7 @@ void Con_DrawNotify (void)
|
|||
|
||||
clearnotify = 0;
|
||||
scr_copytop = 1;
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled){ // often used as a hud
|
||||
for (x = 0 ; x < con_linewidth ; x++)
|
||||
Draw_Character_Scaled ( (x+1)<<3, v, text[x]);
|
||||
|
@ -705,32 +701,7 @@ void Con_DrawNotify (void)
|
|||
v += 8;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
for (x = 0 ; x < con_linewidth ; x++)
|
||||
Draw_Character ( (x+1)<<3, v, text[x]);
|
||||
|
||||
v +=8;
|
||||
}
|
||||
|
||||
|
||||
if (key_dest == key_message)
|
||||
{
|
||||
clearnotify = 0;
|
||||
scr_copytop = 1;
|
||||
|
||||
x = 0;
|
||||
|
||||
Draw_String (8, v, "say:");
|
||||
while(chat_buffer[x])
|
||||
{
|
||||
Draw_Character( (x+5)<<3, v, chat_buffer[x]);
|
||||
x++;
|
||||
}
|
||||
Draw_Character ( (x+5)<<3, v, 10+((int)(realtime*con_cursorspeed)&1));
|
||||
v += 8;
|
||||
}
|
||||
#endif
|
||||
if (v > con_notifylines)
|
||||
con_notifylines = v;
|
||||
}
|
||||
|
@ -803,13 +774,11 @@ void Con_DrawConsole (int lines, qboolean drawinput)
|
|||
}
|
||||
// 2000-01-05 Console scrolling fix by Maddes end
|
||||
text = con_text + (j % con_totallines)*con_linewidth;
|
||||
#ifdef SCALED2D
|
||||
if (console_scaled){
|
||||
for (x=0 ; x<con_linewidth ; x++)
|
||||
Draw_Character_Scaled ( (x+1)<<3, y, text[x]);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
||||
for (x=0 ; x<con_linewidth ; x++)
|
||||
|
@ -820,17 +789,15 @@ void Con_DrawConsole (int lines, qboolean drawinput)
|
|||
// 2001-12-15 Avoid automatic console scrolling by Fett start
|
||||
if (sb) // are we scrolled back?
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (console_scaled){
|
||||
// draw arrows to show the buffer is backscrolled
|
||||
for (x=0 ; x<con_linewidth ; x+=4)
|
||||
Draw_Character_Scaled ((x+1)<<3, y, '^');
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
for (x=0 ; x<con_linewidth ; x+=4)
|
||||
Draw_Character ((x+1)<<3, y, '^');
|
||||
}
|
||||
|
||||
}
|
||||
// 2001-12-15 Avoid automatic console scrolling by Fett end
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
/* crc.c */
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "crc.h"
|
||||
|
||||
// this is a 16 bit, non-reflected CRC using the polynomial 0x1021
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// 2001-09-18 New cvar system by Maddes
|
||||
// completly new file
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
cvar_t *cvar_list = NULL;
|
||||
cvar_t *cvar_last = NULL;
|
||||
|
|
162
engine/draw.c
162
engine/draw.c
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// draw.c -- this is the only file outside the refresh that touches the
|
||||
// vid buffer
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
// 2000-08-04 "Transparent" console background for software renderer by Norberto Alfredo Bensa/Maddes start
|
||||
extern cvar_t *con_alpha;
|
||||
|
@ -3160,9 +3160,6 @@ void Draw_Fill_Scaled (int x, int y, int w, int h, int c)
|
|||
//=============================================================================
|
||||
|
||||
extern cvar_t *r_menucolor;
|
||||
extern cvar_t *r_tingecolor;
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
Draw_FadeScreen
|
||||
|
@ -3221,163 +3218,6 @@ void Draw_FadeScreen (void)
|
|||
VID_LockBuffer ();
|
||||
}
|
||||
|
||||
|
||||
// 12/01/14 LEILEI
|
||||
// Sort of a parody of current gen console shooters
|
||||
// Blends the screen in brown, which is blended additively AND translucency
|
||||
// 3 lookup tables working on a single pixel = slow, just like the consoles
|
||||
|
||||
void Draw_DudeScreen (void)
|
||||
{
|
||||
int x,y;
|
||||
byte *pbuf;
|
||||
int mycol;
|
||||
|
||||
mycol = (int)r_tingecolor->value;
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
|
||||
for (y=0 ; y<vid.height ; y++)
|
||||
{
|
||||
int t;
|
||||
|
||||
pbuf = (byte *)(vid.buffer + vid.rowbytes*y);
|
||||
t = (y & 1) << 1;
|
||||
|
||||
for (x=0 ; x<vid.width ; x++)
|
||||
{
|
||||
|
||||
pbuf[x] = addTable[menumap[pbuf[x]][mycol]][pbuf[x]]; // new menu tint
|
||||
}
|
||||
}
|
||||
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
}
|
||||
|
||||
void Draw_DudeScreen66 (void)
|
||||
{
|
||||
int x,y;
|
||||
byte *pbuf;
|
||||
int mycol;
|
||||
|
||||
mycol = (int)r_tingecolor->value;
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
|
||||
for (y=0 ; y<vid.height ; y++)
|
||||
{
|
||||
int t;
|
||||
|
||||
pbuf = (byte *)(vid.buffer + vid.rowbytes*y);
|
||||
t = (y & 1) << 1;
|
||||
|
||||
for (x=0 ; x<vid.width ; x++)
|
||||
{
|
||||
|
||||
pbuf[x] = transTable[pbuf[x]][addTable[menumap[pbuf[x]][mycol]][pbuf[x]]]; // new menu tint
|
||||
}
|
||||
}
|
||||
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
}
|
||||
|
||||
void Draw_DudeScreen33 (void)
|
||||
{
|
||||
int x,y;
|
||||
byte *pbuf;
|
||||
int mycol;
|
||||
|
||||
mycol = (int)r_tingecolor->value;
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
|
||||
for (y=0 ; y<vid.height ; y++)
|
||||
{
|
||||
int t;
|
||||
|
||||
pbuf = (byte *)(vid.buffer + vid.rowbytes*y);
|
||||
t = (y & 1) << 1;
|
||||
|
||||
for (x=0 ; x<vid.width ; x++)
|
||||
{
|
||||
|
||||
pbuf[x] = transTable[addTable[menumap[pbuf[x]][mycol]][pbuf[x]]][pbuf[x]]; // new menu tint
|
||||
}
|
||||
}
|
||||
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
}
|
||||
|
||||
|
||||
void Draw_DudeScreen66A (void)
|
||||
{
|
||||
int x,y;
|
||||
byte *pbuf;
|
||||
int mycol;
|
||||
|
||||
mycol = (int)r_tingecolor->value;
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
|
||||
for (y=0 ; y<vid.height ; y++)
|
||||
{
|
||||
int t;
|
||||
|
||||
pbuf = (byte *)(vid.buffer + vid.rowbytes*y);
|
||||
t = (y & 1) << 1;
|
||||
|
||||
for (x=0 ; x<vid.width ; x++)
|
||||
{
|
||||
|
||||
pbuf[x] = transTable[pbuf[x]][menumap[pbuf[x]][mycol]]; // new menu tint
|
||||
}
|
||||
}
|
||||
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
}
|
||||
|
||||
void Draw_DudeScreen33A (void)
|
||||
{
|
||||
int x,y;
|
||||
byte *pbuf;
|
||||
int mycol;
|
||||
|
||||
mycol = (int)r_tingecolor->value;
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
|
||||
for (y=0 ; y<vid.height ; y++)
|
||||
{
|
||||
int t;
|
||||
|
||||
pbuf = (byte *)(vid.buffer + vid.rowbytes*y);
|
||||
t = (y & 1) << 1;
|
||||
|
||||
for (x=0 ; x<vid.width ; x++)
|
||||
{
|
||||
|
||||
pbuf[x] = transTable[menumap[pbuf[x]][mycol]][pbuf[x]]; // new menu tint
|
||||
}
|
||||
}
|
||||
|
||||
VID_UnlockBuffer ();
|
||||
S_ExtraUpdate ();
|
||||
VID_LockBuffer ();
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Draw_BeginDisc
|
||||
|
|
173
engine/host.c
173
engine/host.c
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// host.c -- coordinates spawning and killing of local servers
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
/*
|
||||
|
@ -392,8 +392,8 @@ void Host_WriteConfiguration (void)
|
|||
|
||||
// dedicated servers initialize the host but don't parse and set the
|
||||
// config.cfg cvars
|
||||
// if (host_initialized & !isDedicated)
|
||||
if (host_initialized && !isDedicated) // 1999-12-24 logical correction by Maddes
|
||||
//
|
||||
if (host_initialized && !isDedicated)
|
||||
{
|
||||
f = fopen (va("%s/config.cfg",com_gamedir), "w");
|
||||
if (!f)
|
||||
|
@ -403,11 +403,8 @@ void Host_WriteConfiguration (void)
|
|||
}
|
||||
|
||||
Key_WriteBindings (f);
|
||||
Cvar_WriteVariables (f, false); // 2001-09-18 New cvar system by Maddes
|
||||
|
||||
Cvar_WriteVariables (f, false);
|
||||
fclose (f);
|
||||
|
||||
// 2001-09-18 New cvar system by Maddes start
|
||||
f = fopen (va("%s/ngunix.rc",com_gamedir), "w");
|
||||
if (!f)
|
||||
{
|
||||
|
@ -415,10 +412,8 @@ void Host_WriteConfiguration (void)
|
|||
return;
|
||||
}
|
||||
|
||||
Cvar_WriteVariables (f, true); // 2001-09-18 New cvar system by Maddes
|
||||
|
||||
Cvar_WriteVariables (f, true);
|
||||
fclose (f);
|
||||
// 2001-09-18 New cvar system by Maddes end
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -659,45 +654,28 @@ qboolean Host_FilterTime (float time)
|
|||
{
|
||||
realtime += time;
|
||||
|
||||
// 2001-12-16 MAX_FPS cvar by MrG start
|
||||
// if (!cls.timedemo && realtime - oldrealtime < 1.0/72.0)
|
||||
if (max_fps->value < 10) Cvar_Set(max_fps, "72");
|
||||
|
||||
if (!cls.timedemo && realtime - oldrealtime < 1.0/max_fps->value)
|
||||
// 2001-12-16 MAX_FPS cvar by MrG end
|
||||
return false; // framerate is too high
|
||||
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
// host_frametime = realtime - oldrealtime;
|
||||
host_cpu_frametime = realtime - oldrealtime;
|
||||
host_org_frametime = host_cpu_frametime;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
oldrealtime = realtime;
|
||||
|
||||
if (host_framerate->value > 0)
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
{
|
||||
// host_frametime = host_framerate->value;
|
||||
host_org_frametime = host_framerate->value;
|
||||
}
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
else
|
||||
{ // don't allow really long or short frames
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
/*
|
||||
if (host_frametime > 0.1)
|
||||
host_frametime = 0.1;
|
||||
if (host_frametime < 0.001)
|
||||
host_frametime = 0.001;
|
||||
*/
|
||||
if (host_org_frametime > 0.1)
|
||||
host_org_frametime = 0.1;
|
||||
if (host_org_frametime < 0.001)
|
||||
host_org_frametime = 0.001;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
}
|
||||
|
||||
host_frametime = host_org_frametime * host_timescale->value; // 2001-10-20 TIMESCALE extension by Tomaz/Maddes
|
||||
|
||||
host_frametime = host_org_frametime * host_timescale->value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -735,7 +713,6 @@ void _Host_ServerFrame (void)
|
|||
{
|
||||
// run the world state
|
||||
pr_global_struct->frametime = host_frametime;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
if (pr_global_cpu_frametime)
|
||||
{
|
||||
G_FLOAT(pr_global_cpu_frametime->ofs) = host_cpu_frametime;
|
||||
|
@ -745,7 +722,6 @@ void _Host_ServerFrame (void)
|
|||
{
|
||||
G_FLOAT(pr_global_org_frametime->ofs) = host_org_frametime;
|
||||
}
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
|
||||
// read client messages
|
||||
SV_RunClients ();
|
||||
|
@ -760,11 +736,9 @@ void Host_ServerFrame (void)
|
|||
{
|
||||
float save_host_frametime;
|
||||
float temp_host_frametime;
|
||||
int i; // 2000-05-02 NVS SVC by Maddes
|
||||
|
||||
int i;
|
||||
// run the world state
|
||||
pr_global_struct->frametime = host_frametime;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
if (pr_global_cpu_frametime)
|
||||
{
|
||||
G_FLOAT(pr_global_cpu_frametime->ofs) = host_cpu_frametime;
|
||||
|
@ -774,11 +748,9 @@ void Host_ServerFrame (void)
|
|||
{
|
||||
G_FLOAT(pr_global_org_frametime->ofs) = host_org_frametime;
|
||||
}
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
|
||||
// set the time and clear the general datagram
|
||||
SV_ClearDatagram ();
|
||||
// 2000-05-02 NVS SVC by Maddes start
|
||||
// clear existing clients
|
||||
for (i=0 ; i<svs.maxclients ; i++)
|
||||
{
|
||||
|
@ -787,7 +759,6 @@ void Host_ServerFrame (void)
|
|||
SZ_Clear (&svs.clients[i].datagram);
|
||||
}
|
||||
}
|
||||
// 2000-05-02 NVS SVC by Maddes end
|
||||
|
||||
// check for new clients
|
||||
SV_CheckForNewClients ();
|
||||
|
@ -812,11 +783,10 @@ void Host_ServerFrame (void)
|
|||
|
||||
void Host_ServerFrame (void)
|
||||
{
|
||||
int i; // 2000-05-02 NVS SVC by Maddes
|
||||
|
||||
int i;
|
||||
// run the world state
|
||||
pr_global_struct->frametime = host_frametime;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
|
||||
if (pr_global_cpu_frametime)
|
||||
{
|
||||
G_FLOAT(pr_global_cpu_frametime->ofs) = host_cpu_frametime;
|
||||
|
@ -826,11 +796,9 @@ void Host_ServerFrame (void)
|
|||
{
|
||||
G_FLOAT(pr_global_org_frametime->ofs) = host_org_frametime;
|
||||
}
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
|
||||
// set the time and clear the general datagram
|
||||
SV_ClearDatagram ();
|
||||
// 2000-05-02 NVS SVC by Maddes start
|
||||
// clear existing clients
|
||||
for (i=0 ; i<svs.maxclients ; i++)
|
||||
{
|
||||
|
@ -839,7 +807,6 @@ void Host_ServerFrame (void)
|
|||
SZ_Clear (&svs.clients[i].datagram);
|
||||
}
|
||||
}
|
||||
// 2000-05-02 NVS SVC by Maddes end
|
||||
|
||||
// check for new clients
|
||||
SV_CheckForNewClients ();
|
||||
|
@ -968,7 +935,7 @@ void _Host_Frame (float time)
|
|||
|
||||
host_framecount++;
|
||||
|
||||
fps_count++; // 2001-11-31 FPS display by QuakeForge/Muff
|
||||
fps_count++;
|
||||
}
|
||||
|
||||
void Host_Frame (float time)
|
||||
|
@ -1024,7 +991,7 @@ void Host_InitVCR (quakeparms_t *parms)
|
|||
if (com_argc != 2)
|
||||
Sys_Error("No other parameters allowed with -playback\n");
|
||||
|
||||
Sys_FileOpenRead("quake.vcr", &vcrFile);
|
||||
Sys_FileOpenRead("engine.vcr", &vcrFile);
|
||||
if (vcrFile == -1)
|
||||
Sys_Error("playback file not found\n");
|
||||
|
||||
|
@ -1049,7 +1016,7 @@ void Host_InitVCR (quakeparms_t *parms)
|
|||
|
||||
if ( (n = COM_CheckParm("-record")) != 0)
|
||||
{
|
||||
vcrFile = Sys_FileOpenWrite("quake.vcr");
|
||||
vcrFile = Sys_FileOpenWrite("engine.vcr");
|
||||
|
||||
i = VCR_SIGNATURE;
|
||||
Sys_FileWrite(vcrFile, &i, sizeof(int));
|
||||
|
@ -1166,14 +1133,8 @@ byte colorthis;
|
|||
void Palette_Init (void)
|
||||
{
|
||||
loadedfile_t *fileinfo; // 2001-09-12 Returning information about loaded file by Maddes
|
||||
int pre100 = 0;
|
||||
|
||||
|
||||
|
||||
overbrights = 1;
|
||||
if (COM_CheckParm ("-beta")){
|
||||
pre100 = 1;
|
||||
}
|
||||
|
||||
#ifdef EGAHACK
|
||||
|
||||
fileinfo = COM_LoadHunkFile ("gfx/palette.lmp");
|
||||
|
@ -1188,42 +1149,14 @@ void Palette_Init (void)
|
|||
#else
|
||||
|
||||
fileinfo = COM_LoadHunkFile ("gfx/palette.lmp");
|
||||
if (!fileinfo){
|
||||
// quake pre-rel doesn't have a palette.lmp
|
||||
// instead it's in the gfx.wad
|
||||
// we can determine that we're running 0.8 this way
|
||||
// if (W_GetLumpName ("palette")){
|
||||
// host_basepal = W_GetLumpName ("palette");
|
||||
// pre100 = 1;
|
||||
// }
|
||||
// else
|
||||
if (!fileinfo)
|
||||
Sys_Error ("Couldn't load gfx/palette.lmp");
|
||||
}
|
||||
// if (!W_GetLumpName ("palette")){
|
||||
host_basepal = fileinfo->data;
|
||||
host_origpal = fileinfo->data;
|
||||
// }
|
||||
fileinfo = COM_LoadHunkFile ("gfx/tranfrom.lmp");
|
||||
if (!fileinfo)
|
||||
host_otherpal = host_basepal; // nothing happened let's move on.
|
||||
else
|
||||
|
||||
host_basepal = fileinfo->data;
|
||||
host_otherpal = fileinfo->data;
|
||||
|
||||
|
||||
fileinfo = COM_LoadHunkFile ("gfx/tranto.lmp");
|
||||
if (!fileinfo)
|
||||
host_otherpal = host_basepal; // nothing happened let's move on.
|
||||
else
|
||||
{
|
||||
host_basepal = fileinfo->data;
|
||||
fileinfo = COM_LoadHunkFile ("gfx/palette.lmp");
|
||||
host_otherpal = fileinfo->data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
if(pre100 == 1){
|
||||
if(COM_CheckParm ("-beta")){
|
||||
host_colormap = malloc(16384);
|
||||
// leilei - variable our fullbright counts if available
|
||||
host_fullbrights = 256-host_colormap[16384];
|
||||
|
@ -1247,9 +1180,7 @@ void Palette_Init (void)
|
|||
host_fullbrights = 256-host_colormap[16384];
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (COM_CheckParm ("-glsuck"))
|
||||
if (COM_CheckParm ("-fakegl"))
|
||||
{
|
||||
overbrights = 0;
|
||||
fullbrights = 0;
|
||||
|
@ -1263,7 +1194,7 @@ void Palette_Init (void)
|
|||
GrabColorMap();
|
||||
}
|
||||
|
||||
if (pre100 == 1)
|
||||
if (COM_CheckParm ("-beta"))
|
||||
{
|
||||
overbrights = 0;
|
||||
fullbrights = 32; // pre 1.00 didn't have the number of brights stored. :(
|
||||
|
@ -1271,7 +1202,7 @@ void Palette_Init (void)
|
|||
}
|
||||
|
||||
|
||||
if (COM_CheckParm ("-nofb"))
|
||||
if (COM_CheckParm ("-nofullbright"))
|
||||
{
|
||||
host_fullbrights = 0;
|
||||
fullbrights = 0;
|
||||
|
@ -1295,8 +1226,6 @@ void Palette_Init (void)
|
|||
host_fogmap = malloc(16384);//fileinfo->data;
|
||||
GrabColorMapNoFB();
|
||||
MakeMy15to8(host_basepal);
|
||||
|
||||
|
||||
}
|
||||
void MassiveLookupTablesInit (void);
|
||||
/*
|
||||
|
@ -1306,7 +1235,7 @@ Host_Init
|
|||
*/
|
||||
void Host_Init (quakeparms_t *parms)
|
||||
{
|
||||
loadedfile_t *fileinfo; // 2001-09-12 Returning information about loaded file by Maddes
|
||||
loadedfile_t *fileinfo;
|
||||
|
||||
if (standard_quake)
|
||||
minimum_memory = MINIMUM_MEMORY;
|
||||
|
@ -1325,11 +1254,10 @@ void Host_Init (quakeparms_t *parms)
|
|||
com_argv = parms->argv;
|
||||
|
||||
Memory_Init (parms->membase, parms->memsize);
|
||||
Cvar_Init (); // 2001-09-18 New cvar system by Maddes
|
||||
Cvar_Init ();
|
||||
Cbuf_Init ();
|
||||
Cmd_Init ();
|
||||
|
||||
// 2001-09-18 New cvar system by Maddes (Init) start
|
||||
COM_Init_Cvars (); // initialize all filesystem related variables
|
||||
Con_Init_Cvars (); // initialize all console related cvars
|
||||
//TW Key_Init_Cvars (); // initialize all key related cvars
|
||||
|
@ -1348,20 +1276,14 @@ void Host_Init (quakeparms_t *parms)
|
|||
Host_InitLocal_Cvars (); // initialize all local host related cvars
|
||||
PR_Init_Cvars(); // initialize all pr_* related cvars
|
||||
NVS_Init_Cvars (); // 2000-04-30 NVS COMMON by Maddes
|
||||
NVS_Init_Server_Cvars (); // 2000-04-30 NVS HANDSHAKE SRV<->QC/SRV<->CL by Maddes
|
||||
NVS_Init_Client_Cvars (); // 2000-04-30 NVS HANDSHAKE SRV<->QC/SRV<->CL by Maddes
|
||||
// 2001-09-18 New cvar system by Maddes (Init) end
|
||||
|
||||
|
||||
NVS_Init_Server_Cvars ();
|
||||
NVS_Init_Client_Cvars ();
|
||||
|
||||
V_Init ();
|
||||
Chase_Init ();
|
||||
Host_InitVCR (parms);
|
||||
COM_Init (parms->basedir);
|
||||
|
||||
|
||||
Host_InitLocal ();
|
||||
// W_LoadWadFileExtra ("extra.wad");
|
||||
|
||||
W_LoadWadFile ("gfx.wad");
|
||||
|
||||
Key_Init ();
|
||||
|
@ -1376,13 +1298,10 @@ void Host_Init (quakeparms_t *parms)
|
|||
#ifdef GLOBOT
|
||||
Bot_Init ();
|
||||
#endif
|
||||
NVS_Init (); // 2000-04-30 NVS COMMON by Maddes
|
||||
NVS_Init_Server (); // 2000-04-30 NVS HANDSHAKE SRV<->QC/SRV<->CL by Maddes
|
||||
NVS_Init_Client (); // 2000-04-30 NVS HANDSHAKE SRV<->QC/SRV<->CL by Maddes
|
||||
//#ifndef _WIN32
|
||||
// S_Init (); // moved sound init way back here. so we can see it in text
|
||||
//#endif
|
||||
Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
|
||||
NVS_Init ();
|
||||
NVS_Init_Server ();
|
||||
NVS_Init_Client ();
|
||||
Con_Printf ("Engine compiled: "__TIME__" "__DATE__"\n");
|
||||
Con_Printf ("%4.1f megabyte heap\n",parms->memsize/ (1024*1024.0));
|
||||
|
||||
R_InitTextures (); // needed even for dedicated servers
|
||||
|
@ -1394,25 +1313,15 @@ void Host_Init (quakeparms_t *parms)
|
|||
#ifndef BENCH
|
||||
// don't do lookup stuff in benchmark
|
||||
MassiveLookupTablesInit();
|
||||
|
||||
|
||||
if (host_basepal != host_origpal){
|
||||
// InitColorColormaps();
|
||||
// GrabColorMap();
|
||||
// InitRemap(host_origpal);
|
||||
}
|
||||
#endif
|
||||
// 2000-07-28 DOSQuake input init before video init fix by Norberto Alfredo Bensa start
|
||||
//#ifndef _WIN32 // on non win32, mouse comes before video for security reasons
|
||||
|
||||
#if !defined(_WIN32) && !defined(DOSQUAKE) // on non dos/win32, mouse comes before video for security reasons
|
||||
// 2000-07-28 DOSQuake input init before video init fix by Norberto Alfredo Bensa end
|
||||
IN_Init ();
|
||||
#endif
|
||||
VID_Init (host_basepal);
|
||||
|
||||
Draw_Init_Cvars(); // 2001-09-18 New cvar system by Maddes (Init)
|
||||
Draw_Init_Cvars();
|
||||
Draw_Init ();
|
||||
// RemapMenuMap();
|
||||
SCR_Init ();
|
||||
R_Init ();
|
||||
#ifndef _WIN32
|
||||
|
@ -1421,31 +1330,22 @@ void Host_Init (quakeparms_t *parms)
|
|||
S_Init ();
|
||||
#else
|
||||
|
||||
#ifdef GLQUAKE
|
||||
// FIXME: doesn't use the new one-window approach yet
|
||||
// S_Init ();
|
||||
#endif
|
||||
|
||||
#endif // _WIN32
|
||||
//TW CDAudio_Init_Cvars(); // 2001-09-18 New cvar system by Maddes (Init)
|
||||
#ifndef BENCH
|
||||
CDAudio_Init ();
|
||||
Tracker_Init ();
|
||||
Sbar_Init ();
|
||||
#endif
|
||||
CL_Init ();
|
||||
// 2000-07-28 DOSQuake input init before video init fix by Norberto Alfredo Bensa start
|
||||
//#ifdef _WIN32 // on non win32, mouse comes before video for security reasons
|
||||
|
||||
#if defined(_WIN32) || defined(DOSQUAKE) // on non dos/win32, mouse comes before video for security reasons
|
||||
// 2000-07-28 DOSQuake input init before video init fix by Norberto Alfredo Bensa end
|
||||
IN_Init ();
|
||||
#endif
|
||||
}
|
||||
|
||||
Cbuf_InsertText ("exec ngunix.rc\n"); // 2001-09-18 New cvar system by Maddes
|
||||
// this creates all missing variables
|
||||
// some of them will be updated by config.cfg executed in quake.rc
|
||||
// this way you can use a non-set-compatible engine without loosing your new cvars
|
||||
Cbuf_InsertText ("exec ngunix.rc\n");
|
||||
|
||||
#ifdef BENCH
|
||||
Cbuf_InsertText ("exec bench.rc\n");
|
||||
#else
|
||||
|
@ -1457,13 +1357,10 @@ void Host_Init (quakeparms_t *parms)
|
|||
R_Presets();
|
||||
host_initialized = true;
|
||||
|
||||
|
||||
|
||||
Sys_Printf ("========Game Initialized=========\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
Host_Shutdown
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
extern cvar_t *pausable;
|
||||
|
||||
|
@ -152,6 +152,7 @@ void Host_Quit_f (void)
|
|||
M_Menu_Quit_f ();
|
||||
return;
|
||||
}
|
||||
|
||||
CL_Disconnect ();
|
||||
Host_ShutdownServer(false);
|
||||
|
||||
|
@ -186,7 +187,7 @@ void Host_Status_f (void)
|
|||
print = SV_ClientPrintf;
|
||||
|
||||
print ("Host: %s\n", hostname->string); // 2001-09-18 New cvar system by Maddes
|
||||
print ("Version: %1.2f (%s)\n", VERSION, QIP_VERSION); // 2001-10-25 QIP version in the console background by Maddes
|
||||
print ("Version: %s\n", VERSION); // 2001-10-25 QIP version in the console background by Maddes
|
||||
if (tcpipAvailable)
|
||||
print ("TCP/IP: %s\n", my_tcpip_address);
|
||||
if (ipxAvailable)
|
||||
|
@ -1357,7 +1358,7 @@ void Host_Version_f (void)
|
|||
print ("Server ");
|
||||
}
|
||||
|
||||
print ("Version: %1.2f (%s)\n", VERSION, QIP_VERSION); // 2001-10-25 QIP version in the console background by Maddes
|
||||
print ("Version: %s\n", VERSION); // 2001-10-25 QIP version in the console background by Maddes
|
||||
print ("Exe: "__TIME__" "__DATE__"\n");
|
||||
// print ("Engine homepage: %s\n", QIP_URL); // 2001-10-25 QIP version in the console background by Maddes
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
// 2001-12-15 Windows Clipboard pasting by FrikaC start
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// mathlib.c -- math primitives
|
||||
|
||||
#include <math.h>
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
void Sys_Error (char *error, ...);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// from Darkplaces
|
||||
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "matrixlib.h"
|
||||
|
|
296
engine/menu.c
296
engine/menu.c
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winquake.h"
|
||||
|
@ -100,12 +100,12 @@ qboolean m_entersound; // play after drawing a frame, so caching
|
|||
// won't disrupt the sound
|
||||
qboolean m_recursiveDraw;
|
||||
extern int menu_scaled;
|
||||
int m_return_state;
|
||||
int m_return_state;
|
||||
qboolean m_return_onerror;
|
||||
char m_return_reason [32];
|
||||
|
||||
#define StartingGame (m_multiplayer_cursor == 1)
|
||||
#define JoiningGame (m_multiplayer_cursor == 0)
|
||||
#define JoiningGame (m_multiplayer_cursor == 0)
|
||||
#define SerialConfig (m_net_cursor == 0)
|
||||
#define DirectConfig (m_net_cursor == 1)
|
||||
#define IPXConfig (m_net_cursor == 2)
|
||||
|
@ -121,6 +121,10 @@ extern cvar_t *v_saturation;
|
|||
#define MENU_DRAW_ONLY 1
|
||||
#define MENU_INVISIBLE 2
|
||||
|
||||
#define MENU_SOUND1 "misc/menu1.wav"
|
||||
#define MENU_SOUND2 "misc/menu2.wav"
|
||||
#define MENU_SOUND3 "misc/menu3.wav"
|
||||
|
||||
typedef struct menu_definition_s
|
||||
{
|
||||
int funcno; // Unique number used for displaying and executing a menu entry. Zero = end of menu definition
|
||||
|
@ -603,15 +607,10 @@ Draws one solid graphics character
|
|||
*/
|
||||
void M_DrawCharacter (int cx, int line, int num)
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (menu_scaled)
|
||||
Draw_Character_Scaled ( cx + ((vid.vconwidth - 320)>>1), line, num);
|
||||
else
|
||||
Draw_Character ( cx + ((vid.width - 320)>>1), line, num);
|
||||
|
||||
#else
|
||||
Draw_Character ( cx + ((vid.width - 320)>>1), line, num);
|
||||
#endif
|
||||
Draw_Character ( cx + ((vid.width - 320)>>1), line, num);
|
||||
}
|
||||
|
||||
void M_Print (int cx, int cy, char *str)
|
||||
|
@ -651,27 +650,18 @@ void M_PrintWhite (int cx, int cy, char *str)
|
|||
|
||||
void M_DrawTransPic (int x, int y, qpic_t *pic)
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (menu_scaled)
|
||||
Draw_TransPic_Scaled (x + ((vid.vconwidth - 320)>>1), y, pic);
|
||||
else
|
||||
Draw_TransPic (x + ((vid.width - 320)>>1), y, pic);
|
||||
#else
|
||||
Draw_TransPic (x + ((vid.width - 320)>>1), y, pic);
|
||||
#endif
|
||||
}
|
||||
|
||||
void M_DrawPic (int x, int y, qpic_t *pic)
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (menu_scaled)
|
||||
if (gamemode == GAME_TRANSFUSION) Draw_TransPic_Scaled (x + ((vid.vconwidth - 320)>>1), y, pic); // transfusion uses transparencies a lot for the main menu. Maybe this can be default?
|
||||
else Draw_Pic_Scaled (x + ((vid.vconwidth - 320)>>1), y, pic);
|
||||
Draw_Pic_Scaled (x + ((vid.vconwidth - 320)>>1), y, pic);
|
||||
else
|
||||
Draw_Pic (x + ((vid.width - 320)>>1), y, pic);
|
||||
#else
|
||||
Draw_Pic (x + ((vid.width - 320)>>1), y, pic);
|
||||
#endif
|
||||
Draw_Pic (x + ((vid.width - 320)>>1), y, pic);
|
||||
}
|
||||
|
||||
byte identityTable[256];
|
||||
|
@ -704,12 +694,10 @@ void M_BuildTranslationTable(int top, int bottom)
|
|||
|
||||
void M_DrawTransPicTranslate (int x, int y, qpic_t *pic)
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (menu_scaled)
|
||||
Draw_TransPicTranslate_Scaled (x + ((vid.vconwidth - 320)>>1), y, pic, translationTable);
|
||||
else
|
||||
#endif
|
||||
Draw_TransPicTranslate (x + ((vid.width - 320)>>1), y, pic, translationTable);
|
||||
Draw_TransPicTranslate (x + ((vid.width - 320)>>1), y, pic, translationTable);
|
||||
}
|
||||
|
||||
|
||||
|
@ -836,19 +824,17 @@ void M_Main_Draw (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/ttl_main.lmp");
|
||||
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
M_DrawTransPic (72, 32, Draw_CachePic ("gfx/mainmenu.lmp") );
|
||||
}
|
||||
}
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
// f = (int)(host_time * 10)%6;
|
||||
if (qbeta) f = (int)(realtime * 10)%2; else f = (int)(realtime * 10)%6;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
if(gamemode != GAME_LASER_ARENA)
|
||||
|
||||
M_DrawTransPic (54, 32 + m_main_cursor * 20,Draw_CachePic( va("gfx/menudot%i.lmp", f+1 ) ) );
|
||||
}
|
||||
|
||||
|
@ -867,13 +853,13 @@ void M_Main_Key (int key)
|
|||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (++m_main_cursor >= MAIN_ITEMS)
|
||||
m_main_cursor = 0;
|
||||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (--m_main_cursor < 0)
|
||||
m_main_cursor = MAIN_ITEMS - 1;
|
||||
break;
|
||||
|
@ -881,13 +867,13 @@ void M_Main_Key (int key)
|
|||
// leilei - xb controller standard
|
||||
|
||||
case K_AUX29:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (--m_main_cursor < 0)
|
||||
m_main_cursor = MAIN_ITEMS - 1;
|
||||
break;
|
||||
|
||||
case K_AUX31:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (++m_main_cursor >= MAIN_ITEMS)
|
||||
m_main_cursor = 0;
|
||||
break;
|
||||
|
@ -919,6 +905,7 @@ void M_Main_Key (int key)
|
|||
M_Menu_Quit_f ();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -941,17 +928,17 @@ void M_SinglePlayer_Draw (void)
|
|||
{
|
||||
int f;
|
||||
qpic_t *p;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/ttl_sgl.lmp");
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
M_DrawTransPic (72, 32, Draw_CachePic ("gfx/sp_menu.lmp") );
|
||||
}
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
// f = (int)(host_time * 10)%6;
|
||||
if (qbeta) f = (int)(realtime * 10)%2; else f = (int)(realtime * 10)%6;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
if(gamemode != GAME_LASER_ARENA)
|
||||
|
||||
if (qbeta)
|
||||
f = (int)(realtime * 10)%2;
|
||||
else
|
||||
f = (int)(realtime * 10)%6;
|
||||
|
||||
M_DrawTransPic (54, 32 + m_singleplayer_cursor * 20,Draw_CachePic( va("gfx/menudot%i.lmp", f+1 ) ) );
|
||||
}
|
||||
|
||||
|
@ -965,13 +952,13 @@ void M_SinglePlayer_Key (int key)
|
|||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (++m_singleplayer_cursor >= SINGLEPLAYER_ITEMS)
|
||||
m_singleplayer_cursor = 0;
|
||||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (--m_singleplayer_cursor < 0)
|
||||
m_singleplayer_cursor = SINGLEPLAYER_ITEMS - 1;
|
||||
break;
|
||||
|
@ -1107,7 +1094,7 @@ void M_Load_Key (int k)
|
|||
break;
|
||||
|
||||
case K_ENTER:
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
if (!loadable[load_cursor])
|
||||
return;
|
||||
m_state = m_none;
|
||||
|
@ -1127,7 +1114,7 @@ void M_Load_Key (int k)
|
|||
|
||||
case K_UPARROW:
|
||||
case K_LEFTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
load_cursor--;
|
||||
if (load_cursor < 0)
|
||||
load_cursor = MAX_SAVEGAMES-1;
|
||||
|
@ -1135,7 +1122,7 @@ void M_Load_Key (int k)
|
|||
|
||||
case K_DOWNARROW:
|
||||
case K_RIGHTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
load_cursor++;
|
||||
if (load_cursor >= MAX_SAVEGAMES)
|
||||
load_cursor = 0;
|
||||
|
@ -1160,7 +1147,7 @@ void M_Save_Key (int k)
|
|||
|
||||
case K_UPARROW:
|
||||
case K_LEFTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
load_cursor--;
|
||||
if (load_cursor < 0)
|
||||
load_cursor = MAX_SAVEGAMES-1;
|
||||
|
@ -1168,7 +1155,7 @@ void M_Save_Key (int k)
|
|||
|
||||
case K_DOWNARROW:
|
||||
case K_RIGHTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
load_cursor++;
|
||||
if (load_cursor >= MAX_SAVEGAMES)
|
||||
load_cursor = 0;
|
||||
|
@ -1195,15 +1182,18 @@ void M_MultiPlayer_Draw (void)
|
|||
{
|
||||
int f;
|
||||
qpic_t *p;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
M_DrawTransPic (72, 32, Draw_CachePic ("gfx/mp_menu.lmp") );
|
||||
}
|
||||
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
|
||||
// f = (int)(host_time * 10)%6;
|
||||
if (qbeta) f = (int)(realtime * 10)%2; else f = (int)(realtime * 10)%6;
|
||||
if (qbeta)
|
||||
f = (int)(realtime * 10)%2;
|
||||
else
|
||||
f = (int)(realtime * 10)%6;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
#ifdef QSB_NET
|
||||
// leilei - warn, because it most likely will not work.
|
||||
|
@ -1214,7 +1204,6 @@ void M_MultiPlayer_Draw (void)
|
|||
M_PrintWhite ((320/2) - ((27*8)/2), 180, " USE AT YOUR OWN RISK!!! PERIOD!!!");
|
||||
|
||||
#endif
|
||||
if(gamemode != GAME_LASER_ARENA)
|
||||
M_DrawTransPic (54, 32 + m_multiplayer_cursor * 20,Draw_CachePic( va("gfx/menudot%i.lmp", f+1 ) ) );
|
||||
|
||||
if (serialAvailable || ipxAvailable || tcpipAvailable)
|
||||
|
@ -1236,13 +1225,13 @@ void M_MultiPlayer_Key (int key)
|
|||
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (++m_multiplayer_cursor >= MULTIPLAYER_ITEMS)
|
||||
m_multiplayer_cursor = 0;
|
||||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (--m_multiplayer_cursor < 0)
|
||||
m_multiplayer_cursor = MULTIPLAYER_ITEMS - 1;
|
||||
break;
|
||||
|
@ -1316,12 +1305,12 @@ void M_Menu_Setup_f (void)
|
|||
void M_Setup_Draw (void)
|
||||
{
|
||||
qpic_t *p;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
}
|
||||
|
||||
M_Print (64, 40, "Hostname");
|
||||
M_DrawTextBox (160, 32, 16, 1);
|
||||
M_Print (168, 40, setup_hostname);
|
||||
|
@ -1369,14 +1358,14 @@ void M_Setup_Key (int k)
|
|||
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
setup_cursor--;
|
||||
if (setup_cursor < 0)
|
||||
setup_cursor = NUM_SETUP_CMDS-1;
|
||||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
setup_cursor++;
|
||||
if (setup_cursor >= NUM_SETUP_CMDS)
|
||||
setup_cursor = 0;
|
||||
|
@ -1385,7 +1374,7 @@ void M_Setup_Key (int k)
|
|||
case K_LEFTARROW:
|
||||
if (setup_cursor < 2)
|
||||
return;
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
if (setup_cursor == 2)
|
||||
setup_top = setup_top - 1;
|
||||
if (setup_cursor == 3)
|
||||
|
@ -1395,7 +1384,7 @@ void M_Setup_Key (int k)
|
|||
if (setup_cursor < 2)
|
||||
return;
|
||||
forward:
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
if (setup_cursor == 2)
|
||||
setup_top = setup_top + 1;
|
||||
if (setup_cursor == 3)
|
||||
|
@ -1535,10 +1524,10 @@ void M_Net_Draw (void)
|
|||
{
|
||||
int f;
|
||||
qpic_t *p;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
}
|
||||
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
|
||||
f = 32;
|
||||
|
@ -1602,7 +1591,6 @@ void M_Net_Draw (void)
|
|||
// f = (int)(host_time * 10)%6;
|
||||
if (qbeta) f = (int)(realtime * 10)%2; else f = (int)(realtime * 10)%6;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
if(gamemode != GAME_LASER_ARENA)
|
||||
M_DrawTransPic (54, 32 + m_net_cursor * 20,Draw_CachePic( va("gfx/menudot%i.lmp", f+1 ) ) );
|
||||
}
|
||||
|
||||
|
@ -1620,13 +1608,13 @@ again:
|
|||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (++m_net_cursor >= m_net_items)
|
||||
m_net_cursor = 0;
|
||||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (--m_net_cursor < 0)
|
||||
m_net_cursor = m_net_items - 1;
|
||||
break;
|
||||
|
@ -2786,11 +2774,9 @@ void M_Menu_Draw (menu_definition_t *menu_definition, int *current_index)
|
|||
switch (menu_definition[0].type)
|
||||
{
|
||||
case MENU_OPTIONS:
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_option.lmp");
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
}
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_option.lmp");
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3884,7 +3870,7 @@ void M_ExecFunction (menu_definition_t *menu_definition, int key)
|
|||
|
||||
if (m_changesound)
|
||||
{
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3948,7 +3934,7 @@ void M_Menu_Key (menu_definition_t *menu_definition, int *current_index, int key
|
|||
|
||||
if (m_movesound)
|
||||
{
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
}
|
||||
}
|
||||
// 2002-01-31 New menu system by Maddes start
|
||||
|
@ -3956,50 +3942,37 @@ void M_Menu_Key (menu_definition_t *menu_definition, int *current_index, int key
|
|||
//=============================================================================
|
||||
/* KEYS MENU */
|
||||
|
||||
// more usefull menu bindings ~eukara
|
||||
char *bindnames[][2] =
|
||||
{
|
||||
{"+attack", "attack"},
|
||||
{"impulse 10", "change weapon"},
|
||||
{"impulse 12", "reverse cycle"},
|
||||
{"+jump", "jump / swim up"},
|
||||
{"impulse 10", "next weapon"},
|
||||
{"impulse 12", "previous weapon"},
|
||||
{"+forward", "walk forward"},
|
||||
{"+back", "backpedal"},
|
||||
{"+left", "turn left"},
|
||||
{"+right", "turn right"},
|
||||
{"+speed", "run"},
|
||||
{"+back", "backpedal"},
|
||||
{"+moveleft", "step left"},
|
||||
{"+moveright", "step right"},
|
||||
{"+strafe", "sidestep"},
|
||||
{"+left", "turn left"},
|
||||
{"+right", "turn right"},
|
||||
{"+jump", "jump"},
|
||||
{"+speed", "run/walk"},
|
||||
{"+lookup", "look up"},
|
||||
{"+lookdown", "look down"},
|
||||
{"+strafe", "sidestep"},
|
||||
{"centerview", "center view"},
|
||||
{"+mlook", "mouse look"},
|
||||
{"+klook", "keyboard look"},
|
||||
{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"},
|
||||
/*{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"}, // testing lists that exceed screen size
|
||||
{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"},
|
||||
{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"},
|
||||
{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"},
|
||||
{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"},
|
||||
{"+moveup", "swim up"},
|
||||
{"+movedown", "swim down"}, */
|
||||
{"+moveup", "move up"},
|
||||
{"+movedown", "move down"},
|
||||
{"messagemode", "chat"},
|
||||
{"pause", "pause"},
|
||||
{"screenshot", "screenshot"},
|
||||
{"toggleconsole", "toggle console"},
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char *extrabinds[][2] =
|
||||
{
|
||||
{"+use", "eat"},
|
||||
{"impulse 9", "poop"},
|
||||
{"disconnect", "fart down"}
|
||||
{"+use", "use"},
|
||||
{"impulse 9", "cheat"},
|
||||
{"disconnect", "disconnect"}
|
||||
};
|
||||
|
||||
|
||||
|
@ -4015,14 +3988,6 @@ void InitCustomKeyList (void)
|
|||
Con_Printf ("couldn't load keys.lst! Custom binds not available.");
|
||||
return;
|
||||
}
|
||||
|
||||
//extrabinds = fileinfo->data;
|
||||
// else
|
||||
// extrabinds = fileinfo->data;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4064,8 +4029,10 @@ void Cmd_Exec_f (void)
|
|||
*/
|
||||
|
||||
#define NUMCOMMANDS (sizeof(bindnames)/sizeof(bindnames[0]))
|
||||
#define KEYS_SIZE 14
|
||||
int NUMCOMMANDS2;
|
||||
int keys_cursor;
|
||||
int keys_top = 0;
|
||||
int bind_grab;
|
||||
|
||||
void M_Menu_Keys_f (void)
|
||||
|
@ -4127,7 +4094,6 @@ void M_UnbindCommand (char *command)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void M_Keys_Draw (void)
|
||||
{
|
||||
int i; //, l // 2001-12-10 Reduced compiler warnings by Jeff Ford
|
||||
|
@ -4138,22 +4104,19 @@ void M_Keys_Draw (void)
|
|||
|
||||
p = Draw_CachePic ("gfx/ttl_cstm.lmp");
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
|
||||
if (bind_grab)
|
||||
M_Print (12, 32, "Press a key or button for this action");
|
||||
else
|
||||
M_Print (18, 32, "Enter to change, backspace to clear");
|
||||
if (keys_top)
|
||||
M_Print (6, 80, "-");
|
||||
if (keys_top + KEYS_SIZE < (int)NUMCOMMANDS)
|
||||
M_Print (6, 80 + ((KEYS_SIZE-1)*8), "+");
|
||||
|
||||
// search for known bindings
|
||||
for (i=0 ; i<NUMCOMMANDS ; i++)
|
||||
for (i = 0; i < KEYS_SIZE; i++)
|
||||
{
|
||||
y = 48 + 8*i;
|
||||
y = 80 + 8*i;
|
||||
|
||||
M_Print (16, y, bindnames[i][1]);
|
||||
M_Print (16, y, bindnames[i+keys_top][1]);
|
||||
|
||||
// l = strlen (bindnames[i][0]); // 2001-12-10 Reduced compiler warnings by Jeff Ford
|
||||
|
||||
M_FindKeysForCommand (bindnames[i][0], keys);
|
||||
M_FindKeysForCommand (bindnames[i+keys_top][0], keys);
|
||||
|
||||
if (keys[0] == -1)
|
||||
{
|
||||
|
@ -4173,9 +4136,15 @@ void M_Keys_Draw (void)
|
|||
}
|
||||
|
||||
if (bind_grab)
|
||||
M_DrawCharacter (130, 48 + keys_cursor*8, '=');
|
||||
{
|
||||
M_Print (12, 64, "Press a key or button for this action");
|
||||
M_DrawCharacter (130, 80 + (keys_cursor-keys_top)*8, '=');
|
||||
}
|
||||
else
|
||||
M_DrawCharacter (130, 48 + keys_cursor*8, 12+((int)(realtime*4)&1));
|
||||
{
|
||||
M_Print (18, 64, "Enter to change, backspace to clear");
|
||||
M_DrawCharacter (130, 80 + (keys_cursor-keys_top)*8, 12+((int)(realtime*4)&1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -4239,7 +4208,7 @@ void M_Keys_Key (int k)
|
|||
|
||||
if (bind_grab)
|
||||
{ // defining a key
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (k == K_ESCAPE)
|
||||
{
|
||||
bind_grab = false;
|
||||
|
@ -4262,7 +4231,7 @@ void M_Keys_Key (int k)
|
|||
|
||||
case K_LEFTARROW:
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
keys_cursor--;
|
||||
if (keys_cursor < 0)
|
||||
keys_cursor = NUMCOMMANDS-1;
|
||||
|
@ -4270,7 +4239,7 @@ void M_Keys_Key (int k)
|
|||
|
||||
case K_DOWNARROW:
|
||||
case K_RIGHTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
keys_cursor++;
|
||||
if (keys_cursor >= NUMCOMMANDS)
|
||||
keys_cursor = 0;
|
||||
|
@ -4278,7 +4247,7 @@ void M_Keys_Key (int k)
|
|||
case K_JOY1:
|
||||
case K_ENTER: // go into bind mode
|
||||
M_FindKeysForCommand (bindnames[keys_cursor][0], keys);
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
if (keys[1] != -1)
|
||||
M_UnbindCommand (bindnames[keys_cursor][0]);
|
||||
bind_grab = true;
|
||||
|
@ -4286,10 +4255,15 @@ void M_Keys_Key (int k)
|
|||
|
||||
case K_BACKSPACE: // delete bindings
|
||||
case K_DEL: // delete bindings
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
M_UnbindCommand (bindnames[keys_cursor][0]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (keys_cursor < keys_top)
|
||||
keys_top = keys_cursor;
|
||||
else if (keys_cursor >= keys_top+KEYS_SIZE)
|
||||
keys_top = keys_cursor - KEYS_SIZE + 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4300,7 +4274,7 @@ void M_Keys_Key2 (int k)
|
|||
|
||||
if (bind_grab)
|
||||
{ // defining a key
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
if (k == K_ESCAPE)
|
||||
{
|
||||
bind_grab = false;
|
||||
|
@ -4323,7 +4297,7 @@ void M_Keys_Key2 (int k)
|
|||
|
||||
case K_LEFTARROW:
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
keys_cursor--;
|
||||
if (keys_cursor < 0)
|
||||
keys_cursor = NUMCOMMANDS2-1;
|
||||
|
@ -4331,7 +4305,7 @@ void M_Keys_Key2 (int k)
|
|||
|
||||
case K_DOWNARROW:
|
||||
case K_RIGHTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
keys_cursor++;
|
||||
if (keys_cursor >= NUMCOMMANDS2)
|
||||
keys_cursor = 0;
|
||||
|
@ -4339,7 +4313,7 @@ void M_Keys_Key2 (int k)
|
|||
|
||||
case K_ENTER: // go into bind mode
|
||||
M_FindKeysForCommand (extrabinds[keys_cursor][0], keys);
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
if (keys[1] != -1)
|
||||
M_UnbindCommand (extrabinds[keys_cursor][0]);
|
||||
bind_grab = true;
|
||||
|
@ -4347,7 +4321,7 @@ void M_Keys_Key2 (int k)
|
|||
|
||||
case K_BACKSPACE: // delete bindings
|
||||
case K_DEL: // delete bindings
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
M_UnbindCommand (extrabinds[keys_cursor][0]);
|
||||
break;
|
||||
}
|
||||
|
@ -4723,10 +4697,9 @@ void M_SerialConfig_Draw (void)
|
|||
int basex;
|
||||
char *startJoin;
|
||||
char *directModem;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
}
|
||||
basex = (320-p->width)/2;
|
||||
M_DrawPic (basex, 4, p);
|
||||
|
||||
|
@ -4796,14 +4769,14 @@ void M_SerialConfig_Key (int key)
|
|||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
serialConfig_cursor--;
|
||||
if (serialConfig_cursor < 0)
|
||||
serialConfig_cursor = NUM_SERIALCONFIG_CMDS-1;
|
||||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
serialConfig_cursor++;
|
||||
if (serialConfig_cursor >= NUM_SERIALCONFIG_CMDS)
|
||||
serialConfig_cursor = 0;
|
||||
|
@ -4812,7 +4785,7 @@ void M_SerialConfig_Key (int key)
|
|||
case K_LEFTARROW:
|
||||
if (serialConfig_cursor > 2)
|
||||
break;
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
|
||||
if (serialConfig_cursor == 0)
|
||||
{
|
||||
|
@ -4844,7 +4817,7 @@ void M_SerialConfig_Key (int key)
|
|||
if (serialConfig_cursor > 2)
|
||||
break;
|
||||
forward:
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
|
||||
if (serialConfig_cursor == 0)
|
||||
{
|
||||
|
@ -4978,10 +4951,10 @@ void M_ModemConfig_Draw (void)
|
|||
{
|
||||
qpic_t *p;
|
||||
int basex;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
}
|
||||
|
||||
basex = (320-p->width)/2;
|
||||
M_DrawPic (basex, 4, p);
|
||||
basex += 8;
|
||||
|
@ -5027,14 +5000,14 @@ void M_ModemConfig_Key (int key)
|
|||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
modemConfig_cursor--;
|
||||
if (modemConfig_cursor < 0)
|
||||
modemConfig_cursor = NUM_MODEMCONFIG_CMDS-1;
|
||||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
modemConfig_cursor++;
|
||||
if (modemConfig_cursor >= NUM_MODEMCONFIG_CMDS)
|
||||
modemConfig_cursor = 0;
|
||||
|
@ -5048,7 +5021,7 @@ void M_ModemConfig_Key (int key)
|
|||
modemConfig_dialing = 'T';
|
||||
else
|
||||
modemConfig_dialing = 'P';
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -5165,10 +5138,10 @@ void M_LanConfig_Draw (void)
|
|||
int basex;
|
||||
char *startJoin;
|
||||
char *protocol;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
}
|
||||
|
||||
basex = (320-p->width)/2;
|
||||
M_DrawPic (basex, 4, p);
|
||||
|
||||
|
@ -5230,14 +5203,14 @@ void M_LanConfig_Key (int key)
|
|||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
lanConfig_cursor--;
|
||||
if (lanConfig_cursor < 0)
|
||||
lanConfig_cursor = NUM_LANCONFIG_CMDS-1;
|
||||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
lanConfig_cursor++;
|
||||
if (lanConfig_cursor >= NUM_LANCONFIG_CMDS)
|
||||
lanConfig_cursor = 0;
|
||||
|
@ -5508,11 +5481,11 @@ int gameoptions_cursor;
|
|||
void M_GameOptions_Draw (void)
|
||||
{
|
||||
qpic_t *p;
|
||||
int x;
|
||||
if(gamemode != GAME_LASER_ARENA){
|
||||
int x;
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_multi.lmp");
|
||||
}
|
||||
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
|
||||
M_DrawTextBox (152, 32, 10, 1);
|
||||
|
@ -5751,14 +5724,14 @@ void M_GameOptions_Key (int key)
|
|||
break;
|
||||
|
||||
case K_UPARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
gameoptions_cursor--;
|
||||
if (gameoptions_cursor < 0)
|
||||
gameoptions_cursor = NUM_GAMEOPTIONS-1;
|
||||
break;
|
||||
|
||||
case K_DOWNARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
gameoptions_cursor++;
|
||||
if (gameoptions_cursor >= NUM_GAMEOPTIONS)
|
||||
gameoptions_cursor = 0;
|
||||
|
@ -5767,19 +5740,19 @@ void M_GameOptions_Key (int key)
|
|||
case K_LEFTARROW:
|
||||
if (gameoptions_cursor == 0)
|
||||
break;
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
M_NetStart_Change (-1);
|
||||
break;
|
||||
|
||||
case K_RIGHTARROW:
|
||||
if (gameoptions_cursor == 0)
|
||||
break;
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
S_LocalSound (MENU_SOUND3);
|
||||
M_NetStart_Change (1);
|
||||
break;
|
||||
|
||||
case K_ENTER:
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
if (gameoptions_cursor == 0)
|
||||
{
|
||||
if (sv.active)
|
||||
|
@ -5936,7 +5909,7 @@ void M_ServerList_Key (int k)
|
|||
|
||||
case K_UPARROW:
|
||||
case K_LEFTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
slist_cursor--;
|
||||
if (slist_cursor < 0)
|
||||
slist_cursor = hostCacheCount - 1;
|
||||
|
@ -5944,14 +5917,14 @@ void M_ServerList_Key (int k)
|
|||
|
||||
case K_DOWNARROW:
|
||||
case K_RIGHTARROW:
|
||||
S_LocalSound ("misc/menu1.wav");
|
||||
S_LocalSound (MENU_SOUND1);
|
||||
slist_cursor++;
|
||||
if (slist_cursor >= hostCacheCount)
|
||||
slist_cursor = 0;
|
||||
break;
|
||||
|
||||
case K_ENTER:
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
m_return_state = m_state;
|
||||
m_return_onerror = true;
|
||||
slist_sorted = false;
|
||||
|
@ -6271,7 +6244,6 @@ void Preset_Crap (void) // Everything set low or possibly beyond low
|
|||
GrabColorMap(); // regenerate colormap
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/* Menu Subsystem */
|
||||
|
||||
|
@ -6281,6 +6253,7 @@ void M_Init (void)
|
|||
Cmd_AddCommand ("togglemenu", M_ToggleMenu_f);
|
||||
|
||||
Cmd_AddCommand ("menu_main", M_Menu_Main_f);
|
||||
|
||||
Cmd_AddCommand ("menu_singleplayer", M_Menu_SinglePlayer_f);
|
||||
Cmd_AddCommand ("menu_load", M_Menu_Load_f);
|
||||
Cmd_AddCommand ("menu_save", M_Menu_Save_f);
|
||||
|
@ -6299,8 +6272,8 @@ void M_Init (void)
|
|||
Cmd_AddCommand ("preset_d", Preset_D);
|
||||
Cmd_AddCommand ("preset_u", Preset_U);
|
||||
Cmd_AddCommand ("preset_q64", Preset_Q64);
|
||||
|
||||
menu_quitscreen = Cvar_Get ("menu_quitscreen", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
|
||||
// 2002-01-31 New menu system by Maddes
|
||||
current_cursor = NULL;
|
||||
current_menu = NULL;
|
||||
|
@ -6435,7 +6408,7 @@ void M_Draw (void)
|
|||
|
||||
if (m_entersound)
|
||||
{
|
||||
S_LocalSound ("misc/menu2.wav");
|
||||
S_LocalSound (MENU_SOUND2);
|
||||
m_entersound = false;
|
||||
}
|
||||
|
||||
|
@ -6540,7 +6513,6 @@ void M_Keydown (int key)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void M_ConfigureNetSubsystem(void)
|
||||
{
|
||||
// enable/disable net systems to match desired config
|
||||
|
@ -6554,5 +6526,3 @@ void M_ConfigureNetSubsystem(void)
|
|||
if (IPXConfig || TCPIPConfig)
|
||||
net_hostport = lanConfig_port;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// models are the only shared resource between a client and server running
|
||||
// on the same machine.
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
#ifdef QSB
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// models are the only shared resource between a client and server running
|
||||
// on the same machine.
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
model_t *loadmodel;
|
||||
char loadname[32]; // for hunk tags
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// nonintel.c: code for non-Intel processors only
|
||||
//
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#define RETURN_EDICT(e) (((int *)pr_globals)[OFS_RETURN] = EDICT_TO_PROG(e))
|
||||
|
||||
|
@ -104,14 +104,6 @@ char *pr_extensions[] =
|
|||
QSB_FOG
|
||||
QSB_GAMEPLAYFIXES
|
||||
QSB_MOVINGSOUNDS // lol i can do this
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
|
@ -3756,13 +3748,6 @@ ebfs_builtin_t pr_ebfs_builtins[] =
|
|||
// { 433, "te_gunshot", PF_te_gunshot }, // te_plasmaburn
|
||||
// { 433, "te_gunshot", PF_te_gunshot }, // te_plasmaburn
|
||||
// { 432, "vectorvectors", PF_te_vectorvectors }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
int pr_ebfs_numbuiltins = sizeof(pr_ebfs_builtins)/sizeof(pr_ebfs_builtins[0]);
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// sv_edict.c -- entity dictionary
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
dprograms_t *progs;
|
||||
dfunction_t *pr_functions;
|
||||
|
@ -1154,16 +1154,6 @@ void PR_LoadProgs (void)
|
|||
keep_compatibility = true;
|
||||
Con_DPrintf ("Old progs.dat found, compatibility turned on.\n");
|
||||
}
|
||||
else if (progs->crc == PROGHEADER080_CRC)
|
||||
{
|
||||
keep_compatibility = 2;
|
||||
Con_DPrintf ("Beta progs.dat found, beta compatibility turned on.\n");
|
||||
}
|
||||
else if (progs->crc == PROGHEADERLA_CRC)
|
||||
{
|
||||
keep_compatibility = 1;
|
||||
Con_DPrintf ("Loser Arena progs.dat found, beta compatibility turned on.\n");
|
||||
}
|
||||
else if (progs->crc == PROGHEADER_CRC)
|
||||
// || (progs->crc == PROGHEADER107_CRC)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
|
||||
/*
|
||||
|
@ -382,7 +382,7 @@ void PR_ExecuteProgram (func_t fnum)
|
|||
{
|
||||
if (pr_global_struct->self)
|
||||
ED_Print (PROG_TO_EDICT(pr_global_struct->self));
|
||||
if(gamemode != GAME_LASER_ARENA) // leilei - DIRTY HACK HACK HACK
|
||||
|
||||
Host_Error ("PR_ExecuteProgram: NULL function");
|
||||
}
|
||||
|
||||
|
|
490
engine/sbar.c
490
engine/sbar.c
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// sbar.c -- status bar code
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
int sb_scaled;
|
||||
int sb_updates; // if >= vid.numpages, no update needed
|
||||
|
@ -305,94 +305,6 @@ void Sbar_Init (void)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (gamemode == GAME_LASER_ARENA){
|
||||
for (i=0 ; i<10 ; i++)
|
||||
{
|
||||
sb_nums[0][i] = Draw_PicFromWad ("health_1");
|
||||
sb_nums[1][i] = Draw_PicFromWad ("health_1");
|
||||
}
|
||||
sb_nums[0][10] = Draw_PicFromWad ("health_1");
|
||||
sb_nums[1][10] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_colon = Draw_PicFromWad ("health_1");
|
||||
sb_slash =Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_weapons[0][0] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[0][1] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[0][2] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[0][3] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[0][4] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[0][5] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[0][6] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_weapons[1][0] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[1][1] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[1][2] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[1][3] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[1][4] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[1][5] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[1][6] = Draw_PicFromWad ("health_1");
|
||||
|
||||
for (i=0 ; i<5 ; i++)
|
||||
{
|
||||
sb_weapons[2+i][0] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[2+i][1] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[2+i][2] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[2+i][3] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[2+i][4] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[2+i][5] = Draw_PicFromWad ("health_1");
|
||||
sb_weapons[2+i][6] = Draw_PicFromWad ("health_1");
|
||||
}
|
||||
|
||||
sb_ammo[0] = Draw_PicFromWad ("health_1");
|
||||
sb_ammo[1] = Draw_PicFromWad ("health_1");
|
||||
sb_ammo[2] = Draw_PicFromWad ("health_1");
|
||||
sb_ammo[3] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_armor[0] = Draw_PicFromWad ("health_1");
|
||||
sb_armor[1] = Draw_PicFromWad ("health_1");
|
||||
sb_armor[2] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_items[0] = Draw_PicFromWad ("health_1");
|
||||
sb_items[1] = Draw_PicFromWad ("health_1");
|
||||
sb_items[2] = Draw_PicFromWad ("health_1");
|
||||
sb_items[3] = Draw_PicFromWad ("health_1");
|
||||
sb_items[4] = Draw_PicFromWad ("health_1");
|
||||
sb_items[5] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_sigil[0] = Draw_PicFromWad ("health_1");
|
||||
sb_sigil[1] = Draw_PicFromWad ("health_1");;
|
||||
sb_sigil[2] = Draw_PicFromWad ("health_1");
|
||||
sb_sigil[3] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_faces[4][0] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[4][1] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[3][0] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[3][1] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[2][0] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[2][1] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[1][0] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[1][1] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[0][0] = Draw_PicFromWad ("health_1");
|
||||
sb_faces[0][1] = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_face_invis = Draw_PicFromWad ("health_1");
|
||||
sb_face_invuln = Draw_PicFromWad ("health_1");
|
||||
sb_face_invis_invuln = Draw_PicFromWad ("health_1");
|
||||
|
||||
sb_face_quad = Draw_PicFromWad ("health_1");
|
||||
|
||||
Cmd_AddCommand ("+showscores", Sbar_ShowScores);
|
||||
Cmd_AddCommand ("-showscores", Sbar_DontShowScores);
|
||||
|
||||
sb_sbar = Draw_PicFromWad ("health_1");
|
||||
sb_ibar = Draw_PicFromWad ("health_1");
|
||||
sb_scorebar = Draw_PicFromWad ("health_1");
|
||||
|
||||
|
||||
return; // load its graphics only
|
||||
}
|
||||
|
||||
for (i=0 ; i<10 ; i++)
|
||||
{
|
||||
sb_nums[0][i] = Draw_PicFromWad (va("num_%i",i));
|
||||
|
@ -400,15 +312,6 @@ void Sbar_Init (void)
|
|||
sb_nums[1][i] = Draw_PicFromWad (va("anum_%i",i));
|
||||
}
|
||||
|
||||
if (gamemode == GAME_TRANSFUSION){
|
||||
for (i=0 ; i<10 ; i++)
|
||||
{
|
||||
hud_amo[0][i] = Draw_PicFromWad (va("hud_amo%i",i));
|
||||
|
||||
hud_amo[1][i] = Draw_PicFromWad (va("hud_arm%i",i));
|
||||
hud_main = Draw_PicFromWad ("hud_main");
|
||||
}
|
||||
}
|
||||
sb_nums[0][10] = Draw_PicFromWad ("num_minus");
|
||||
sb_nums[1][10] = Draw_PicFromWad ("anum_minus");
|
||||
|
||||
|
@ -489,56 +392,6 @@ void Sbar_Init (void)
|
|||
sb_sbar = Draw_PicFromWad ("sbar");
|
||||
sb_ibar = Draw_PicFromWad ("ibar");
|
||||
sb_scorebar = Draw_PicFromWad ("scorebar");
|
||||
//MED 01/04/97 added new hipnotic weapons
|
||||
if (hipnotic)
|
||||
{
|
||||
hsb_weapons[0][0] = Draw_PicFromWad ("inv_laser");
|
||||
hsb_weapons[0][1] = Draw_PicFromWad ("inv_mjolnir");
|
||||
hsb_weapons[0][2] = Draw_PicFromWad ("inv_gren_prox");
|
||||
hsb_weapons[0][3] = Draw_PicFromWad ("inv_prox_gren");
|
||||
hsb_weapons[0][4] = Draw_PicFromWad ("inv_prox");
|
||||
|
||||
hsb_weapons[1][0] = Draw_PicFromWad ("inv2_laser");
|
||||
hsb_weapons[1][1] = Draw_PicFromWad ("inv2_mjolnir");
|
||||
hsb_weapons[1][2] = Draw_PicFromWad ("inv2_gren_prox");
|
||||
hsb_weapons[1][3] = Draw_PicFromWad ("inv2_prox_gren");
|
||||
hsb_weapons[1][4] = Draw_PicFromWad ("inv2_prox");
|
||||
|
||||
for (i=0 ; i<5 ; i++)
|
||||
{
|
||||
hsb_weapons[2+i][0] = Draw_PicFromWad (va("inva%i_laser",i+1));
|
||||
hsb_weapons[2+i][1] = Draw_PicFromWad (va("inva%i_mjolnir",i+1));
|
||||
hsb_weapons[2+i][2] = Draw_PicFromWad (va("inva%i_gren_prox",i+1));
|
||||
hsb_weapons[2+i][3] = Draw_PicFromWad (va("inva%i_prox_gren",i+1));
|
||||
hsb_weapons[2+i][4] = Draw_PicFromWad (va("inva%i_prox",i+1));
|
||||
}
|
||||
|
||||
hsb_items[0] = Draw_PicFromWad ("sb_wsuit");
|
||||
hsb_items[1] = Draw_PicFromWad ("sb_eshld");
|
||||
}
|
||||
|
||||
if (rogue)
|
||||
{
|
||||
rsb_invbar[0] = Draw_PicFromWad ("r_invbar1");
|
||||
rsb_invbar[1] = Draw_PicFromWad ("r_invbar2");
|
||||
|
||||
rsb_weapons[0] = Draw_PicFromWad ("r_lava");
|
||||
rsb_weapons[1] = Draw_PicFromWad ("r_superlava");
|
||||
rsb_weapons[2] = Draw_PicFromWad ("r_gren");
|
||||
rsb_weapons[3] = Draw_PicFromWad ("r_multirock");
|
||||
rsb_weapons[4] = Draw_PicFromWad ("r_plasma");
|
||||
|
||||
rsb_items[0] = Draw_PicFromWad ("r_shield1");
|
||||
rsb_items[1] = Draw_PicFromWad ("r_agrav1");
|
||||
|
||||
// PGM 01/19/97 - team color border
|
||||
rsb_teambord = Draw_PicFromWad ("r_teambord");
|
||||
// PGM 01/19/97 - team color border
|
||||
|
||||
rsb_ammo[0] = Draw_PicFromWad ("r_ammolava");
|
||||
rsb_ammo[1] = Draw_PicFromWad ("r_ammomulti");
|
||||
rsb_ammo[2] = Draw_PicFromWad ("r_ammoplasma");
|
||||
}
|
||||
|
||||
// leilei - colorable 2d stuff
|
||||
// also a reminder - 16 means DISABLED
|
||||
|
@ -560,7 +413,6 @@ void Sbar_Init (void)
|
|||
//=============================================================================
|
||||
|
||||
// drawing routines are relative to the status bar location
|
||||
#ifdef SCALED2D
|
||||
/*
|
||||
=============
|
||||
Sbar_DrawPic
|
||||
|
@ -673,65 +525,6 @@ void Sbar_DrawString (int x, int y, char *str)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
=============
|
||||
Sbar_DrawPic
|
||||
=============
|
||||
*/
|
||||
void Sbar_DrawPic (int x, int y, qpic_t *pic)
|
||||
{
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
Draw_Pic (x /* + ((vid.width - 320)>>1)*/, y + (vid.height-SBAR_HEIGHT), pic);
|
||||
else
|
||||
Draw_Pic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
Sbar_DrawTransPic
|
||||
=============
|
||||
*/
|
||||
void Sbar_DrawTransPic (int x, int y, qpic_t *pic)
|
||||
{
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
Draw_TransPic (x /*+ ((vid.width - 320)>>1)*/, y + (vid.height-SBAR_HEIGHT), pic);
|
||||
else
|
||||
Draw_TransPic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Sbar_DrawCharacter
|
||||
|
||||
Draws one solid graphics character
|
||||
================
|
||||
*/
|
||||
void Sbar_DrawCharacter (int x, int y, int num)
|
||||
{
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
Draw_Character ( x /*+ ((vid.width - 320)>>1) */ + 4 , y + vid.height-SBAR_HEIGHT, num);
|
||||
else
|
||||
Draw_Character ( x + ((vid.width - 320)>>1) + 4 , y + vid.height-SBAR_HEIGHT, num);
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Sbar_DrawString
|
||||
================
|
||||
*/
|
||||
void Sbar_DrawString (int x, int y, char *str)
|
||||
{
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
Draw_String (x /*+ ((vid.width - 320)>>1)*/, y+ vid.height-SBAR_HEIGHT, str);
|
||||
else
|
||||
Draw_String (x + ((vid.width - 320)>>1), y+ vid.height-SBAR_HEIGHT, str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
=============
|
||||
Sbar_itoa
|
||||
|
@ -1195,7 +988,6 @@ void Sbar_DrawFrags (void)
|
|||
|
||||
// draw the text
|
||||
l = scoreboardlines <= 4 ? scoreboardlines : 4;
|
||||
#ifdef SCALED2D
|
||||
if (sb_scaled){
|
||||
x = 23;
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
|
@ -1215,16 +1007,7 @@ void Sbar_DrawFrags (void)
|
|||
|
||||
|
||||
}
|
||||
#else
|
||||
x = 23;
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
xofs = 0;
|
||||
else
|
||||
xofs = (vid.width - 320)>>1;
|
||||
y = vid.height - SBAR_HEIGHT - 23;
|
||||
|
||||
|
||||
#endif
|
||||
for (i=0 ; i<l ; i++)
|
||||
{
|
||||
k = fragsort[i];
|
||||
|
@ -1237,7 +1020,7 @@ void Sbar_DrawFrags (void)
|
|||
bottom = (s->colors & 15)<<4;
|
||||
top = Sbar_ColorForMap (top);
|
||||
bottom = Sbar_ColorForMap (bottom);
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled){
|
||||
Draw_Fill_Scaled (xofs + x*8 + 10, y, 28, 4, top);
|
||||
Draw_Fill_Scaled (xofs + x*8 + 10, y+4, 28, 3, bottom);
|
||||
|
@ -1261,25 +1044,6 @@ void Sbar_DrawFrags (void)
|
|||
Sbar_DrawCharacter ( (x+4)*8-4, -24, 17);
|
||||
}
|
||||
x+=4;
|
||||
#else
|
||||
Draw_Fill (xofs + x*8 + 10, y, 28, 4, top);
|
||||
Draw_Fill (xofs + x*8 + 10, y+4, 28, 3, bottom);
|
||||
|
||||
// draw number
|
||||
f = s->frags;
|
||||
sprintf (num, "%3i",f);
|
||||
|
||||
Sbar_DrawCharacter ( (x+1)*8 , -24, num[0]);
|
||||
Sbar_DrawCharacter ( (x+2)*8 , -24, num[1]);
|
||||
Sbar_DrawCharacter ( (x+3)*8 , -24, num[2]);
|
||||
|
||||
if (k == cl.viewentity - 1)
|
||||
{
|
||||
Sbar_DrawCharacter (x*8+2, -24, 16);
|
||||
Sbar_DrawCharacter ( (x+4)*8-4, -24, 17);
|
||||
}
|
||||
x+=4;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1313,7 +1077,7 @@ void Sbar_DrawFace (void)
|
|||
bottom = (s->colors & 15)<<4;
|
||||
top = Sbar_ColorForMap (top);
|
||||
bottom = Sbar_ColorForMap (bottom);
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled){
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
xofs = 113;
|
||||
|
@ -1337,17 +1101,7 @@ void Sbar_DrawFace (void)
|
|||
Draw_Fill (xofs, vid.height-SBAR_HEIGHT+3, 22, 9, top);
|
||||
Draw_Fill (xofs, vid.height-SBAR_HEIGHT+12, 22, 9, bottom);
|
||||
}
|
||||
#else
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
xofs = 113;
|
||||
else
|
||||
xofs = ((vid.width - 320)>>1) + 113;
|
||||
|
||||
Sbar_DrawPic (112, 0, rsb_teambord);
|
||||
|
||||
Draw_Fill (xofs, vid.height-SBAR_HEIGHT+3, 22, 9, top);
|
||||
Draw_Fill (xofs, vid.height-SBAR_HEIGHT+12, 22, 9, bottom);
|
||||
#endif
|
||||
// draw number
|
||||
f = s->frags;
|
||||
sprintf (num, "%3i",f);
|
||||
|
@ -1588,16 +1342,6 @@ void Sbar_DrawNodrmal (void)
|
|||
qboolean headsup;
|
||||
char st[512];
|
||||
|
||||
if (gamemode == GAME_FIGHT){
|
||||
//Sbar_Draw_Fight();
|
||||
Sys_Error("FAT!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (gamemode == GAME_TRANSFUSION){
|
||||
Sbar_Draw_TFN();
|
||||
return;
|
||||
}
|
||||
if (cl_sbar->value || scr_viewsize->value<100)
|
||||
Sbar_DrawPic (0, 0, sb_sbar, col_sbar);
|
||||
|
||||
|
@ -1725,11 +1469,6 @@ void Sbar_Draw (void)
|
|||
qboolean headsup;
|
||||
char st[512];
|
||||
|
||||
if (gamemode == GAME_TRANSFUSION){
|
||||
Sbar_Draw_TFN();
|
||||
return;
|
||||
}
|
||||
|
||||
headsup = !(cl_sbar->value || scr_viewsize->value<100);
|
||||
|
||||
|
||||
|
@ -1742,14 +1481,6 @@ void Sbar_Draw (void)
|
|||
if ((sb_updates >= vid.numpages) && !headsup)
|
||||
return;
|
||||
|
||||
// Game Specific Huds and etc.
|
||||
if (gamemode == GAME_FIGHT){ // fighting game experiment
|
||||
Sbar_Draw_Fight();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
scr_copyeverything = 1;
|
||||
|
||||
sb_updates++;
|
||||
|
@ -1780,92 +1511,6 @@ void Sbar_Draw (void)
|
|||
Sbar_DrawScoreboard ();
|
||||
sb_updates = 0;
|
||||
}
|
||||
else if (sb_lines)
|
||||
{
|
||||
/* Sbar_DrawPic (0, 0, sb_sbar);
|
||||
|
||||
// keys (hipnotic only)
|
||||
//MED 01/04/97 moved keys here so they would not be overwritten
|
||||
if (hipnotic)
|
||||
{
|
||||
if (cl.items & IT_KEY1)
|
||||
Sbar_DrawPic (209, 3, sb_items[0]);
|
||||
if (cl.items & IT_KEY2)
|
||||
Sbar_DrawPic (209, 12, sb_items[1]);
|
||||
}
|
||||
// armor
|
||||
if (cl.items & IT_INVULNERABILITY)
|
||||
{
|
||||
Sbar_DrawNum (24, 0, 666, 3, 1);
|
||||
Sbar_DrawPic (0, 0, draw_disc);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rogue)
|
||||
{
|
||||
Sbar_DrawNum (24, 0, cl.stats[STAT_ARMOR], 3,
|
||||
cl.stats[STAT_ARMOR] <= 25);
|
||||
if (cl.items & RIT_ARMOR3)
|
||||
Sbar_DrawPic (0, 0, sb_armor[2]);
|
||||
else if (cl.items & RIT_ARMOR2)
|
||||
Sbar_DrawPic (0, 0, sb_armor[1]);
|
||||
else if (cl.items & RIT_ARMOR1)
|
||||
Sbar_DrawPic (0, 0, sb_armor[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sbar_DrawNum (24, 0, cl.stats[STAT_ARMOR], 3
|
||||
, cl.stats[STAT_ARMOR] <= 25);
|
||||
if (cl.items & IT_ARMOR3)
|
||||
Sbar_DrawPic (0, 0, sb_armor[2]);
|
||||
else if (cl.items & IT_ARMOR2)
|
||||
Sbar_DrawPic (0, 0, sb_armor[1]);
|
||||
else if (cl.items & IT_ARMOR1)
|
||||
Sbar_DrawPic (0, 0, sb_armor[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// face
|
||||
Sbar_DrawFace ();
|
||||
|
||||
// health
|
||||
Sbar_DrawNum (136, 0, cl.stats[STAT_HEALTH], 3
|
||||
, cl.stats[STAT_HEALTH] <= 25);
|
||||
|
||||
// ammo icon
|
||||
if (rogue)
|
||||
{
|
||||
if (cl.items & RIT_SHELLS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[0]);
|
||||
else if (cl.items & RIT_NAILS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[1]);
|
||||
else if (cl.items & RIT_ROCKETS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[2]);
|
||||
else if (cl.items & RIT_CELLS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[3]);
|
||||
else if (cl.items & RIT_LAVA_NAILS)
|
||||
Sbar_DrawPic (224, 0, rsb_ammo[0]);
|
||||
else if (cl.items & RIT_PLASMA_AMMO)
|
||||
Sbar_DrawPic (224, 0, rsb_ammo[1]);
|
||||
else if (cl.items & RIT_MULTI_ROCKETS)
|
||||
Sbar_DrawPic (224, 0, rsb_ammo[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cl.items & IT_SHELLS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[0]);
|
||||
else if (cl.items & IT_NAILS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[1]);
|
||||
else if (cl.items & IT_ROCKETS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[2]);
|
||||
else if (cl.items & IT_CELLS)
|
||||
Sbar_DrawPic (224, 0, sb_ammo[3]);
|
||||
}
|
||||
|
||||
Sbar_DrawNum (248, 0, cl.stats[STAT_AMMO], 3,
|
||||
cl.stats[STAT_AMMO] <= 10);
|
||||
*/
|
||||
}
|
||||
|
||||
if (vid.width > 320) {
|
||||
if (cl.gametype == GAME_DEATHMATCH)
|
||||
|
@ -1965,12 +1610,10 @@ void Sbar_DeathmatchOverlay (void)
|
|||
|
||||
// draw the text
|
||||
l = scoreboardlines;
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled) x = 80 + ((vid.vconwidth - 320)>>1);
|
||||
else x = 80 + ((vid.width - 320)>>1);
|
||||
#else
|
||||
x = 80 + ((vid.width - 320)>>1);
|
||||
#endif
|
||||
|
||||
y = 40;
|
||||
for (i=0 ; i<l ; i++)
|
||||
{
|
||||
|
@ -1984,7 +1627,7 @@ void Sbar_DeathmatchOverlay (void)
|
|||
bottom = (s->colors & 15)<<4;
|
||||
top = Sbar_ColorForMap (top);
|
||||
bottom = Sbar_ColorForMap (bottom);
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled){
|
||||
Draw_Fill_Scaled ( x, y, 40, 4, top);
|
||||
Draw_Fill_Scaled ( x, y+4, 40, 4, bottom);
|
||||
|
@ -1992,14 +1635,10 @@ void Sbar_DeathmatchOverlay (void)
|
|||
Draw_Fill ( x, y, 40, 4, top);
|
||||
Draw_Fill ( x, y+4, 40, 4, bottom);
|
||||
}
|
||||
#else
|
||||
Draw_Fill ( x, y, 40, 4, top);
|
||||
Draw_Fill ( x, y+4, 40, 4, bottom);
|
||||
#endif
|
||||
// draw number
|
||||
|
||||
// draw number
|
||||
f = s->frags;
|
||||
sprintf (num, "%3i",f);
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled){
|
||||
Draw_Character_Scaled ( x+8 , y, num[0]);
|
||||
|
@ -2018,24 +1657,11 @@ void Sbar_DeathmatchOverlay (void)
|
|||
if (k == cl.viewentity - 1)
|
||||
Draw_Character ( x - 8, y, 12);
|
||||
}
|
||||
#else
|
||||
|
||||
Draw_Character ( x+8 , y, num[0]);
|
||||
Draw_Character ( x+16 , y, num[1]);
|
||||
Draw_Character ( x+24 , y, num[2]);
|
||||
|
||||
if (k == cl.viewentity - 1)
|
||||
Draw_Character ( x - 8, y, 12);
|
||||
#endif
|
||||
|
||||
#ifdef SCALED2D
|
||||
// draw name
|
||||
if (sb_scaled)
|
||||
Draw_String_Scaled (x+64, y, s->name);
|
||||
else Draw_String (x+64, y, s->name);
|
||||
#else
|
||||
Draw_String (x+64, y, s->name);
|
||||
#endif
|
||||
y += 10;
|
||||
}
|
||||
}
|
||||
|
@ -2056,7 +1682,6 @@ void Sbar_MiniDeathmatchOverlay (void)
|
|||
scoreboard_t *s;
|
||||
int numlines;
|
||||
|
||||
#ifdef SCALED2D
|
||||
if (sb_scaled){
|
||||
if (vid.vconwidth < 512 || !sb_lines)
|
||||
return;
|
||||
|
@ -2154,74 +1779,6 @@ void Sbar_MiniDeathmatchOverlay (void)
|
|||
}
|
||||
y += 8;
|
||||
}
|
||||
#else
|
||||
if (vid.width < 512 || !sb_lines)
|
||||
return;
|
||||
|
||||
scr_copyeverything = 1;
|
||||
scr_fullupdate = 0;
|
||||
|
||||
// scores
|
||||
Sbar_SortFrags ();
|
||||
|
||||
// draw the text
|
||||
// l = scoreboardlines; // 2001-12-10 Reduced compiler warnings by Jeff Ford
|
||||
y = vid.vconheight - sb_lines;
|
||||
numlines = sb_lines/8;
|
||||
if (numlines < 3)
|
||||
return;
|
||||
|
||||
//find us
|
||||
for (i = 0; i < scoreboardlines; i++)
|
||||
if (fragsort[i] == cl.viewentity - 1)
|
||||
break;
|
||||
|
||||
if (i == scoreboardlines) // we're not there
|
||||
i = 0;
|
||||
else // figure out start
|
||||
i = i - numlines/2;
|
||||
|
||||
if (i > scoreboardlines - numlines)
|
||||
i = scoreboardlines - numlines;
|
||||
if (i < 0)
|
||||
i = 0;
|
||||
|
||||
x = 324;
|
||||
for (/* */; i < scoreboardlines && y < vid.height - 8 ; i++)
|
||||
{
|
||||
k = fragsort[i];
|
||||
s = &cl.scores[k];
|
||||
if (!s->name[0])
|
||||
continue;
|
||||
|
||||
// draw background
|
||||
top = s->colors & 0xf0;
|
||||
bottom = (s->colors & 15)<<4;
|
||||
top = Sbar_ColorForMap (top);
|
||||
bottom = Sbar_ColorForMap (bottom);
|
||||
|
||||
Draw_Fill ( x, y+1, 40, 3, top);
|
||||
Draw_Fill ( x, y+4, 40, 4, bottom);
|
||||
|
||||
// draw number
|
||||
f = s->frags;
|
||||
sprintf (num, "%3i",f);
|
||||
|
||||
Draw_Character ( x+8 , y, num[0]);
|
||||
Draw_Character ( x+16 , y, num[1]);
|
||||
Draw_Character ( x+24 , y, num[2]);
|
||||
|
||||
if (k == cl.viewentity - 1) {
|
||||
Draw_Character ( x, y, 16);
|
||||
Draw_Character ( x + 32, y, 17);
|
||||
}
|
||||
|
||||
// draw name
|
||||
Draw_String (x+48, y, s->name);
|
||||
|
||||
y += 8;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2246,7 +1803,7 @@ void Sbar_IntermissionOverlay (void)
|
|||
Sbar_DeathmatchOverlay ();
|
||||
return;
|
||||
}
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled){
|
||||
pic = Draw_CachePic ("gfx/complete.lmp");
|
||||
Draw_Pic_Scaled (64, 24, pic);
|
||||
|
@ -2295,29 +1852,6 @@ void Sbar_IntermissionOverlay (void)
|
|||
Sbar_IntermissionNumber (240, 144, cl.stats[STAT_TOTALMONSTERS], 3, 0);
|
||||
|
||||
}
|
||||
#else
|
||||
pic = Draw_CachePic ("gfx/complete.lmp");
|
||||
Draw_Pic (64, 24, pic);
|
||||
|
||||
pic = Draw_CachePic ("gfx/inter.lmp");
|
||||
Draw_TransPic (0, 56, pic);
|
||||
|
||||
// time
|
||||
dig = cl.completed_time/60;
|
||||
Sbar_IntermissionNumber (160, 64, dig, 3, 0);
|
||||
num = cl.completed_time - dig*60;
|
||||
Draw_TransPic (234,64,sb_colon);
|
||||
Draw_TransPic (246,64,sb_nums[0][num/10]);
|
||||
Draw_TransPic (266,64,sb_nums[0][num%10]);
|
||||
|
||||
Sbar_IntermissionNumber (160, 104, cl.stats[STAT_SECRETS], 3, 0);
|
||||
Draw_TransPic (232,104,sb_slash);
|
||||
Sbar_IntermissionNumber (240, 104, cl.stats[STAT_TOTALSECRETS], 3, 0);
|
||||
|
||||
Sbar_IntermissionNumber (160, 144, cl.stats[STAT_MONSTERS], 3, 0);
|
||||
Draw_TransPic (232,144,sb_slash);
|
||||
Sbar_IntermissionNumber (240, 144, cl.stats[STAT_TOTALMONSTERS], 3, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -2334,13 +1868,9 @@ void Sbar_FinaleOverlay (void)
|
|||
scr_copyeverything = 1;
|
||||
|
||||
pic = Draw_CachePic ("gfx/finale.lmp");
|
||||
#ifdef SCALED2D
|
||||
|
||||
if(sb_scaled)
|
||||
Draw_TransPic_Scaled ( (vid.vconwidth-pic->width)/2, 16, pic);
|
||||
else
|
||||
Draw_TransPic ( (vid.width-pic->width)/2, 16, pic);
|
||||
#else
|
||||
Draw_TransPic ( (vid.width-pic->width)/2, 16, pic);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// screen.c -- master for refresh, status bar, console, chat, notify, etc
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
// only the refresh window will be updated unless these variables are flagged
|
||||
|
@ -144,8 +144,8 @@ void SCR_DrawCenterString (void)
|
|||
remaining = scr_printspeed->value * (cl.time - scr_centertime_start);
|
||||
else
|
||||
remaining = 9999;
|
||||
#ifdef SCALED2D
|
||||
scr_erase_center = 0;
|
||||
|
||||
scr_erase_center = 0;
|
||||
start = scr_centerstring;
|
||||
|
||||
if (scr_center_lines <= 4)
|
||||
|
@ -176,39 +176,6 @@ void SCR_DrawCenterString (void)
|
|||
break;
|
||||
start++; // skip the \n
|
||||
} while (1);
|
||||
#else
|
||||
scr_erase_center = 0;
|
||||
start = scr_centerstring;
|
||||
|
||||
if (scr_center_lines <= 4)
|
||||
y = vid.height*0.35;
|
||||
else
|
||||
y = 48;
|
||||
|
||||
do
|
||||
{
|
||||
// scan the width of the line
|
||||
for (l=0 ; l<40 ; l++)
|
||||
if (start[l] == '\n' || !start[l])
|
||||
break;
|
||||
x = (vid.width - l*8)/2;
|
||||
for (j=0 ; j<l ; j++, x+=8)
|
||||
{
|
||||
Draw_Character (x, y, start[j]);
|
||||
if (!remaining--)
|
||||
return;
|
||||
}
|
||||
|
||||
y += 8;
|
||||
|
||||
while (*start && *start != '\n')
|
||||
start++;
|
||||
|
||||
if (!*start)
|
||||
break;
|
||||
start++; // skip the \n
|
||||
} while (1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SCR_CheckDrawCenterString (void)
|
||||
|
@ -697,7 +664,7 @@ static void SCR_CalcRefdef (void)
|
|||
size = 120;
|
||||
else
|
||||
size = scr_viewsize->value;
|
||||
#ifdef SCALED2D
|
||||
|
||||
if(sb_scaled){
|
||||
if (size >= 120)
|
||||
sb_lines = 0; // no status bar at all
|
||||
|
@ -707,7 +674,7 @@ static void SCR_CalcRefdef (void)
|
|||
sb_lines = 24+16+8;
|
||||
|
||||
} else
|
||||
#endif
|
||||
|
||||
{
|
||||
if (size >= 120)
|
||||
sb_lines = 0; // no status bar at all
|
||||
|
@ -718,12 +685,11 @@ static void SCR_CalcRefdef (void)
|
|||
}
|
||||
|
||||
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (sb_scaled)
|
||||
// sb_what_lines = sb_lines * (vid.vconheight / vid.height); // leilei - refdef hack fix
|
||||
sb_what_lines = sb_lines * (scalefactorv); // leilei - refdef hack fix
|
||||
else
|
||||
#endif
|
||||
|
||||
sb_what_lines = sb_lines;
|
||||
|
||||
// these calculations mirror those in R_Init() for r_refdef, but take no
|
||||
|
@ -803,12 +769,12 @@ SCR_Init_Cvars
|
|||
cvar_t *scr_fov_adapt;
|
||||
void SCR_Init_Cvars (void)
|
||||
{
|
||||
scr_fov = Cvar_Get ("fov", "90", CVAR_ORIGINAL);
|
||||
scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE|CVAR_ORIGINAL);
|
||||
scr_fov = Cvar_Get ("scr_fov", "90", CVAR_ORIGINAL);
|
||||
scr_viewsize = Cvar_Get ("scr_viewsize", "100", CVAR_ARCHIVE|CVAR_ORIGINAL);
|
||||
scr_conspeed = Cvar_Get ("scr_conspeed", "300", CVAR_ORIGINAL);
|
||||
scr_showram = Cvar_Get ("showram", "1", CVAR_ORIGINAL);
|
||||
scr_showturtle = Cvar_Get ("showturtle", "0", CVAR_ORIGINAL);
|
||||
scr_showpause = Cvar_Get ("showpause", "1", CVAR_ORIGINAL);
|
||||
scr_showram = Cvar_Get ("scr_showram", "1", CVAR_ORIGINAL);
|
||||
scr_showturtle = Cvar_Get ("scr_showturtle", "0", CVAR_ORIGINAL);
|
||||
scr_showpause = Cvar_Get ("scr_showpause", "1", CVAR_ORIGINAL);
|
||||
scr_centertime = Cvar_Get ("scr_centertime", "2", CVAR_ORIGINAL);
|
||||
scr_printspeed = Cvar_Get ("scr_printspeed", "8", CVAR_ORIGINAL);
|
||||
scr_fov_adapt = Cvar_Get ("scr_fov_adapt", "1", CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
|
@ -831,16 +797,9 @@ SCR_Init
|
|||
*/
|
||||
void SCR_Init (void)
|
||||
{
|
||||
|
||||
// 2001-09-18 New cvar system by Maddes (Init) end
|
||||
|
||||
//
|
||||
// register our commands
|
||||
//
|
||||
Cmd_AddCommand ("screenshot",SCR_ScreenShot_f);
|
||||
Cmd_AddCommand ("sizeup",SCR_SizeUp_f);
|
||||
Cmd_AddCommand ("sizedown",SCR_SizeDown_f);
|
||||
|
||||
Cmd_AddCommand ("scr_sizeup",SCR_SizeUp_f);
|
||||
Cmd_AddCommand ("scr_sizedown",SCR_SizeDown_f);
|
||||
|
||||
scr_ram = Draw_PicFromWad ("ram");
|
||||
scr_net = Draw_PicFromWad ("net");
|
||||
|
@ -942,18 +901,14 @@ void SCR_DrawFPS (void)
|
|||
}
|
||||
|
||||
sprintf(st, "%3d FPS", lastfps);
|
||||
#ifdef SCALED2D
|
||||
if (sb_scaled)
|
||||
x = vid.vconwidth - strlen(st) * 16 - 16;
|
||||
else
|
||||
#endif
|
||||
x = vid.width - strlen(st) * 16 - 16;
|
||||
y = 0 ;
|
||||
#ifdef SCALED2D
|
||||
if (sb_scaled)
|
||||
Draw_String_Scaled(x, y, st);
|
||||
else
|
||||
#endif
|
||||
Draw_String(x, y, st);
|
||||
|
||||
}
|
||||
|
@ -1036,11 +991,10 @@ void SCR_SetUpToDrawConsole (void)
|
|||
else if (key_dest == key_console)
|
||||
{
|
||||
scr_conlines = vid.height/2; // half screen
|
||||
#ifdef SCALED2D
|
||||
|
||||
if (console_scaled)
|
||||
scr_conlines = vid.vconheight*scr_conheight->value; // in-game console
|
||||
else
|
||||
#endif
|
||||
scr_conlines = vid.height*scr_conheight->value; // in-game console
|
||||
|
||||
if (scr_conlines < (3*8+8+8)) // always leave three lines visible (plus command line and border)
|
||||
|
@ -1048,11 +1002,9 @@ void SCR_SetUpToDrawConsole (void)
|
|||
|
||||
if (scr_conlines >= vid.height)
|
||||
{
|
||||
#ifdef SCALED2D
|
||||
if (console_scaled)
|
||||
scr_conlines = vid.vconheight - 1; // maximum is full screen
|
||||
else
|
||||
#endif
|
||||
scr_conlines = vid.height - 1; // maximum is full screen
|
||||
}
|
||||
}
|
||||
|
@ -1230,7 +1182,7 @@ void SCR_ScreenShot_f (void)
|
|||
//
|
||||
// find a file name to save it to
|
||||
//
|
||||
strcpy(pcxname,"quake00.pcx");
|
||||
strcpy(pcxname,"scrsh00.pcx");
|
||||
|
||||
for (i=0 ; i<=99 ; i++)
|
||||
{
|
||||
|
@ -1323,13 +1275,11 @@ void SCR_DrawNotifyString (void)
|
|||
int x, y;
|
||||
|
||||
start = scr_notifystring;
|
||||
#ifdef SCALED2D
|
||||
if (menu_scaled)
|
||||
y = vid.vconheight*0.35;
|
||||
|
||||
|
||||
else
|
||||
#endif
|
||||
y = vid.height*0.35;
|
||||
|
||||
do
|
||||
|
@ -1339,14 +1289,12 @@ void SCR_DrawNotifyString (void)
|
|||
if (start[l] == '\n' || !start[l])
|
||||
break;
|
||||
|
||||
#ifdef SCALED2D
|
||||
if (menu_scaled){ // leilei - we consider this part of the menu isntead
|
||||
x = (vid.vconwidth - l*8)/2;
|
||||
for (j=0 ; j<l ; j++, x+=8)
|
||||
Draw_Character_Scaled (x, y, start[j]);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
{
|
||||
x = (vid.width - l*8)/2;
|
||||
|
@ -1618,17 +1566,6 @@ void SCR_UpdateScreen (void)
|
|||
dynlightenabled = r_dynamic->value ? 0 : 1;
|
||||
|
||||
|
||||
if (r_tinge->value == 3)
|
||||
Draw_DudeScreen ();
|
||||
else if (r_tinge->value == 2)
|
||||
Draw_DudeScreen66 ();
|
||||
else if (r_tinge->value == 1)
|
||||
Draw_DudeScreen33 ();
|
||||
else if (r_tinge->value == -1)
|
||||
Draw_DudeScreen33A ();
|
||||
else if (r_tinge->value == -2)
|
||||
Draw_DudeScreen66A ();
|
||||
|
||||
if (scr_drawdialog)
|
||||
{
|
||||
Sbar_Draw ();
|
||||
|
@ -1680,11 +1617,9 @@ void SCR_UpdateScreen (void)
|
|||
//
|
||||
// update one of three areas
|
||||
//
|
||||
#ifdef SCALED2D
|
||||
if (sb_scaled)
|
||||
sb_what_lines = sb_lines * (vid.height / vid.vconheight); // leilei - refdef hack fix
|
||||
else
|
||||
#endif
|
||||
// if (!reflectpass)
|
||||
sb_what_lines = sb_lines;
|
||||
// else
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// sv_main.c -- server main program
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
server_t sv;
|
||||
server_static_t svs;
|
||||
|
@ -1279,9 +1279,6 @@ void SV_CreateBaseline (void)
|
|||
if (entnum > 0 && entnum <= svs.maxclients)
|
||||
{
|
||||
svent->baseline.colormap = entnum;
|
||||
if(gamemode == GAME_LASER_ARENA)
|
||||
svent->baseline.modelindex = SV_ModelIndex("progs/player.mdl");
|
||||
else
|
||||
svent->baseline.modelindex = SV_ModelIndex("progs/player.mdl");
|
||||
}
|
||||
else
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// sv_move.c -- monster movement
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#define STEPSIZE 18
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// sv_phys.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// sv_user.c -- server code for moving users
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
edict_t *sv_player;
|
||||
|
||||
|
|
283
engine/view.c
283
engine/view.c
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// view.c -- player eye positioning
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@ when crossing a water boudnary.
|
|||
cvar_t *lcd_x;
|
||||
cvar_t *cl_splitscreen;
|
||||
|
||||
cvar_t *v_detail; // LEI
|
||||
cvar_t *v_detail;
|
||||
cvar_t *lcd_yaw;
|
||||
|
||||
cvar_t *scr_ofsx;
|
||||
|
@ -47,8 +47,7 @@ cvar_t *cl_rollangle;
|
|||
cvar_t *cl_bob;
|
||||
cvar_t *cl_bobcycle;
|
||||
cvar_t *cl_bobup;
|
||||
// DARKPLACES!
|
||||
// DARKPLACES!
|
||||
|
||||
cvar_t *cl_bobmodel;
|
||||
cvar_t *cl_bobmodel_up;
|
||||
cvar_t *cl_bobmodel_side;
|
||||
|
@ -86,10 +85,6 @@ cvar_t *cl_followmodel_up_highpass1;
|
|||
cvar_t *cl_followmodel_up_highpass;
|
||||
cvar_t *cl_followmodel_up_lowpass;
|
||||
|
||||
|
||||
|
||||
// NEW
|
||||
|
||||
cvar_t *cl_oldview;
|
||||
cvar_t *cl_gundraw; // leilei - draw the gun when selected
|
||||
cvar_t *cl_gunhold; // leilei - hold the gun motion when firing (ala d**m)
|
||||
|
@ -120,19 +115,19 @@ cvar_t *gl_cshiftpercent;
|
|||
|
||||
float v_dmg_time, v_dmg_roll, v_dmg_pitch;
|
||||
|
||||
extern int in_forward, in_forward2, in_back;
|
||||
int shiftshif;
|
||||
int shiftalpha;
|
||||
extern int skipbob;
|
||||
extern int in_forward, in_forward2, in_back;
|
||||
int shiftshif;
|
||||
int shiftalpha;
|
||||
extern int skipbob;
|
||||
// BOBEN
|
||||
// 16 pixels of bob
|
||||
|
||||
#define MAXBOB 0x100000
|
||||
|
||||
int ongrounid; // whether player is on ground or in air
|
||||
int ongrounid; // whether player is on ground or in air
|
||||
int aimlock; // leilei - aim locking
|
||||
float aimlockangle; // maximum extremities of aiming in the aimlock
|
||||
vec3_t lockedangle;
|
||||
vec3_t lockedangle;
|
||||
|
||||
|
||||
// leilei death cam
|
||||
|
@ -140,8 +135,7 @@ vec3_t lockedangle;
|
|||
extern cvar_t *cl_diecam;
|
||||
extern float deathcamtime;
|
||||
extern vec3_t deathcam_angles;
|
||||
extern int deathcam_yesiamdead;
|
||||
|
||||
extern int deathcam_yesiamdead;
|
||||
|
||||
/*
|
||||
===============
|
||||
|
@ -733,94 +727,6 @@ void V_CalcAlphaShift (void)
|
|||
V_UpdatePalette
|
||||
=============
|
||||
*/
|
||||
#ifdef GLQUAKE
|
||||
void V_UpdatePalette (void)
|
||||
{
|
||||
int i, j;
|
||||
qboolean new;
|
||||
byte *basepal, *newpal;
|
||||
byte pal[768];
|
||||
float r,g,b,a;
|
||||
int ir, ig, ib;
|
||||
qboolean force;
|
||||
|
||||
V_CalcPowerupCshift ();
|
||||
|
||||
new = false;
|
||||
|
||||
for (i=0 ; i<NUM_CSHIFTS ; i++)
|
||||
{
|
||||
if (cl.cshifts[i].percent != cl.prev_cshifts[i].percent)
|
||||
{
|
||||
new = true;
|
||||
cl.prev_cshifts[i].percent = cl.cshifts[i].percent;
|
||||
}
|
||||
for (j=0 ; j<3 ; j++)
|
||||
if (cl.cshifts[i].destcolor[j] != cl.prev_cshifts[i].destcolor[j])
|
||||
{
|
||||
new = true;
|
||||
cl.prev_cshifts[i].destcolor[j] = cl.cshifts[i].destcolor[j];
|
||||
}
|
||||
}
|
||||
|
||||
// drop the damage value
|
||||
cl.cshifts[CSHIFT_DAMAGE].percent -= host_frametime*150;
|
||||
if (cl.cshifts[CSHIFT_DAMAGE].percent <= 0)
|
||||
cl.cshifts[CSHIFT_DAMAGE].percent = 0;
|
||||
|
||||
// drop the bonus value
|
||||
cl.cshifts[CSHIFT_BONUS].percent -= host_frametime*100;
|
||||
if (cl.cshifts[CSHIFT_BONUS].percent <= 0)
|
||||
cl.cshifts[CSHIFT_BONUS].percent = 0;
|
||||
|
||||
force = V_CheckGamma ();
|
||||
if (!new && !force)
|
||||
return;
|
||||
|
||||
V_CalcBlend ();
|
||||
|
||||
a = v_blend[3];
|
||||
r = 255*v_blend[0]*a;
|
||||
g = 255*v_blend[1]*a;
|
||||
b = 255*v_blend[2]*a;
|
||||
|
||||
a = 1-a;
|
||||
for (i=0 ; i<256 ; i++)
|
||||
{
|
||||
ir = i*a + r;
|
||||
ig = i*a + g;
|
||||
ib = i*a + b;
|
||||
if (ir > 255)
|
||||
ir = 255;
|
||||
if (ig > 255)
|
||||
ig = 255;
|
||||
if (ib > 255)
|
||||
ib = 255;
|
||||
|
||||
ramps[0][i] = gammatable[ir];
|
||||
ramps[1][i] = gammatable[ig];
|
||||
ramps[2][i] = gammatable[ib];
|
||||
}
|
||||
|
||||
basepal = host_basepal;
|
||||
newpal = pal;
|
||||
|
||||
for (i=0 ; i<256 ; i++)
|
||||
{
|
||||
ir = basepal[0];
|
||||
ig = basepal[1];
|
||||
ib = basepal[2];
|
||||
basepal += 3;
|
||||
|
||||
newpal[0] = ramps[0][ir];
|
||||
newpal[1] = ramps[1][ig];
|
||||
newpal[2] = ramps[2][ib];
|
||||
newpal += 3;
|
||||
}
|
||||
|
||||
VID_ShiftPalette (pal);
|
||||
}
|
||||
#else // !GLQUAKE
|
||||
|
||||
void D_AlphaShift (void);
|
||||
|
||||
|
@ -990,7 +896,6 @@ void V_UpdatePalette (void)
|
|||
// else
|
||||
// V_CalcAlphaShift();
|
||||
}
|
||||
#endif // !GLQUAKE
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1430,22 +1335,10 @@ void V_CalcRefdef (void)
|
|||
|
||||
// transform the view offset by the model's matrix to get the offset from
|
||||
// model origin for the view
|
||||
ent->angles[YAW] = cl.viewangles[YAW]; // the model should face
|
||||
// the view dir
|
||||
ent->angles[PITCH] = -cl.viewangles[PITCH]; // the model should face
|
||||
// the view dir
|
||||
|
||||
|
||||
|
||||
ent->angles[YAW] = cl.viewangles[YAW];
|
||||
ent->angles[PITCH] = -cl.viewangles[PITCH];
|
||||
bob = V_CalcBob ();
|
||||
|
||||
|
||||
// bob = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (chase_active->value || deathcam_yesiamdead)
|
||||
skipbob = 1; // don't bob in the chase cam...
|
||||
|
||||
|
@ -1685,29 +1578,8 @@ if (cl.stats[STAT_HEALTH] >= 1){
|
|||
|
||||
#ifdef LOOKANGLE
|
||||
cl.viewent.angles[PITCH] = - (r_refdef.viewangles[PITCH] + cl.aimangle[0] * temp2->value);
|
||||
|
||||
|
||||
// if (cl.aimangle[0])
|
||||
// Sys_Error("WHAT");
|
||||
// VectorAdd (cl.viewent.angles, cl.aimangle, cl.viewent.angles);
|
||||
// VectorCopy(cl.viewent.angles, desiredaim);
|
||||
// if (cl.aimangle[2]) // we got something!
|
||||
// desiredaim[1] = cl.aimangle[2] * 90;
|
||||
// else
|
||||
// desiredaim[1] = cl.viewent.angles[PITCH]; // we don't got something
|
||||
//cl.viewent.angles[PITCH] = cl.aimangle[2] * 90;
|
||||
//highpass3(cl.viewent.angles, gunaimtime*40, gunaimtime*40, gunaimtime*40, cl.gunorg_adjustment_highpass, desiredaim);
|
||||
//lowpass3(cl.viewent.angles, frametime*cl_followmodel_side_highpass->value, frametime*cl_followmodel_side_highpass->value, frametime*cl_followmodel_up_highpass->value, cl.gunorg_adjustment_highpass, desiredaim);
|
||||
// highpass(cl.viewent.angles[PITCH], 5, desiredaim);
|
||||
// cl.viewent.angles[PITCH] = desiredaim[1];
|
||||
//Con_DPrintf ("%f VIEWPITCH\n", cl.viewent.angles[PITCH]);
|
||||
// VectorCopy (cl.aimangle, cl.viewent.angles);
|
||||
|
||||
// Con_Printf("%f %f\n", cl.aimangle[0], cl.aimangle[1]);
|
||||
// cl.viewent.angles[YAW] = r_refdef.viewangles[YAW] - cl.aimangle[1] * IR_YAWRANGE;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// -----------------------------------------
|
||||
// ** SAJT'S KEGENDARY BOBMODEL CODE STARTS HERE! **
|
||||
// -----------------------------------------
|
||||
|
@ -1999,21 +1871,6 @@ if (cl.stats[STAT_HEALTH] >= 1){
|
|||
Chase_Update ();
|
||||
if (skipbob)
|
||||
skipbob = 0;
|
||||
// leilei - water reflections
|
||||
{
|
||||
// if (reflectpass)
|
||||
// {
|
||||
// vec3_t orgin;
|
||||
|
||||
// VectorSubtract(view->origin2, view->origin, orgin);
|
||||
|
||||
//VectorSubtract(view->origin2, orgin, reflectorg);
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -2241,12 +2098,7 @@ if (aimlock){
|
|||
crossthere[2] = 0;
|
||||
}
|
||||
|
||||
#ifdef SCALED2D
|
||||
//Draw_Character (scr_vrect.x + scr_vrect.width/2 + cl_crossx->value,scr_vrect.y + scr_vrect.height/2 + cl_crossy->value, '+');
|
||||
Draw_Character (scr_vrect.x + scr_vrect.width/2 + cl_crossx->value + crossthere[0],scr_vrect.y + scr_vrect.height/2 + cl_crossy->value+ crossthere[1], '+');
|
||||
#else
|
||||
Draw_Character (scr_vrect.x + scr_vrect.width/2 + cl_crossx->value,scr_vrect.y + scr_vrect.height/2 + cl_crossy->value, '+');
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2270,93 +2122,65 @@ void V_Init_Cvars (void)
|
|||
cl_splitscreen = Cvar_Get ("cl_splitscreen", "0", CVAR_ORIGINAL);
|
||||
v_centermove = Cvar_Get ("v_centermove", "0.15", CVAR_ORIGINAL);
|
||||
v_centerspeed = Cvar_Get ("v_centerspeed", "500", CVAR_ORIGINAL);
|
||||
/*
|
||||
v_iyaw_cycle = Cvar_Get ("v_iyaw_cycle", "2", CVAR_ORIGINAL);
|
||||
v_iroll_cycle = Cvar_Get ("v_iroll_cycle", "0.5", CVAR_ORIGINAL);
|
||||
v_ipitch_cycle = Cvar_Get ("v_ipitch_cycle", "1", CVAR_ORIGINAL);
|
||||
v_iyaw_level = Cvar_Get ("v_iyaw_level", "0.3", CVAR_ORIGINAL);
|
||||
v_iroll_level = Cvar_Get ("v_iroll_level", "0.1", CVAR_ORIGINAL);
|
||||
v_ipitch_level = Cvar_Get ("v_ipitch_level", "0.3", CVAR_ORIGINAL);
|
||||
|
||||
v_idlescale = Cvar_Get ("v_idlescale", "0", CVAR_ORIGINAL);
|
||||
*/
|
||||
|
||||
v_iyaw_cycle = Cvar_Get ("v_iyaw_cycle", "1", CVAR_ORIGINAL);
|
||||
v_iroll_cycle = Cvar_Get ("v_iroll_cycle", "0.5", CVAR_ORIGINAL);
|
||||
v_ipitch_cycle = Cvar_Get ("v_ipitch_cycle", "1", CVAR_ORIGINAL);
|
||||
v_iyaw_level = Cvar_Get ("v_iyaw_level", "0.6", CVAR_ORIGINAL);
|
||||
v_iroll_level = Cvar_Get ("v_iroll_level", "0.1", CVAR_ORIGINAL);
|
||||
v_ipitch_level = Cvar_Get ("v_ipitch_level", "0.5", CVAR_ORIGINAL);
|
||||
|
||||
|
||||
|
||||
|
||||
crosshair = Cvar_Get ("crosshair", "0", CVAR_ARCHIVE|CVAR_ORIGINAL);
|
||||
cl_crossx = Cvar_Get ("cl_crossx", "0", CVAR_ORIGINAL);
|
||||
cl_crossy = Cvar_Get ("cl_crossy", "0", CVAR_ORIGINAL);
|
||||
gl_cshiftpercent = Cvar_Get ("gl_cshiftpercent", "100", CVAR_ORIGINAL);
|
||||
|
||||
scr_ofsx = Cvar_Get ("scr_ofsx", "0", CVAR_ORIGINAL);
|
||||
scr_ofsy = Cvar_Get ("scr_ofsy", "0", CVAR_ORIGINAL);
|
||||
scr_ofsz = Cvar_Get ("scr_ofsz", "0", CVAR_ORIGINAL);
|
||||
|
||||
//cl_bob = Cvar_Get ("cl_bob", "0.02", CVAR_ORIGINAL);
|
||||
|
||||
// Quake defaults
|
||||
v_idlescale = Cvar_Get ("v_idlescale", "0", CVAR_ORIGINAL);
|
||||
|
||||
cl_bob = Cvar_Get ("cl_bob", "0.02", CVAR_ORIGINAL);
|
||||
cl_bobcycle = Cvar_Get ("cl_bobcycle", "0.6", CVAR_ORIGINAL);
|
||||
cl_bobup = Cvar_Get ("cl_bobup", "0.5", CVAR_ORIGINAL);
|
||||
|
||||
|
||||
cl_bobmodel = Cvar_Get ("cl_bobmodel", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_bobmodel_side = Cvar_Get ("cl_bobmodel_side", "0.3", CVAR_ORIGINAL);
|
||||
cl_bobmodel_up = Cvar_Get ("cl_bobmodel_up", "0.15", CVAR_ORIGINAL);
|
||||
cl_bobmodel_speed = Cvar_Get ("cl_bobmodel_speed", "7", CVAR_ORIGINAL);
|
||||
cl_bobmodel_ex = Cvar_Get ("cl_bobmodel_ex", "0", CVAR_ORIGINAL);
|
||||
|
||||
cl_rollspeed = Cvar_Get ("cl_rollspeed", "200", CVAR_ORIGINAL);
|
||||
cl_rollangle = Cvar_Get ("cl_rollangle", "2.0", CVAR_ORIGINAL);
|
||||
r_lerpmodels = Cvar_Get ("r_lerpmodels", "0", CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
|
||||
cl_oldview = Cvar_Get ("cl_oldview", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_followmodel = Cvar_Get ("cl_followmodel", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_followmodel_up_lowpass = Cvar_Get ("cl_followmodel_up_lowpass", "40", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_highpass = Cvar_Get ("cl_followmodel_up_highpass", "1", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_highpass1 = Cvar_Get ("cl_followmodel_up_highpass1", "22", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_limit = Cvar_Get ("cl_followmodel_up_limit ", "1", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_speed = Cvar_Get ("cl_followmodel_up_speed", "0.5", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_lowpass = Cvar_Get ("cl_followmodel_side_lowpass", "39", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_highpass = Cvar_Get ("cl_followmodel_side_highpass", "5", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_highpass1 = Cvar_Get ("cl_followmodel_side_highpass1", "30", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_limit = Cvar_Get ("cl_followmodel_side_limit", "6", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_speed = Cvar_Get ("cl_followmodel_side_speed", "0.25", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_lowpass = Cvar_Get ("cl_leanmodel_up_lowpass", "20", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_highpass = Cvar_Get ("cl_leanmodel_up_highpass", "15", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_highpass1 = Cvar_Get ("cl_leanmodel_up_highpass1", "5", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_limit = Cvar_Get ("cl_leanmodel_up_limit", "50", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_speed = Cvar_Get ("cl_leanmodel_up_speed", "0.65", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_lowpass = Cvar_Get ("cl_leanmodel_side_lowpass", "20", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_highpass = Cvar_Get ("cl_leanmodel_side_highpass", "3", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_highpass1 = Cvar_Get ("cl_leanmodel_side_highpass1", "30", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_limit = Cvar_Get ("cl_leanmodel_side_limit", "35", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_speed = Cvar_Get ("cl_leanmodel_side_speed", "0.7", CVAR_ORIGINAL);
|
||||
cl_leanmodel = Cvar_Get ("cl_leanmodel", "0", CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
cl_bob2 = Cvar_Get ("cl_bob2", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_bob2cycle = Cvar_Get ("cl_bob2cycle", "0.6", CVAR_ORIGINAL);
|
||||
cl_bob2smooth = Cvar_Get ("cl_bob2smooth", "0.05", CVAR_ORIGINAL);
|
||||
cl_bobfall = Cvar_Get ("cl_bobfall", "0", CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
cl_bobfallcycle = Cvar_Get ("cl_bobfallcycle", "3", CVAR_ORIGINAL);
|
||||
cl_bobfallminspeed = Cvar_Get ("cl_bobfallminspeed", "200", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_lowpass = Cvar_Get ("cl_followmodel_up_lowpass", "40", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_highpass = Cvar_Get ("cl_followmodel_up_highpass", "1", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_highpass1 = Cvar_Get ("cl_followmodel_up_highpass1", "22", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_limit = Cvar_Get ("cl_followmodel_up_limit ", "1", CVAR_ORIGINAL);
|
||||
cl_followmodel_up_speed = Cvar_Get ("cl_followmodel_up_speed", "0.5", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_lowpass = Cvar_Get ("cl_followmodel_side_lowpass", "39", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_highpass = Cvar_Get ("cl_followmodel_side_highpass", "5", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_highpass1 = Cvar_Get ("cl_followmodel_side_highpass1", "30", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_limit = Cvar_Get ("cl_followmodel_side_limit", "6", CVAR_ORIGINAL);
|
||||
cl_followmodel_side_speed = Cvar_Get ("cl_followmodel_side_speed", "0.25", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_lowpass = Cvar_Get ("cl_leanmodel_up_lowpass", "20", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_highpass = Cvar_Get ("cl_leanmodel_up_highpass", "15", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_highpass1 = Cvar_Get ("cl_leanmodel_up_highpass1", "5", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_limit = Cvar_Get ("cl_leanmodel_up_limit", "50", CVAR_ORIGINAL);
|
||||
cl_leanmodel_up_speed = Cvar_Get ("cl_leanmodel_up_speed", "0.65", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_lowpass = Cvar_Get ("cl_leanmodel_side_lowpass", "20", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_highpass = Cvar_Get ("cl_leanmodel_side_highpass", "3", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_highpass1 = Cvar_Get ("cl_leanmodel_side_highpass1", "30", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_limit = Cvar_Get ("cl_leanmodel_side_limit", "35", CVAR_ORIGINAL);
|
||||
cl_leanmodel_side_speed = Cvar_Get ("cl_leanmodel_side_speed", "0.7", CVAR_ORIGINAL);
|
||||
cl_leanmodel = Cvar_Get ("cl_leanmodel", "0", CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
cl_bob2 = Cvar_Get ("cl_bob2", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_bob2cycle = Cvar_Get ("cl_bob2cycle", "0.6", CVAR_ORIGINAL);
|
||||
cl_bob2smooth = Cvar_Get ("cl_bob2smooth", "0.05", CVAR_ORIGINAL);
|
||||
cl_bobfall = Cvar_Get ("cl_bobfall", "0", CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
cl_bobfallcycle = Cvar_Get ("cl_bobfallcycle", "3", CVAR_ORIGINAL);
|
||||
cl_bobfallminspeed = Cvar_Get ("cl_bobfallminspeed", "200", CVAR_ORIGINAL);
|
||||
|
||||
// to be done (bobfall into walls)
|
||||
cl_bobslam = Cvar_Get ("cl_bobslam", "0", CVAR_ORIGINAL);
|
||||
cl_bobslamcycle = Cvar_Get ("cl_bobslamcycle", "3", CVAR_ORIGINAL);
|
||||
cl_bobslamminspeed = Cvar_Get ("cl_bobslamminspeed", "200", CVAR_ORIGINAL);
|
||||
|
||||
|
||||
|
||||
cl_bobslam = Cvar_Get ("cl_bobslam", "0", CVAR_ORIGINAL);
|
||||
cl_bobslamcycle = Cvar_Get ("cl_bobslamcycle", "3", CVAR_ORIGINAL);
|
||||
cl_bobslamminspeed = Cvar_Get ("cl_bobslamminspeed", "200", CVAR_ORIGINAL);
|
||||
cl_gundraw = Cvar_Get ("cl_gundraw", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_gunhold = Cvar_Get ("cl_gunhold", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
cl_gunsniff = Cvar_Get ("cl_gunsniff", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
|
@ -2366,32 +2190,25 @@ void V_Init_Cvars (void)
|
|||
|
||||
BuildGammaTable (1.0); // no gamma yet
|
||||
v_gamma = Cvar_Get ("gamma", "1", CVAR_ARCHIVE|CVAR_ORIGINAL);
|
||||
v_saturation = Cvar_Get ("saturation", "1", CVAR_ARCHIVE|CVAR_ORIGINAL); // leilei - saturation
|
||||
v_contrast = Cvar_Get ("contrast", "1", CVAR_ARCHIVE|CVAR_ORIGINAL); // leilei - contrast
|
||||
|
||||
v_saturation = Cvar_Get ("v_saturation", "1", CVAR_ARCHIVE|CVAR_ORIGINAL);
|
||||
v_contrast = Cvar_Get ("v_contrast", "1", CVAR_ARCHIVE|CVAR_ORIGINAL);
|
||||
}
|
||||
// 2001-09-18 New cvar system by Maddes (Init) end
|
||||
|
||||
|
||||
|
||||
|
||||
// leilei - aim lock hack
|
||||
void V_LockAim (void){
|
||||
// Con_Printf("SP..........");
|
||||
void V_LockAim (void)
|
||||
{
|
||||
lockedangle[0] = r_refdef.viewangles[0];
|
||||
lockedangle[1] = r_refdef.viewangles[1];
|
||||
// lockedangle[2] = r_refdef.viewangles[2];
|
||||
aimlock = 1;
|
||||
|
||||
};
|
||||
|
||||
void V_UnlockAim (void){
|
||||
|
||||
// Con_Printf("OON!\n");
|
||||
void V_UnlockAim (void)
|
||||
{
|
||||
aimlock = 0;
|
||||
VectorCopy(lockedangle, cl.viewangles);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
=============
|
||||
V_Init
|
||||
|
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <dos.h>
|
||||
#include <conio.h>
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "vregset.h"
|
||||
|
||||
//#define outportb loutportb
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// wad.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
int wad_numlumps;
|
||||
lumpinfo_t *wad_lumps;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// world.c -- world query functions
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// Z_zone.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
//#define DYNAMIC_SIZE 0xc000 // 48K // 2001-09-20 Increased default zone by Maddes
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// !!! if this is changed, it must be changed in r_shared.h too !!!
|
||||
#define MAXHEIGHT 1536
|
||||
|
||||
// !!! if this is changed, it must be changed in quakedef.h too !!!
|
||||
// !!! if this is changed, it must be changed in globaldef.h too !!!
|
||||
#define CACHE_SIZE 32 // used to align key data structures
|
||||
|
||||
// particle_t structure
|
||||
|
|
|
@ -17,70 +17,24 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// quakedef.h -- primary header for client
|
||||
// globaldef.h -- primary header for client
|
||||
|
||||
//#define GLTEST // experimental stuff
|
||||
#define QUAKE_GAME // as opposed to utilities
|
||||
//#define BENCH // Standalone benchmark only (no sound or menu)
|
||||
//#define PROTO // Prototype additions
|
||||
// this game isn't anything anymore
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "mathlib.h" // I make djgpp upset for some reason
|
||||
#include "mathlib.h" // I make djgpp upset for some reason
|
||||
#endif
|
||||
|
||||
#include "matrixlib.h"
|
||||
#include "version.h"
|
||||
//#define EXPERIMENT // This just enables the -fixmefixmefixme- menu
|
||||
// this is pretty much the line between release versions
|
||||
// and unreleased versions
|
||||
// for the sake of the end user really
|
||||
|
||||
|
||||
// WARNING: THESE CAN INCREASE MEMORY USAGE TO 200MB! CAUTION!
|
||||
//#define QSB // QSB Limit increases to meet the standard of QSB
|
||||
//#define QSB_NET // QSB's changes to network protocol that breaks things
|
||||
// leilei note: I raised the limit on unreliable messages
|
||||
// to a stupidly high amount for debugging. Please read below
|
||||
// for why.
|
||||
// EXPERIMENTALY HACKS
|
||||
//#define twentyfourbithack // Converts textures to 24-bit for dithered rendering. Doesn't work
|
||||
//#define dithermodelhack // Attempts dithered lighting on models
|
||||
//#define statictest // uses Static for the tables used by rgb surfaceblocks
|
||||
//#define LOOKANGLE // adds aimangle (crude pointing of the viewmodel to autoaim angle)
|
||||
#define ITSFIX
|
||||
//#define ANTIPACKETOVERFLOW // argh
|
||||
//#define WINDOWS31 // to allow the engine to be run in windows 3 w/ win32s
|
||||
// it doesn't work right now (and latest win32s aborts it too)
|
||||
// but theoretically it is broken at the TIMER level, at least
|
||||
// in older mid-1995 win32s versions
|
||||
|
||||
//#define SPLIT // Splitscreen hack (NOTE: Depends on GLOBOT for now, for client functionality)
|
||||
#define REALLYCRASHESITHINK
|
||||
// -----------------------------------------
|
||||
// Video Features
|
||||
// -----------------------------------------
|
||||
|
||||
//#define EGA // EGA 4-bit colors experiment *WIP*
|
||||
//#define EGAHACK // EGA Palette Hackup Test
|
||||
//#define VGA // VGA 4-bit colors experiment to allow game running in safe mode *WIP*
|
||||
//#define INTERPOL // buggy interpolation (ToChriS/makaqu port - this will crash.)
|
||||
//#define MHINTERPOL // other interpolation (still buggy)*WIP*
|
||||
#define INTERPOL7 // other interpolation again (still buggy)*WIP*
|
||||
//#define NOFULLSCREENEVER // absolutely force windowed mode
|
||||
//#define INTERPOL2 // Tochris interpolation
|
||||
//#define ALPHASCALE // enable .alpha and .scale*WIP* (may break protocol?)
|
||||
//#define SCALEE // enable just the scale ocde, no protocols
|
||||
#define SCALED2D // enables scaled hud/menu etc. adapted from siggi's uhexen2 patch
|
||||
//#define THIRTYTWOBITHACK
|
||||
//#define MMXHACK // try to shove in MMX intrinsics to some functions
|
||||
|
||||
//#define DECALS // Port of FTEQW's disabled SW DECALS feature. Probably doesn't work.
|
||||
//#define COMBINED
|
||||
//#define STAINMAPS // I don't like this common feature much, but we'll try it anyway.
|
||||
//#define WATERLOW // Use a warpbuffer clone for storing the reflection in, rendering it stretched to the buffer (why)
|
||||
//#define EXPREND // Experimental shadowmap rendering mode
|
||||
//#define WATERREFLECTIONS
|
||||
//#define INTERPOLENTITIES
|
||||
//#define VOODOO // vid_win.c only - try to mock 3dfx Voodoo 4x1 filter
|
||||
|
||||
// -----------------------------------------
|
||||
// Audio Features
|
||||
|
@ -115,66 +69,17 @@ int Nehahrademcompatibility; // LordHavoc: to allow playback of the early Nehah
|
|||
int dpprotocol;
|
||||
|
||||
#define DPPROTOCOLS
|
||||
#define QIP_VERSION "Build 278"
|
||||
#define QIP_URL "nowhere"
|
||||
#define VERSION 1.08
|
||||
#define TNQ_VERSION 240 // todo: increment build numbers
|
||||
#define GLQUAKE_VERSION 1.00
|
||||
#define D3DQUAKE_VERSION 0.01
|
||||
#define WINQUAKE_VERSION 2.78 // was 0.996, but WinQuake was already final
|
||||
#define LINUX_VERSION 1.30
|
||||
#define X11_VERSION 1.10
|
||||
#define VERSION 0.5
|
||||
|
||||
#define PROTOCOL_STOCK 0 // old 1.09
|
||||
#define PROTOCOL_QUAKEDP 1 // dp105
|
||||
#define PROTOCOL_TQ 2 // Tomazquake
|
||||
|
||||
//define PARANOID // speed sapping error checking
|
||||
#define PROTOCOL_TQ 2 // Tomaz
|
||||
|
||||
// -----------------------------------------
|
||||
// Game Data
|
||||
// -----------------------------------------
|
||||
|
||||
#ifdef PROTO
|
||||
#define GAMENAME "data"
|
||||
#else
|
||||
#define GAMENAME "id1"
|
||||
#endif
|
||||
|
||||
#define FIGHT 1 // fight experiment
|
||||
|
||||
// -----------------------------------------
|
||||
// Game Modes
|
||||
//
|
||||
// Support for other Q1-derivative engine games
|
||||
//
|
||||
// This is used to keep built-ins used by these
|
||||
// games from conflicting with others, as well as
|
||||
// spiffying them up in general (i.e. hud in
|
||||
// Transfusion)
|
||||
//
|
||||
// THIS IS NOT FINAL AND IS SUBJECT TO CHANGE
|
||||
// AND PROMISE
|
||||
// -----------------------------------------
|
||||
|
||||
int gamemode;
|
||||
|
||||
#define GAME_QUAKE 0 // 1997 - 1.07-1.09
|
||||
#define GAME_QUAKE_OLD 1 // 1996 - 0.8-0.92
|
||||
#define GAME_QUAKE_ARCADE 2 // 1998 - mame cabinet, has avi playback (TODO: MCI this) and a new menu system
|
||||
#define GAME_QUAKE_106 3 // 1996 - 1.00-1.06 (lacks all mp changes)
|
||||
#define GAME_LASER_ARENA 4 // 2000 - trainwreck
|
||||
#define GAME_TRANSFUSION 5 // 2002
|
||||
#define GAME_CIA_OPERATIVE 6 // 2001 - trainwreck
|
||||
#define GAME_JESUSTHEFPS 7 // 2003 - very jesusy
|
||||
#define GAME_GRASS 8 // 2002
|
||||
#define GAME_MINIRACER 9 // 2002
|
||||
//#define GAME_HEXEN_II 10 // 1997 - too many system vars changes atm
|
||||
#define GAME_FIEND_HUNTER 11 // 2001 v0.64
|
||||
#define GAME_NEHAHRA 12 // 2000
|
||||
#define GAME_URBANMERC 13 // 2000 - profits are "emulated"
|
||||
#define GAME_KUROK 14 // 2008
|
||||
#define GAME_FIGHT 15 // 2015?
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
@ -484,9 +389,9 @@ extern byte *host_fogmap; // leilei - fog
|
|||
extern byte *host_egamap;
|
||||
extern byte *glcolormap;
|
||||
extern byte *host_noopal; // for translations
|
||||
extern int host_fullbrights; // for preserving fullbrights in color operations
|
||||
extern int host_fullbrights; // for preserving fullbrights in color operations
|
||||
|
||||
extern int host_framecount; // incremented every frame, never reset
|
||||
extern int host_framecount; // incremented every frame, never reset
|
||||
extern double realtime; // not bounded in any way, changed at
|
||||
// start of every frame, never reset
|
||||
|
||||
|
@ -504,14 +409,12 @@ void Host_ShutdownServer (qboolean crash);
|
|||
void Host_Version_f (void); // 2000-04-30 NVS HANDSHAKE SRV<->CL/QC<->CL by Maddes
|
||||
|
||||
extern qboolean msg_suppress_1; // suppresses resolution and cache size console output
|
||||
// an fullscreen DIB focus gain/loss
|
||||
extern int current_skill; // skill level for currently loaded level (in case
|
||||
extern int current_skill; // skill level for currently loaded level (in case
|
||||
// the user changes the cvar while the level is
|
||||
// running, this reflects the level actually in use)
|
||||
|
||||
extern qboolean isDedicated;
|
||||
|
||||
extern int minimum_memory;
|
||||
extern int minimum_memory;
|
||||
|
||||
//
|
||||
// chase
|
||||
|
@ -524,11 +427,9 @@ void Chase_Update (void);
|
|||
|
||||
extern qboolean nouse; // 1999-10-29 +USE fix by Maddes
|
||||
|
||||
#define PROGHEADER080_CRC 26940 // leilei - beta check
|
||||
#define PROGHEADER090_CRC 26940
|
||||
#define PROGHEADER091_CRC 26940
|
||||
#define PROGHEADER092_CRC 26940
|
||||
#define PROGHEADERLA_CRC 27094 // laser arena
|
||||
|
||||
// 1999-10-28 Compatibilty check by Maddes start
|
||||
#define PROGHEADER101_CRC 5927
|
||||
|
@ -547,31 +448,6 @@ extern double host_org_frametime;
|
|||
extern cvar_t *host_timescale;
|
||||
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
|
||||
|
||||
|
||||
//
|
||||
// MusicInfo struct.
|
||||
//
|
||||
|
||||
typedef struct {
|
||||
// up to 6-character name
|
||||
char *name;
|
||||
|
||||
// lump number of music
|
||||
int lumpnum;
|
||||
|
||||
// music data
|
||||
void *data;
|
||||
|
||||
// music handle once registered
|
||||
int handle;
|
||||
} musicinfo_t;
|
||||
|
||||
|
||||
// the complete set of music
|
||||
extern musicinfo_t S_music[];
|
||||
|
||||
// some names for integers of various sizes, all unsigned
|
||||
|
||||
typedef unsigned char UBYTE; // a one-byte int
|
||||
typedef unsigned short UWORD; // a two-byte int
|
||||
//typedef unsigned int ULONG; // a four-byte int (assumes int 4 bytes)
|
|
@ -307,8 +307,6 @@ extern cvar_t *r_virtualmode;
|
|||
extern cvar_t *r_shading;
|
||||
extern cvar_t *r_lowworld;
|
||||
extern cvar_t *r_menucolor;
|
||||
extern cvar_t *r_tingecolor;
|
||||
extern cvar_t *r_tinge;
|
||||
extern cvar_t *r_lowmodels;
|
||||
extern cvar_t *r_coloredlights;
|
||||
extern cvar_t *r_truecolor;
|
||||
|
@ -488,4 +486,4 @@ void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
|
|||
void R_FinalizeAliasVerts ();
|
||||
#endif
|
||||
|
||||
extern unsigned int dynlightenabled;
|
||||
extern unsigned int dynlightenabled;
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
#include "net_dgrm.h"
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <stdlib.h>
|
||||
#include <dpmi.h>
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "dosisms.h"
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ unsigned long inet_addr(const char *cp);
|
|||
#endif
|
||||
#endif // BAN_TEST
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "net_dgrm.h"
|
||||
|
||||
// these two macros are to make the code more readable
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
#include "net_dgrm.h"
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <stdlib.h>
|
||||
#include <dpmi.h>
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "dosisms.h"
|
||||
#include "net_ipx.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_loop.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "net_loop.h"
|
||||
|
||||
qboolean localconnectpending = false;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_main.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "net_vcr.h"
|
||||
|
||||
qsocket_t *net_activeSockets = NULL;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// net_mpath.c
|
||||
|
||||
#include <dpmi.h>
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "mpdosock.h"
|
||||
|
||||
short flat_selector;
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_ser.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "net_ser.h"
|
||||
#include "dosisms.h"
|
||||
#include "crc.h"
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_udp.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_vcr.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "net_vcr.h"
|
||||
|
||||
extern int vcrFile;
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
#include "net_dgrm.h"
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_wins.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "winquake.h"
|
||||
|
||||
extern cvar_t *hostname;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// net_wipx.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "winquake.h"
|
||||
#include <wsipx.h>
|
||||
#include "net_wipx.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// nvs_client.c
|
||||
// 2000-04-30 NVS COMMON by Maddes
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
// 2000-04-30 NVS COMMON by Maddes
|
||||
cvar_t *nvs_current_csvc;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// nvs_common.c
|
||||
// 2000-04-30 NVS COMMON by Maddes
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
// 2000-04-30 NVS COMMON by Maddes
|
||||
cvar_t *nvs_current_ssvc;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// nvs_server.c
|
||||
// 2000-04-30 NVS COMMON by Maddes
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
// 2000-04-30 NVS COMMON by Maddes
|
||||
cvar_t *nvs_required;
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// nvs_server_data.c
|
||||
// 2000-05-02 NVS SVC by Maddes
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
/*
|
||||
The conversion tables consist of boolean values, that define which data is send
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_edge.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
|
||||
static int miplevel;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_clear: clears a specified rectangle to the specified color
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_init.c: rasterization driver initialization
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
|
||||
#define NUM_MIPS 4
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_modech.c: called when mode has just changed
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
|
||||
int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_part.c: software driver module for drawing particles
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// d_polyset.c: routines for drawing sets of polygons sharing the same
|
||||
// texture (used for Alias models)
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h"
|
||||
|
||||
#define COLMODEL
|
||||
|
||||
// TODO: put in span spilling to shrink list size
|
||||
// !!! if this is changed, it must be changed in d_polysa.s too !!!
|
||||
#define DPS_MAXSPANS MAXHEIGHT+1 // 1 extra for spanpackage that marks end
|
||||
|
@ -834,7 +833,7 @@ do{
|
|||
if ((lzi >> 16) >= *lpz)
|
||||
{
|
||||
// Blending
|
||||
if (gamemode == GAME_KUROK || *lptex != 255)
|
||||
if (*lptex != 255)
|
||||
{
|
||||
if (currententity->effects & EF_ADDITIVE)
|
||||
*lpdest = addTable[((byte *)acolormap)[*lptex + (llight & 0xFF00)]][*lpdest];
|
||||
|
@ -1034,7 +1033,7 @@ void D_PolysetDrawSpans8RGB_C (spanpackage_t *pspanpackage)
|
|||
{
|
||||
|
||||
// Blending
|
||||
if (gamemode == GAME_KUROK || *lptex != 255) {
|
||||
if (*lptex != 255) {
|
||||
|
||||
if (currententity->effects & EF_ADDITIVE)
|
||||
*lpdest = addTable[((byte *)acolormap)[*lptex + (llight & 0xFF00)]][*lpdest];
|
||||
|
@ -1320,7 +1319,7 @@ void D_PolysetDrawSpans8_C (spanpackage_t *pspanpackage)
|
|||
|
||||
|
||||
// Blending
|
||||
if (gamemode == GAME_KUROK || *lptex != 255) {
|
||||
if (*lptex != 255) {
|
||||
|
||||
if (currententity->effects & EF_ADDITIVE)
|
||||
*lpdest = addTable[((byte *)acolormap)[*lptex + (llight + shad & 0xFF00)]][*lpdest];
|
||||
|
@ -1617,7 +1616,7 @@ void D_PolysetDrawSpans8_Low_C (spanpackage_t *pspanpackage)
|
|||
|
||||
|
||||
// Blending
|
||||
if (gamemode == GAME_KUROK || *lptex != 255) {
|
||||
if (*lptex != 255) {
|
||||
|
||||
if (currententity->effects & EF_ADDITIVE)
|
||||
*lpdest = addTable[((byte *)acolormap)[*lptex + (llight + shad & 0xFF00)]][*lpdest];
|
||||
|
@ -1814,7 +1813,7 @@ if (currententity->effects & EF_NODRAW || currententity->leifect)
|
|||
if ((lzi >> 16) >= *lpz)
|
||||
{
|
||||
// Blending
|
||||
if (gamemode == GAME_KUROK || *lptex != 255) {
|
||||
if (*lptex != 255) {
|
||||
|
||||
if (currententity->effects & EF_ADDITIVE)
|
||||
*lpdest = addTable[((byte *)acolormap)[*lptex + (llight & 0xFF00)]][*lpdest];
|
||||
|
@ -2062,48 +2061,6 @@ void D_PolysetDrawSpans8_C_Filter (spanpackage_t *pspanpackage)
|
|||
*lpz = lzi >> 16;
|
||||
|
||||
}
|
||||
/*
|
||||
// Blending
|
||||
// if (gamemode == GAME_KUROK || *lptex != 255) {
|
||||
|
||||
// if (currententity->effects & EF_ADDITIVE)
|
||||
// *lpdest = addTable[((byte *)acolormap)[*lptex + (llight & 0xFF00)]][*lpdest];
|
||||
// else{
|
||||
if (*lptex < host_fullbrights || currententity->effects & EF_FULLBRIGHT)
|
||||
{ // Preserve the fullbrights
|
||||
|
||||
pix24 = (unsigned char *)&d_8to24table[((byte *)acolormap)[*lptex + (8192 & 0xFF00)]];
|
||||
// TODO FIXME: colored light vectors similar to dp105/q3
|
||||
{
|
||||
trans[0] = (pix24[0] * (16384 - llightrgb[0])) >> 15;
|
||||
trans[1] = (pix24[1] * (16384 - llightrgb[1])) >> 15;
|
||||
trans[2] = (pix24[2] * (16384 - llightrgb[2])) >> 15;
|
||||
|
||||
if (trans[0] < 0) trans[0] = 0; if (trans[1] < 0) trans[1] = 0; if (trans[2] < 0) trans[2] = 0;
|
||||
if (trans[0] > 63) trans[0] = 63; if (trans[1] > 63) trans[1] = 63; if (trans[2] > 63) trans[2] = 63;
|
||||
|
||||
|
||||
n = ((lzi & 1) << 1) | (lzi & 1);
|
||||
{
|
||||
|
||||
trans[0] <<= 10;
|
||||
trans[1] <<= 5;
|
||||
trans[2] <<= 0;
|
||||
*lpdest = ditherTable[*trans & 0x7FFF][n];
|
||||
n ^= 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// *lpdest = *lptex;
|
||||
// }
|
||||
|
||||
*lpz = lzi >> 16;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
lpdest++;
|
||||
lzi += r_zistepx;
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//
|
||||
// TODO: Fix this mess up, some of the codes formatting is utterly broken on most editors
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_sky.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
// d_sprite.c: software top-level rasterization driver module for drawing
|
||||
// spritesy
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
|
||||
static int sprite_height;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_surf.c: rasterization driver surface heap manager
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
#include "r_local.h"
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#if !id386
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
// all global and static refresh variables are collected in a contiguous block
|
||||
// to avoid cache conflicts.
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// d_zpoint.c: software driver module for drawing z-buffered points
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_aclip.c: clip routines for drawing Alias models directly to the screen
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_alias.c: routines for setting up to draw alias models
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h" // FIXME: shouldn't be needed (is needed for patch
|
||||
// right now, but that should move)
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_bsp.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
//
|
||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
// r_draw.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h" // FIXME: shouldn't need to include this
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_edge.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_efrag.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
mnode_t *r_pefragtopnode;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_light.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
int r_dlightframecount;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_main.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "matrixlib.h"
|
||||
|
||||
|
@ -179,8 +179,7 @@ cvar_t *r_fullbrights;
|
|||
cvar_t *r_overbrightmdl;
|
||||
cvar_t *r_coloreddyns;
|
||||
cvar_t *r_menucolor;
|
||||
cvar_t *r_tinge;
|
||||
cvar_t *r_tingecolor;
|
||||
|
||||
cvar_t *r_dynamic;
|
||||
cvar_t *r_waterblend; // 0 - alpha 1 - additive 2 - multiply 3 - gelmap (ewwww!)
|
||||
cvar_t *r_tranquality; // 0 - use palmap(32768) 1 - use d_15to8 (65536) 2 - use d_8to24?
|
||||
|
@ -311,8 +310,6 @@ void R_Init_Cvars (void)
|
|||
r_shinygrays = Cvar_Get ("r_shinygrays", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
r_dither = Cvar_Get ("r_dither", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
r_menucolor = Cvar_Get ("r_menucolor", "1",CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
r_tingecolor = Cvar_Get ("r_tingecolor", "10",CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
r_tinge = Cvar_Get ("r_tinge", "0",CVAR_ARCHIVE | CVAR_ORIGINAL);
|
||||
r_alphashift = Cvar_Get ("r_alphashift", "0", CVAR_ORIGINAL);
|
||||
r_lowworld = Cvar_Get ("r_lowworld", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
r_shadowhack = Cvar_Get ("r_shadowhack", "0", CVAR_ARCHIVE |CVAR_ORIGINAL);
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_misc.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
//#define MAX_PARTICLES 8192 // default max # of particles at one
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_sky.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_sprite.c
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
|
||||
static int clip_current;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_surf.c: surface-related refresh code
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "r_local.h"
|
||||
// hmm
|
||||
drawsurf_t r_drawsurf;
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_vars.c: global refresh variables
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
|
||||
#if !id386
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// in_mouse.c -- dos mouse code
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "globaldef.h"
|
||||
#include "dosisms.h"
|
||||
|
||||
#define AUX_FLAG_FREELOOK 0x00000001
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue