Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function floodfill(x,y,old_color,new_color:Integer; map : Map_gen) : Integer;
- var
- x2,y2:Integer;
- begin
- if map[x,y] <> old_color then Exit();
- map[x,y] := new_color;
- for x2 := -1 to 1 do
- begin
- for y2 := -1 to 1 do
- begin
- floodfill(x + x2,y + y2,old_color,new_color,map)
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement