298 lines
16 KiB
Text
298 lines
16 KiB
Text
// DrawWeapon code for all weapons
|
|
|
|
// Deep Impact
|
|
extend Class DeepImpact
|
|
{
|
|
ui TextureID WeaponBox, AmmoBar;
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/DeepImpactDisplay.png",TexMan.Type_Any);
|
|
if ( !AmmoBar ) AmmoBar = TexMan.CheckForTexture("graphics/HUD/DeepImpactBar.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-8,by-25,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
double chg = clamp(ChargeInter?ChargeInter.GetValue(TicFrac):clipcount,0.,100.);
|
|
double ch = chg*20./100.;
|
|
bool blinking = (failtime>gametic)&&((failtime-gametic)%8>=4);
|
|
Screen.DrawTexture(AmmoBar,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(AmmoBar,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));
|
|
}
|
|
}
|
|
|
|
// Explodium Gun
|
|
extend Class ExplodiumGun
|
|
{
|
|
ui TextureID WeaponBox, RoundTex;
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/ExplodiumRound.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( chambered ) Screen.DrawTexture(RoundTex,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(RoundTex,false,bx-8,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
}
|
|
}
|
|
extend Class DualExplodiumGun
|
|
{
|
|
ui TextureID WeaponBox, RoundTex;
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/ExplodiumRound.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-22,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( chambered ) Screen.DrawTexture(RoundTex,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(RoundTex,false,bx-20,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
Screen.DrawTexture(WeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( ExplodiumGun(SisterWeapon).chambered ) Screen.DrawTexture(RoundTex,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(RoundTex,false,bx-8,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
}
|
|
}
|
|
|
|
// Spreadgun
|
|
extend Class Spreadgun
|
|
{
|
|
ui TextureID WeaponBox, RoundTex[6];
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
static const Class<Ammo> types[] = {"RedShell","GreenShell","BlueShell","PurpleShell","BlackShell","GoldShell"};
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/SpreadgunDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/ShellRed.png",TexMan.Type_Any);
|
|
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/ShellGreen.png",TexMan.Type_Any);
|
|
if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/ShellBlue.png",TexMan.Type_Any);
|
|
if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/ShellPurple.png",TexMan.Type_Any);
|
|
if ( !RoundTex[4] ) RoundTex[4] = TexMan.CheckForTexture("graphics/HUD/ShellBlack.png",TexMan.Type_Any);
|
|
if ( !RoundTex[5] ) RoundTex[5] = TexMan.CheckForTexture("graphics/HUD/ShellGold.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-13,by-8,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(RoundTex[i],false,bx-11,by-6,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired?128:0,0,0,0));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Wallbuster (less of a fuck in the alt hud)
|
|
extend Class Wallbuster
|
|
{
|
|
ui TextureID WeaponBox, RoundTex[4], CursorTex;
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
static const Class<Ammo> types[] = {"RedShell","GreenShell","BlueShell","PurpleShell"};
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/WallbusterDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/ShellRedSmall.png",TexMan.Type_Any);
|
|
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/ShellGreenSmall.png",TexMan.Type_Any);
|
|
if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/ShellBlueSmall.png",TexMan.Type_Any);
|
|
if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/ShellPurpleSmall.png",TexMan.Type_Any);
|
|
if ( !CursorTex ) CursorTex = TexMan.CheckForTexture("graphics/HUD/WallbusterCursor.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,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(CursorTex,false,bx-10,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
for ( int i=0; i<25; i++ )
|
|
{
|
|
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(RoundTex[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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Eviscerator
|
|
extend Class Eviscerator
|
|
{
|
|
ui TextureID WeaponBox, RoundTex, SpreadIcon[2];
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/EvisceratorDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/EvisceratorRound.png",TexMan.Type_Any);
|
|
if ( !SpreadIcon[0] ) SpreadIcon[0] = TexMan.CheckForTexture("graphics/HUD/EvisceratorWide.png",TexMan.Type_Any);
|
|
if ( !SpreadIcon[1] ) SpreadIcon[1] = TexMan.CheckForTexture("graphics/HUD/EvisceratorTight.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-10,by-20,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
Screen.DrawTexture(RoundTex,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(SpreadIcon[extended],false,bx-8,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
}
|
|
}
|
|
|
|
// Hellblazer
|
|
extend Class Hellblazer
|
|
{
|
|
ui TextureID WeaponBox, RoundTex[4];
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
static const Class<Ammo> types[] = {"HellblazerMissiles","HellblazerCrackshots","HellblazerRavagers","HellblazerWarheads"};
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/HellblazerDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/HellblazerMissile.png",TexMan.Type_Any);
|
|
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/HellblazerCrackshot.png",TexMan.Type_Any);
|
|
if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/HellblazerRavager.png",TexMan.Type_Any);
|
|
if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/HellblazerWarhead.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,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++ )
|
|
{
|
|
if ( loadammo != types[i] ) continue;
|
|
curtype = i;
|
|
break;
|
|
}
|
|
int yy = 27;
|
|
switch ( curtype )
|
|
{
|
|
case 0:
|
|
for ( int i=0; i<6; i++ )
|
|
{
|
|
Screen.DrawTexture(RoundTex[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 = 25;
|
|
for ( int i=0; i<3; i++ )
|
|
{
|
|
Screen.DrawTexture(RoundTex[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 = 25;
|
|
for ( int i=0; i<3; i++ )
|
|
{
|
|
Screen.DrawTexture(RoundTex[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 = 23;
|
|
for ( int i=0; i<2; i++ )
|
|
{
|
|
Screen.DrawTexture(RoundTex[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;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Biospark Carbine
|
|
extend Class Sparkster
|
|
{
|
|
ui TextureID WeaponBox, RoundTex[2];
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/BiosparkDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/BiosparkShot.png",TexMan.Type_Any);
|
|
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/BiosparkRed.png",TexMan.Type_Any);
|
|
bool blinking = (failtime>gametic)&&((failtime-gametic)%16>=8);
|
|
if ( doublestacc )
|
|
{
|
|
Screen.DrawTexture(WeaponBox,false,bx-8,by-34,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
Screen.DrawTexture(WeaponBox,false,bx-8,by-17,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( nomag ) return;
|
|
bool bRed;
|
|
int yy = 32;
|
|
for ( int i=0; i<8; i++ )
|
|
{
|
|
if ( clipcount <= i ) Screen.DrawTexture(RoundTex[0],false,bx-6,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(RoundTex[bRed],false,bx-6,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0));
|
|
}
|
|
yy -= 3;
|
|
if ( i == 3 ) yy -= 5;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Screen.DrawTexture(WeaponBox,false,bx-8,by-17,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( nomag ) return;
|
|
bool bRed;
|
|
int yy = 15;
|
|
for ( int i=0; i<4; i++ )
|
|
{
|
|
if ( clipcount <= i ) Screen.DrawTexture(RoundTex[0],false,bx-6,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(RoundTex[bRed],false,bx-6,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0));
|
|
}
|
|
yy -= 3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Silver Bullet JET
|
|
extend Class SilverBullet
|
|
{
|
|
ui TextureID WeaponBox[2], ZoomBar, RoundTex[4];
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox[0] ) WeaponBox[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletDisplay.png",TexMan.Type_Any);
|
|
if ( !WeaponBox[1] ) WeaponBox[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomDisplay.png",TexMan.Type_Any);
|
|
if ( !ZoomBar ) ZoomBar = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomBar.png",TexMan.Type_Any);
|
|
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSB.png",TexMan.Type_Any);
|
|
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCB.png",TexMan.Type_Any);
|
|
if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSBCasing.png",TexMan.Type_Any);
|
|
if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCBCasing.png",TexMan.Type_Any);
|
|
double zl = clamp(ZoomInter?ZoomInter.GetValue(TicFrac):(zoomlevel*10),0.,160.);
|
|
if ( zl >= 10. )
|
|
{
|
|
Screen.DrawTexture(WeaponBox[1],false,bx-20,by-39,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
double zw = zl*15./160.;
|
|
Screen.DrawTexture(ZoomBar,false,bx-17,by-36,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw,DTA_ColorOverlay,Color(255,0,0,0));
|
|
Screen.DrawTexture(ZoomBar,false,bx-18,by-37,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw);
|
|
}
|
|
Screen.DrawTexture(WeaponBox[0],false,bx-20,by-29,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( chambered ) Screen.DrawTexture(RoundTex[fcbchambered+fired*2],false,bx-18,by-27,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
for ( int i=0; i<clipcount; i++ )
|
|
Screen.DrawTexture(RoundTex[fcbloaded],false,bx-18,by-(22-i*4),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
}
|
|
}
|
|
|
|
// Candy Gun
|
|
extend Class CandyGun
|
|
{
|
|
ui TextureID WeaponBox, RoundTex;
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png",TexMan.Type_Any);
|
|
if ( !RoundTex ) RoundTex = TexMan.CheckForTexture("graphics/HUD/CandyRound.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
if ( chambered ) Screen.DrawTexture(RoundTex,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(RoundTex,false,bx-8,by-(16-i*2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
}
|
|
}
|
|
|
|
// Ynykron
|
|
extend Class Ynykron
|
|
{
|
|
ui TextureID WeaponBox, ChargeBar[2], BoxSide[2];
|
|
|
|
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
|
|
{
|
|
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/YnykronDisplay.png",TexMan.Type_Any);
|
|
if ( !ChargeBar[0] ) ChargeBar[0] = TexMan.CheckForTexture("graphics/HUD/YnykronBarBeam.png",TexMan.Type_Any);
|
|
if ( !ChargeBar[1] ) ChargeBar[1] = TexMan.CheckForTexture("graphics/HUD/YnykronBarVortex.png",TexMan.Type_Any);
|
|
if ( !BoxSide[0] ) BoxSide[0] = TexMan.CheckForTexture("graphics/HUD/YnykronIconBeam.png",TexMan.Type_Any);
|
|
if ( !BoxSide[1] ) BoxSide[1] = TexMan.CheckForTexture("graphics/HUD/YnykronIconVortex.png",TexMan.Type_Any);
|
|
Screen.DrawTexture(WeaponBox,false,bx-10,by-40,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
|
double chg = clamp(ChargeInter?ChargeInter.GetValue(TicFrac):(chargelevel*10),0.,400.);
|
|
double ch = chg/16.;
|
|
Screen.DrawTexture(BoxSide[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(ChargeBar[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(ChargeBar[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));
|
|
}
|
|
}
|