- glEnd ();
-
- // LordHavoc: revert to LINEAR mode
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-}
-
-void Draw_GenericPic (int texnum, float red, float green, float blue, float alpha, int x, int y, int width, int height)
-{
- if (!r_render.value)
- return;
- glColor4f(red,green,blue,alpha);
- glBindTexture(GL_TEXTURE_2D, texnum);
- glBegin (GL_QUADS);
- glTexCoord2f (0, 0);glVertex2f (x, y);
- glTexCoord2f (1, 0);glVertex2f (x+width, y);
- glTexCoord2f (1, 1);glVertex2f (x+width, y+height);
- glTexCoord2f (0, 1);glVertex2f (x, y+height);
- glEnd ();
-}
-
-/*
-=============
-Draw_AlphaPic
-=============
-*/
-void Draw_AlphaPic (int x, int y, qpic_t *pic, float alpha)
-{
- glpic_t *gl;
-
- if (scrap_dirty)
- Scrap_Upload ();
- gl = (glpic_t *)pic->data;
- if (!r_render.value)
- return;
- glColor4f(1,1,1,alpha);
- glBindTexture(GL_TEXTURE_2D, gl->texnum);
- glBegin (GL_QUADS);
- glTexCoord2f (gl->sl, gl->tl);glVertex2f (x, y);
- glTexCoord2f (gl->sh, gl->tl);glVertex2f (x+pic->width, y);
- glTexCoord2f (gl->sh, gl->th);glVertex2f (x+pic->width, y+pic->height);
- glTexCoord2f (gl->sl, gl->th);glVertex2f (x, y+pic->height);
- glEnd ();
-}
-
-
-/*
-=============
-Draw_Pic
-=============
-*/
-void Draw_Pic (int x, int y, qpic_t *pic)
-{
- glpic_t *gl;
-
- if (scrap_dirty)
- Scrap_Upload ();
- gl = (glpic_t *)pic->data;
- if (!r_render.value)
- return;
- glColor3f(1,1,1);
- glBindTexture(GL_TEXTURE_2D, gl->texnum);
- glBegin (GL_QUADS);
- glTexCoord2f (gl->sl, gl->tl);glVertex2f (x, y);
- glTexCoord2f (gl->sh, gl->tl);glVertex2f (x+pic->width, y);
- glTexCoord2f (gl->sh, gl->th);glVertex2f (x+pic->width, y+pic->height);
- glTexCoord2f (gl->sl, gl->th);glVertex2f (x, y+pic->height);
- glEnd ();
-}
-
-
-/*
-=============
-Draw_PicTranslate
-
-Only used for the player color selection menu
-=============
-*/
-void Draw_PicTranslate (int x, int y, qpic_t *pic, byte *translation)
-{
- int i, c;
- byte *trans, *src, *dest;
-
- c = pic->width * pic->height;
- src = menuplyr_pixels;
- dest = trans = malloc(c);
- for (i = 0;i < c;i++)
- *dest++ = translation[*src++];
-
- c = GL_LoadTexture ("translatedplayerpic", pic->width, pic->height, trans, false, true, 1);
- free(trans);
-
- if (!r_render.value)
- return;
- Draw_GenericPic (c, 1,1,1,1, x, y, pic->width, pic->height);
- /*
- glBindTexture(GL_TEXTURE_2D, c);
- glColor3f(1,1,1);
- glBegin (GL_QUADS);
- glTexCoord2f (0, 0);glVertex2f (x, y);
- glTexCoord2f (1, 0);glVertex2f (x+pic->width, y);
- glTexCoord2f (1, 1);glVertex2f (x+pic->width, y+pic->height);
- glTexCoord2f (0, 1);glVertex2f (x, y+pic->height);
- glEnd ();