looking for a pixel flood fill routine
Re: looking for a pixel flood fill routine
I almost finished commenting (in French) the Retour du Dr Genius flood fill routine.
I'm just in a boring moment with real life, kind of "a new problem each day". When (if!) things calm down, I'll post it.
I'm just in a boring moment with real life, kind of "a new problem each day". When (if!) things calm down, I'll post it.
Re: looking for a pixel flood fill routine
Nice !
but it's not urgent.
if you have the time, otherwise it's okay.
but it's not urgent.
if you have the time, otherwise it's okay.
Re: looking for a pixel flood fill routine
There it is! In French sorry, but I guess automatic translators can do the job if any non-French is curious.
Sorry it took so long, I struggled a lot with the stack management, I never found a long quiet moment to focus on it and understand. Now here we are
BTW, the code is long, maybe it's worth to take a look at Geoff Philips' one in his book, I didn't test it but it might be easier / less memory consuming, etc.
Sorry it took so long, I struggled a lot with the stack management, I never found a long quiet moment to focus on it and understand. Now here we are
BTW, the code is long, maybe it's worth to take a look at Geoff Philips' one in his book, I didn't test it but it might be easier / less memory consuming, etc.
Re: looking for a pixel flood fill routine
Oh yes it looks much faster than Genius. Genuis looks nice and is no-so-slow, but I wonder if Lorigraph doesn't already use the idea I had (check/fill pixels by group of six before doing it of one by one).
Re: looking for a pixel flood fill routine
Re: looking for a pixel flood fill routine
Well, I haven't deeply checked but I saw a CMP $40 while Lorigraph was executing the fill routine.
So I guess that's the idea
So finally, it will probably be better to isolate Lorigraph's routine... Oh no, not again!
Re: looking for a pixel flood fill routine
Waou nice work
It's very difficult to extract the meaning of an assembly code without knowing the design.
Well done.
Re: looking for a pixel flood fill routine
Thanks!
Well, at least I knew from the start what I was looking for, it helped a lot
Well, at least I knew from the start what I was looking for, it helped a lot
Re: looking for a pixel flood fill routine
@Symoon: Congrats for this huge amount of work!
Re: looking for a pixel flood fill routine
Thanks, that's not that much work, it's just me complaining about the lack of spare time
If you're curious and need some help translating, just let me know (I kept it in French both by lazyness and for Goyo)
If you're curious and need some help translating, just let me know (I kept it in French both by lazyness and for Goyo)
Re: looking for a pixel flood fill routine
I tried to get Geffers routine to work, without success.
It's from the book https://library.defence-force.org/index ... =007084743
I tried to call it from BASIC doing that:
and all I get is just 6 white pixels in the center.
I guess I must have missed something.
It's from the book https://library.defence-force.org/index ... =007084743
I tried to call it from BASIC doing that:
Code: Select all
HIRES
CURSET120,100,3
CIRCLE50,1
POKE 0,120:POKE 1,100
CALL #1000
I guess I must have missed something.
Re: looking for a pixel flood fill routine
I still did not manage to get Geffers assembler routine to run, but I managed to get the BASIC one to work, and then I converted it to C.
It still quite slow, but it does not explode on some relatively complex shape, so I guess it could relatively easily be converted to assembler.
You can find the source code for the two programs on the SVN repository:
https://osdn.net/projects/oricsdk/scm/s ... sic/paint/
https://osdn.net/projects/oricsdk/scm/s ... e/c/paint/
It still quite slow, but it does not explode on some relatively complex shape, so I guess it could relatively easily be converted to assembler.
You can find the source code for the two programs on the SVN repository:
https://osdn.net/projects/oricsdk/scm/s ... sic/paint/
https://osdn.net/projects/oricsdk/scm/s ... e/c/paint/
Re: looking for a pixel flood fill routine
I continued playing with the flood fill code, for the ones interested:
Re: looking for a pixel flood fill routine
Glad you tried Goeff's ones!
At the moment I gave up looking at the Lorigraph one. It was a bit complicated and couldn't spend time on it for a month. But it's the fastest of the (very few) I saw.
At the moment I gave up looking at the Lorigraph one. It was a bit complicated and couldn't spend time on it for a month. But it's the fastest of the (very few) I saw.
Re: looking for a pixel flood fill routine
I'm interested!
I wonder if a lot of time is being wasted in the ROM curset function (maybe point too?) Are you using those to plot and to get the value of a pixel?
Use one of our fast putpixel or pixeladdress routines and you'll probably see it fly, but that would be assembler called within C, a bit of cheating
I wonder if a lot of time is being wasted in the ROM curset function (maybe point too?) Are you using those to plot and to get the value of a pixel?
Use one of our fast putpixel or pixeladdress routines and you'll probably see it fly, but that would be assembler called within C, a bit of cheating