Engine:
* New visual gear: Shell
* Shooting Shotgun and Sniper Rifle now throws out shells
* Added sound for (re-)loading Sniper Rifle
Installer:
* Updated vendor name to "Hedgewars Project"
--- a/CMakeLists.txt Thu Feb 18 13:59:05 2010 +0000
+++ b/CMakeLists.txt Fri Feb 19 00:51:37 2010 +0000
@@ -155,7 +155,7 @@
# CPack vars
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hedgewars, a turn-based strategy")
-set(CPACK_PACKAGE_VENDOR "Hedgewars")
+set(CPACK_PACKAGE_VENDOR "Hedgewars Project")
set(CPACK_PACKAGE_FILE_NAME "hedgewars-${HEDGEWARS_VERSION}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "hedgewars-src-${HEDGEWARS_VERSION}")
set(CPACK_SOURCE_GENERATOR "TBZ2")
--- a/hedgewars/HHHandlers.inc Thu Feb 18 13:59:05 2010 +0000
+++ b/hedgewars/HHHandlers.inc Fri Feb 19 00:51:37 2010 +0000
@@ -154,7 +154,10 @@
amRope: CurAmmoGear:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtRope, 0, xx, yy, 0);
amMine: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtMine, 0, SignAs(_0_02, dX), _0, 3000);
amDEagle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0);
- amSniperRifle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
+ amSniperRifle: begin
+ PlaySound(sndSniperReload);
+ CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
+ end;
amDynamite: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
amFirePunch: CurAmmoGear:= AddGear(hwRound(X) + hwSign(dX) * 10, hwRound(Y), gtFirePunch, 0, xx, _0, 0);
amWhip: begin
--- a/hedgewars/uConsts.pas Thu Feb 18 13:59:05 2010 +0000
+++ b/hedgewars/uConsts.pas Fri Feb 19 00:51:37 2010 +0000
@@ -72,7 +72,7 @@
sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
sprShoutCorner, sprShoutEdge, sprShoutTail,
sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
- sprSmoke);
+ sprSmoke, sprShell);
TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, // 3
gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, // 8
@@ -87,7 +87,7 @@
TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
- vgtSteam, vgtSmoke, vgtHealth);
+ vgtSteam, vgtSmoke, vgtHealth, vgtShell);
TGearsType = set of TGearType;
@@ -106,7 +106,7 @@
sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
sndHomerun, sndMolotov, sndWalking, sndCover, sndUhOh,
sndOops, sndNooo, sndHello, sndRopeShot, sndRopeAttach,
- sndRopeRelease, sndSwitchHog, sndVictory);
+ sndRopeRelease, sndSwitchHog, sndVictory, sndSniperReload);
TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
@@ -659,7 +659,9 @@
(FileName: 'Molotov'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprMolotov
(FileName: 'Smoke'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false)// sprSmoke
+ Width: 22; Height: 22; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprSmoke
+ (FileName: 'Shells'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprShell
);
Wavez: array [TWave] of record
@@ -753,7 +755,8 @@
(FileName: ''; Path: ptSounds),// sndRopeAttach
(FileName: ''; Path: ptSounds),// sndRopeRelease
(FileName: 'switchhog.ogg'; Path: ptSounds),// sndSwitchHog
- (FileName: 'victory.ogg'; Path: ptVoices) // sndSwitchHog
+ (FileName: 'victory.ogg'; Path: ptVoices),// sndVictory
+ (FileName: 'sniperreload.ogg'; Path: ptSounds) // sndSniperReload
);
Ammoz: array [TAmmoType] of record
--- a/hedgewars/uVisualGears.pas Thu Feb 18 13:59:05 2010 +0000
+++ b/hedgewars/uVisualGears.pas Fri Feb 19 00:51:37 2010 +0000
@@ -155,6 +155,21 @@
dec(Gear^.FrameTicks, Steps)
end;
+procedure doStepShell(Gear: PVisualGear; Steps: Longword);
+begin
+Gear^.X:= Gear^.X + Gear^.dX * Steps;
+
+Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
+Gear^.dY:= Gear^.dY + cGravity * Steps;
+
+Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
+
+if Gear^.FrameTicks <= Steps then
+ DeleteVisualGear(Gear)
+else
+ dec(Gear^.FrameTicks, Steps)
+end;
+
procedure doStepSmallDamage(Gear: PVisualGear; Steps: Longword);
begin
Gear^.Y:= Gear^.Y - _0_02 * Steps;
@@ -353,7 +368,8 @@
@doStepBubble,
@doStepSteam,
@doStepSmoke,
- @doStepHealth
+ @doStepHealth,
+ @doStepShell
);
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear;
@@ -425,6 +441,7 @@
FrameTicks:= 650 + random(250);
Frame:= random(8)
end;
+ vgtShell: FrameTicks:= 500;
vgtSmallDamageTag: begin
gear^.FrameTicks:= 1100
end;
@@ -538,6 +555,13 @@
DrawSprite(sprHealth, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy - 8, 0);
glColor4f(1, 1, 1, 1);
end;
+ vgtShell: begin
+ if Gear^.FrameTicks < 250 then
+ glColor4f(1, 1, 1, Gear^.FrameTicks / 250);
+ DrawRotatedF(sprShell, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
+ if Gear^.FrameTicks < 250 then
+ glColor4f(1, 1, 1, 1);
+ end;
end;
case Gear^.Kind of
vgtSmallDamageTag: DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex);
Binary file share/hedgewars/Data/Graphics/Shells.png has changed
Binary file share/hedgewars/Data/Sounds/sniperreload.ogg has changed