mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-01-31 20:50:36 +00:00
BIG merge work, POQ now compiles, though at least glquake.3dfx has, err, issues..
Hopefully QW will still compile and work, thats the next commit I think..
This commit is contained in:
parent
6f63cc71e5
commit
5765f7fe5d
23 changed files with 341 additions and 640 deletions
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = qw_client qw_server #standalone #standalone isn't done merging yet
|
||||
SUBDIRS = qw_client qw_server standalone #standalone isn't done merging yet
|
||||
|
||||
all %:
|
||||
for dir in $(SUBDIRS); do \
|
||||
|
|
|
@ -761,8 +761,3 @@ void IN_Move (usercmd_t *cmd)
|
|||
{
|
||||
IN_MouseMove(cmd);
|
||||
}
|
||||
|
||||
|
||||
void VID_UnlockBuffer() {}
|
||||
void VID_LockBuffer() {}
|
||||
|
||||
|
|
|
@ -166,14 +166,6 @@ void VID_ForceLockState (int lk)
|
|||
{
|
||||
}
|
||||
|
||||
void VID_LockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
void VID_UnlockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
int VID_ForceUnlockedAndReturnState (void)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -33,7 +33,9 @@ void S_StopAllSounds(qboolean clear);
|
|||
void S_StopAllSoundsC(void);
|
||||
|
||||
// QuakeWorld hack
|
||||
#ifdef QUAKEWORLD
|
||||
#define viewentity playernum+1
|
||||
#endif // QUAKEWORLD
|
||||
|
||||
// =======================================================================
|
||||
// Internal sound data & structures
|
||||
|
|
|
@ -83,9 +83,6 @@ int VID_SetMode (int modenum, unsigned char *palette);
|
|||
void VID_HandlePause (qboolean pause);
|
||||
// called only on Win32, when pause happens, so the mouse can be released
|
||||
|
||||
void VID_LockBuffer (void);
|
||||
void VID_UnlockBuffer (void);
|
||||
|
||||
#ifdef GLQUAKE
|
||||
qboolean VID_Is8bit(void);
|
||||
#endif
|
||||
|
|
|
@ -1282,7 +1282,3 @@ void IN_Move (usercmd_t *cmd)
|
|||
}
|
||||
mouse_x = mouse_y = 0.0;
|
||||
}
|
||||
|
||||
//void VID_UnlockBuffer(void) { }
|
||||
//void VID_LockBuffer(void) { }
|
||||
|
||||
|
|
|
@ -1018,11 +1018,3 @@ char *VID_ModeInfo (int modenum)
|
|||
return (badmodestr);
|
||||
}
|
||||
}
|
||||
|
||||
void VID_LockBuffer ( void )
|
||||
{
|
||||
}
|
||||
|
||||
void VID_UnlockBuffer ( void )
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1100,12 +1100,3 @@ void IN_Move (usercmd_t *cmd)
|
|||
}
|
||||
mouse_x = mouse_y = 0.0;
|
||||
}
|
||||
|
||||
void VID_LockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
void VID_UnlockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ extern cvar_t v_gamma;
|
|||
extern byte gammatable[256]; // palette is sent through this
|
||||
extern byte ramps[3][256];
|
||||
|
||||
#ifdef GLQUAKE
|
||||
//#ifdef GLQUAKE
|
||||
extern float v_blend[4];
|
||||
extern cvar_t lcd_x;
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
void V_Init (void);
|
||||
void V_RenderView (void);
|
||||
|
|
|
@ -818,7 +818,3 @@ void IN_Move (usercmd_t *cmd)
|
|||
{
|
||||
IN_MouseMove(cmd);
|
||||
}
|
||||
|
||||
void VID_UnlockBuffer() {}
|
||||
void VID_LockBuffer() {}
|
||||
|
||||
|
|
|
@ -863,8 +863,3 @@ void IN_Move (usercmd_t *cmd)
|
|||
}
|
||||
mouse_x = mouse_y = 0.0;
|
||||
}
|
||||
|
||||
|
||||
void VID_LockBuffer (void) {}
|
||||
void VID_UnlockBuffer (void) {}
|
||||
|
||||
|
|
|
@ -207,46 +207,46 @@ extern client_static_t cls;
|
|||
//
|
||||
typedef struct
|
||||
{
|
||||
int servercount; // server identification for prespawns
|
||||
int servercount; // server identification for prespawns
|
||||
|
||||
char serverinfo[MAX_SERVERINFO_STRING];
|
||||
char serverinfo[MAX_SERVERINFO_STRING];
|
||||
|
||||
int parsecount; // server message counter
|
||||
int validsequence; // this is the sequence number of the last good
|
||||
// packetentity_t we got. If this is 0, we can't
|
||||
// render a frame yet
|
||||
int movemessages; // since connecting to this server
|
||||
// throw out the first couple, so the player
|
||||
// doesn't accidentally do something the
|
||||
// first frame
|
||||
int parsecount; // server message counter
|
||||
int validsequence; // this is the sequence number of the last good
|
||||
// packetentity_t we got. If this is 0, we can't
|
||||
// render a frame yet
|
||||
int movemessages; // since connecting to this server
|
||||
// throw out the first couple, so the player
|
||||
// doesn't accidentally do something the
|
||||
// first frame
|
||||
|
||||
int spectator;
|
||||
int spectator;
|
||||
|
||||
double last_ping_request; // while showing scoreboard
|
||||
double last_servermessage;
|
||||
double last_ping_request; // while showing scoreboard
|
||||
double last_servermessage;
|
||||
|
||||
// sentcmds[cl.netchan.outgoing_sequence & UPDATE_MASK] = cmd
|
||||
frame_t frames[UPDATE_BACKUP];
|
||||
|
||||
// information for local display
|
||||
int stats[MAX_CL_STATS]; // health, etc
|
||||
float item_gettime[32]; // cl.time of aquiring item, for blinking
|
||||
float faceanimtime; // use anim frame if cl.time < this
|
||||
int stats[MAX_CL_STATS]; // health, etc
|
||||
float item_gettime[32]; //cl.time of aquiring item, for blinking
|
||||
float faceanimtime; // use anim frame if cl.time < this
|
||||
|
||||
cshift_t cshifts[NUM_CSHIFTS]; // color shifts for damage, powerups
|
||||
cshift_t prev_cshifts[NUM_CSHIFTS]; // and content types
|
||||
cshift_t cshifts[NUM_CSHIFTS]; // color shifts for damage, powerups
|
||||
cshift_t prev_cshifts[NUM_CSHIFTS]; // and content types
|
||||
|
||||
// the client maintains its own idea of view angles, which are
|
||||
// sent to the server each frame. And only reset at level change
|
||||
// and teleport times
|
||||
vec3_t viewangles;
|
||||
vec3_t viewangles;
|
||||
|
||||
// the client simulates or interpolates movement to get these values
|
||||
double time; // this is the time value that the client
|
||||
// is rendering at. allways <= realtime
|
||||
vec3_t simorg;
|
||||
vec3_t simvel;
|
||||
vec3_t simangles;
|
||||
double time; // this is the time value that the client
|
||||
// is rendering at. allways <= realtime
|
||||
vec3_t simorg;
|
||||
vec3_t simvel;
|
||||
vec3_t simangles;
|
||||
|
||||
// pitch drifting vars
|
||||
float pitchvel;
|
||||
|
@ -255,14 +255,14 @@ typedef struct
|
|||
double laststop;
|
||||
|
||||
|
||||
float crouch; // local amount for smoothing stepups
|
||||
float crouch; // local amount for smoothing stepups
|
||||
|
||||
qboolean paused; // send over by server
|
||||
qboolean paused; // send over by server
|
||||
|
||||
float punchangle; // temporar yview kick from weapon firing
|
||||
float punchangle; // temporar yview kick from weapon firing
|
||||
|
||||
int intermission; // don't change view angle, full screen, etc
|
||||
int completed_time; // latched ffrom time at intermission start
|
||||
int intermission; // don't change view angle, full screen, etc
|
||||
int completed_time; // latched ffrom time at intermission start
|
||||
|
||||
//
|
||||
// information that is static for the entire time connected to a server
|
||||
|
@ -274,15 +274,15 @@ typedef struct
|
|||
struct sfx_s *sound_precache[MAX_SOUNDS];
|
||||
|
||||
char levelname[40]; // for display on solo scoreboard
|
||||
int playernum;
|
||||
int playernum;
|
||||
|
||||
// refresh related state
|
||||
struct model_s *worldmodel; // cl_entitites[0].model
|
||||
struct efrag_s *free_efrags;
|
||||
int num_entities; // stored bottom up in cl_entities array
|
||||
int num_statics; // stored top down in cl_entitiers
|
||||
int num_entities; // stored bottom up in cl_entities array
|
||||
int num_statics; // stored top down in cl_entitiers
|
||||
|
||||
int cdtrack; // cd audio
|
||||
int cdtrack; // cd audio
|
||||
|
||||
entity_t viewent; // weapon model
|
||||
|
||||
|
|
|
@ -249,6 +249,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
// entity_state_t is the information conveyed from the server
|
||||
// in an update message
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
int number; // edict index
|
||||
|
@ -262,6 +263,7 @@ typedef struct
|
|||
int skinnum;
|
||||
int effects;
|
||||
} entity_state_t;
|
||||
*/
|
||||
|
||||
|
||||
#define MAX_PACKET_ENTITIES 64 // doesn't count nails
|
||||
|
|
|
@ -19,124 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// quakedef.h -- primary header for client
|
||||
|
||||
#define QUAKE_GAME // as opposed to utilities
|
||||
|
||||
//define PARANOID // speed sapping error checking
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018)
|
||||
#endif
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
#include <time.h>
|
||||
#include <common_quakedef.h>
|
||||
|
||||
#include "bothdefs.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "bspfile.h"
|
||||
#include "vid.h"
|
||||
#include "sys.h"
|
||||
#include "zone.h"
|
||||
#include "mathlib.h"
|
||||
#include "wad.h"
|
||||
#include "draw.h"
|
||||
#include "cvar.h"
|
||||
#include "screen.h"
|
||||
#include "net.h"
|
||||
#include "protocol.h"
|
||||
#include "cmd.h"
|
||||
#include "sbar.h"
|
||||
#include "sound.h"
|
||||
#include "render.h"
|
||||
#include "client.h"
|
||||
|
||||
#ifdef GLQUAKE
|
||||
#include "gl_model.h"
|
||||
#else
|
||||
#include "model.h"
|
||||
#include "d_iface.h"
|
||||
#endif
|
||||
|
||||
#include "input.h"
|
||||
#include "keys.h"
|
||||
#include "console.h"
|
||||
#include "view.h"
|
||||
#include "menu.h"
|
||||
#include "crc.h"
|
||||
#include "cdaudio.h"
|
||||
#include "pmove.h"
|
||||
|
||||
#ifdef GLQUAKE
|
||||
#include "glquake.h"
|
||||
#endif
|
||||
|
||||
#ifndef max
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
// the host system specifies the base of the directory tree, the
|
||||
// command line parms passed to the program, and the amount of memory
|
||||
// available for the program to use
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *basedir;
|
||||
char *cachedir; // for development over ISDN lines
|
||||
int argc;
|
||||
char **argv;
|
||||
void *membase;
|
||||
int memsize;
|
||||
} quakeparms_t;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#define MAX_NUM_ARGVS 50
|
||||
|
||||
|
||||
extern qboolean noclip_anglehack;
|
||||
|
||||
|
||||
//
|
||||
// host
|
||||
//
|
||||
extern quakeparms_t host_parms;
|
||||
|
||||
extern cvar_t sys_ticrate;
|
||||
extern cvar_t sys_nostdout;
|
||||
extern cvar_t developer;
|
||||
|
||||
extern cvar_t password;
|
||||
|
||||
extern qboolean host_initialized; // true if into command execution
|
||||
extern double host_frametime;
|
||||
extern byte *host_basepal;
|
||||
extern byte *host_colormap;
|
||||
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
|
||||
|
||||
void Host_ServerFrame (void);
|
||||
void Host_InitCommands (void);
|
||||
void Host_Init (quakeparms_t *parms);
|
||||
void Host_Shutdown(void);
|
||||
void Host_Error (char *error, ...);
|
||||
void Host_EndGame (char *message, ...);
|
||||
qboolean Host_SimulationTime(float time);
|
||||
void Host_Frame (float time);
|
||||
void Host_Quit_f (void);
|
||||
void Host_ClientCommands (char *fmt, ...);
|
||||
void Host_ShutdownServer (qboolean crash);
|
||||
|
||||
extern qboolean msg_suppress_1; // suppresses resolution and cache size console output
|
||||
// an fullscreen DIB focus gain/loss
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -419,7 +419,7 @@ if (bits&(1<<i))
|
|||
if (bits & U_SKIN)
|
||||
skin = MSG_ReadByte();
|
||||
else
|
||||
skin = ent->baseline.skin;
|
||||
skin = ent->baseline.skinnum;
|
||||
if (skin != ent->skinnum) {
|
||||
ent->skinnum = skin;
|
||||
if (num > 0 && num <= cl.maxclients)
|
||||
|
@ -431,7 +431,7 @@ if (bits&(1<<i))
|
|||
if (bits & U_SKIN)
|
||||
ent->skinnum = MSG_ReadByte();
|
||||
else
|
||||
ent->skinnum = ent->baseline.skin;
|
||||
ent->skinnum = ent->baseline.skinnum;
|
||||
#endif
|
||||
|
||||
if (bits & U_EFFECTS)
|
||||
|
@ -495,7 +495,7 @@ void CL_ParseBaseline (entity_t *ent)
|
|||
ent->baseline.modelindex = MSG_ReadByte ();
|
||||
ent->baseline.frame = MSG_ReadByte ();
|
||||
ent->baseline.colormap = MSG_ReadByte();
|
||||
ent->baseline.skin = MSG_ReadByte();
|
||||
ent->baseline.skinnum = MSG_ReadByte();
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
ent->baseline.origin[i] = MSG_ReadCoord ();
|
||||
|
@ -681,7 +681,7 @@ void CL_ParseStatic (void)
|
|||
ent->model = cl.model_precache[ent->baseline.modelindex];
|
||||
ent->frame = ent->baseline.frame;
|
||||
ent->colormap = vid.colormap;
|
||||
ent->skinnum = ent->baseline.skin;
|
||||
ent->skinnum = ent->baseline.skinnum;
|
||||
ent->effects = ent->baseline.effects;
|
||||
|
||||
VectorCopy (ent->baseline.origin, ent->origin);
|
||||
|
|
|
@ -549,17 +549,17 @@ void Draw_ConsoleBackground (int lines)
|
|||
|
||||
// hack the version number directly into the pic
|
||||
#ifdef _WIN32
|
||||
sprintf (ver, "(WinQuake) %4.2f", (float)VERSION);
|
||||
sprintf (ver, "QuakeForge (%4.2f) (WinQuake)", (float)VERSION);
|
||||
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||
#elif defined(X11)
|
||||
sprintf (ver, "(X11 Quake %2.2f) %4.2f", (float)X11_VERSION, (float)VERSION);
|
||||
sprintf (ver, "QuakeForge (%4.2f) (X11 Quake)", (float)VERSION);
|
||||
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||
#elif defined(__linux__)
|
||||
sprintf (ver, "(Linux Quake %2.2f) %4.2f", (float)LINUX_VERSION, (float)VERSION);
|
||||
sprintf (ver, "QuakeForge (%4.2f) (Linux Quake)", (float)VERSION);
|
||||
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||
#else
|
||||
dest = conback->data + 320 - 43 + 320*186;
|
||||
sprintf (ver, "%4.2f", VERSION);
|
||||
sprintf (ver, "QuakeForge (%4.2f)", VERSION);
|
||||
#endif
|
||||
|
||||
for (x=0 ; x<strlen(ver) ; x++)
|
||||
|
|
|
@ -410,9 +410,9 @@ void Draw_Init (void)
|
|||
|
||||
// hack the version number directly into the pic
|
||||
#if defined(__linux__)
|
||||
sprintf (ver, "(Linux %2.2f, gl %4.2f) %4.2f", (float)LINUX_VERSION, (float)GLQUAKE_VERSION, (float)VERSION);
|
||||
sprintf (ver, "SourceForge (Linux GL) Version %4.2f", (float)VERSION);
|
||||
#else
|
||||
sprintf (ver, "(gl %4.2f) %4.2f", (float)GLQUAKE_VERSION, (float)VERSION);
|
||||
sprintf (ver, "SourceForge (GL) Version %4.2f", (float)VERSION);
|
||||
#endif
|
||||
dest = cb->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||
y = strlen(ver);
|
||||
|
|
|
@ -147,34 +147,34 @@ extern client_static_t cls;
|
|||
//
|
||||
typedef struct
|
||||
{
|
||||
int movemessages; // since connecting to this server
|
||||
// throw out the first couple, so the player
|
||||
// doesn't accidentally do something the
|
||||
// first frame
|
||||
usercmd_t cmd; // last command sent to the server
|
||||
int movemessages; // since connecting to this server
|
||||
// throw out the first couple, so the player
|
||||
// doesn't accidentally do something the
|
||||
// first frame
|
||||
usercmd_t cmd; // last command sent to the server
|
||||
|
||||
// information for local display
|
||||
int stats[MAX_CL_STATS]; // health, etc
|
||||
int items; // inventory bit flags
|
||||
float item_gettime[32]; // cl.time of aquiring item, for blinking
|
||||
float faceanimtime; // use anim frame if cl.time < this
|
||||
float item_gettime[32];// cl.time of aquiring item, for blinking
|
||||
float faceanimtime; // use anim frame if cl.time < this
|
||||
|
||||
cshift_t cshifts[NUM_CSHIFTS]; // color shifts for damage, powerups
|
||||
cshift_t prev_cshifts[NUM_CSHIFTS]; // and content types
|
||||
cshift_t cshifts[NUM_CSHIFTS]; // color shifts for damage, powerups
|
||||
cshift_t prev_cshifts[NUM_CSHIFTS]; // and content types
|
||||
|
||||
// the client maintains its own idea of view angles, which are
|
||||
// sent to the server each frame. The server sets punchangle when
|
||||
// the view is temporarliy offset, and an angle reset commands at the start
|
||||
// of each level and after teleporting.
|
||||
vec3_t mviewangles[2]; // during demo playback viewangles is lerped
|
||||
// between these
|
||||
vec3_t viewangles;
|
||||
vec3_t mviewangles[2]; // during demo playback viewangles is lerped
|
||||
// between these
|
||||
vec3_t viewangles;
|
||||
|
||||
vec3_t mvelocity[2]; // update by server, used for lean+bob
|
||||
// (0 is newest)
|
||||
vec3_t velocity; // lerped between mvelocity[0] and [1]
|
||||
vec3_t mvelocity[2]; // update by server, used for lean+bob
|
||||
// (0 is newest)
|
||||
vec3_t velocity; // lerped between mvelocity[0] and [1]
|
||||
|
||||
vec3_t punchangle; // temporary offset
|
||||
vec3_t punchangle; // temporary offset
|
||||
|
||||
// pitch drifting vars
|
||||
float idealpitch;
|
||||
|
@ -184,24 +184,24 @@ typedef struct
|
|||
double laststop;
|
||||
|
||||
float viewheight;
|
||||
float crouch; // local amount for smoothing stepups
|
||||
float crouch; // local amount for smoothing stepups
|
||||
|
||||
qboolean paused; // send over by server
|
||||
qboolean paused; // send over by server
|
||||
qboolean onground;
|
||||
qboolean inwater;
|
||||
|
||||
int intermission; // don't change view angle, full screen, etc
|
||||
int completed_time; // latched at intermission start
|
||||
int intermission; // don't change view angle, full screen, etc
|
||||
int completed_time; // latched at intermission start
|
||||
|
||||
double mtime[2]; // the timestamp of last two messages
|
||||
double time; // clients view of time, should be between
|
||||
// servertime and oldservertime to generate
|
||||
// a lerp point for other data
|
||||
double oldtime; // previous cl.time, time-oldtime is used
|
||||
// to decay light values and smooth step ups
|
||||
double mtime[2]; // the timestamp of last two messages
|
||||
double time; // clients view of time, should be between
|
||||
// servertime and oldservertime to generate
|
||||
// a lerp point for other data
|
||||
double oldtime; // previous cl.time, time-oldtime is used
|
||||
// to decay light values and smooth step ups
|
||||
|
||||
|
||||
float last_received_message; // (realtime) for net trouble icon
|
||||
float last_received_message; // (realtime) for net trouble icon
|
||||
|
||||
//
|
||||
// information that is static for the entire time connected to a server
|
||||
|
@ -210,15 +210,15 @@ typedef struct
|
|||
struct sfx_s *sound_precache[MAX_SOUNDS];
|
||||
|
||||
char levelname[40]; // for display on solo scoreboard
|
||||
int viewentity; // cl_entitites[cl.viewentity] = player
|
||||
int maxclients;
|
||||
int gametype;
|
||||
int viewentity; // cl_entitites[cl.viewentity] = player
|
||||
int maxclients;
|
||||
int gametype;
|
||||
|
||||
// refresh related state
|
||||
struct model_s *worldmodel; // cl_entitites[0].model
|
||||
struct efrag_s *free_efrags;
|
||||
int num_entities; // held in cl_entities array
|
||||
int num_statics; // held in cl_staticentities array
|
||||
int num_entities; // held in cl_entities array
|
||||
int num_statics; // held in cl_staticentities array
|
||||
entity_t viewent; // the gun model
|
||||
|
||||
int cdtrack, looptrack; // cd audio
|
||||
|
|
|
@ -19,46 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// quakedef.h -- primary header for client
|
||||
|
||||
//#define GLTEST // experimental stuff
|
||||
|
||||
#define QUAKE_GAME // as opposed to utilities
|
||||
|
||||
#define VERSION 1.09
|
||||
#define GLQUAKE_VERSION 1.00
|
||||
#define D3DQUAKE_VERSION 0.01
|
||||
#define WINQUAKE_VERSION 0.996
|
||||
#define LINUX_VERSION 1.30
|
||||
#define X11_VERSION 1.10
|
||||
|
||||
//define PARANOID // speed sapping error checking
|
||||
|
||||
#ifdef QUAKE2
|
||||
#define GAMENAME "id1" // directory to look in by default
|
||||
#else
|
||||
#define GAMENAME "id1"
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(WINDED)
|
||||
|
||||
#if defined(_M_IX86)
|
||||
#define __i386__ 1
|
||||
#endif
|
||||
|
||||
void VID_LockBuffer (void);
|
||||
void VID_UnlockBuffer (void);
|
||||
|
||||
#else
|
||||
|
||||
#define VID_LockBuffer()
|
||||
#define VID_UnlockBuffer()
|
||||
|
||||
#endif
|
||||
|
||||
#if defined __i386__ // && !defined __sun__
|
||||
|
@ -209,13 +176,8 @@ void VID_UnlockBuffer (void);
|
|||
// Use for multiplayer testing only - VERY dangerous!!!
|
||||
// #define IDGODS
|
||||
|
||||
#include "common.h"
|
||||
#include "bspfile.h"
|
||||
#include "vid.h"
|
||||
#include "sys.h"
|
||||
#include "zone.h"
|
||||
#include "mathlib.h"
|
||||
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
vec3_t origin;
|
||||
|
@ -223,99 +185,20 @@ typedef struct
|
|||
int modelindex;
|
||||
int frame;
|
||||
int colormap;
|
||||
int skin;
|
||||
int skinnum;
|
||||
int effects;
|
||||
} entity_state_t;
|
||||
*/
|
||||
|
||||
#include <common_quakedef.h>
|
||||
|
||||
#include "wad.h"
|
||||
#include "draw.h"
|
||||
#include "cvar.h"
|
||||
#include "screen.h"
|
||||
#include "net.h"
|
||||
#include "protocol.h"
|
||||
#include "cmd.h"
|
||||
#include "sbar.h"
|
||||
#include "sound.h"
|
||||
#include "render.h"
|
||||
#include "client.h"
|
||||
#include "progs.h"
|
||||
#include "server.h"
|
||||
|
||||
#ifdef GLQUAKE
|
||||
#include "gl_model.h"
|
||||
#else
|
||||
#include "model.h"
|
||||
#include "d_iface.h"
|
||||
#endif
|
||||
|
||||
#include "input.h"
|
||||
#include "world.h"
|
||||
#include "keys.h"
|
||||
#include "console.h"
|
||||
#include "view.h"
|
||||
#include "menu.h"
|
||||
#include "crc.h"
|
||||
#include "cdaudio.h"
|
||||
|
||||
#ifdef GLQUAKE
|
||||
#include "glquake.h"
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
// the host system specifies the base of the directory tree, the
|
||||
// command line parms passed to the program, and the amount of memory
|
||||
// available for the program to use
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *basedir;
|
||||
char *cachedir; // for development over ISDN lines
|
||||
int argc;
|
||||
char **argv;
|
||||
void *membase;
|
||||
int memsize;
|
||||
} quakeparms_t;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
extern qboolean noclip_anglehack;
|
||||
|
||||
|
||||
//
|
||||
// host
|
||||
//
|
||||
extern quakeparms_t host_parms;
|
||||
|
||||
extern cvar_t sys_ticrate;
|
||||
extern cvar_t sys_nostdout;
|
||||
extern cvar_t developer;
|
||||
|
||||
extern qboolean host_initialized; // true if into command execution
|
||||
extern double host_frametime;
|
||||
extern byte *host_basepal;
|
||||
extern byte *host_colormap;
|
||||
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
|
||||
|
||||
void Host_ClearMemory (void);
|
||||
void Host_ServerFrame (void);
|
||||
void Host_InitCommands (void);
|
||||
void Host_Init (quakeparms_t *parms);
|
||||
void Host_Shutdown(void);
|
||||
void Host_Error (char *error, ...);
|
||||
void Host_EndGame (char *message, ...);
|
||||
void Host_Frame (float time);
|
||||
void Host_Quit_f (void);
|
||||
void Host_ClientCommands (char *fmt, ...);
|
||||
void Host_ShutdownServer (qboolean crash);
|
||||
|
||||
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
|
||||
// the user changes the cvar while the level is
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
// view.h
|
||||
|
||||
extern cvar_t v_gamma;
|
||||
|
||||
extern byte gammatable[256]; // palette is sent through this
|
||||
extern byte ramps[3][256];
|
||||
extern float v_blend[4];
|
||||
|
||||
extern cvar_t lcd_x;
|
||||
|
||||
|
||||
void V_Init (void);
|
||||
void V_RenderView (void);
|
||||
float V_CalcRoll (vec3_t angles, vec3_t velocity);
|
||||
void V_UpdatePalette (void);
|
||||
|
|
@ -493,7 +493,7 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
|||
if (ent->baseline.colormap != ent->v.colormap)
|
||||
bits |= U_COLORMAP;
|
||||
|
||||
if (ent->baseline.skin != ent->v.skin)
|
||||
if (ent->baseline.skinnum != ent->v.skin)
|
||||
bits |= U_SKIN;
|
||||
|
||||
if (ent->baseline.frame != ent->v.frame)
|
||||
|
@ -943,7 +943,7 @@ void SV_CreateBaseline (void)
|
|||
VectorCopy (svent->v.origin, svent->baseline.origin);
|
||||
VectorCopy (svent->v.angles, svent->baseline.angles);
|
||||
svent->baseline.frame = svent->v.frame;
|
||||
svent->baseline.skin = svent->v.skin;
|
||||
svent->baseline.skinnum = svent->v.skin;
|
||||
if (entnum > 0 && entnum <= svs.maxclients)
|
||||
{
|
||||
svent->baseline.colormap = entnum;
|
||||
|
@ -965,7 +965,7 @@ void SV_CreateBaseline (void)
|
|||
MSG_WriteByte (&sv.signon, svent->baseline.modelindex);
|
||||
MSG_WriteByte (&sv.signon, svent->baseline.frame);
|
||||
MSG_WriteByte (&sv.signon, svent->baseline.colormap);
|
||||
MSG_WriteByte (&sv.signon, svent->baseline.skin);
|
||||
MSG_WriteByte (&sv.signon, svent->baseline.skinnum);
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
MSG_WriteCoord(&sv.signon, svent->baseline.origin[i]);
|
||||
|
|
|
@ -383,7 +383,7 @@ int main (int c, char **v)
|
|||
nostdout = 1;
|
||||
else {
|
||||
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
|
||||
printf ("Linux Quake -- Version %0.3f\n", LINUX_VERSION);
|
||||
printf ("QuakeForge (Linux Quake) -- Version %0.3f\n", VERSION);
|
||||
}
|
||||
|
||||
oldtime = Sys_FloatTime () - 0.1;
|
||||
|
|
Loading…
Reference in a new issue