Restrict slipperiness to girders and bridges. Make girders more obviously ice.
--- a/hedgewars/GSHandlers.inc Sat Oct 08 23:36:52 2011 -0400
+++ b/hedgewars/GSHandlers.inc Sun Oct 09 19:36:09 2011 -0400
@@ -2874,21 +2874,22 @@
if Gear^.Health < Gear^.Damage then
begin
doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound);
- for i:= 0 to 31 do
- begin
- sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot);
- if sparkles <> nil then
- with sparkles^ do
- begin
- Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF;
- Angle:= random * 360;
- dx:= 0.001 * (random(200));
- dy:= 0.001 * (random(200));
- if random(2) = 0 then dx := -dx;
- if random(2) = 0 then dy := -dy;
- FrameTicks:= random(400) + 250
- end;
- end;
+ if hasWishes then
+ for i:= 0 to 31 do
+ begin
+ sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot);
+ if sparkles <> nil then
+ with sparkles^ do
+ begin
+ Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF;
+ Angle:= random * 360;
+ dx:= 0.001 * (random(200));
+ dy:= 0.001 * (random(200));
+ if random(2) = 0 then dx := -dx;
+ if random(2) = 0 then dy := -dy;
+ FrameTicks:= random(400) + 250
+ end
+ end;
AfterAttack;
DeleteGear(Gear);
DeleteGear(HHGear);
--- a/hedgewars/uLandObjects.pas Sat Oct 08 23:36:52 2011 -0400
+++ b/hedgewars/uLandObjects.pas Sun Oct 09 19:36:09 2011 -0400
@@ -25,7 +25,7 @@
procedure AddObjects();
procedure FreeLandObjects();
procedure LoadThemeConfig;
-procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface);
+procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; extraFlags: Word = 0);
procedure AddOnLandObjects(Surface: PSDL_Surface);
implementation
@@ -66,7 +66,7 @@
SprayObjects: TSprayObjects;
-procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface);
+procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; extraFlags: Word = 0);
var p: PLongwordArray;
x, y: Longword;
bpp: LongInt;
@@ -96,11 +96,11 @@
if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then
LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
+ Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or extraFlags;
+
if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then
begin
Land[cpY + y, cpX + x]:= lfObject;
- // For testing only. Intent is to flag this on objects with masks, or use it for an ice ray gun
- if (Theme = 'Snow') or (Theme = 'Christmas') then Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or lfIce
end;
end;
p:= @(p^[Image^.pitch shr 2])
@@ -208,7 +208,11 @@
rr.x:= x1;
while rr.x < x2 do
begin
- BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf);
+ // For testing only. Intent is to flag this on objects with masks, or use it for an ice ray gun
+ if (Theme = 'Snow') or (Theme = 'Christmas') then
+ BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf, lfIce)
+ else
+ BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf);
inc(rr.x, tmpsurf^.w);
end;
SDL_FreeSurface(tmpsurf);
--- a/hedgewars/uVariables.pas Sat Oct 08 23:36:52 2011 -0400
+++ b/hedgewars/uVariables.pas Sun Oct 09 19:36:09 2011 -0400
@@ -345,7 +345,7 @@
Width: 254; Height: 101; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAirplane
(FileName: 'amAirplane'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmAirplane
- (FileName: 'amGirder'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ (FileName: 'amGirder'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
Width: 160; Height:160; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAmGirder
(FileName: 'hhMask'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHHTelepMask
Binary file share/hedgewars/Data/Themes/Christmas/amGirder.png has changed
Binary file share/hedgewars/Data/Themes/Snow/amGirder.png has changed