--- a/hedgewars/uStore.pas Tue Apr 04 21:17:02 2017 +0200
+++ b/hedgewars/uStore.pas Sun Oct 09 19:59:00 2016 +0200
@@ -406,7 +406,7 @@
imflags := (ifAlpha or ifTransparent);
// these sprites are optional
- if not (ii in [sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, sprChunk]) then // FIXME: hack
+ if not (ii in [sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, sprChunk, sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL]) then // FIXME: hack
imflags := (imflags or ifCritical);
// load the image
--- a/hedgewars/uTypes.pas Tue Apr 04 21:17:02 2017 +0200
+++ b/hedgewars/uTypes.pas Sun Oct 09 19:59:00 2016 +0200
@@ -89,7 +89,8 @@
sprBulletHit, sprSnowball, sprHandSnowball, sprSnow,
sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun,
- sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2, sprAirMine, sprHandAirMine
+ sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2, sprAirMine, sprHandAirMine,
+ sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL
);
// Gears that interact with other Gears and/or Land
--- a/hedgewars/uVariables.pas Tue Apr 04 21:17:02 2017 +0200
+++ b/hedgewars/uVariables.pas Sun Oct 09 19:59:00 2016 +0200
@@ -738,7 +738,15 @@
(FileName: 'AirMine'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true), // sprAirMine
(FileName: 'amAirMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprHandAirMine
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprHandAirMine
+ (FileName: 'FlakeL'; Path:ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprFlakeL
+ (FileName: 'SDFlakeL'; Path: ptCurrTheme; AltPath: ptSuddenDeath; Texture: nil; Surface: nil;
+ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHighest; getDimensions: false; getImageDimensions: true),// sprSDFlakeL
+ (FileName: 'CloudsL'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprCloudL
+ (FileName: 'SDCloudsL'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 256; Height:128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true)// sprSDCloudL
);
const
--- a/hedgewars/uVisualGears.pas Tue Apr 04 21:17:02 2017 +0200
+++ b/hedgewars/uVisualGears.pas Sun Oct 09 19:59:00 2016 +0200
@@ -125,6 +125,14 @@
exit(sprite);
end;
+function GetSpriteByWind(sprite, Lsprite: TSprite): TSprite; inline;
+begin
+ if (SpritesData[Lsprite].Texture <> nil) and (cWindSpeedf<0) then
+ exit(Lsprite)
+ else
+ exit(sprite);
+end;
+
function GetSpriteData(sprite, SDsprite: TSprite): PSpriteData; inline;
begin
exit(@SpritesData[GetSprite(sprite, SDsprite)]);
@@ -152,11 +160,11 @@
if Gear^.Tint <> $FFFFFFFF then Tint(Gear^.Tint);
case Gear^.Kind of
vgtCloud: begin
- spriteData:= GetSpriteData(sprCloud, sprSDCloud);
+ spriteData:= GetSpriteData(GetSpriteByWind(sprCloud, sprCloudL), GetSpriteByWind(sprSDCloud, sprSDCloudL));
DrawTextureF(spriteData^.Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, spriteData^.Width, spriteData^.Height)
end;
vgtFlake: begin
- sprite:= GetSprite(sprFlake, sprSDFlake);
+ sprite:= GetSpriteByWind(GetSprite(sprFlake, sprSDFlake), GetSprite(sprFlakeL, sprSDFlakeL));
if cFlattenFlakes then
begin
if speedlessFlakes then
@@ -188,7 +196,7 @@
Tint(Gear^.Tint);
case Gear^.Kind of
vgtFlake: begin
- sprite:= GetSprite(sprFlake, sprSDFlake);
+ sprite:= GetSpriteByWind(GetSprite(sprFlake, sprSDFlake), GetSprite(sprFlakeL, sprSDFlakeL));
if speedlessFlakes then
DrawSprite(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
else
@@ -360,7 +368,7 @@
end;
case Gear^.Kind of
vgtFlake: begin
- spriteData:= GetSpriteData(sprFlake, sprSDFlake);
+ spriteData:= GetSpriteData(GetSpriteByWind(sprFlake, sprFlakeL), GetSpriteByWind(sprSDFlake, sprSDFlakeL));
if speedlessFlakes then
DrawTextureF(spriteData^.Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, spriteData^.Width, spriteData^.Height)
else
@@ -388,11 +396,11 @@
Tint(Gear^.Tint);
case Gear^.Kind of
vgtCloud: begin
- spriteData:= GetSpriteData(sprCloud, sprSDCloud);
+ spriteData:= GetSpriteData(GetSpriteByWind(sprCloud, sprCloudL), GetSpriteByWind(sprSDCloud, sprSDCloudL));
DrawTextureF(spriteData^.Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, spriteData^.Width, spriteData^.Height);
end;
vgtFlake: begin
- spriteData:= GetSpriteData(sprFlake, sprSDFlake);
+ spriteData:= GetSpriteData(GetSpriteByWind(sprFlake, sprFlakeL), GetSpriteByWind(sprSDFlake, sprSDFlakeL));
if speedlessFlakes then
DrawTextureF(spriteData^.Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, spriteData^.Width, spriteData^.Height)
else
@@ -413,11 +421,11 @@
Tint(Gear^.Tint);
case Gear^.Kind of
vgtCloud: begin
- sprite:= GetSprite(sprCloud, sprSDCloud);
+ sprite:= GetSpriteByWind(GetSprite(sprCloud, sprSDCloud), GetSprite(sprCloudL, sprSDCloudL));
DrawSprite(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame);
end;
vgtFlake: begin
- sprite:= GetSprite(sprFlake, sprSDFlake);
+ sprite:= GetSpriteByWind(GetSprite(sprFlake, sprSDFlake), GetSprite(sprFlakeL, sprSDFlakeL));
if speedlessFlakes then
DrawSprite(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
else
@@ -438,7 +446,7 @@
Tint(Gear^.Tint);
case Gear^.Kind of
vgtFlake: begin
- sprite:= GetSprite(sprFlake, sprSDFlake);
+ sprite:= GetSpriteByWind(GetSprite(sprFlake, sprSDFlake), GetSprite(sprFlakeL, sprSDFlakeL));
if speedlessFlakes then
DrawSprite(sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame)
else