Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. let rec cleanblack surface x y =
  2. Sdlvideo.put_pixel_color surface x y (255,255,255);
  3. if (x > 0) then
  4. begin
  5. if (Sdlvideo.get_pixel_color surface (x-1) y = (0,0,0)) then
  6. cleanblack surface (x-1) y
  7. end;
  8. if (x < (w-1)) then
  9. begin
  10. if (Sdlvideo.get_pixel_color surface (x+1) y = (0,0,0)) then
  11. cleanblack surface (x+1) y
  12. end;
  13. if (y > 0) then
  14. begin
  15. if (Sdlvideo.get_pixel_color surface x (y-1) = (0,0,0)) then
  16. cleanblack surface x (y-1)
  17. end;
  18. if (y < (h-1)) then
  19. begin
  20. if (Sdlvideo.get_pixel_color surface x (y+1) = (0,0,0)) then
  21. cleanblack surface x (y+1)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement