-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade/floodfill #667
Upgrade/floodfill #667
Conversation
Of course last night I forgot to check formatting guidelines and such. I'll take care of that after work. Sorry for that. |
@OverloadedOrama sorry to ping you. I think with my updates this PR should be able to pass the checks in the automated workflows now, but it needs authorization for those to run. |
My bad, I thought I had to authorize it once. Done! |
I did more reformatting. Apparently I had been too zealous with going to new lines for function parameters, according to the parser. |
Further refactoring. The linter failed on a line that the parser had me change. I hope it's good for both now. |
I wish I could run the format/lint tasks on my machine, but there is an issue in gdtoolkit and their scripts error out on my pc. |
I think the reason it fails is because of this bug Scony/godot-gdscript-toolkit#148. Best thing we can do for now is to add
Yeah unfortunately if I remember correctly it's not working properly on Windows. If it's a problem for you, I can use gdtoolkit to fix the formatting/linting issues. |
to line the parser has me set to longer than 100 chars
The code finally passes all automated checks. Let me know any further improvements you require. |
I'm checking now. The issue with the code in my PR is indeed on those lines. It's not correctly checking whether the segment above (or below) should be checked in cases where there is a selection area. Basically, it's testing above (or below) the left-most pixel of the segment. |
The quick fix would be
That seems to cover it all. I'm working on something more precise. |
I ended up going for that quick fix, with some comments explaining it, because it's just quicker than the alternatives I found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it and found no other issues. The performance increase is definitely there, so this seems to be good to merge. Thank you!
As discussed in #639 , this is my attempt at implementing the floodfill routine in gdscript