changeset 13754 | f1c66a34f2fe |
parent 13506 | bdac56fb6f1a |
child 13822 | 381e37c6d5d9 |
13753:5985ee7a4922 | 13754:f1c66a34f2fe |
---|---|
871 |
871 |
872 // adjust world edges for borderless maps |
872 // adjust world edges for borderless maps |
873 if (WorldEdge <> weNone) and (not hasBorder) then |
873 if (WorldEdge <> weNone) and (not hasBorder) then |
874 InitWorldEdges(); |
874 InitWorldEdges(); |
875 |
875 |
876 ScriptSetMapGlobals; |
|
876 end; |
877 end; |
877 |
878 |
878 procedure GenPreview(out Preview: TPreview); |
879 procedure GenPreview(out Preview: TPreview); |
879 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt; |
880 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt; |
880 begin |
881 begin |
886 mgDrawn: GenDrawnMap; |
887 mgDrawn: GenDrawnMap; |
887 mgForts: MakeFortsPreview(); |
888 mgForts: MakeFortsPreview(); |
888 else |
889 else |
889 OutError('Unknown mapgen', true); |
890 OutError('Unknown mapgen', true); |
890 end; |
891 end; |
892 |
|
893 ScriptSetMapGlobals; |
|
891 |
894 |
892 // strict scaling needed here since preview assumes a rectangle |
895 // strict scaling needed here since preview assumes a rectangle |
893 rh:= max(LAND_HEIGHT,2048); |
896 rh:= max(LAND_HEIGHT,2048); |
894 rw:= max(LAND_WIDTH,4096); |
897 rw:= max(LAND_WIDTH,4096); |
895 ox:= 0; |
898 ox:= 0; |
936 mgForts: MakeFortsPreview; |
939 mgForts: MakeFortsPreview; |
937 else |
940 else |
938 OutError('Unknown mapgen', true); |
941 OutError('Unknown mapgen', true); |
939 end; |
942 end; |
940 |
943 |
944 ScriptSetMapGlobals; |
|
945 |
|
941 // strict scaling needed here since preview assumes a rectangle |
946 // strict scaling needed here since preview assumes a rectangle |
942 rh:= max(LAND_HEIGHT, 2048); |
947 rh:= max(LAND_HEIGHT, 2048); |
943 rw:= max(LAND_WIDTH, 4096); |
948 rw:= max(LAND_WIDTH, 4096); |
944 ox:= 0; |
949 ox:= 0; |
945 if rw < rh*2 then |
950 if rw < rh*2 then |