]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
added support for GL_ARB_texture_env_combine, currently only used on wall rendering...
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index d429f69867f76894f171f2481d9caf409044412b..73e51ca788f97bc38aabc63d90dff25820c0c88e 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -260,19 +260,6 @@ void Sbar_DrawAlphaPic (int x, int y, qpic_t *pic, float alpha)
                Draw_AlphaPic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic, alpha);
 }
 
-/*
-=============
-Sbar_DrawTransPic
-=============
-*/
-void Sbar_DrawTransPic (int x, int y, qpic_t *pic)
-{
-       if (cl.gametype == GAME_DEATHMATCH)
-               Draw_TransPic (x /*+ ((vid.width - 320)>>1)*/, y + (vid.height-SBAR_HEIGHT), pic);
-       else
-               Draw_TransPic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
-}
-
 /*
 ================
 Sbar_DrawCharacter
@@ -362,7 +349,7 @@ void Sbar_DrawNum (int x, int y, int num, int digits, int color)
                else
                        frame = *ptr -'0';
 
-               Sbar_DrawTransPic (x,y,sb_nums[color][frame]);
+               Sbar_DrawPic (x,y,sb_nums[color][frame]);
                x += 24;
                ptr++;
        }
@@ -796,6 +783,9 @@ void Sbar_DrawFace (void)
                f = 4;
        else
                f = cl.stats[STAT_HEALTH] / 20;
+       // LordHavoc: I don't even know how the game didn't crash without this
+       if (f < 0)
+               f = 0;
 
        if (cl.time <= cl.faceanimtime)
        {
@@ -817,8 +807,6 @@ void Sbar_Draw (void)
        if (scr_con_current == vid.height)
                return;         // console is full screen
 
-       scr_copyeverything = 1;
-
 //     sb_updates++;
 
        if (sb_lines > 24)
@@ -954,7 +942,7 @@ void Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
                else
                        frame = *ptr -'0';
 
-               Draw_TransPic (x,y,sb_nums[color][frame]);
+               Draw_Pic (x,y,sb_nums[color][frame]);
                x += 24;
                ptr++;
        }
@@ -973,9 +961,6 @@ void Sbar_DeathmatchOverlay (void)
        char                    num[128];
        scoreboard_t    *s;
 
-       scr_copyeverything = 1;
-       scr_fullupdate = 0;
-
        pic = Draw_CachePic ("gfx/ranking.lmp");
        M_DrawPic ((320-pic->width)/2, 8, pic);
 
@@ -1034,9 +1019,6 @@ void Sbar_MiniDeathmatchOverlay (void)
        if (vid.width < 512 || !sb_lines)
                return;
 
-       scr_copyeverything = 1;
-       scr_fullupdate = 0;
-
 // scores
        Sbar_SortFrags ();
 
@@ -1101,9 +1083,6 @@ void Sbar_IntermissionOverlay (void)
        int             dig;
        int             num;
 
-       scr_copyeverything = 1;
-       scr_fullupdate = 0;
-
        if (cl.gametype == GAME_DEATHMATCH)
        {
                Sbar_DeathmatchOverlay ();
@@ -1114,22 +1093,22 @@ void Sbar_IntermissionOverlay (void)
        Draw_Pic (64, 24, pic);
 
        pic = Draw_CachePic ("gfx/inter.lmp");
-       Draw_TransPic (0, 56, pic);
+       Draw_Pic (0, 56, pic);
 
 // time
        dig = cl.completed_time/60;
        Sbar_IntermissionNumber (160, 64, dig, 3, 0);
        num = cl.completed_time - dig*60;
-       Draw_TransPic (234,64,sb_colon);
-       Draw_TransPic (246,64,sb_nums[0][num/10]);
-       Draw_TransPic (266,64,sb_nums[0][num%10]);
+       Draw_Pic (234,64,sb_colon);
+       Draw_Pic (246,64,sb_nums[0][num/10]);
+       Draw_Pic (266,64,sb_nums[0][num%10]);
 
        Sbar_IntermissionNumber (160, 104, cl.stats[STAT_SECRETS], 3, 0);
-       Draw_TransPic (232,104,sb_slash);
+       Draw_Pic (232,104,sb_slash);
        Sbar_IntermissionNumber (240, 104, cl.stats[STAT_TOTALSECRETS], 3, 0);
 
        Sbar_IntermissionNumber (160, 144, cl.stats[STAT_MONSTERS], 3, 0);
-       Draw_TransPic (232,144,sb_slash);
+       Draw_Pic (232,144,sb_slash);
        Sbar_IntermissionNumber (240, 144, cl.stats[STAT_TOTALMONSTERS], 3, 0);
 
 }
@@ -1145,8 +1124,6 @@ void Sbar_FinaleOverlay (void)
 {
        qpic_t  *pic;
 
-       scr_copyeverything = 1;
-
        pic = Draw_CachePic ("gfx/finale.lmp");
-       Draw_TransPic ( (vid.width-pic->width)/2, 16, pic);
+       Draw_Pic ( (vid.width-pic->width)/2, 16, pic);
 }