moved qw_common{bothdefs.h,pmove.h,pmove_simple.h} to common

merged qw_common/quakedef.h and uquake/quakedef.h into common/quakedef.h (sort
of, bits of bothdefs.h too)
common/cl_ents.c common/client.h uquake/screen.c uquake/sv_user.c:
	various fixups to cope with the merge.

UQ is still busted
This commit is contained in:
Bill Currie 2000-02-09 01:44:59 +00:00
parent 21416b0b94
commit 1308793cce
9 changed files with 40 additions and 244 deletions

View File

@ -42,6 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define UNUSED(x) (x = x) // for pesky compiler / lint warnings #define UNUSED(x) (x = x) // for pesky compiler / lint warnings
#define MINIMUM_MEMORY 0x550000 #define MINIMUM_MEMORY 0x550000
#define MINIMUM_MEMORY_LEVELPAK (MINIMUM_MEMORY + 0x100000)
// up / down // up / down
#define PITCH 0 #define PITCH 0
@ -83,11 +84,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// //
#define MAX_CL_STATS 32 #define MAX_CL_STATS 32
#define STAT_HEALTH 0 #define STAT_HEALTH 0
//define STAT_FRAGS 1 #define STAT_FRAGS 1
#define STAT_WEAPON 2 #define STAT_WEAPON 2
#define STAT_AMMO 3 #define STAT_AMMO 3
#define STAT_ARMOR 4 #define STAT_ARMOR 4
//define STAT_WEAPONFRAME 5 #define STAT_WEAPONFRAME 5
#define STAT_SHELLS 6 #define STAT_SHELLS 6
#define STAT_NAILS 7 #define STAT_NAILS 7
#define STAT_ROCKETS 8 #define STAT_ROCKETS 8
@ -98,7 +99,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define STAT_SECRETS 13 // bumped on client side by svc_foundsecret #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
#define STAT_MONSTERS 14 // bumped by svc_killedmonster #define STAT_MONSTERS 14 // bumped by svc_killedmonster
#define STAT_ITEMS 15 #define STAT_ITEMS 15
//define STAT_VIEWHEIGHT 16 #define STAT_VIEWHEIGHT 16
// //

View File

@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mathlib.h" #include "mathlib.h"
#include "view.h" #include "view.h"
#include "cvars.h" #include "cvars.h"
#include "model.h"
extern cvar_t cl_predict_players; extern cvar_t cl_predict_players;
extern cvar_t cl_predict_players2; extern cvar_t cl_predict_players2;
@ -221,11 +222,12 @@ void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int bits)
if (bits & U_ANGLE3) if (bits & U_ANGLE3)
to->angles[2] = MSG_ReadAngle(); to->angles[2] = MSG_ReadAngle();
#ifdef QUAKEWORLD
if (bits & U_SOLID) if (bits & U_SOLID)
{ {
// FIXME // FIXME
} }
#endif
} }
@ -366,6 +368,7 @@ void CL_ParsePacketEntities (qboolean delta)
if (newnum < oldnum) if (newnum < oldnum)
{ // new from baseline { // new from baseline
//Con_Printf ("baseline %i\n", newnum); //Con_Printf ("baseline %i\n", newnum);
#ifdef QUAKEWORLD
if (word & U_REMOVE) if (word & U_REMOVE)
{ {
if (full) if (full)
@ -377,6 +380,7 @@ void CL_ParsePacketEntities (qboolean delta)
} }
continue; continue;
} }
#endif
if (newindex >= MAX_PACKET_ENTITIES) if (newindex >= MAX_PACKET_ENTITIES)
Host_EndGame ("CL_ParsePacketEntities: newindex == MAX_PACKET_ENTITIES"); Host_EndGame ("CL_ParsePacketEntities: newindex == MAX_PACKET_ENTITIES");
CL_ParseDelta (&cl_baselines[newnum], &newp->entities[newindex], word); CL_ParseDelta (&cl_baselines[newnum], &newp->entities[newindex], word);
@ -391,11 +395,13 @@ void CL_ParsePacketEntities (qboolean delta)
cl.validsequence = 0; cl.validsequence = 0;
Con_Printf ("WARNING: delta on full update"); Con_Printf ("WARNING: delta on full update");
} }
#ifdef QUAKEWORLD
if (word & U_REMOVE) if (word & U_REMOVE)
{ {
oldindex++; oldindex++;
continue; continue;
} }
#endif
//Con_Printf ("delta %i\n",newnum); //Con_Printf ("delta %i\n",newnum);
CL_ParseDelta (&oldp->entities[oldindex], &newp->entities[newindex], word); CL_ParseDelta (&oldp->entities[oldindex], &newp->entities[newindex], word);
newindex++; newindex++;

View File

@ -34,9 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <net.h> #include <net.h>
#include <qtypes.h> #include <qtypes.h>
#include <zone.h> #include <zone.h>
#if defined(UQUAKE) || defined(QUAKEWORLD) #include <protocol.h>
# include <protocol.h>
#endif
#include <vid.h> #include <vid.h>
#include <render.h> #include <render.h>
#include <common.h> #include <common.h>
@ -105,7 +103,7 @@ typedef struct player_info_s
} player_info_t; } player_info_t;
#ifdef QUAKEWORLD //#ifdef QUAKEWORLD
typedef struct typedef struct
{ {
// generated on client side // generated on client side
@ -121,7 +119,7 @@ typedef struct
packet_entities_t packet_entities; packet_entities_t packet_entities;
qboolean invalid; // if packet_entities delta is invalid qboolean invalid; // if packet_entities delta is invalid
} frame_t; } frame_t;
#endif //#endif
#define CSHIFT_CONTENTS 0 #define CSHIFT_CONTENTS 0
#define CSHIFT_DAMAGE 1 #define CSHIFT_DAMAGE 1
@ -199,7 +197,7 @@ typedef struct
cactive_t state; // connection info cactive_t state; // connection info
netchan_t netchan; // network stuff netchan_t netchan; // network stuff
#ifdef QUAKEWORLD //#ifdef QUAKEWORLD
char userinfo[MAX_INFO_STRING]; char userinfo[MAX_INFO_STRING];
char servername[MAX_OSPATH]; char servername[MAX_OSPATH];
int qport; int qport;
@ -214,13 +212,13 @@ typedef struct
int challenge; int challenge;
float latency; // rolling average float latency; // rolling average
#elif UQUAKE //#elif UQUAKE
char mapstring[MAX_QPATH]; char mapstring[MAX_QPATH];
char spawnparms[MAX_MAPSTRING]; // to restart level char spawnparms[MAX_MAPSTRING]; // to restart level
int signon; int signon;
struct qsocket_s *netcon; struct qsocket_s *netcon;
#endif // QUAKEWORLD else UQUAKE //#endif // QUAKEWORLD else UQUAKE
// demos - this stuff can't go into client_state_t // demos - this stuff can't go into client_state_t
int demonum; int demonum;
@ -298,7 +296,7 @@ typedef struct
int gametype; int gametype;
int maxclients; int maxclients;
#ifdef QUAKEWORLD //#ifdef QUAKEWORLD
// QW specific! // QW specific!
// all player information // all player information
player_info_t players[MAX_CLIENTS]; player_info_t players[MAX_CLIENTS];
@ -325,7 +323,7 @@ typedef struct
// //
char model_name[MAX_MODELS][MAX_QPATH]; char model_name[MAX_MODELS][MAX_QPATH];
char sound_name[MAX_SOUNDS][MAX_QPATH]; char sound_name[MAX_SOUNDS][MAX_QPATH];
#elif defined(UQUAKE) //#elif defined(UQUAKE)
// UQ specific. // UQ specific.
int num_entities; // held in cl_entities array int num_entities; // held in cl_entities array
float last_received_message; // (time) for net trouble icon float last_received_message; // (time) for net trouble icon
@ -347,7 +345,7 @@ typedef struct
vec3_t mvelocity[2]; // update by server, used for lean+bob vec3_t mvelocity[2]; // update by server, used for lean+bob
// (0 is newest) // (0 is newest)
vec3_t velocity; // lerped between mvelocity[0] and [1] vec3_t velocity; // lerped between mvelocity[0] and [1]
#endif // QUAKEWORLD else UQUAKE //#endif // QUAKEWORLD else UQUAKE
} client_state_t; } client_state_t;
extern client_state_t cl; extern client_state_t cl;
@ -398,9 +396,7 @@ extern cvar_t _windowed_mouse;
// FIXME, allocate dynamically // FIXME, allocate dynamically
#ifdef QUAKEWORLD
extern entity_state_t cl_baselines[MAX_EDICTS]; extern entity_state_t cl_baselines[MAX_EDICTS];
#endif // QUAKEWORLD
#ifdef UQUAKE #ifdef UQUAKE
entity_t cl_entities[MAX_EDICTS]; entity_t cl_entities[MAX_EDICTS];
entity_t cl_temp_entities[MAX_TEMP_ENTITIES]; entity_t cl_temp_entities[MAX_TEMP_ENTITIES];
@ -550,7 +546,7 @@ void CL_ClearTEnts (void);
void CL_SignonReply (void); void CL_SignonReply (void);
#endif #endif
#ifdef QUAKEWORLD //#ifdef QUAKEWORLD
// //
// cl_ents.c // cl_ents.c
// //
@ -617,6 +613,6 @@ void Skin_NextDownload (void);
#define RSSHOT_WIDTH 320 #define RSSHOT_WIDTH 320
#define RSSHOT_HEIGHT 200 #define RSSHOT_HEIGHT 200
#endif // QUAKEWORLD //#endif // QUAKEWORLD
#endif // _CLIENT_H #endif // _CLIENT_H

View File

@ -32,5 +32,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern cvar_t password; extern cvar_t password;
qboolean Host_SimulationTime(float time); qboolean Host_SimulationTime(float time);
void Host_ClearMemory (void);
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;
/*
Chase camera
*/
extern cvar_t cl_chasecam;
void Chase_Init (void);
void Chase_Reset (void);
void Chase_Update (void);
#endif /* _QW_COMMON_QUAKEDEF_H */ #endif /* _QW_COMMON_QUAKEDEF_H */

View File

@ -1,208 +0,0 @@
/*
quakedef.h - primary header for client
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.
*/
#ifndef _UQUAKE_QUAKEDEF_H
#define _UQUAKE_QUAKEDEF_H
#if defined(_WIN32) && !defined(WINDED)
#if defined(_M_IX86)
#define __i386__ 1
#endif
#endif
#if id386
#define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported
#else
#define UNALIGNED_OK 0
#endif
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
#define CACHE_SIZE 32 // used to align key data structures
#define UNUSED(x) (x = x) // for pesky compiler / lint warnings
#define MINIMUM_MEMORY 0x550000
#define MINIMUM_MEMORY_LEVELPAK (MINIMUM_MEMORY + 0x100000)
#define MAX_NUM_ARGVS 50
// up / down
#define PITCH 0
// left / right
#define YAW 1
// fall over
#define ROLL 2
#define MAX_QPATH 64 // max length of a quake game pathname
#define MAX_OSPATH 128 // max length of a filesystem pathname
#define ON_EPSILON 0.1 // point on plane side epsilon
//
// per-level limits
//
#define MAX_LIGHTSTYLES 64
#define MAX_MODELS 256 // these are sent over the net as bytes
#define MAX_SOUNDS 256 // so they cannot be blindly increased
#define SAVEGAME_COMMENT_LENGTH 39
#define MAX_STYLESTRING 64
//
// stats are integers communicated to the client by the server
//
#define MAX_CL_STATS 32
#define STAT_HEALTH 0
#define STAT_FRAGS 1
#define STAT_WEAPON 2
#define STAT_AMMO 3
#define STAT_ARMOR 4
#define STAT_WEAPONFRAME 5
#define STAT_SHELLS 6
#define STAT_NAILS 7
#define STAT_ROCKETS 8
#define STAT_CELLS 9
#define STAT_ACTIVEWEAPON 10
#define STAT_TOTALSECRETS 11
#define STAT_TOTALMONSTERS 12
#define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
#define STAT_MONSTERS 14 // bumped by svc_killedmonster
// stock defines
#define IT_SHOTGUN 1
#define IT_SUPER_SHOTGUN 2
#define IT_NAILGUN 4
#define IT_SUPER_NAILGUN 8
#define IT_GRENADE_LAUNCHER 16
#define IT_ROCKET_LAUNCHER 32
#define IT_LIGHTNING 64
#define IT_SUPER_LIGHTNING 128
#define IT_SHELLS 256
#define IT_NAILS 512
#define IT_ROCKETS 1024
#define IT_CELLS 2048
#define IT_AXE 4096
#define IT_ARMOR1 8192
#define IT_ARMOR2 16384
#define IT_ARMOR3 32768
#define IT_SUPERHEALTH 65536
#define IT_KEY1 131072
#define IT_KEY2 262144
#define IT_INVISIBILITY 524288
#define IT_INVULNERABILITY 1048576
#define IT_SUIT 2097152
#define IT_QUAD 4194304
#define IT_SIGIL1 (1<<28)
#define IT_SIGIL2 (1<<29)
#define IT_SIGIL3 (1<<30)
#define IT_SIGIL4 (1<<31)
//===========================================
//rogue changed and added defines
#define RIT_SHELLS 128
#define RIT_NAILS 256
#define RIT_ROCKETS 512
#define RIT_CELLS 1024
#define RIT_AXE 2048
#define RIT_LAVA_NAILGUN 4096
#define RIT_LAVA_SUPER_NAILGUN 8192
#define RIT_MULTI_GRENADE 16384
#define RIT_MULTI_ROCKET 32768
#define RIT_PLASMA_GUN 65536
#define RIT_ARMOR1 8388608
#define RIT_ARMOR2 16777216
#define RIT_ARMOR3 33554432
#define RIT_LAVA_NAILS 67108864
#define RIT_PLASMA_AMMO 134217728
#define RIT_MULTI_ROCKETS 268435456
#define RIT_SHIELD 536870912
#define RIT_ANTIGRAV 1073741824
#define RIT_SUPERHEALTH 2147483648
//MED 01/04/97 added hipnotic defines
//===========================================
//hipnotic added defines
#define HIT_PROXIMITY_GUN_BIT 16
#define HIT_MJOLNIR_BIT 7
#define HIT_LASER_CANNON_BIT 23
#define HIT_WETSUIT_BIT 25
#define HIT_EMPATHY_SHIELDS_BIT 26
#define HIT_PROXIMITY_GUN (1<<HIT_PROXIMITY_GUN_BIT)
#define HIT_MJOLNIR (1<<HIT_MJOLNIR_BIT)
#define HIT_LASER_CANNON (1<<HIT_LASER_CANNON_BIT)
#define HIT_WETSUIT (1<<HIT_WETSUIT_BIT)
#define HIT_EMPATHY_SHIELDS (1<<HIT_EMPATHY_SHIELDS_BIT)
//===========================================
#define MAX_SCOREBOARD 16
#define MAX_SCOREBOARDNAME 32
#define SOUND_CHANNELS 8
/*
typedef struct
{
vec3_t origin;
vec3_t angles;
int modelindex;
int frame;
int colormap;
int skinnum;
int effects;
} entity_state_t;
*/
#include <common_quakedef.h>
//#include "progs.h"
//#include "server.h"
//#include "world.h"
void Host_ClearMemory (void);
// 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
// running, this reflects the level actually in use)
extern qboolean isDedicated;
extern int minimum_memory;
/*
Chase camera
*/
extern cvar_t cl_chasecam;
void Chase_Init (void);
void Chase_Reset (void);
void Chase_Update (void);
#endif /* _UQUAKE_QUAKEDEF_H */

View File

@ -624,22 +624,6 @@ void SCR_DrawConsole (void)
============================================================================== ==============================================================================
*/ */
typedef struct
{
char manufacturer;
char version;
char encoding;
char bits_per_pixel;
unsigned short xmin,ymin,xmax,ymax;
unsigned short hres,vres;
unsigned char palette[48];
char reserved;
char color_planes;
unsigned short bytes_per_line;
unsigned short palette_type;
char filler[58];
unsigned char data; // unbounded
} pcx_t;
/* /*
============== ==============

View File

@ -50,7 +50,7 @@ float *angles;
float *origin; float *origin;
float *velocity; float *velocity;
qboolean onground; int onground;
usercmd_t cmd; usercmd_t cmd;