port in some improvements from OT (namely fs_basepath, etc, though commandline parsing isn't finished yet)

split up the headerfiles and such. common.[ch] and qwsvdef.h no longer exist. More work still needs to be done (esp for windows) but this should be a major improvement.
This commit is contained in:
Bill Currie 2000-05-21 08:24:45 +00:00
parent e471c785d8
commit af032b8d55
121 changed files with 1055 additions and 3086 deletions

View file

@ -29,8 +29,32 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "quakedef.h"
#include "qargs.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "d_iface.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "menu.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
#include "quakefs.h"
#include "quakedef.h"
#include <stdlib.h>
#define MAX_PARTICLES 2048 // default max # of particles at one
// time
@ -62,7 +86,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;
}
@ -96,13 +120,14 @@ void R_ClearParticles (void)
void R_ReadPointFile_f (void)
{
FILE *f;
QFile *f;
vec3_t org;
int r;
int c;
particle_t *p;
char name[MAX_OSPATH];
char buf[256];
// FIXME sprintf (name,"maps/%s.pts", sv.name);
COM_FOpenFile (name, &f);
@ -116,7 +141,9 @@ void R_ReadPointFile_f (void)
c = 0;
for ( ;; )
{
r = fscanf (f,"%f %f %f\n", &org[0], &org[1], &org[2]);
if (!Qgets(f,buf,sizeof(buf)))
break;
r = sscanf (buf,"%f %f %f\n", &org[0], &org[1], &org[2]);
if (r != 3)
break;
c++;
@ -138,7 +165,7 @@ void R_ReadPointFile_f (void)
VectorCopy (org, p->org);
}
fclose (f);
Qclose (f);
Con_Printf ("%i points read\n", c);
}