hedgewars/uLand.pas
changeset 7051 db17476d7a37
parent 7028 0f60591f3a16
child 7063 a0326412e96a
--- a/hedgewars/uLand.pas	Fri May 11 00:11:01 2012 +0200
+++ b/hedgewars/uLand.pas	Fri May 11 11:08:50 2012 -0400
@@ -26,7 +26,7 @@
 procedure freeModule;
 procedure DrawBottomBorder;
 procedure GenMap;
-function  GenPreview: TPreview;
+procedure GenPreview(var Preview: TPreview);
 
 implementation
 uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, sysutils,
@@ -677,9 +677,8 @@
 UpdateLandTexture(0, LAND_WIDTH, 0, LAND_HEIGHT);
 end;
 
-function GenPreview: TPreview;
+procedure GenPreview(var Preview: TPreview);
 var x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
-    Preview: TPreview;
 begin
     WriteLnToConsole('Generating preview...');
     case cMapGen of
@@ -708,8 +707,6 @@
                     Preview[y, x]:= Preview[y, x] or ($80 shr bit);
             end;
         end;
-
-    GenPreview:= Preview
 end;