Resurrector Weapon: Add ammo icon, sound, hedgehog picture (from Tiy).
--- a/hedgewars/GSHandlers.inc Thu Oct 21 23:12:02 2010 +0200
+++ b/hedgewars/GSHandlers.inc Sat Oct 23 14:10:23 2010 +0200
@@ -4111,6 +4111,7 @@
graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius);
if Length(graves) = 0 then begin
+ StopSound(Gear^.SoundChannel);
Gear^.Timer := 250;
Gear^.doStep := @doStepIdle;
exit;
@@ -4140,6 +4141,7 @@
RecountTeamHealth(Phedgehog(resgear^.Hedgehog)^.Team);
end;
end;
+ StopSound(Gear^.SoundChannel);
Gear^.Timer := 250;
Gear^.doStep := @doStepIdle;
end;
@@ -4162,6 +4164,7 @@
end;
Gear^.doStep := @doStepResurrectorWork;
end else begin
+ StopSound(Gear^.SoundChannel);
Gear^.Timer := 250;
Gear^.doStep := @doStepIdle;
end;
--- a/hedgewars/GearDrawing.inc Thu Oct 21 23:12:02 2010 +0200
+++ b/hedgewars/GearDrawing.inc Sat Oct 23 14:10:23 2010 +0200
@@ -278,7 +278,9 @@
defaultPos:= false
end;
gtResurrector: begin
- // yet to come?
+ DrawRotated(sprHandResurrector, hwRound(Gear^.X) + WorldDx,
+ hwRound(Gear^.Y) + WorldDy, 0, 0);
+ defaultPos := false;
end;
gtKamikaze: begin
if CurAmmoGear^.Pos = 0 then
--- a/hedgewars/HHHandlers.inc Thu Oct 21 23:12:02 2010 +0200
+++ b/hedgewars/HHHandlers.inc Sat Oct 23 14:10:23 2010 +0200
@@ -268,9 +268,11 @@
PauseMusic
end;
amFlamethrower: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtFlamethrower, 0, xx * _0_5, yy * _0_5, 0);
- amResurrector: CurAmmoGear:= AddGear(hwRound(lx),
- hwRound(ly), gtResurrector, 0, _0,
- _0, 0);
+ amResurrector: begin
+ CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly),
+ gtResurrector, 0, _0, _0, 0);
+ CurAmmoGear^.SoundChannel := LoopSound(sndResurrector);
+ end;
end;
uStats.AmmoUsed(CurAmmoType);
--- a/hedgewars/uConsts.pas Thu Oct 21 23:12:02 2010 +0200
+++ b/hedgewars/uConsts.pas Sat Oct 23 14:10:23 2010 +0200
@@ -74,7 +74,7 @@
sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal,
sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
- sprSMineOff, sprSMineOn, sprHandSMine, sprHammer, sprResurrector
+ sprSMineOff, sprSMineOn, sprHandSMine, sprHammer, sprHandResurrector
);
// Gears that interact with other Gears and/or Land
@@ -123,7 +123,7 @@
sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater,
sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8,
sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack,
- sndComeonthen, sndParachute, sndBump);
+ sndComeonthen, sndParachute, sndBump, sndResurrector);
TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
@@ -818,10 +818,10 @@
(FileName: 'amHammer'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprWhip
(FileName: 'amResurrector'; Path: ptHedgehog; AltPath: ptNone;
- Texture: nil; Surface: nil; Width: 128; Height: 64;
+ Texture: nil; Surface: nil; Width: 32; Height: 32;
imageWidth: 0; imageHeight: 0; saveSurf: false; priority:
tpMedium; getDimensions: false; getImageDimensions: true)
- );
+ ); // sprHandResurrector
Wavez: array [TWave] of record
Sprite: TSprite;
@@ -951,7 +951,8 @@
(FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhack
(FileName: 'Comeonthen.ogg'; Path: ptVoices),// sndComeonthen
(FileName: 'parachute.ogg'; Path: ptSounds),// sndParachute
- (FileName: 'bump.ogg'; Path: ptSounds) // sndBump
+ (FileName: 'bump.ogg'; Path: ptSounds),// sndBump
+ (FileName: 'hogchant3.ogg'; Path: ptSounds) // sndResurrector
);
Ammoz: array [TAmmoType] of record
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed
Binary file share/hedgewars/Data/Graphics/Hedgehog/amResurrector.png has changed
Binary file share/hedgewars/Data/Sounds/hogchant3.ogg has changed