author nemo Sun, 26 Jul 2009 19:19:03 +0000 changeset 2275 3f56c99a70f8 parent 2274 f413e41802d6 child 2276 d4d9e490d534
Make all theme numbers proportional to map MaxHedgehogs. This should mean the numbers should be as in past for 18 hedgehog map
```--- a/hedgewars/uLandObjects.pas	Sat Jul 25 18:02:12 2009 +0000
+++ b/hedgewars/uLandObjects.pas	Sun Jul 26 19:19:03 2009 +0000
@@ -259,6 +259,7 @@
Result: boolean;
begin
cnt:= 0;
+Obj.Maxcnt:= (Obj.Maxcnt * MaxHedgehogs) div 18;
with Obj do
begin
if Maxcnt = 0 then
@@ -303,6 +304,7 @@
Result: boolean;
begin
cnt:= 0;
+Obj.Maxcnt:= (Obj.Maxcnt * MaxHedgehogs) div 18;
with Obj do
begin
if Maxcnt = 0 then
@@ -328,9 +330,9 @@
end
end;
inc(y, 12);
-		until y > 1023 - Height - 8;
+        until y > LAND_HEIGHT - 1 - Height - 8;
inc(x, getrandom(12) + 12)
-	until x > 2047 - Width;
+    until x > LAND_WIDTH - 1 - Width;
Result:= cnt <> 0;
if Result then
begin
@@ -494,7 +496,7 @@
i:=i+int;
until (i>rightX-int);
end;
-AddThemeObjects(ThemeObjects, MaxHedgehogs div 2); // MaxHedgehogs should roughly correspond to available surface area.  Was also thinking maybe using playHeight * playWidth div constant   :)
+AddThemeObjects(ThemeObjects, (8 * MaxHedgehogs) div 18); // MaxHedgehogs should roughly correspond to available surface area.  Was also thinking maybe using playHeight * playWidth div constant   :)