SBARINFO update:

- Reorganized the SBarInfo code.
- Added interpolate(<speed>) flag to drawnumber, drawbar, and drawgem.  The old
  way of interpolating the health and armor is depreciated.
- Added: armortype to drawswitchableimage loosely based on Gez's submission.
- As an extension to the previous you can now use comparison operators on
  inventory items and armortype in drawswitchableimage.


SVN r2069 (trunk)
This commit is contained in:
Christoph Oelckers 2010-01-01 09:11:55 +00:00
commit 3f4f0a8ae4
11 changed files with 4262 additions and 4049 deletions

View file

@ -324,7 +324,7 @@ bool FMugShot::SetState(const char *state_name, bool wait_till_done, bool reset)
//
//===========================================================================
int FMugShot::UpdateState(player_t *player, int stateflags)
int FMugShot::UpdateState(player_t *player, StateFlags stateflags)
{
int i;
angle_t badguyangle;
@ -333,7 +333,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
if (player->health > 0)
{
if (bEvilGrin && !(stateflags & DRAWMUGSHOT_DISABLEGRIN))
if (bEvilGrin && !(stateflags & DISABLEGRIN))
{
if (player->bonuscount)
{
@ -348,7 +348,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
if (player->damagecount &&
// Now go in if pain is disabled but we think ouch will be shown (and ouch is not disabled!)
(!(stateflags & DRAWMUGSHOT_DISABLEPAIN) || (((FaceHealth != -1 && FaceHealth - player->health > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DRAWMUGSHOT_DISABLEOUCH))))
(!(stateflags & DISABLEPAIN) || (((FaceHealth != -1 && FaceHealth - player->health > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DISABLEOUCH))))
{
int damage_angle = 1;
if (player->attacker && player->attacker != player->mo)
@ -380,7 +380,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
}
}
bool use_ouch = false;
if (((FaceHealth != -1 && FaceHealth - player->health > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DRAWMUGSHOT_DISABLEOUCH))
if (((FaceHealth != -1 && FaceHealth - player->health > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DISABLEOUCH))
{
use_ouch = true;
full_state_name = "ouch.";
@ -407,7 +407,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
else
{
bool use_ouch = false;
if (((FaceHealth != -1 && player->health - FaceHealth > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DRAWMUGSHOT_DISABLEOUCH))
if (((FaceHealth != -1 && player->health - FaceHealth > ST_MUCHPAIN) || bOuchActive) && !(stateflags & DISABLEOUCH))
{
use_ouch = true;
full_state_name = "ouch.";
@ -425,7 +425,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
}
}
if (RampageTimer == ST_RAMPAGEDELAY && !(stateflags & DRAWMUGSHOT_DISABLERAMPAGE))
if (RampageTimer == ST_RAMPAGEDELAY && !(stateflags & DISABLERAMPAGE))
{
SetState("rampage", !bNormal); //If we have nothing better to show, use the rampage face.
return 0;
@ -436,7 +436,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
bool good;
if ((player->cheats & CF_GODMODE) || (player->mo != NULL && player->mo->flags2 & MF2_INVULNERABLE))
{
good = SetState((stateflags & DRAWMUGSHOT_ANIMATEDGODMODE) ? "godanimated" : "god");
good = SetState((stateflags & ANIMATEDGODMODE) ? "godanimated" : "god");
}
else
{
@ -450,7 +450,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
}
else
{
if (!(stateflags & DRAWMUGSHOT_XDEATHFACE) || !(player->cheats & CF_EXTREMELYDEAD))
if (!(stateflags & XDEATHFACE) || !(player->cheats & CF_EXTREMELYDEAD))
{
full_state_name = "death.";
}
@ -473,7 +473,7 @@ int FMugShot::UpdateState(player_t *player, int stateflags)
//
//===========================================================================
FTexture *FMugShot::GetFace(player_t *player, const char *default_face, int accuracy, int stateflags)
FTexture *FMugShot::GetFace(player_t *player, const char *default_face, int accuracy, StateFlags stateflags)
{
int angle = UpdateState(player, stateflags);
int level = 0;