Drop shadows on Alt HUD for consistency.
This commit is contained in:
parent
958a32c28e
commit
d8d3fa8ba2
142 changed files with 174 additions and 158 deletions
|
|
@ -237,7 +237,7 @@ extend Class SWWMStatusBar
|
|||
AltAmmoTex[0] = TexMan.CheckForTexture("graphics/AltHUD/AmmoBoxT.png",TexMan.Type_Any);
|
||||
AltAmmoTex[1] = TexMan.CheckForTexture("graphics/AltHUD/AmmoBoxM.png",TexMan.Type_Any);
|
||||
AltAmmoTex[2] = TexMan.CheckForTexture("graphics/AltHUD/AmmoBoxB.png",TexMan.Type_Any);
|
||||
MiniHudFont = Font.GetFont("MiniHUD");
|
||||
MiniHudFont = Font.GetFont("MiniHUDShadow");
|
||||
MiniHudFontOutline = Font.GetFont("MiniHUDOutline");
|
||||
mhudfontcol[MCR_DEMOHUD] = Font.FindFontColor("MiniDemoHUD");
|
||||
mhudfontcol[MCR_IBUKIHUD] = Font.FindFontColor("MiniIbukiHUD");
|
||||
|
|
@ -478,18 +478,18 @@ extend Class SWWMStatusBar
|
|||
|
||||
void Alt_DrawWeapons()
|
||||
{
|
||||
if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeaponAlt(FracTic,ss.x-(margin+55),ss.y-(margin+11),hs,ss);
|
||||
if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeaponAlt(FracTic,ss.x-(margin+56),ss.y-(margin+12),hs,ss);
|
||||
else
|
||||
{
|
||||
// generic display
|
||||
double xx = ss.x-(margin+57), yy = ss.y-(margin+11);
|
||||
double xx = ss.x-(margin+58), yy = ss.y-(margin+22);
|
||||
String str;
|
||||
int len;
|
||||
if ( CPlayer.ReadyWeapon.Ammo2 && (CPlayer.ReadyWeapon.Ammo2 != CPlayer.ReadyWeapon.Ammo1) )
|
||||
{
|
||||
str = String.Format("%d",CPlayer.ReadyWeapon.Ammo2.Amount);
|
||||
len = str.Length();
|
||||
yy -= 11;
|
||||
yy -= 12;
|
||||
Screen.DrawTexture(AltGenericAmmoTex[2],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<len; i++ )
|
||||
{
|
||||
|
|
@ -498,9 +498,9 @@ extend Class SWWMStatusBar
|
|||
}
|
||||
Screen.DrawTexture(AltGenericAmmoTex[0],false,xx-2,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo2.Amount<=0)?MCR_RED:MCR_BRASS],xx,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 11;
|
||||
yy += 12;
|
||||
}
|
||||
xx = ss.x-(margin+57);
|
||||
xx = ss.x-(margin+58);
|
||||
if ( CPlayer.ReadyWeapon.Ammo1 )
|
||||
{
|
||||
str = String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount);
|
||||
|
|
@ -515,9 +515,9 @@ extend Class SWWMStatusBar
|
|||
Screen.DrawText(MiniHUDFont,mhudfontcol[(CPlayer.ReadyWeapon.Ammo1.Amount<=0)?MCR_RED:MCR_BRASS],xx,yy+2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
Screen.DrawTexture(AltWeaponTex,false,ss.x-(margin+70),ss.y-(margin+9),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double xx = ss.x-(margin+68), yy = ss.y-(margin+7);
|
||||
for ( int i=1; i<=10; i++,xx+=7 )
|
||||
Screen.DrawTexture(AltWeaponTex,false,ss.x-(margin+80),ss.y-(margin+10),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double xx = ss.x-(margin+78), yy = ss.y-(margin+8);
|
||||
for ( int i=1; i<=10; i++,xx+=8 )
|
||||
{
|
||||
int ncolor = mhudfontcol[MCR_WHITE];
|
||||
if ( !CPlayer.HasWeaponsInSlot(i%10) )
|
||||
|
|
@ -580,8 +580,8 @@ extend Class SWWMStatusBar
|
|||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],xx,yy,String.Format("%d",(i%10)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
}
|
||||
}
|
||||
xx = ss.x-(margin+53);
|
||||
yy = ss.y-(margin+12);
|
||||
xx = ss.x-(margin+54);
|
||||
yy = ss.y-(margin+14);
|
||||
Screen.DrawTexture(AltAmmoTex[2],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
String str;
|
||||
for ( int i=25; i>=0; i-- )
|
||||
|
|
@ -667,17 +667,17 @@ extend Class SWWMStatusBar
|
|||
Screen.DrawTexture(AltAmmoTex[0],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
// score
|
||||
String sstr = String.Format("%09d",ScoreInter.GetValue());
|
||||
xx = ss.x-(margin+46);
|
||||
yy -= 11;
|
||||
xx = ss.x-(margin+48);
|
||||
yy -= 12;
|
||||
Screen.DrawTexture(AltScoreTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx += 9;
|
||||
xx += 10;
|
||||
yy += 2;
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_BRASS],xx,yy,sstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
|
||||
void Alt_DrawStatus()
|
||||
{
|
||||
Screen.DrawTexture(AltStatusTex,false,margin,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltStatusTex,false,margin,ss.y-(margin+22),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
String str;
|
||||
double ht = clamp(AltHealthInter.GetValue(fractic),0,10000);
|
||||
str = String.Format("%3d",clamp(round(ht),0,999));
|
||||
|
|
@ -689,32 +689,34 @@ extend Class SWWMStatusBar
|
|||
else if ( round(ht) > 100 ) hcolor = MCR_CYAN;
|
||||
if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") )
|
||||
{
|
||||
Screen.DrawTexture(AltHealthTex[4],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
Screen.DrawTexture(AltHealthTex[0],false,margin+3,ss.y-(margin+19),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltHealthTex[4],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
hcolor = MCR_WHITE;
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen.DrawTexture(AltHealthTex[0],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
Screen.DrawTexture(AltHealthTex[0],false,margin+3,ss.y-(margin+19),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltHealthTex[0],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
if ( ht > 100 )
|
||||
{
|
||||
hw = min(ht-100,100);
|
||||
Screen.DrawTexture(AltHealthTex[1],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
Screen.DrawTexture(AltHealthTex[1],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
}
|
||||
if ( ht > 200 )
|
||||
{
|
||||
hw = min(ht-200,300)/3.;
|
||||
Screen.DrawTexture(AltHealthTex[2],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
Screen.DrawTexture(AltHealthTex[2],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
}
|
||||
if ( ht > 500 )
|
||||
{
|
||||
hw = min(ht-500,500)/5.;
|
||||
Screen.DrawTexture(AltHealthTex[3],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
Screen.DrawTexture(AltHealthTex[3],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
|
||||
}
|
||||
}
|
||||
if ( CPlayer.mo.FindInventory("DivineSpriteEffect") )
|
||||
{
|
||||
double falph = clamp((ht-1000)/6000.,0.,1.);
|
||||
Screen.DrawTexture(AltHealthTex[5],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
Screen.DrawTexture(AltHealthTex[5],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
String tst;
|
||||
double alph = .1;
|
||||
int trl = 9;
|
||||
|
|
@ -723,98 +725,41 @@ extend Class SWWMStatusBar
|
|||
tst = "AAA";
|
||||
SWWMUtility.ObscureText(tst,(gametic-trl)/3,true);
|
||||
trl--;
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_WHITE],margin+106,ss.y-(margin+18),tst,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph*alph,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_WHITE],margin+107,ss.y-(margin+20),tst,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph*alph,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
}
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[hcolor],margin+106,ss.y-(margin+18),String.Format("%3d",clamp(round(ht),0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,1.-falph);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[hcolor],margin+107,ss.y-(margin+20),String.Format("%3d",clamp(round(ht),0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,1.-falph);
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[hcolor],margin+106,ss.y-(margin+18),String.Format("%3d",clamp(round(ht),0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[hcolor],margin+107,ss.y-(margin+20),String.Format("%3d",clamp(round(ht),0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int f = HealthFlash;
|
||||
if ( f && (gametic < f) )
|
||||
{
|
||||
double alph = max((f-(gametic+FracTic))/25.,0.)**1.5;
|
||||
Screen.DrawTexture(AltHealthTex[7],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,bhw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],margin+106,ss.y-(margin+18),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(AltHealthTex[7],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,bhw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],margin+107,ss.y-(margin+20),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
|
||||
}
|
||||
if ( (CPlayer.health > 0) && (CPlayer.health <= 25) && (PulsePhase <= 15) )
|
||||
{
|
||||
double alph = clamp(sin((PulsePhase-FracTic)*12.),0.,1.);
|
||||
Screen.DrawTexture(AltHealthTex[6],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_REDFLASH],margin+106,ss.y-(margin+18),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(AltHealthTex[6],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph);
|
||||
Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_REDFLASH],margin+107,ss.y-(margin+20),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
}
|
||||
ht = clamp(LagHealthInter.GetValue(fractic),0,1000);
|
||||
double hwl = min(ht,100);
|
||||
if ( hwl > bhw )
|
||||
Screen.DrawTexture(AltHealthTex[8],false,margin+2,ss.y-(margin+18),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,bhw,DTA_WindowRightF,hwl);
|
||||
{
|
||||
Screen.DrawTexture(AltHealthTex[8],false,margin+3,ss.y-(margin+19),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,bhw,DTA_WindowRightF,hwl,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltHealthTex[8],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,bhw,DTA_WindowRightF,hwl);
|
||||
}
|
||||
}
|
||||
double ft = clamp(AltFuelInter.GetValue(fractic),0,120);
|
||||
Screen.DrawTexture(AltFuelTex[swwm_superfuel],false,margin+2,ss.y-(margin+7),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,ft);
|
||||
Screen.DrawTexture(AltFuelTex[swwm_superfuel],false,margin+3,ss.y-(margin+7),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,ft,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltFuelTex[swwm_superfuel],false,margin+2,ss.y-(margin+8),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,ft);
|
||||
let d = Demolitionist(CPlayer.mo);
|
||||
bool blink = (!d || (d.dashfuel > 20) || ((gametic%10) < 5));
|
||||
double dt = clamp(AltDashInter.GetValue(fractic),0,120);
|
||||
Screen.DrawTexture(AltDashTex,false,margin+2,ss.y-(margin+4),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,dt,DTA_ColorOverlay,Color(blink?0:96,0,0,0));
|
||||
}
|
||||
}
|
||||
|
||||
// fractic-compatible interpolators, with double value
|
||||
Class SmoothLinearValueInterpolator
|
||||
{
|
||||
private double val, oldval, diff;
|
||||
|
||||
static SmoothLinearValueInterpolator Create( double val, double diff )
|
||||
{
|
||||
let v = new("SmoothLinearValueInterpolator");
|
||||
v.oldval = v.val = val;
|
||||
v.diff = diff;
|
||||
return v;
|
||||
}
|
||||
void Reset( double newval )
|
||||
{
|
||||
oldval = val = newval;
|
||||
}
|
||||
void Update( double newval )
|
||||
{
|
||||
oldval = val;
|
||||
if ( abs(newval-val) < diff ) val = newval;
|
||||
else if ( val > newval ) val = max(newval,val-diff);
|
||||
else val = min(newval,val+diff);
|
||||
}
|
||||
double GetValue( double fractic = 1. )
|
||||
{
|
||||
return SWWMUtility.Lerp(oldval,val,fractic);
|
||||
}
|
||||
}
|
||||
Class SmoothDynamicValueInterpolator
|
||||
{
|
||||
private double val, oldval, factor, mindiff, maxdiff;
|
||||
|
||||
static SmoothDynamicValueInterpolator Create( double val, double factor, double mindiff, double maxdiff )
|
||||
{
|
||||
let v = new("SmoothDynamicValueInterpolator");
|
||||
v.oldval = v.val = val;
|
||||
v.factor = factor;
|
||||
v.mindiff = mindiff;
|
||||
v.maxdiff = maxdiff;
|
||||
return v;
|
||||
}
|
||||
void Reset( double newval )
|
||||
{
|
||||
oldval = val = newval;
|
||||
}
|
||||
void Update( double newval )
|
||||
{
|
||||
oldval = val;
|
||||
if ( abs(newval-val) < mindiff ) val = newval;
|
||||
else
|
||||
{
|
||||
double diff = min(abs(newval-val)*factor,maxdiff);
|
||||
if ( val > newval ) val = max(newval,val-diff);
|
||||
else val = min(newval,val+diff);
|
||||
}
|
||||
}
|
||||
double GetValue( double fractic = 1. )
|
||||
{
|
||||
return SWWMUtility.Lerp(oldval,val,fractic);
|
||||
Screen.DrawTexture(AltDashTex,false,margin+3,ss.y-(margin+4),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,dt,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltDashTex,false,margin+2,ss.y-(margin+5),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,dt,DTA_ColorOverlay,Color(blink?0:96,0,0,0));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2954,7 +2954,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
DrawTopStuff(true);
|
||||
Alt_DrawTopStuff();
|
||||
DrawInventory(54);
|
||||
DrawInventory(56);
|
||||
Alt_DrawStatus();
|
||||
Alt_DrawWeapons();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,3 +34,65 @@ Class SWWMNothing : Actor
|
|||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
// fractic-compatible interpolators, with double value
|
||||
Class SmoothLinearValueInterpolator
|
||||
{
|
||||
private double val, oldval, diff;
|
||||
|
||||
static SmoothLinearValueInterpolator Create( double val, double diff )
|
||||
{
|
||||
let v = new("SmoothLinearValueInterpolator");
|
||||
v.oldval = v.val = val;
|
||||
v.diff = diff;
|
||||
return v;
|
||||
}
|
||||
void Reset( double newval )
|
||||
{
|
||||
oldval = val = newval;
|
||||
}
|
||||
void Update( double newval )
|
||||
{
|
||||
oldval = val;
|
||||
if ( abs(newval-val) < diff ) val = newval;
|
||||
else if ( val > newval ) val = max(newval,val-diff);
|
||||
else val = min(newval,val+diff);
|
||||
}
|
||||
double GetValue( double fractic = 1. )
|
||||
{
|
||||
return SWWMUtility.Lerp(oldval,val,fractic);
|
||||
}
|
||||
}
|
||||
Class SmoothDynamicValueInterpolator
|
||||
{
|
||||
private double val, oldval, factor, mindiff, maxdiff;
|
||||
|
||||
static SmoothDynamicValueInterpolator Create( double val, double factor, double mindiff, double maxdiff )
|
||||
{
|
||||
let v = new("SmoothDynamicValueInterpolator");
|
||||
v.oldval = v.val = val;
|
||||
v.factor = factor;
|
||||
v.mindiff = mindiff;
|
||||
v.maxdiff = maxdiff;
|
||||
return v;
|
||||
}
|
||||
void Reset( double newval )
|
||||
{
|
||||
oldval = val = newval;
|
||||
}
|
||||
void Update( double newval )
|
||||
{
|
||||
oldval = val;
|
||||
if ( abs(newval-val) < mindiff ) val = newval;
|
||||
else
|
||||
{
|
||||
double diff = min(abs(newval-val)*factor,maxdiff);
|
||||
if ( val > newval ) val = max(newval,val-diff);
|
||||
else val = min(newval,val+diff);
|
||||
}
|
||||
}
|
||||
double GetValue( double fractic = 1. )
|
||||
{
|
||||
return SWWMUtility.Lerp(oldval,val,fractic);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
Class Ynykron : SWWMWeapon
|
||||
{
|
||||
transient ui DynamicValueInterpolator ChargeInter;
|
||||
transient ui SmoothDynamicValueInterpolator AltChargeInter;
|
||||
|
||||
enum EChargeState
|
||||
{
|
||||
|
|
@ -31,6 +32,8 @@ Class Ynykron : SWWMWeapon
|
|||
Super.HudTick();
|
||||
if ( !ChargeInter ) ChargeInter = DynamicValueInterpolator.Create(int(chargelevel*10),.5,1,400);
|
||||
ChargeInter.Update(int(chargelevel*10));
|
||||
if ( !AltChargeInter ) AltChargeInter = SmoothDynamicValueInterpolator.Create(chargelevel*10,.5,1.,400.);
|
||||
AltChargeInter.Update(chargelevel*10);
|
||||
if ( lastmode && (lastmode != inverted+1) && (Owner.player == players[consoleplayer]) )
|
||||
{
|
||||
let bar = SWWMStatusBar(statusbar);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ Class DeepImpact : SWWMWeapon
|
|||
bool charging;
|
||||
|
||||
transient ui DynamicValueInterpolator ChargeInter;
|
||||
transient ui SmoothDynamicValueInterpolator AltChargeInter;
|
||||
transient int failtime;
|
||||
|
||||
Property ClipCount : clipcount;
|
||||
|
|
@ -59,6 +60,8 @@ Class DeepImpact : SWWMWeapon
|
|||
Super.HudTick();
|
||||
if ( !ChargeInter ) ChargeInter = DynamicValueInterpolator.Create(clipcount,.5,1,25);
|
||||
ChargeInter.Update(clipcount);
|
||||
if ( !AltChargeInter ) AltChargeInter = SmoothDynamicValueInterpolator.Create(clipcount,.5,1.,25.);
|
||||
AltChargeInter.Update(clipcount);
|
||||
}
|
||||
|
||||
override bool ReportHUDAmmo()
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ Class SilverBullet : SWWMWeapon
|
|||
int nkills;
|
||||
|
||||
transient ui DynamicValueInterpolator ZoomInter;
|
||||
transient ui SmoothDynamicValueInterpolator AltZoomInter;
|
||||
|
||||
bool zoomed;
|
||||
double zoomlevel;
|
||||
|
|
@ -249,6 +250,8 @@ Class SilverBullet : SWWMWeapon
|
|||
Super.HudTick();
|
||||
if ( !ZoomInter ) ZoomInter = DynamicValueInterpolator.Create(int(zoomlevel*10),.5,1,20);
|
||||
ZoomInter.Update(int(zoomlevel*10));
|
||||
if ( !AltZoomInter ) AltZoomInter = SmoothDynamicValueInterpolator.Create(zoomlevel*10,.5,1.,20.);
|
||||
AltZoomInter.Update(zoomlevel*10);
|
||||
if ( lastammo && (lastammo != fcbselected+1) && (Owner.player == players[consoleplayer]) )
|
||||
{
|
||||
let bar = SWWMStatusBar(statusbar);
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ extend Class DeepImpact
|
|||
{
|
||||
if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/DeepImpactDisplay.png",TexMan.Type_Any);
|
||||
if ( !AltAmmoBar ) AltAmmoBar = TexMan.CheckForTexture("graphics/AltHUD/DeepImpactBar.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-7,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int chg = clamp(ChargeInter?ChargeInter.GetValue():clipcount,0,100);
|
||||
int ct = int(((by-2)-(chg*20./100.))*hs);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-8,by-25,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double chg = clamp(AltChargeInter?AltChargeInter.GetValue(TicFrac):clipcount,0.,100.);
|
||||
double ch = chg*20./100.;
|
||||
bool blinking = (failtime>gametic)&&((failtime-gametic)%8>=4);
|
||||
Screen.DrawTexture(AltAmmoBar,false,bx-5,by-22,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipTop,ct,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0));
|
||||
Screen.DrawTexture(AltAmmoBar,false,bx-5,by-(2+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,20.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltAmmoBar,false,bx-6,by-(3+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,20.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -26,9 +27,9 @@ extend Class ExplodiumGun
|
|||
{
|
||||
if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumDisplay.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex ) AltRoundTex = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumRound.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-9,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
extend Class DualExplodiumGun
|
||||
|
|
@ -39,12 +40,12 @@ extend Class DualExplodiumGun
|
|||
{
|
||||
if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumDisplay.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex ) AltRoundTex = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumRound.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-20,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-18,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-18,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-9,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( ExplodiumGun(SisterWeapon).chambered ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<ExplodiumGun(SisterWeapon).clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-22,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-20,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-20,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( ExplodiumGun(SisterWeapon).chambered ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<ExplodiumGun(SisterWeapon).clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -63,12 +64,12 @@ extend Class Spreadgun
|
|||
if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/ShellPurple.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[4] ) AltRoundTex[4] = TexMan.CheckForTexture("graphics/AltHUD/ShellBlack.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[5] ) AltRoundTex[5] = TexMan.CheckForTexture("graphics/AltHUD/ShellGold.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-9,by-6,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-10,by-7,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( !chambered ) return;
|
||||
for ( int i=0; i<6; i++ )
|
||||
{
|
||||
if ( loadammo != types[i] ) continue;
|
||||
Screen.DrawTexture(AltRoundTex[i],false,bx-7,by-4,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired?128:0,0,0,0));
|
||||
Screen.DrawTexture(AltRoundTex[i],false,bx-8,by-5,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired?128:0,0,0,0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -88,17 +89,17 @@ extend Class Wallbuster
|
|||
if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/ShellBlue.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/ShellPurple.png",TexMan.Type_Any);
|
||||
if ( !AltCursorTex ) AltCursorTex = TexMan.CheckForTexture("graphics/AltHUD/WallbusterCursor.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-11,by-70,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int curpos = 68-(rotation[5]*14+rotation[rotation[5]]*2);
|
||||
Screen.DrawTexture(AltCursorTex,false,bx-9,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-12,by-75,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int curpos = 73-(rotation[5]*15+rotation[rotation[5]]*2);
|
||||
Screen.DrawTexture(AltCursorTex,false,bx-10,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<25; i++ )
|
||||
{
|
||||
curpos = 68-(i*2+(i/5)*4);
|
||||
curpos = 73-(i*2+(i/5)*5);
|
||||
if ( !loaded[i] ) continue;
|
||||
for ( int j=0; j<4; j++ )
|
||||
{
|
||||
if ( loaded[i] != types[j] ) continue;
|
||||
Screen.DrawTexture(AltRoundTex[j],false,bx-7,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired[i]?128:0,0,0,0));
|
||||
Screen.DrawTexture(AltRoundTex[j],false,bx-8,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired[i]?128:0,0,0,0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +117,9 @@ extend Class Eviscerator
|
|||
if ( !AltRoundTex ) AltRoundTex = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorRound.png",TexMan.Type_Any);
|
||||
if ( !AltSpreadIcon[0] ) AltSpreadIcon[0] = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorWide.png",TexMan.Type_Any);
|
||||
if ( !AltSpreadIcon[1] ) AltSpreadIcon[1] = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorTight.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-9,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltRoundTex,false,bx-7,by-7,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,chambered?Color(0,0,0,0):Color(128,0,0,0));
|
||||
Screen.DrawTexture(AltSpreadIcon[extended],false,bx-7,by-16,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-10,by-20,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltRoundTex,false,bx-8,by-8,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,chambered?Color(0,0,0,0):Color(128,0,0,0));
|
||||
Screen.DrawTexture(AltSpreadIcon[extended],false,bx-8,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +136,7 @@ extend Class Hellblazer
|
|||
if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerCrackshot.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerRavager.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerWarhead.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-12,by-28,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-13,by-29,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int curtype = 0;
|
||||
for ( int i=0; i<4; i++ )
|
||||
{
|
||||
|
|
@ -143,37 +144,37 @@ extend Class Hellblazer
|
|||
curtype = i;
|
||||
break;
|
||||
}
|
||||
int yy = 26;
|
||||
int yy = 27;
|
||||
switch ( curtype )
|
||||
{
|
||||
case 0:
|
||||
for ( int i=0; i<6; i++ )
|
||||
{
|
||||
Screen.DrawTexture(AltRoundTex[0],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
Screen.DrawTexture(AltRoundTex[0],false,bx-11,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
yy -= 4;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
yy = 24;
|
||||
yy = 25;
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
Screen.DrawTexture(AltRoundTex[1],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
Screen.DrawTexture(AltRoundTex[1],false,bx-11,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
yy -= 8;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
yy = 24;
|
||||
yy = 25;
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
Screen.DrawTexture(AltRoundTex[2],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
Screen.DrawTexture(AltRoundTex[2],false,bx-11,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
yy -= 8;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
yy = 22;
|
||||
yy = 23;
|
||||
for ( int i=0; i<2; i++ )
|
||||
{
|
||||
Screen.DrawTexture(AltRoundTex[3],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
Screen.DrawTexture(AltRoundTex[3],false,bx-11,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0);
|
||||
yy -= 12;
|
||||
}
|
||||
break;
|
||||
|
|
@ -194,36 +195,36 @@ extend Class Sparkster
|
|||
bool blinking = (failtime>gametic)&&((failtime-gametic)%16>=8);
|
||||
if ( doublestacc )
|
||||
{
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-6,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-6,by-12,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-7,by-26,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-7,by-13,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( nomag ) return;
|
||||
bool bRed;
|
||||
int yy = 22;
|
||||
int yy = 24;
|
||||
for ( int i=0; i<8; i++ )
|
||||
{
|
||||
if ( clipcount <= i ) Screen.DrawTexture(AltRoundTex[0],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Desaturate,255,DTA_ColorOverlay,Color(160,0,0,0));
|
||||
else
|
||||
{
|
||||
bRed = ((i>=4)&&(clipcount<6)||(i<4)&&(clipcount<2));
|
||||
Screen.DrawTexture(AltRoundTex[bRed],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0));
|
||||
Screen.DrawTexture(AltRoundTex[bRed],false,bx-5,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0));
|
||||
}
|
||||
yy -= 2;
|
||||
if ( i == 3 ) yy -= 4;
|
||||
if ( i == 3 ) yy -= 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-6,by-12,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-7,by-13,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( nomag ) return;
|
||||
bool bRed;
|
||||
int yy = 10;
|
||||
int yy = 11;
|
||||
for ( int i=0; i<4; i++ )
|
||||
{
|
||||
if ( clipcount <= i ) Screen.DrawTexture(AltRoundTex[0],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Desaturate,255,DTA_ColorOverlay,Color(160,0,0,0));
|
||||
if ( clipcount <= i ) Screen.DrawTexture(AltRoundTex[0],false,bx-5,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Desaturate,255,DTA_ColorOverlay,Color(160,0,0,0));
|
||||
else
|
||||
{
|
||||
bRed = (clipcount<2);
|
||||
Screen.DrawTexture(AltRoundTex[bRed],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0));
|
||||
Screen.DrawTexture(AltRoundTex[bRed],false,bx-5,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0));
|
||||
}
|
||||
yy -= 2;
|
||||
}
|
||||
|
|
@ -245,17 +246,18 @@ extend Class SilverBullet
|
|||
if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletFCB.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletXSBCasing.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletFCBCasing.png",TexMan.Type_Any);
|
||||
int zl = clamp(ZoomInter?ZoomInter.GetValue():int(zoomlevel*10),0,160);
|
||||
if ( zl >= 10 )
|
||||
double zl = clamp(AltZoomInter?AltZoomInter.GetValue(TicFrac):(zoomlevel*10),0.,160.);
|
||||
if ( zl >= 10. )
|
||||
{
|
||||
Screen.DrawTexture(AltWeaponBox[1],false,bx-14,by-26,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox[1],false,bx-15,by-28,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double zw = zl*10./160.;
|
||||
Screen.DrawTexture(AltZoomBar,false,bx-12,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw);
|
||||
Screen.DrawTexture(AltZoomBar,false,bx-12,by-25,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltZoomBar,false,bx-13,by-26,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw);
|
||||
}
|
||||
Screen.DrawTexture(AltWeaponBox[0],false,bx-14,by-17,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex[fcbchambered+fired*2],false,bx-12,by-15,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox[0],false,bx-15,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex[fcbchambered+fired*2],false,bx-13,by-16,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ )
|
||||
Screen.DrawTexture(AltRoundTex[fcbloaded],false,bx-12,by-(12-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltRoundTex[fcbloaded],false,bx-13,by-(13-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -268,9 +270,9 @@ extend Class CandyGun
|
|||
{
|
||||
if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumDisplay.png",TexMan.Type_Any);
|
||||
if ( !AltRoundTex ) AltRoundTex = TexMan.CheckForTexture("graphics/AltHUD/CandyRound.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-9,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int i=0; i<clipcount; i++ ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -286,10 +288,11 @@ extend Class Ynykron
|
|||
if ( !AltChargeBar[1] ) AltChargeBar[1] = TexMan.CheckForTexture("graphics/AltHUD/YnykronBarVortex.png",TexMan.Type_Any);
|
||||
if ( !AltBoxSide[0] ) AltBoxSide[0] = TexMan.CheckForTexture("graphics/AltHUD/YnykronIconBeam.png",TexMan.Type_Any);
|
||||
if ( !AltBoxSide[1] ) AltBoxSide[1] = TexMan.CheckForTexture("graphics/AltHUD/YnykronIconVortex.png",TexMan.Type_Any);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-9,by-38,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int chg = clamp(ChargeInter?ChargeInter.GetValue():int(chargelevel*10),0,400);
|
||||
int ct = int(((by-2)-chg/16.)*hs);
|
||||
Screen.DrawTexture(AltBoxSide[inverted],false,bx-7,by-36,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,clipcount?Color(0,0,0,0):Color(128,0,0,0));
|
||||
Screen.DrawTexture(AltChargeBar[inverted],false,bx-7,by-27,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(chargestate==CS_READY)?Color(int(clamp(sin((level.maptime+TicFrac)*8)*40+24,0.,64.)),255,255,255):Color(0,0,0,0),DTA_ClipTop,ct);
|
||||
Screen.DrawTexture(AltWeaponBox,false,bx-10,by-40,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
double chg = clamp(AltChargeInter?AltChargeInter.GetValue(TicFrac):(chargelevel*10),0.,400.);
|
||||
double ch = chg/16.;
|
||||
Screen.DrawTexture(AltBoxSide[inverted],false,bx-8,by-38,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,clipcount?Color(0,0,0,0):Color(128,0,0,0));
|
||||
Screen.DrawTexture(AltChargeBar[inverted],false,bx-7,by-(2+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,25.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(AltChargeBar[inverted],false,bx-8,by-(3+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,25.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,(chargestate==CS_READY)?Color(int(clamp(sin((level.maptime+TicFrac)*8)*40+24,0.,64.)),255,255,255):Color(0,0,0,0));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue