# HG changeset patch
# User nemo
# Date 1336748930 14400
# Node ID db17476d7a37288dfeebe87a83e8967abf04b2a9
# Parent  91199321e916d945851701033efc6adbc7c63fb5
Avoid returning an array for the sake of pas2c

diff -r 91199321e916 -r db17476d7a37 hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas	Fri May 11 00:11:01 2012 +0200
+++ b/hedgewars/hwengine.pas	Fri May 11 11:08:50 2012 -0400
@@ -481,7 +481,7 @@
     IPCWaitPongEvent;
     TryDo(InitStepsFlags = cifRandomize, 'Some parameters not set (flags = ' + inttostr(InitStepsFlags) + ')', true);
 
-    Preview:= GenPreview();
+    GenPreview(Preview);
     WriteLnToConsole('Sending preview...');
     SendIPCRaw(@Preview, sizeof(Preview));
     SendIPCRaw(@MaxHedgehogs, sizeof(byte));
diff -r 91199321e916 -r db17476d7a37 hedgewars/uLand.pas
--- 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;