Add QSG2 colormod, alpha, and scale for sprites. Probably not used by anything, but there you go.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2002-06-05 05:56:13 +00:00
parent 32215b1296
commit 0bce2d0f2e

View file

@ -83,10 +83,10 @@ R_GetSpriteFrame (entity_t *currententity)
return pspriteframe;
}
// FIXME: add modelalpha support?
void
R_DrawSpriteModel (entity_t *e)
{
float color[4];
float *up, *right;
msprite_t *psprite;
mspriteframe_t *frame;
@ -110,11 +110,17 @@ R_DrawSpriteModel (entity_t *e)
up = vup;
right = vright;
}
VectorScale (up, e->scale, up);
VectorScale (right, e->scale, right);
qfglBindTexture (GL_TEXTURE_2D, frame->gl_texturenum);
qfglBegin (GL_QUADS);
VectorCopy (e->colormod, color);
color[3] = e->alpha;
qfglColor4fv (color);
qfglTexCoord2f (0, 1);
VectorMA (e->origin, frame->down, up, point);
VectorMA (point, frame->left, right, point);