Restore Deep Impact charge numbers in HUD.

This commit is contained in:
Mari the Deer 2022-09-16 20:23:43 +02:00
commit 1b74e6b84d
5 changed files with 7 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

After

Width:  |  Height:  |  Size: 96 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 159 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 189 B

Before After
Before After

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r471 \cu(Fri 16 Sep 19:11:04 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r471 \cu(2022-09-16 19:11:04)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r472 \cu(Fri 16 Sep 20:23:43 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r472 \cu(2022-09-16 20:23:43)\c-";

View file

@ -4,15 +4,18 @@
extend Class DeepImpact
{
ui TextureID WeaponBox, AmmoBar;
ui Font AmmoFont;
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);
if ( !AmmoFont ) AmmoFont = Font.GetFont("MiniHudShadow");
Screen.DrawTexture(WeaponBox,false,bx-24,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.DrawText(AmmoFont,Font.FindFontColor("MiniIce"),bx-22,by-8,String.Format("%3d",clamp(int(chg),0,100)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0));
double ch = chg*20./100.;
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));
}