Working line iterator, and mostly working flood iterator that should be good enough for world gen.
This commit is contained in:
parent
1295e9631d
commit
d4b6c35120
5 changed files with 91 additions and 39 deletions
14
matrix.hpp
14
matrix.hpp
|
@ -94,4 +94,18 @@ namespace matrix {
|
|||
bool next_working();
|
||||
};
|
||||
|
||||
struct line {
|
||||
int x;
|
||||
int y;
|
||||
int x1;
|
||||
int y1;
|
||||
int sx;
|
||||
int sy;
|
||||
int dx;
|
||||
int dy;
|
||||
int error;
|
||||
|
||||
line(Point start, Point end);
|
||||
bool next();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue