Poor visual gear value in theme now bears little resemblance to the number of gears actually spawned. But, it certainly shouldn't be related to LAND_WIDTH.
--- a/hedgewars/uLandObjects.pas Wed Aug 15 23:30:23 2012 +0400
+++ b/hedgewars/uLandObjects.pas Wed Aug 15 16:54:49 2012 -0400
@@ -554,7 +554,7 @@
SetMusicName(Trim(s))
else if key = 'clouds' then
begin
- cCloudsNumber:= Word(StrToInt(Trim(s))) * cScreenSpace div LAND_WIDTH;
+ cCloudsNumber:= Word(StrToInt(Trim(s))) * cScreenSpace div 4096;
cSDCloudsNumber:= cCloudsNumber
end
else if key = 'object' then
@@ -700,7 +700,7 @@
else if key = 'sd-water-opacity' then
SDWaterOpacity:= StrToInt(Trim(s))
else if key = 'sd-clouds' then
- cSDCloudsNumber:= Word(StrToInt(Trim(s))) * cScreenSpace div LAND_WIDTH
+ cSDCloudsNumber:= Word(StrToInt(Trim(s))) * cScreenSpace div 4096
else if key = 'sd-flakes' then
begin
i:= Pos(',', s);
--- a/hedgewars/uVisualGears.pas Wed Aug 15 23:30:23 2012 +0400
+++ b/hedgewars/uVisualGears.pas Wed Aug 15 16:54:49 2012 -0400
@@ -958,10 +958,10 @@
exit;
if hasBorder or ((Theme <> 'Snow') and (Theme <> 'Christmas')) then
- for i:= 0 to Pred(vobCount * cScreenSpace div LAND_WIDTH) do
+ for i:= 0 to Pred(vobCount * cScreenSpace div 4096) do
AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake)
else
- for i:= 0 to Pred((vobCount * cScreenSpace div LAND_WIDTH) div 3) do
+ for i:= 0 to Pred((vobCount * cScreenSpace div 4096) div 3) do
AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake);
end;