equal
deleted
inserted
replaced
547 Despeckle:= false |
547 Despeckle:= false |
548 end; |
548 end; |
549 |
549 |
550 function SweepDirty: boolean; |
550 function SweepDirty: boolean; |
551 var x, y, xx, yy: LongInt; |
551 var x, y, xx, yy: LongInt; |
552 Result, updateBlock, resweep: boolean; |
552 bRes, updateBlock, resweep: boolean; |
553 begin |
553 begin |
554 Result:= false; |
554 bRes:= false; |
555 |
555 |
556 for y:= 0 to LAND_HEIGHT div 32 - 1 do |
556 for y:= 0 to LAND_HEIGHT div 32 - 1 do |
557 begin |
557 begin |
558 |
558 |
559 for x:= 0 to LAND_WIDTH div 32 - 1 do |
559 for x:= 0 to LAND_WIDTH div 32 - 1 do |
567 resweep:= false; |
567 resweep:= false; |
568 for yy:= y * 32 to y * 32 + 31 do |
568 for yy:= y * 32 to y * 32 + 31 do |
569 for xx:= x * 32 to x * 32 + 31 do |
569 for xx:= x * 32 to x * 32 + 31 do |
570 if Despeckle(xx, yy) then |
570 if Despeckle(xx, yy) then |
571 begin |
571 begin |
572 Result:= true; |
572 bRes:= true; |
573 updateBlock:= true; |
573 updateBlock:= true; |
574 resweep:= true; |
574 resweep:= true; |
575 end; |
575 end; |
576 end; |
576 end; |
577 if updateBlock then UpdateLandTexture(x * 32, 32, y * 32, 32); |
577 if updateBlock then UpdateLandTexture(x * 32, 32, y * 32, 32); |
578 LandDirty[y, x]:= 0; |
578 LandDirty[y, x]:= 0; |
579 end; |
579 end; |
580 end; |
580 end; |
581 end; |
581 end; |
582 |
582 |
583 SweepDirty:= Result |
583 SweepDirty:= bRes; |
584 end; |
584 end; |
585 |
585 |
586 // Return true if outside of land or not the value tested, used right now for some X/Y movement that does not use normal hedgehog movement in GSHandlers.inc |
586 // Return true if outside of land or not the value tested, used right now for some X/Y movement that does not use normal hedgehog movement in GSHandlers.inc |
587 function CheckLandValue(X, Y: LongInt; Color: Word): boolean; |
587 function CheckLandValue(X, Y: LongInt; Color: Word): boolean; |
588 begin |
588 begin |