mirror of
https://github.com/nzp-team/glquake.git
synced 2025-03-01 06:51:21 +00:00
Fit blood HUD graphic to screen
This commit is contained in:
parent
d268560beb
commit
1ee92c9b34
3 changed files with 36 additions and 5 deletions
|
@ -479,11 +479,7 @@ void HUD_Blood (void)
|
||||||
return;
|
return;
|
||||||
float color = 255.0 + modifier;
|
float color = 255.0 + modifier;
|
||||||
|
|
||||||
Draw_ColorPic(0,0,fx_blood_lu,color,color,color,alpha);
|
Draw_ColoredStretchPic(0, 0, fx_blood_lu, 400, 240, color,color,color,alpha);
|
||||||
//Draw_ColorPic (0, 0, fx_blood_lu, 82, 6, 6, alpha);
|
|
||||||
/*Draw_ColorPic (0, vid.height - fx_blood_ru->height, fx_blood_ld, 82, 6, 6, alpha);
|
|
||||||
Draw_ColorPic (vid.width - fx_blood_ru->width, 0, fx_blood_ru, 82, 6, 6, alpha);
|
|
||||||
Draw_ColorPic (vid.width - fx_blood_ru->width, vid.height - fx_blood_ru->height, fx_blood_rd, 82, 6, 6, alpha);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -28,6 +28,7 @@ void Draw_Character (int x, int y, int num);
|
||||||
void Draw_DebugChar (char num);
|
void Draw_DebugChar (char num);
|
||||||
void Draw_Pic (int x, int y, qpic_t *pic);
|
void Draw_Pic (int x, int y, qpic_t *pic);
|
||||||
void Draw_StretchPic (int x, int y, qpic_t *pic, int x_value, int y_value);
|
void Draw_StretchPic (int x, int y, qpic_t *pic, int x_value, int y_value);
|
||||||
|
void Draw_ColoredStretchPic (int x, int y, qpic_t *pic, int x_value, int y_value, float r, float g , float b, float a);
|
||||||
void Draw_ColorPic (int x, int y, qpic_t *pic, float r, float g , float b, float a);
|
void Draw_ColorPic (int x, int y, qpic_t *pic, float r, float g , float b, float a);
|
||||||
void Draw_TransPic (int x, int y, qpic_t *pic);
|
void Draw_TransPic (int x, int y, qpic_t *pic);
|
||||||
void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation);
|
void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation);
|
||||||
|
|
|
@ -567,6 +567,40 @@ void Draw_Pic (int x, int y, qpic_t *pic)
|
||||||
Draw_ColorPic(x, y, pic, 255, 255, 255, 255);
|
Draw_ColorPic(x, y, pic, 255, 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
=============
|
||||||
|
Draw_ColoredStretchPic
|
||||||
|
=============
|
||||||
|
*/
|
||||||
|
void Draw_ColoredStretchPic (int x, int y, qpic_t *pic, int x_value, int y_value, float r, float g , float b, float a)
|
||||||
|
{
|
||||||
|
glpic_t *gl;
|
||||||
|
|
||||||
|
if (scrap_dirty)
|
||||||
|
Scrap_Upload ();
|
||||||
|
gl = (glpic_t *)pic->data;
|
||||||
|
|
||||||
|
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
glColor4f(r/255.0,g/255.0,b/255.0,a/255.0);
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||||
|
|
||||||
|
GL_Bind (gl->texnum);
|
||||||
|
glBegin (GL_QUADS);
|
||||||
|
glTexCoord2f (0, 0);
|
||||||
|
glVertex2f (x, y);
|
||||||
|
glTexCoord2f (1, 0);
|
||||||
|
glVertex2f (x+x_value, y);
|
||||||
|
glTexCoord2f (1, 1);
|
||||||
|
glVertex2f (x+x_value, y+y_value);
|
||||||
|
glTexCoord2f (0, 1);
|
||||||
|
glVertex2f (x, y+y_value);
|
||||||
|
glEnd ();
|
||||||
|
|
||||||
|
glColor4f(1,1,1,1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
Draw_StretchPic
|
Draw_StretchPic
|
||||||
|
|
Loading…
Reference in a new issue