Graphic for dead mines
authornemo
Sun, 28 Feb 2010 17:51:38 +0000
changeset 2888 69d04079fb46
parent 2887 a4526fcc26c7
child 2889 eacccd2476ba
Graphic for dead mines
QTfrontend/gamecfgwidget.cpp
hedgewars/uConsts.pas
hedgewars/uGears.pas
share/hedgewars/Data/Graphics/MineDead.png
--- a/QTfrontend/gamecfgwidget.cpp	Sun Feb 28 17:49:45 2010 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Sun Feb 28 17:51:38 2010 +0000
@@ -56,6 +56,7 @@
 	
 	QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
 	//goToSchemePage->setText(tr("Edit schemes"));
+    goToSchemePage->setToolTip(tr("Edit schemes"));
 	goToSchemePage->setIconSize(pmEdit.size());
 	goToSchemePage->setIcon(pmEdit);
 	goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
@@ -71,6 +72,7 @@
 
 	QPushButton * goToWeaponPage = new QPushButton(GBoxOptions);
 	//goToWeaponPage->setText(tr("Edit weapons"));
+    goToWeaponPage->setToolTip(tr("Edit weapons"));
 	goToWeaponPage->setIconSize(pmEdit.size());
 	goToWeaponPage->setIcon(pmEdit);
 	goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
--- a/hedgewars/uConsts.pas	Sun Feb 28 17:49:45 2010 +0000
+++ b/hedgewars/uConsts.pas	Sun Feb 28 17:51:38 2010 +0000
@@ -50,7 +50,7 @@
 	TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
 			sprLag, sprArrow, sprGrenade, sprTargetP, sprUFO,
 			sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
-			sprMineOn, sprCase, sprFAid, sprDynamite, sprPower,
+			sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower,
 			sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont,
 			sprHorizontL, sprHorizontR, sprSky, sprSkyL,
 			sprSkyR, sprAMBorders, sprAMSlot, sprAMSlotName, sprAMAmmos,
@@ -467,6 +467,8 @@
 			Width:   8; Height:  8; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprMineOff
 			(FileName:     'MineOn'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
 			Width:   8; Height:  8; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprMineOn
+			(FileName:     'MineDead'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+			Width:   8; Height:  8; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprMineDead
 			(FileName:       'Case'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
 			Width:  48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprCase
 			(FileName:   'FirstAid'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
--- a/hedgewars/uGears.pas	Sun Feb 28 17:49:45 2010 +0000
+++ b/hedgewars/uGears.pas	Sun Feb 28 17:51:38 2010 +0000
@@ -1554,9 +1554,10 @@
             gtRope: DrawRope(Gear);
       gtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State);
        gtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 32 + WorldDy, Gear^.State);
-            gtMine: if ((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)
-                       then DrawRotated(sprMineOff, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle)
-                       else DrawRotated(sprMineOn, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
+            gtMine: if ((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420) and (Gear^.Health <> 0) then
+                           DrawRotated(sprMineOff, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle)
+                       else if Gear^.Health <> 0 then DrawRotated(sprMineOn, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle)
+                       else DrawRotated(sprMineDead, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
             gtCase: case Gear^.Pos of
                          posCaseAmmo  : begin
                                         i:= (GameTicks shr 6) mod 64;
Binary file share/hedgewars/Data/Graphics/MineDead.png has changed