Remove default transparent chunks. Chunk will only be added if theme defined.
--- a/hedgewars/uGears.pas Tue Jun 21 23:24:50 2011 +0200
+++ b/hedgewars/uGears.pas Tue Jun 21 17:28:53 2011 -0400
@@ -1292,7 +1292,7 @@
if (GameFlags and gfSolidLand) = 0 then
begin
cnt:= DrawExplosion(X, Y, Radius) div 1608; // approx 2 16x16 circles to erase per chunk
- if cnt > 0 then
+ if (cnt > 0) and (SpritesData[sprChunk].Texture <> nil) then
for i:= 0 to cnt do
AddVisualGear(X, Y, vgtChunk)
end;
--- a/hedgewars/uStore.pas Tue Jun 21 23:24:50 2011 +0200
+++ b/hedgewars/uStore.pas Tue Jun 21 17:28:53 2011 -0400
@@ -286,7 +286,7 @@
(((cReducedQuality and rqKillFlakes) = 0) or (Theme = 'Snow') or (Theme = 'Christmas') or ((not (ii in [sprFlake, sprSDFlake])))) then
begin
if AltPath = ptNone then
- if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack
+ if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR, sprChunk] then // FIXME: hack
begin
tmpsurf:= LoadImage(UserPathz[Path] + '/' + FileName, ifAlpha or ifTransparent);
if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent)
@@ -306,7 +306,7 @@
if tmpsurf <> nil then
begin
if getImageDimensions then
- begin
+ begin
imageWidth:= tmpsurf^.w;
imageHeight:= tmpsurf^.h
end;
--- a/hedgewars/uVariables.pas Tue Jun 21 23:24:50 2011 +0200
+++ b/hedgewars/uVariables.pas Tue Jun 21 17:28:53 2011 -0400
@@ -546,7 +546,7 @@
Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCheese
(FileName: 'amFlamethrower'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandFlamethrower
- (FileName: 'Chunk'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ (FileName: 'Chunk'; Path: ptCurrTheme; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprChunk
(FileName: 'Note'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprNote
Binary file share/hedgewars/Data/Graphics/Chunk.png has changed