changeset 10661 | 0da243c01bde |
parent 10626 | 2562797ab3cf |
child 10717 | 0810826cdf80 |
10660:79fa79c77c38 | 10661:0da243c01bde |
---|---|
576 end; |
576 end; |
577 end; |
577 end; |
578 |
578 |
579 if hasBorder then |
579 if hasBorder then |
580 begin |
580 begin |
581 for y:= 0 to LAND_HEIGHT - 1 do |
581 if WorldEdge = weNone then |
582 for x:= 0 to LAND_WIDTH - 1 do |
582 begin |
583 if (y < topY) or (x < leftX) or (x > rightX) then |
583 for y:= 0 to LAND_HEIGHT - 1 do |
584 for x:= 0 to LAND_WIDTH - 1 do |
|
585 if (y < topY) or (x < leftX) or (x > rightX) then |
|
586 Land[y, x]:= lfIndestructible; |
|
587 end |
|
588 else if topY > 0 then |
|
589 begin |
|
590 for y:= 0 to LongInt(topY) - 1 do |
|
591 for x:= 0 to LAND_WIDTH - 1 do |
|
584 Land[y, x]:= lfIndestructible; |
592 Land[y, x]:= lfIndestructible; |
593 end; |
|
585 // experiment hardcoding cave |
594 // experiment hardcoding cave |
586 // also try basing cave dimensions on map/template dimensions, if they exist |
595 // also try basing cave dimensions on map/template dimensions, if they exist |
587 for w:= 0 to 5 do // width of 3 allowed hogs to be knocked through with grenade |
596 for w:= 0 to 5 do // width of 3 allowed hogs to be knocked through with grenade |
588 begin |
597 begin |
589 if (WorldEdge <> weBounce) and (WorldEdge <> weWrap) then |
598 if (WorldEdge <> weBounce) and (WorldEdge <> weWrap) then |
664 end |
673 end |
665 end; |
674 end; |
666 |
675 |
667 PrettifyLandAlpha(); |
676 PrettifyLandAlpha(); |
668 |
677 |
669 InitWorldEdges(); |
678 // adjust world edges for borderless maps |
679 if (WorldEdge <> weNone) and (not hasBorder) then |
|
680 InitWorldEdges(); |
|
670 |
681 |
671 end; |
682 end; |
672 |
683 |
673 procedure GenPreview(out Preview: TPreview); |
684 procedure GenPreview(out Preview: TPreview); |
674 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt; |
685 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt; |