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,13 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "quakedef.h"
#include "qargs.h"
#include "r_local.h"
#include "console.h"
#include "quakefs.h"
#include "quakedef.h"
#include <stdlib.h>
#define MAX_PARTICLES 2048 // default max # of particles at one
// time
@ -62,7 +67,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,12 +101,13 @@ 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);
@ -116,7 +122,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 +146,7 @@ void R_ReadPointFile_f (void)
VectorCopy (org, p->org);
}
fclose (f);
Qclose (f);
Con_Printf ("%i points read\n", c);
}