From 33c00bf0db0690a65a417a0bd7493b6211c60b48 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 5 Sep 2022 23:56:40 +0300 Subject: [PATCH] minor whitespace/style tidy-up. --- Quake/gl_refrag.c | 19 +++++++++---------- Quake/progs.h | 2 +- Quake/protocol.h | 3 +-- Quake/view.c | 6 +++--- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Quake/gl_refrag.c b/Quake/gl_refrag.c index 21158d39..25a2783f 100644 --- a/Quake/gl_refrag.c +++ b/Quake/gl_refrag.c @@ -59,28 +59,27 @@ static efrag_t *R_GetEfrag (void) // we could just Hunk_Alloc a single efrag_t and return it, but since // the struct is so small (2 pointers) allocate groups of them // to avoid wasting too much space on the hunk allocation headers. - if (cl.free_efrags) { efrag_t *ef = cl.free_efrags; cl.free_efrags = ef->leafnext; ef->leafnext = NULL; - + cl.num_efrags++; - + return ef; } else { int i; - + cl.free_efrags = (efrag_t *) Hunk_AllocName (EXTRA_EFRAGS * sizeof (efrag_t), "efrags"); - + for (i = 0; i < EXTRA_EFRAGS - 1; i++) cl.free_efrags[i].leafnext = &cl.free_efrags[i + 1]; - + cl.free_efrags[i].leafnext = NULL; - + // call recursively to get a newly allocated free efrag return R_GetEfrag (); } @@ -112,11 +111,11 @@ void R_SplitEntityOnNode (mnode_t *node) leaf = (mleaf_t *)node; -// grab an efrag off the free list + // grab an efrag off the free list ef = R_GetEfrag(); ef->entity = r_addent; -// set the leaf links + // set the leaf links ef->leafnext = leaf->efrags; leaf->efrags = ef; @@ -169,7 +168,7 @@ R_AddEfrags void R_AddEfrags (entity_t *ent) { qmodel_t *entmodel; - vec_t scalefactor; + vec_t scalefactor; if (!ent->model) return; diff --git a/Quake/progs.h b/Quake/progs.h index ea8b0a55..a4805d7a 100644 --- a/Quake/progs.h +++ b/Quake/progs.h @@ -47,7 +47,7 @@ typedef struct edict_s entity_state_t baseline; unsigned char alpha; /* johnfitz -- hack to support alpha since it's not part of entvars_t */ - unsigned char scale; + unsigned char scale; /* Quakespasm: added for model scale support. */ qboolean sendinterval; /* johnfitz -- send time until nextthink to client for better lerp timing */ float freetime; /* sv.time when the object was freed */ diff --git a/Quake/protocol.h b/Quake/protocol.h index d645ab45..a155eee6 100644 --- a/Quake/protocol.h +++ b/Quake/protocol.h @@ -262,7 +262,7 @@ typedef struct unsigned char colormap; //johnfitz -- was int unsigned char skin; //johnfitz -- was int unsigned char alpha; //johnfitz -- added - unsigned char scale; + unsigned char scale; //Quakespasm: for model scale support. int effects; } entity_state_t; @@ -277,4 +277,3 @@ typedef struct } usercmd_t; #endif /* _QUAKE_PROTOCOL_H */ - diff --git a/Quake/view.c b/Quake/view.c index 795c2460..a9bc2fbd 100644 --- a/Quake/view.c +++ b/Quake/view.c @@ -542,10 +542,10 @@ void V_PolyBlend (void) glEnable (GL_BLEND); glMatrixMode(GL_PROJECTION); - glLoadIdentity (); + glLoadIdentity (); glOrtho (0, 1, 1, 0, -99999, 99999); glMatrixMode(GL_MODELVIEW); - glLoadIdentity (); + glLoadIdentity (); glColor4fv (v_blend); @@ -962,7 +962,7 @@ void V_Init (void) Cvar_RegisterVariable (&v_kickroll); Cvar_RegisterVariable (&v_kickpitch); Cvar_RegisterVariable (&v_gunkick); //johnfitz - + Cvar_RegisterVariable (&r_viewmodel_quake); //MarkV }