Esempio n. 1
0
File: sbar.c Progetto: dommul/super8
/*
===============
Sbar_DrawHealth
===============
*/
void Sbar_DrawHealth (int x, int x2, int y) // default 112, 136, 0
{
    if (sbar.value > 3)
        if (!sb_showscores && !sbar_show_health.value)
            return;
    // face
    Sbar_DrawFace (x, y);
    // health
    Sbar_DrawNum (x2, y, cl.stats[STAT_HEALTH], 3, cl.stats[STAT_HEALTH] <= 25);
}
Esempio n. 2
0
/*
=============
Sbar_DrawNormal
=============
*/
void
Sbar_DrawNormal(void)
{
    if (cl_sbar.value || scr_viewsize.value < 100)
	Sbar_DrawPic(0, 0, sb_sbar);

// armor
    if (cl.stats[STAT_ITEMS] & IT_INVULNERABILITY) {
	Sbar_DrawNum(24, 0, 666, 3, 1);
	Sbar_DrawPic(0, 0, draw_disc);
    } else {
	Sbar_DrawNum(24, 0, cl.stats[STAT_ARMOR], 3,
		     cl.stats[STAT_ARMOR] <= 25);
	if (cl.stats[STAT_ITEMS] & IT_ARMOR3)
	    Sbar_DrawPic(0, 0, sb_armor[2]);
	else if (cl.stats[STAT_ITEMS] & IT_ARMOR2)
	    Sbar_DrawPic(0, 0, sb_armor[1]);
	else if (cl.stats[STAT_ITEMS] & IT_ARMOR1)
	    Sbar_DrawPic(0, 0, sb_armor[0]);
    }

// face
    Sbar_DrawFace();

// health
    Sbar_DrawNum(136, 0, cl.stats[STAT_HEALTH], 3,
		 cl.stats[STAT_HEALTH] <= 25);

// ammo icon
    if (cl.stats[STAT_ITEMS] & IT_SHELLS)
	Sbar_DrawPic(224, 0, sb_ammo[0]);
    else if (cl.stats[STAT_ITEMS] & IT_NAILS)
	Sbar_DrawPic(224, 0, sb_ammo[1]);
    else if (cl.stats[STAT_ITEMS] & IT_ROCKETS)
	Sbar_DrawPic(224, 0, sb_ammo[2]);
    else if (cl.stats[STAT_ITEMS] & IT_CELLS)
	Sbar_DrawPic(224, 0, sb_ammo[3]);

    Sbar_DrawNum(248, 0, cl.stats[STAT_AMMO], 3, cl.stats[STAT_AMMO] <= 10);
}
Esempio n. 3
0
File: sbar.c Progetto: dommul/super8
/*
===============
Sbar_DrawArmor
===============
*/
void Sbar_DrawArmor (int x, int x2, int y) // default 0, 24, 0
{
    int i = 0;
    if (sbar.value > 3)
        if (!sb_showscores && !sbar_show_armor.value)
            return;
    if (cl.items & IT_INVULNERABILITY)
    {
        Sbar_DrawTransPic (x, y, draw_disc);
        Sbar_DrawNum (x2, y, 666, 3, 1);
    }
    else
    {
        if (rogue)
        {
            if (cl.items & RIT_ARMOR3)
                Sbar_DrawTransPic (x, y, sb_armor[2]);
            else if (cl.items & RIT_ARMOR2)
                Sbar_DrawTransPic (x, y, sb_armor[1]);
            else if (cl.items & RIT_ARMOR1)
                Sbar_DrawTransPic (x, y, sb_armor[0]);
            else
                i = 1;
        }
        else
        {
            if (cl.items & IT_ARMOR3)
                Sbar_DrawTransPic (x, y, sb_armor[2]);
            else if (cl.items & IT_ARMOR2)
                Sbar_DrawTransPic (x, y, sb_armor[1]);
            else if (cl.items & IT_ARMOR1)
                Sbar_DrawTransPic (x, y, sb_armor[0]);
            else
                i = 1;
        }
        if (!i || sbar.value < 4 || cl.stats[STAT_ARMOR])
            Sbar_DrawNum (x2, y, cl.stats[STAT_ARMOR], 3, cl.stats[STAT_ARMOR] <= 25);
    }
}
Esempio n. 4
0
File: sbar.c Progetto: dommul/super8
/*
===============
Sbar_DrawAmmo
===============
*/
void Sbar_DrawAmmo (int x, int x2, int y) // default 224, 248, 0
{
    int i = 0;
    if (sbar.value > 3)
        if (!sb_showscores && !sbar_show_ammo.value)
            return;
    if (rogue)
    {
        if (cl.items & RIT_SHELLS)
            Sbar_DrawTransPic (x, y, sb_ammo[0]);
        else if (cl.items & RIT_NAILS)
            Sbar_DrawTransPic (x, y, sb_ammo[1]);
        else if (cl.items & RIT_ROCKETS)
            Sbar_DrawTransPic (x, y, sb_ammo[2]);
        else if (cl.items & RIT_CELLS)
            Sbar_DrawTransPic (x, y, sb_ammo[3]);
        else if (cl.items & RIT_LAVA_NAILS)
            Sbar_DrawTransPic (x, y, rsb_ammo[0]);
        else if (cl.items & RIT_PLASMA_AMMO)
            Sbar_DrawTransPic (x, y, rsb_ammo[1]);
        else if (cl.items & RIT_MULTI_ROCKETS)
            Sbar_DrawTransPic (x, y, rsb_ammo[2]);
        else
            i = 1;
    }
    else
    {
        if (cl.items & IT_SHELLS)
            Sbar_DrawTransPic (x, y, sb_ammo[0]);
        else if (cl.items & IT_NAILS)
            Sbar_DrawTransPic (x, y, sb_ammo[1]);
        else if (cl.items & IT_ROCKETS)
            Sbar_DrawTransPic (x, y, sb_ammo[2]);
        else if (cl.items & IT_CELLS)
            Sbar_DrawTransPic (x, y, sb_ammo[3]);
        else
            i = 1;
    }
    if (!i || sbar.value < 4 || cl.stats[STAT_AMMO])
        Sbar_DrawNum (x2, y, cl.stats[STAT_AMMO], 3, cl.stats[STAT_AMMO] <= 10);
}