Work in Progress

Semi-manual flood fill

5

SP4CEBAR 2023-01-15 22:45

This uses my fast pixel graphics (it checks and writes 8 pixel (1 byte) horizontal line segments instead of pixels)

It doesn't handle tight spaces very well right now

The active subprogram is called "FLOOD_FILL"

Pretty Fast.nx | Open in app
2023-01-16 10:06
Pretty Fast.nx | Open in app
2023-01-16 09:31
Pretty Fast.nx | Open in app
2023-01-15 22:45

McPepic 2023-01-15 23:06

If you tap the outer edge of the large circle, the program gets softlocked.


SP4CEBAR 2023-01-16 09:26

Yeah, I found that too, that probably happens because it only accepts edges of colors, not the edge of the map, I added a clamp to keep it from causing an error, I should probably replace it with a conditional"EXIT"


SP4CEBAR 2023-01-16 09:32

Update: it's fixed now


SP4CEBAR 2023-01-16 09:45 (Edited)

I love TRACE BIN$( PEEK(A), 8) as it allows me to see the pixels along with some variables


SP4CEBAR 2023-01-16 10:08 (Edited)

Update: small areas now look somewhat alright, it's quite complicated as it has to know which bits belong to the flood-filled area and which don't, currently it just fills in all the black pixels in the 8-pixel line segment, whether they are isolated or not


Log in to reply.