whitespace.

This commit is contained in:
Jeff Teunissen 2000-12-28 06:49:26 +00:00
parent c1e0cf7b8e
commit 2fdeaf7aaa
3 changed files with 40 additions and 53 deletions

View file

@ -47,7 +47,7 @@ cvar_t *r_skyname;
cvar_t *pr_boundscheck; cvar_t *pr_boundscheck;
void SV_Error (char *error, ...); void SV_Error (char *error, ...);
void FindEdictFieldOffsets (); void FindEdictFieldOffsets (void);
dprograms_t *progs; dprograms_t *progs;
dfunction_t *pr_functions; dfunction_t *pr_functions;
@ -60,9 +60,16 @@ float *pr_globals; // same as pr_global_struct
int pr_edict_size; // in bytes int pr_edict_size; // in bytes
int pr_edictareasize; // LordHavoc: in bytes int pr_edictareasize; // LordHavoc: in bytes
int type_size[8] = int type_size[8] = {
{ 1, sizeof (void *) / 4, 1, 3, 1, 1, sizeof (void *) / 4, 1,
sizeof (void *) / 4 }; sizeof (void *) / 4,
1,
3,
1,
1,
sizeof (void *) / 4,
sizeof (void *) / 4
};
ddef_t *ED_FieldAtOfs (int ofs); ddef_t *ED_FieldAtOfs (int ofs);
qboolean ED_ParseEpair (void *base, ddef_t *key, char *s); qboolean ED_ParseEpair (void *base, ddef_t *key, char *s);

View file

@ -260,7 +260,7 @@ struct maplist {
}; };
static struct maplist * static struct maplist *
maplist_new () maplist_new (void)
{ {
return calloc (1, sizeof (struct maplist)); return calloc (1, sizeof (struct maplist));
} }
@ -654,18 +654,16 @@ byte *
COM_LoadFile (char *path, int usehunk) COM_LoadFile (char *path, int usehunk)
{ {
QFile *h; QFile *h;
byte *buf; byte *buf = NULL;
char base[32]; char base[32];
int len; int len;
buf = NULL; // quiet compiler warning // look for it in the filesystem or pack files
// look for it in the filesystem or pack files
len = com_filesize = COM_FOpenFile (path, &h); len = com_filesize = COM_FOpenFile (path, &h);
if (!h) if (!h)
return NULL; return NULL;
// extract the filename base name for hunk tag // extract the filename base name for hunk tag
COM_FileBase (path, base); COM_FileBase (path, base);
if (usehunk == 1) if (usehunk == 1)
@ -772,7 +770,7 @@ COM_LoadPackFile (char *packfile)
Qread (packhandle, info, header.dirlen); Qread (packhandle, info, header.dirlen);
// parse the directory // parse the directory
for (i = 0; i < numpackfiles; i++) { for (i = 0; i < numpackfiles; i++) {
strcpy (newfiles[i].name, info[i].name); strcpy (newfiles[i].name, info[i].name);
newfiles[i].filepos = LittleLong (info[i].filepos); newfiles[i].filepos = LittleLong (info[i].filepos);
@ -826,7 +824,6 @@ qstrcmp (char **os1, char **os2)
} }
} }
void void
COM_LoadGameDirectory (char *dir) COM_LoadGameDirectory (char *dir)
{ {
@ -922,18 +919,13 @@ COM_AddDirectory (char *dir)
strcpy (com_gamedir, va ("%s/%s", fs_userpath->string, dir)); strcpy (com_gamedir, va ("%s/%s", fs_userpath->string, dir));
} }
// // add the directory to the search path
// add the directory to the search path
//
search = calloc (1, sizeof (searchpath_t)); search = calloc (1, sizeof (searchpath_t));
strcpy (search->filename, dir); strcpy (search->filename, dir);
search->next = com_searchpaths; search->next = com_searchpaths;
com_searchpaths = search; com_searchpaths = search;
// // add any pak files in the format pak0.pak pak1.pak, ...
// add any pak files in the format pak0.pak pak1.pak, ...
//
COM_LoadGameDirectory (dir); COM_LoadGameDirectory (dir);
} }
@ -1063,9 +1055,7 @@ COM_Filesystem_Init (void)
Cmd_AddCommand ("gamedir", COM_Gamedir_f); Cmd_AddCommand ("gamedir", COM_Gamedir_f);
/* // start up with basegame->string by default
start up with basegame->string by default
*/
COM_CreateGameDirectory (fs_basegame->string); COM_CreateGameDirectory (fs_basegame->string);
// If we're dealing with id1, use qw too // If we're dealing with id1, use qw too

View file

@ -172,9 +172,7 @@ GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
int numt = hdr->mdl.numtris; int numt = hdr->mdl.numtris;
pstverts = (stvert_t *) Hunk_AllocName (numv * sizeof (stvert_t), loadname); pstverts = (stvert_t *) Hunk_AllocName (numv * sizeof (stvert_t), loadname);
ptri = ptri = (mtriangle_t *) Hunk_AllocName (numt * sizeof (mtriangle_t), loadname);
(mtriangle_t *) Hunk_AllocName (numt * sizeof (mtriangle_t), loadname);
hdr->stverts = (byte *) pstverts - (byte *) hdr; hdr->stverts = (byte *) pstverts - (byte *) hdr;
hdr->triangles = (byte *) ptri - (byte *) hdr; hdr->triangles = (byte *) ptri - (byte *) hdr;
@ -209,16 +207,13 @@ Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
strcpy (frame->name, pdaliasframe->name); strcpy (frame->name, pdaliasframe->name);
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) { // byte values, don't worry about endianness
// these are byte values, so we don't have to worry about
// endianness
frame->bboxmin.v[i] = pdaliasframe->bboxmin.v[i]; frame->bboxmin.v[i] = pdaliasframe->bboxmin.v[i];
frame->bboxmax.v[i] = pdaliasframe->bboxmax.v[i]; frame->bboxmax.v[i] = pdaliasframe->bboxmax.v[i];
} }
pinframe = (trivertx_t *) (pdaliasframe + 1); pinframe = (trivertx_t *) (pdaliasframe + 1);
pframe = pframe = Hunk_AllocName (pheader->mdl.numverts * sizeof (*pframe), loadname);
Hunk_AllocName (pheader->mdl.numverts * sizeof (*pframe), loadname);
frame->frame = (byte *) pframe - (byte *) pheader; frame->frame = (byte *) pframe - (byte *) pheader;
@ -258,12 +253,7 @@ Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
numframes = LittleLong (pingroup->numframes); numframes = LittleLong (pingroup->numframes);
paliasgroup = Hunk_AllocName (sizeof (maliasgroup_t) + paliasgroup = Hunk_AllocName (sizeof (maliasgroup_t) + (numframes - 1) * sizeof (paliasgroup->frames[0]), loadname);
(numframes -
1) * sizeof (paliasgroup->frames[0]),
loadname);
paliasgroup->numframes = numframes; paliasgroup->numframes = numframes;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {