]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
video modes in menu now also set vid_pixelheight and vid_conwidth/vid_conheight
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index 618df89bf87e48586b9a73de9be30f32e25a8907..4e09cbc4da6ae69e6f3a65db77abca89c622878e 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -147,7 +147,10 @@ void sbar_start(void)
 
        numsbarpics = 0;
 
-       if (gamemode == GAME_SOM)
+       if (gamemode == GAME_NETHERWORLD)
+       {
+       }
+       else if (gamemode == GAME_SOM)
        {
                sb_disc = Sbar_NewPic("gfx/disc");
 
@@ -724,7 +727,7 @@ void Sbar_DrawFrags (void)
        int i, k, l, x, f;
        char num[12];
        scoreboard_t *s;
-       qbyte *c;
+       unsigned char *c;
 
        Sbar_SortFrags ();
 
@@ -739,9 +742,9 @@ void Sbar_DrawFrags (void)
                s = &cl.scores[k];
 
                // draw background
-               c = (qbyte *)&palette_complete[(s->colors & 0xf0) + 8];
+               c = (unsigned char *)&palette_complete[(s->colors & 0xf0) + 8];
                DrawQ_Fill (sbar_x + x + 10, sbar_y     - 23, 28, 4, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f) * sbar_alpha_fg.value, 0);
-               c = (qbyte *)&palette_complete[((s->colors & 15)<<4) + 8];
+               c = (unsigned char *)&palette_complete[((s->colors & 15)<<4) + 8];
                DrawQ_Fill (sbar_x + x + 10, sbar_y + 4 - 23, 28, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f) * sbar_alpha_fg.value, 0);
 
                // draw number
@@ -778,14 +781,14 @@ void Sbar_DrawFace (void)
        {
                char num[12];
                scoreboard_t *s;
-               qbyte *c;
+               unsigned char *c;
 
                s = &cl.scores[cl.viewentity - 1];
                // draw background
                Sbar_DrawPic (112, 0, rsb_teambord);
-               c = (qbyte *)&palette_complete[(s->colors & 0xf0) + 8];
+               c = (unsigned char *)&palette_complete[(s->colors & 0xf0) + 8];
                DrawQ_Fill (sbar_x + 113, vid_conheight.integer-SBAR_HEIGHT+3, 22, 9, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f) * sbar_alpha_fg.value, 0);
-               c = (qbyte *)&palette_complete[((s->colors & 15)<<4) + 8];
+               c = (unsigned char *)&palette_complete[((s->colors & 15)<<4) + 8];
                DrawQ_Fill (sbar_x + 113, vid_conheight.integer-SBAR_HEIGHT+12, 22, 9, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f) * sbar_alpha_fg.value, 0);
 
                // draw number
@@ -967,7 +970,10 @@ void Sbar_Draw (void)
                return;
        }
 
-       if (gamemode == GAME_SOM)
+       if (gamemode == GAME_NETHERWORLD)
+       {
+       }
+       else if (gamemode == GAME_SOM)
        {
                if (sb_showscores || (cl.stats[STAT_HEALTH] <= 0 && cl_deathscoreboard.integer))
                        Sbar_DrawScoreboard ();
@@ -1106,8 +1112,6 @@ void Sbar_Draw (void)
                // left1 16, 48 : 126 -66
                // left2 16, 128 : 196 -66
                // right 176, 48 : 196 -136
-               if (cl.stats[STAT_AMMO] > 200)
-                       Con_Printf("cl.stats[STAT_AMMO] == %i\n", cl.stats[STAT_AMMO]);
                Sbar_DrawGauge(sbar_x +  16 * scale, sbar_y +  48 * scale, zymsb_crosshair_left1->name, 64*scale,  80*scale, 78*scale,  -66*scale, cl.stats[STAT_AMMO]  * (1.0 / 200.0), cl.stats[STAT_SHELLS]  * (1.0 / 200.0), 0.8f,0.8f,0.0f,1.0f, 0.8f,0.5f,0.0f,1.0f, 0.3f,0.3f,0.3f,1.0f, DRAWFLAG_NORMAL);
                Sbar_DrawGauge(sbar_x +  16 * scale, sbar_y + 128 * scale, zymsb_crosshair_left2->name, 64*scale,  80*scale, 68*scale,  -66*scale, cl.stats[STAT_NAILS] * (1.0 / 200.0), cl.stats[STAT_ROCKETS] * (1.0 / 200.0), 0.8f,0.8f,0.0f,1.0f, 0.8f,0.5f,0.0f,1.0f, 0.3f,0.3f,0.3f,1.0f, DRAWFLAG_NORMAL);
                Sbar_DrawGauge(sbar_x + 176 * scale, sbar_y +  48 * scale, zymsb_crosshair_right->name, 64*scale, 160*scale, 148*scale, -136*scale, cl.stats[STAT_ARMOR]  * (1.0 / 300.0), cl.stats[STAT_HEALTH]  * (1.0 / 300.0), 0.0f,0.5f,1.0f,1.0f, 1.0f,0.0f,0.0f,1.0f, 0.3f,0.3f,0.3f,1.0f, DRAWFLAG_NORMAL);
@@ -1291,11 +1295,11 @@ Sbar_DeathmatchOverlay
 */
 float Sbar_PrintScoreboardItem(scoreboard_t *s, float x, float y)
 {
-       qbyte *c;
+       unsigned char *c;
        // draw colors behind score
-       c = (qbyte *)&palette_complete[(s->colors & 0xf0) + 8];
+       c = (unsigned char *)&palette_complete[(s->colors & 0xf0) + 8];
        DrawQ_Fill(x + 8, y+1, 32, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f) * sbar_alpha_fg.value, 0);
-       c = (qbyte *)&palette_complete[((s->colors & 15)<<4) + 8];
+       c = (unsigned char *)&palette_complete[((s->colors & 15)<<4) + 8];
        DrawQ_Fill(x + 8, y+4, 32, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f) * sbar_alpha_fg.value, 0);
        // print the text
        //DrawQ_String(x, y, va("%c%4i %s", (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', (int) s->frags, s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0);