My paint() in C

Pagina 2/2
1 |

Van brawaga

Resident (56)

afbeelding van brawaga

24-02-2021, 06:41

Split your shape to rectangles and fill them instead, this won't use search of boundary pixels and so should be twice faster, I expect.

Van PingPong

Prophet (4094)

afbeelding van PingPong

24-02-2021, 19:57

time ago a mrc user posted a paint (flood fill) routine tha uses more efficiencly z80 & vdp color search function & byte fill function when possible, but i do not remember who was. it also had the additional bonus that you were not required to specify the border color for the region you want to fill, simply it stop in any color that is different from the color of the pixels where you specify to start from filling.

Van jltursan

Prophet (2619)

afbeelding van jltursan

24-02-2021, 20:45

Quote:

time ago a mrc user posted a paint (flood fill) routine tha uses more efficiencly z80 & vdp color search function & byte fill function when possible, but i do not remember who was

Mmmm, ¿Dolphin101546015?

Van PingPong

Prophet (4094)

afbeelding van PingPong

25-02-2021, 09:32

Maybe was Dolphin101546015 --- i do not remember

Van jltursan

Prophet (2619)

afbeelding van jltursan

25-02-2021, 10:36

Found the thread, maybe this: Looking for a PAINT routine for MSX2

Van thegeps

Paragon (1175)

afbeelding van thegeps

25-02-2021, 10:50

Maybe he wants that his code work on msx1 too... so no commamd is allowed...
And probably (but I could be mistaken) he is working on a 3D poligon engine (no wireframe, due to areas filling).
So he need a way to fill poligons in a fast way

Van Dolphin101546015

Champion (335)

afbeelding van Dolphin101546015

25-02-2021, 19:53

My function is not using FlodFill algorithm.
FlodFill is recursive method painting area with near pixels and checking bounds in all ways.
Its very slow for MSX and need very big stack ram.

Pagina 2/2
1 |