equal
deleted
inserted
replaced
521 tmpsurf:= nil; |
521 tmpsurf:= nil; |
522 end; |
522 end; |
523 |
523 |
524 procedure LoadMap; |
524 procedure LoadMap; |
525 var tmpsurf: PSDL_Surface; |
525 var tmpsurf: PSDL_Surface; |
526 s: shortstring; |
|
527 mapName: shortstring = ''; |
526 mapName: shortstring = ''; |
528 begin |
527 begin |
529 WriteLnToConsole('Loading land from file...'); |
528 WriteLnToConsole('Loading land from file...'); |
530 AddProgress; |
529 AddProgress; |
531 tmpsurf:= LoadDataImage(ptMapCurrent, 'map', ifAlpha or ifTransparent or ifIgnoreCaps); |
530 tmpsurf:= LoadDataImage(ptMapCurrent, 'map', ifAlpha or ifTransparent or ifIgnoreCaps); |
629 for y:= topY to topY + 5 do |
628 for y:= topY to topY + 5 do |
630 for x:= leftX to rightX do |
629 for x:= leftX to rightX do |
631 if Land[y, x] <> 0 then |
630 if Land[y, x] <> 0 then |
632 begin |
631 begin |
633 inc(c); |
632 inc(c); |
634 if c > (LAND_WIDTH div 2) then // avoid accidental triggering |
633 if c > LongWord((LAND_WIDTH div 2)) then // avoid accidental triggering |
635 begin |
634 begin |
636 hasBorder:= true; |
635 hasBorder:= true; |
637 break; |
636 break; |
638 end; |
637 end; |
639 end; |
638 end; |