mirror of
https://git.code.sf.net/p/quake/nuq
synced 2025-02-16 09:01:16 +00:00
header revamp almost done. it now tries (but fails) to link
This commit is contained in:
parent
98340d8e00
commit
9f8660c30e
33 changed files with 234 additions and 83 deletions
|
@ -26,6 +26,10 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef __d_iface_h
|
||||
#define __d_iface_h
|
||||
|
||||
#include "model.h"
|
||||
|
||||
#define WARP_WIDTH 320
|
||||
#define WARP_HEIGHT 200
|
||||
|
@ -235,3 +239,4 @@ extern vrect_t scr_vrect;
|
|||
|
||||
extern byte *r_warpbuffer;
|
||||
|
||||
#endif // __d_iface_h
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef _QARGS_H
|
||||
#define _QARGS_H
|
||||
#ifndef __qargs_h
|
||||
#define __qargs_h
|
||||
|
||||
#include <qtypes.h>
|
||||
|
||||
|
@ -43,4 +43,4 @@ void COM_AddParm (char *parm);
|
|||
void COM_Init (void);
|
||||
void COM_InitArgv (int argc, char **argv);
|
||||
|
||||
#endif // _QARGS_H
|
||||
#endif // __qargs_h
|
||||
|
|
|
@ -67,14 +67,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(WINDED)
|
||||
void VID_LockBuffer (void);
|
||||
void VID_UnlockBuffer (void);
|
||||
#else
|
||||
#define VID_LockBuffer()
|
||||
#define VID_UnlockBuffer()
|
||||
#endif
|
||||
|
||||
#ifdef USE_INTEL_ASM
|
||||
#define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported
|
||||
#else
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef __r_local_h
|
||||
#define __r_local_h
|
||||
|
||||
#include "client.h"
|
||||
|
||||
#ifndef GLQUAKE
|
||||
#include "r_shared.h"
|
||||
|
@ -322,3 +326,5 @@ void R_SplitEntityOnNode2 (mnode_t *node);
|
|||
void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __r_local_h
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "mathlib.h"
|
||||
#include "cvar.h"
|
||||
#include "vid.h"
|
||||
#include "protocol.h"
|
||||
|
||||
#define MAXCLIPPLANES 11
|
||||
|
||||
|
|
|
@ -93,4 +93,12 @@ 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
|
||||
|
||||
#if defined(_WIN32) && !defined(WINDED)
|
||||
void VID_LockBuffer (void);
|
||||
void VID_UnlockBuffer (void);
|
||||
#else
|
||||
#define VID_LockBuffer()
|
||||
#define VID_UnlockBuffer()
|
||||
#endif
|
||||
|
||||
#endif // __vid_h
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#endif
|
||||
|
||||
#include "d_local.h"
|
||||
#include "client.h"
|
||||
|
||||
static int miplevel;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "vid.h"
|
||||
|
||||
/*
|
||||
================
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#endif
|
||||
|
||||
#include "d_local.h"
|
||||
#include "vid.h"
|
||||
|
||||
#define NUM_MIPS 4
|
||||
|
||||
|
@ -86,8 +87,6 @@ void D_CopyRects (vrect_t *prects, int transparent)
|
|||
// console); Quake will then draw into wherever the driver points vid.buffer
|
||||
// and will call this function before swapping buffers
|
||||
|
||||
UNUSED(prects);
|
||||
UNUSED(transparent);
|
||||
}
|
||||
|
||||
|
||||
|
@ -178,6 +177,5 @@ void D_UpdateRects (vrect_t *prect)
|
|||
|
||||
// the software driver draws these directly to the vid buffer
|
||||
|
||||
UNUSED(prect);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#endif
|
||||
|
||||
#include "d_local.h"
|
||||
#include "sys.h"
|
||||
|
||||
int d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle;
|
||||
|
||||
|
|
|
@ -30,8 +30,17 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "qdefs.h"
|
||||
#include "sys.h"
|
||||
#include "qargs.h"
|
||||
#include "console.h"
|
||||
#include "d_local.h"
|
||||
#include "r_local.h"
|
||||
#include "d_iface.h"
|
||||
#include "render.h"
|
||||
|
||||
float surfscale;
|
||||
qboolean r_cache_thrash; // set if surface cache is thrashing
|
||||
|
@ -48,7 +57,7 @@ int D_SurfaceCacheForRes (int width, int height)
|
|||
|
||||
if (COM_CheckParm ("-surfcachesize"))
|
||||
{
|
||||
size = Q_atoi(com_argv[COM_CheckParm("-surfcachesize")+1]) * 1024;
|
||||
size = atoi(com_argv[COM_CheckParm("-surfcachesize")+1]) * 1024;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "draw.h"
|
||||
#include "vid.h"
|
||||
#include "zone.h"
|
||||
#include "sys.h"
|
||||
#include "quakefs.h"
|
||||
#include "d_iface.h"
|
||||
#include "sound.h"
|
||||
|
||||
typedef struct {
|
||||
vrect_t rect;
|
||||
|
@ -314,7 +321,7 @@ void Draw_Pic (int x, int y, qpic_t *pic)
|
|||
|
||||
for (v=0 ; v<pic->height ; v++)
|
||||
{
|
||||
Q_memcpy (dest, source, pic->width);
|
||||
memcpy (dest, source, pic->width);
|
||||
dest += vid.rowbytes;
|
||||
source += pic->width;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,25 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "host.h"
|
||||
#include "r_local.h"
|
||||
#include "server.h"
|
||||
#include "view.h"
|
||||
#include "chase.h"
|
||||
#include "qargs.h"
|
||||
#include "cmd.h"
|
||||
#include "cdaudio.h"
|
||||
#include "va.h"
|
||||
#include "sbar.h"
|
||||
#include "menu.h"
|
||||
#include "msg.h"
|
||||
#include "vid.h"
|
||||
#include "draw.h"
|
||||
#include "input.h"
|
||||
#include "keys.h"
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*
|
||||
|
||||
|
@ -176,7 +194,7 @@ void Host_FindMaxClients (void)
|
|||
cls.state = ca_dedicated;
|
||||
if (i != (com_argc - 1))
|
||||
{
|
||||
svs.maxclients = Q_atoi (com_argv[i+1]);
|
||||
svs.maxclients = atoi (com_argv[i+1]);
|
||||
}
|
||||
else
|
||||
svs.maxclients = 8;
|
||||
|
@ -190,7 +208,7 @@ void Host_FindMaxClients (void)
|
|||
if (cls.state == ca_dedicated)
|
||||
Sys_Error ("Only one of -dedicated or -listen can be specified");
|
||||
if (i != (com_argc - 1))
|
||||
svs.maxclients = Q_atoi (com_argv[i+1]);
|
||||
svs.maxclients = atoi (com_argv[i+1]);
|
||||
else
|
||||
svs.maxclients = 8;
|
||||
}
|
||||
|
@ -829,7 +847,7 @@ void Host_InitVCR (quakeparms_t *parms)
|
|||
Sys_FileWrite(vcrFile, "-playback", len);
|
||||
continue;
|
||||
}
|
||||
len = Q_strlen(com_argv[i]) + 1;
|
||||
len = strlen(com_argv[i]) + 1;
|
||||
Sys_FileWrite(vcrFile, &len, sizeof(int));
|
||||
Sys_FileWrite(vcrFile, com_argv[i], len);
|
||||
}
|
||||
|
@ -869,7 +887,7 @@ void Host_Init (quakeparms_t *parms)
|
|||
CL_InitCvars ();
|
||||
SCR_InitCvars ();
|
||||
VID_InitCvars ();
|
||||
COM_Init (parms->basedir);
|
||||
COM_Init ();
|
||||
|
||||
V_Init ();
|
||||
Chase_Init ();
|
||||
|
|
|
@ -30,6 +30,18 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "client.h"
|
||||
#include "server.h"
|
||||
#include "host.h"
|
||||
#include "world.h"
|
||||
#include "va.h"
|
||||
#include "screen.h"
|
||||
#include "msg.h"
|
||||
#include "model.h"
|
||||
#include "console.h"
|
||||
#include "progs.h"
|
||||
#include "keys.h"
|
||||
#include "sys.h"
|
||||
|
||||
int current_skill;
|
||||
|
||||
|
@ -933,7 +945,7 @@ void Host_Name_f (void)
|
|||
|
||||
if (cmd_source == src_command)
|
||||
{
|
||||
if (Q_strcmp(cl_name->string, newName) == 0)
|
||||
if (strcmp(cl_name->string, newName) == 0)
|
||||
return;
|
||||
Cvar_Set (cl_name, newName);
|
||||
if (cls.state == ca_connected)
|
||||
|
@ -942,9 +954,9 @@ void Host_Name_f (void)
|
|||
}
|
||||
|
||||
if (host_client->name[0] && strcmp(host_client->name, "unconnected") )
|
||||
if (Q_strcmp(host_client->name, newName) != 0)
|
||||
if (strcmp(host_client->name, newName) != 0)
|
||||
Con_Printf ("%s renamed to %s\n", host_client->name, newName);
|
||||
Q_strcpy (host_client->name, newName);
|
||||
strcpy (host_client->name, newName);
|
||||
host_client->edict->v.netname = host_client->name - pr_strings;
|
||||
|
||||
// send notification to all clients
|
||||
|
@ -970,9 +982,9 @@ void Host_Please_f (void)
|
|||
if (cmd_source != src_command)
|
||||
return;
|
||||
|
||||
if ((Cmd_Argc () == 3) && Q_strcmp(Cmd_Argv(1), "#") == 0)
|
||||
if ((Cmd_Argc () == 3) && strcmp(Cmd_Argv(1), "#") == 0)
|
||||
{
|
||||
j = Q_atof(Cmd_Argv(2)) - 1;
|
||||
j = atof(Cmd_Argv(2)) - 1;
|
||||
if (j < 0 || j >= svs.maxclients)
|
||||
return;
|
||||
if (!svs.clients[j].active)
|
||||
|
@ -996,7 +1008,7 @@ void Host_Please_f (void)
|
|||
{
|
||||
if (!cl->active)
|
||||
continue;
|
||||
if (Q_strcasecmp(cl->name, Cmd_Argv(1)) == 0)
|
||||
if (strcasecmp(cl->name, Cmd_Argv(1)) == 0)
|
||||
{
|
||||
if (cl->privileged)
|
||||
{
|
||||
|
@ -1047,7 +1059,7 @@ void Host_Say(qboolean teamonly)
|
|||
if (*p == '"')
|
||||
{
|
||||
p++;
|
||||
p[Q_strlen(p)-1] = 0;
|
||||
p[strlen(p)-1] = 0;
|
||||
}
|
||||
|
||||
// turn on color set 1
|
||||
|
@ -1056,8 +1068,8 @@ void Host_Say(qboolean teamonly)
|
|||
else
|
||||
sprintf (text, "%c<%s> ", 1, hostname->string);
|
||||
|
||||
j = sizeof(text) - 2 - Q_strlen(text); // -2 for /n and null terminator
|
||||
if (Q_strlen(p) > j)
|
||||
j = sizeof(text) - 2 - strlen(text); // -2 for /n and null terminator
|
||||
if (strlen(p) > j)
|
||||
p[j] = 0;
|
||||
|
||||
strcat (text, p);
|
||||
|
@ -1107,8 +1119,8 @@ void Host_Tell_f(void)
|
|||
if (Cmd_Argc () < 3)
|
||||
return;
|
||||
|
||||
Q_strcpy(text, host_client->name);
|
||||
Q_strcat(text, ": ");
|
||||
strcpy(text, host_client->name);
|
||||
strcat(text, ": ");
|
||||
|
||||
p = Cmd_Args();
|
||||
|
||||
|
@ -1116,12 +1128,12 @@ void Host_Tell_f(void)
|
|||
if (*p == '"')
|
||||
{
|
||||
p++;
|
||||
p[Q_strlen(p)-1] = 0;
|
||||
p[strlen(p)-1] = 0;
|
||||
}
|
||||
|
||||
// check length & truncate if necessary
|
||||
j = sizeof(text) - 2 - Q_strlen(text); // -2 for /n and null terminator
|
||||
if (Q_strlen(p) > j)
|
||||
j = sizeof(text) - 2 - strlen(text); // -2 for /n and null terminator
|
||||
if (strlen(p) > j)
|
||||
p[j] = 0;
|
||||
|
||||
strcat (text, p);
|
||||
|
@ -1132,7 +1144,7 @@ void Host_Tell_f(void)
|
|||
{
|
||||
if (!client->active || !client->spawned)
|
||||
continue;
|
||||
if (Q_strcasecmp(client->name, Cmd_Argv(1)))
|
||||
if (strcasecmp(client->name, Cmd_Argv(1)))
|
||||
continue;
|
||||
host_client = client;
|
||||
SV_ClientPrintf("%s", text);
|
||||
|
@ -1451,9 +1463,9 @@ void Host_Kick_f (void)
|
|||
|
||||
save = host_client;
|
||||
|
||||
if (Cmd_Argc() > 2 && Q_strcmp(Cmd_Argv(1), "#") == 0)
|
||||
if (Cmd_Argc() > 2 && strcmp(Cmd_Argv(1), "#") == 0)
|
||||
{
|
||||
i = Q_atof(Cmd_Argv(2)) - 1;
|
||||
i = atof(Cmd_Argv(2)) - 1;
|
||||
if (i < 0 || i >= svs.maxclients)
|
||||
return;
|
||||
if (!svs.clients[i].active)
|
||||
|
@ -1467,7 +1479,7 @@ void Host_Kick_f (void)
|
|||
{
|
||||
if (!host_client->active)
|
||||
continue;
|
||||
if (Q_strcasecmp(host_client->name, Cmd_Argv(1)) == 0)
|
||||
if (strcasecmp(host_client->name, Cmd_Argv(1)) == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1494,7 +1506,7 @@ void Host_Kick_f (void)
|
|||
message++; // skip the #
|
||||
while (*message == ' ') // skip white space
|
||||
message++;
|
||||
message += Q_strlen(Cmd_Argv(2)); // skip the number
|
||||
message += strlen(Cmd_Argv(2)); // skip the number
|
||||
}
|
||||
while (*message && *message == ' ')
|
||||
message++;
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
#include "qendian.h"
|
||||
|
||||
model_t *loadmodel;
|
||||
char loadname[32]; // for hunk tags
|
||||
|
@ -405,7 +408,7 @@ void Mod_LoadTextures (lump_t *l)
|
|||
// the pixels immediately follow the structures
|
||||
memcpy ( tx+1, mt+1, pixels);
|
||||
|
||||
if (!Q_strncmp(mt->name,"sky",3))
|
||||
if (!strncmp(mt->name,"sky",3))
|
||||
R_InitSky (tx);
|
||||
}
|
||||
|
||||
|
@ -815,13 +818,13 @@ void Mod_LoadFaces (lump_t *l)
|
|||
|
||||
// set the drawing flags flag
|
||||
|
||||
if (!Q_strncmp(out->texinfo->texture->name,"sky",3)) // sky
|
||||
if (!strncmp(out->texinfo->texture->name,"sky",3)) // sky
|
||||
{
|
||||
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Q_strncmp(out->texinfo->texture->name,"*",1)) // turbulent
|
||||
if (!strncmp(out->texinfo->texture->name,"*",1)) // turbulent
|
||||
{
|
||||
out->flags |= (SURF_DRAWTURB | SURF_DRAWTILED);
|
||||
for (i=0 ; i<2 ; i++)
|
||||
|
@ -1365,7 +1368,7 @@ void * Mod_LoadAliasSkin (void * pin, int *pskinindex, int skinsize,
|
|||
|
||||
if (r_pixbytes == 1)
|
||||
{
|
||||
Q_memcpy (pskin, pinskin, skinsize);
|
||||
memcpy (pskin, pinskin, skinsize);
|
||||
}
|
||||
else if (r_pixbytes == 2)
|
||||
{
|
||||
|
@ -1690,7 +1693,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe)
|
|||
pspriteframe = Hunk_AllocName (sizeof (mspriteframe_t) + size*r_pixbytes,
|
||||
loadname);
|
||||
|
||||
Q_memset (pspriteframe, 0, sizeof (mspriteframe_t) + size);
|
||||
memset (pspriteframe, 0, sizeof (mspriteframe_t) + size);
|
||||
*ppframe = pspriteframe;
|
||||
|
||||
pspriteframe->width = width;
|
||||
|
@ -1705,7 +1708,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe)
|
|||
|
||||
if (r_pixbytes == 1)
|
||||
{
|
||||
Q_memcpy (&pspriteframe->pixels[0], (byte *)(pinframe + 1), size);
|
||||
memcpy (&pspriteframe->pixels[0], (byte *)(pinframe + 1), size);
|
||||
}
|
||||
else if (r_pixbytes == 2)
|
||||
{
|
||||
|
|
|
@ -30,6 +30,16 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "progs.h"
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
#include "va.h"
|
||||
#include "host.h"
|
||||
#include "world.h"
|
||||
#include "msg.h"
|
||||
#include "server.h"
|
||||
|
||||
#define RETURN_EDICT(e) (((int *)pr_globals)[OFS_RETURN] = EDICT_TO_PROG(e))
|
||||
|
||||
|
|
|
@ -30,6 +30,15 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "progs.h"
|
||||
#include "cvar.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
#include "host.h"
|
||||
#include "server.h"
|
||||
#include "qendian.h"
|
||||
#include "crc.h"
|
||||
#include "world.h"
|
||||
|
||||
dprograms_t *progs;
|
||||
dfunction_t *pr_functions;
|
||||
|
@ -564,7 +573,7 @@ void ED_PrintEdict_f (void)
|
|||
{
|
||||
int i;
|
||||
|
||||
i = Q_atoi (Cmd_Argv(1));
|
||||
i = atoi (Cmd_Argv(1));
|
||||
if (i >= sv.num_edicts)
|
||||
{
|
||||
Con_Printf("Bad edict number\n");
|
||||
|
|
|
@ -30,7 +30,13 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "progs.h"
|
||||
#include "server.h"
|
||||
#include "host.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
#include "r_local.h"
|
||||
#include "d_local.h" // FIXME: shouldn't be needed (is needed for patch
|
||||
// right now, but that should move)
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
|
||||
//
|
||||
// current entity info
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
#include "r_local.h"
|
||||
|
||||
mnode_t *r_pefragtopnode;
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
#include "view.h"
|
||||
#include "screen.h"
|
||||
|
||||
//define PASSAGES
|
||||
|
||||
|
|
|
@ -31,7 +31,12 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
#include "server.h"
|
||||
#include "host.h"
|
||||
#include "view.h"
|
||||
#include "sbar.h"
|
||||
|
||||
/*
|
||||
===============
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "qargs.h"
|
||||
#include "console.h"
|
||||
#include "server.h"
|
||||
#include "msg.h"
|
||||
|
||||
#define MAX_PARTICLES 2048 // default max # of particles at one
|
||||
// time
|
||||
|
@ -62,7 +66,7 @@ void R_InitParticles (void)
|
|||
|
||||
if (i)
|
||||
{
|
||||
r_numparticles = (int)(Q_atoi(com_argv[i+1]));
|
||||
r_numparticles = (int)(atoi(com_argv[i+1]));
|
||||
if (r_numparticles < ABSOLUTE_MIN_PARTICLES)
|
||||
r_numparticles = ABSOLUTE_MIN_PARTICLES;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
|
||||
static int clip_current;
|
||||
static vec5_t clip_verts[2][MAXWORKINGVERTS];
|
||||
|
@ -97,7 +99,7 @@ int R_ClipSpriteFace (int nump, clipplane_t *pclipplane)
|
|||
|
||||
// handle wraparound case
|
||||
dists[nump] = dists[0];
|
||||
Q_memcpy (instep, in, sizeof (vec5_t));
|
||||
memcpy (instep, in, sizeof (vec5_t));
|
||||
|
||||
|
||||
// clip the winding
|
||||
|
@ -108,7 +110,7 @@ int R_ClipSpriteFace (int nump, clipplane_t *pclipplane)
|
|||
{
|
||||
if (dists[i] >= 0)
|
||||
{
|
||||
Q_memcpy (outstep, instep, sizeof (vec5_t));
|
||||
memcpy (outstep, instep, sizeof (vec5_t));
|
||||
outstep += sizeof (vec5_t) / sizeof (float);
|
||||
outcount++;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "sys.h"
|
||||
|
||||
drawsurf_t r_drawsurf;
|
||||
|
||||
|
|
|
@ -31,6 +31,16 @@
|
|||
#endif
|
||||
|
||||
#include "r_local.h"
|
||||
#include "screen.h"
|
||||
#include "sbar.h"
|
||||
#include "view.h"
|
||||
#include "menu.h"
|
||||
#include "host.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
#include "qendian.h"
|
||||
#include "keys.h"
|
||||
#include "draw.h"
|
||||
|
||||
// only the refresh window will be updated unless these variables are flagged
|
||||
int scr_copytop;
|
||||
|
@ -583,11 +593,11 @@ void WritePCXfile (char *filename, byte *data, int width, int height,
|
|||
pcx->ymax = LittleShort((short)(height-1));
|
||||
pcx->hres = LittleShort((short)width);
|
||||
pcx->vres = LittleShort((short)height);
|
||||
Q_memset (pcx->palette,0,sizeof(pcx->palette));
|
||||
memset (pcx->palette,0,sizeof(pcx->palette));
|
||||
pcx->color_planes = 1; // chunky image
|
||||
pcx->bytes_per_line = LittleShort((short)width);
|
||||
pcx->palette_type = LittleShort(2); // not a grey scale
|
||||
Q_memset (pcx->filler,0,sizeof(pcx->filler));
|
||||
memset (pcx->filler,0,sizeof(pcx->filler));
|
||||
|
||||
// pack the image
|
||||
pack = &pcx->data;
|
||||
|
|
|
@ -30,6 +30,12 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "server.h"
|
||||
#include "msg.h"
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
#include "host.h"
|
||||
#include "world.h"
|
||||
|
||||
server_t sv;
|
||||
server_static_t svs;
|
||||
|
@ -410,7 +416,7 @@ given point.
|
|||
byte *SV_FatPVS (vec3_t org)
|
||||
{
|
||||
fatbytes = (sv.worldmodel->numleafs+31)>>3;
|
||||
Q_memset (fatpvs, 0, fatbytes);
|
||||
memset (fatpvs, 0, fatbytes);
|
||||
SV_AddToFatPVS (org, sv.worldmodel->nodes);
|
||||
return fatpvs;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "server.h"
|
||||
#include "world.h"
|
||||
|
||||
#define STEPSIZE 18
|
||||
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "server.h"
|
||||
#include "host.h"
|
||||
#include "world.h"
|
||||
#include "console.h"
|
||||
#include "sys.h"
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -30,7 +30,14 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "server.h"
|
||||
#include "msg.h"
|
||||
#include "console.h"
|
||||
#include "world.h"
|
||||
#include "keys.h"
|
||||
#include "view.h"
|
||||
#include "host.h"
|
||||
#include "sys.h"
|
||||
edict_t *sv_player;
|
||||
|
||||
cvar_t *sv_edgefriction;
|
||||
|
@ -539,43 +546,43 @@ nextmsg:
|
|||
ret = 2;
|
||||
else
|
||||
ret = 0;
|
||||
if (Q_strncasecmp(s, "status", 6) == 0)
|
||||
if (strncasecmp(s, "status", 6) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "god", 3) == 0)
|
||||
else if (strncasecmp(s, "god", 3) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "notarget", 8) == 0)
|
||||
else if (strncasecmp(s, "notarget", 8) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "fly", 3) == 0)
|
||||
else if (strncasecmp(s, "fly", 3) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "name", 4) == 0)
|
||||
else if (strncasecmp(s, "name", 4) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "noclip", 6) == 0)
|
||||
else if (strncasecmp(s, "noclip", 6) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "say", 3) == 0)
|
||||
else if (strncasecmp(s, "say", 3) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "say_team", 8) == 0)
|
||||
else if (strncasecmp(s, "say_team", 8) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "tell", 4) == 0)
|
||||
else if (strncasecmp(s, "tell", 4) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "color", 5) == 0)
|
||||
else if (strncasecmp(s, "color", 5) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "kill", 4) == 0)
|
||||
else if (strncasecmp(s, "kill", 4) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "pause", 5) == 0)
|
||||
else if (strncasecmp(s, "pause", 5) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "spawn", 5) == 0)
|
||||
else if (strncasecmp(s, "spawn", 5) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "begin", 5) == 0)
|
||||
else if (strncasecmp(s, "begin", 5) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "prespawn", 8) == 0)
|
||||
else if (strncasecmp(s, "prespawn", 8) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "kick", 4) == 0)
|
||||
else if (strncasecmp(s, "kick", 4) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "ping", 4) == 0)
|
||||
else if (strncasecmp(s, "ping", 4) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "give", 4) == 0)
|
||||
else if (strncasecmp(s, "give", 4) == 0)
|
||||
ret = 1;
|
||||
else if (Q_strncasecmp(s, "ban", 3) == 0)
|
||||
else if (strncasecmp(s, "ban", 3) == 0)
|
||||
ret = 1;
|
||||
if (ret == 2)
|
||||
Cbuf_InsertText (s);
|
||||
|
|
|
@ -40,11 +40,18 @@
|
|||
|
||||
#include <asm/io.h>
|
||||
|
||||
#include "vga.h"
|
||||
#include "vgakeyboard.h"
|
||||
#include "vgamouse.h"
|
||||
#include <vga.h>
|
||||
#include <vgakeyboard.h>
|
||||
#include <vgamouse.h>
|
||||
|
||||
#include "host.h"
|
||||
#include "qargs.h"
|
||||
#include "d_local.h"
|
||||
#include "client.h"
|
||||
#include "qendian.h"
|
||||
#include "keys.h"
|
||||
#include "sys.h"
|
||||
#include "console.h"
|
||||
|
||||
#define stringify(m) { #m, m }
|
||||
|
||||
|
@ -253,7 +260,7 @@ void VID_Gamma_f (void)
|
|||
|
||||
if (Cmd_Argc () == 2)
|
||||
{
|
||||
gamma = Q_atof (Cmd_Argv(1));
|
||||
gamma = atof (Cmd_Argv(1));
|
||||
|
||||
for (i=0 ; i<768 ; i++)
|
||||
{
|
||||
|
@ -276,7 +283,7 @@ void VID_DescribeMode_f (void)
|
|||
{
|
||||
int modenum;
|
||||
|
||||
modenum = Q_atoi (Cmd_Argv(1));
|
||||
modenum = atoi (Cmd_Argv(1));
|
||||
if ((modenum >= num_modes) || (modenum < 0 ) || !modes[modenum].width)
|
||||
Con_Printf("Invalid video mode: %d!\n",modenum);
|
||||
Con_Printf("%d: %d x %d - ",modenum,modes[modenum].width,modes[modenum].height);
|
||||
|
@ -341,7 +348,7 @@ void VID_InitModes(void)
|
|||
for (i=0 ; i<num_modes ; i++)
|
||||
{
|
||||
if (vga_hasmode(i))
|
||||
Q_memcpy(&modes[i], vga_getmodeinfo(i), sizeof (vga_modeinfo));
|
||||
memcpy(&modes[i], vga_getmodeinfo(i), sizeof (vga_modeinfo));
|
||||
else
|
||||
modes[i].width = 0; // means not available
|
||||
}
|
||||
|
@ -601,11 +608,11 @@ void VID_Init(unsigned char *palette)
|
|||
|| COM_CheckParm("-d"))
|
||||
{
|
||||
if (COM_CheckParm("-w"))
|
||||
w = Q_atoi(com_argv[COM_CheckParm("-w")+1]);
|
||||
w = atoi(com_argv[COM_CheckParm("-w")+1]);
|
||||
if (COM_CheckParm("-h"))
|
||||
h = Q_atoi(com_argv[COM_CheckParm("-h")+1]);
|
||||
h = atoi(com_argv[COM_CheckParm("-h")+1]);
|
||||
if (COM_CheckParm("-d"))
|
||||
d = Q_atoi(com_argv[COM_CheckParm("-d")+1]);
|
||||
d = atoi(com_argv[COM_CheckParm("-d")+1]);
|
||||
current_mode = get_mode(0, w, h, d);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -32,6 +32,12 @@
|
|||
|
||||
#include "view.h"
|
||||
#include "r_local.h"
|
||||
#include "host.h"
|
||||
#include "chase.h"
|
||||
#include "draw.h"
|
||||
#include "screen.h"
|
||||
#include "console.h"
|
||||
#include "msg.h"
|
||||
|
||||
/*
|
||||
|
||||
|
|
Loading…
Reference in a new issue