Make health HUD icon green if hog poisoned
authorWuzzy <Wuzzy2@mail.ru>
Thu, 16 May 2019 03:41:24 +0200
changeset 14986 cf21a45a62bd
parent 14985 bcecb3349948
child 14987 5a9d203f7c82
Make health HUD icon green if hog poisoned
hedgewars/uTypes.pas
hedgewars/uVariables.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Graphics/HealthPoisonHUD.png
--- a/hedgewars/uTypes.pas	Thu May 16 02:07:29 2019 +0200
+++ b/hedgewars/uTypes.pas	Thu May 16 03:41:24 2019 +0200
@@ -93,7 +93,7 @@
             sprCustom5, sprCustom6, sprCustom7, sprCustom8, sprFrozenAirMine, sprAirMine, sprHandAirMine,
             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprCreeper, sprHandCreeper, sprMinigun,
             sprSliderInverted, sprFingerBack, sprFingerBackInv, sprTargetPBack, sprTargetPBackInv,
-            sprHealthHud
+            sprHealthHud, sprHealthPoisonHud
             );
 
     // Gears that interact with other Gears and/or Land
--- a/hedgewars/uVariables.pas	Thu May 16 02:07:29 2019 +0200
+++ b/hedgewars/uVariables.pas	Thu May 16 03:41:24 2019 +0200
@@ -825,7 +825,9 @@
             (FileName:    'TargetpBackInv'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprTargetPBackInv
             (FileName:    'HealthHUD'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
-            Width:  18; Height: 18; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true)// sprHealthHud
+            Width:  18; Height: 18; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHealthHud
+            (FileName:    'HealthPoisonHUD'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+            Width:  18; Height: 18; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true)// sprHealthPoisonHud
             );
 
 
--- a/hedgewars/uWorld.pas	Thu May 16 02:07:29 2019 +0200
+++ b/hedgewars/uWorld.pas	Thu May 16 03:41:24 2019 +0200
@@ -1597,7 +1597,10 @@
     i:= t + pauseButton.frame.y + pauseButton.frame.h;
 {$ENDIF}
     DrawTexture(cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 16, i, CurrentHedgehog^.HealthTagTex);
-    DrawSprite(sprHealthHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 36), i, 0);
+    if (CurrentHedgehog^.Effects[hePoisoned] > 0) then
+        DrawSprite(sprHealthPoisonHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 36), i, 0)
+    else
+        DrawSprite(sprHealthHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 36), i, 0);
     inc(t, CurrentHedgehog^.HealthTagTex^.h);
     cDemoClockFPSOffsetY:= t;
     end
Binary file share/hedgewars/Data/Graphics/HealthPoisonHUD.png has changed