gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Generating circles using hardware

#139594 - Takaishi_Takeru - Fri Sep 07, 2007 10:21 pm

Hi.

I want to know if its possible to draw circles using the nds hardware?

Thanks.

#139597 - nornagon - Sat Sep 08, 2007 12:18 am

It's not. You can get good performance out of Bresenham's algorithms for lines and circles, though.

#139603 - kusma - Sat Sep 08, 2007 1:57 am

you can always approximate circles with sprites or lines.

#139606 - nornagon - Sat Sep 08, 2007 2:19 am

I guess you could draw a circle into a sprite and use that. Depends on your application.

#139611 - Takaishi_Takeru - Sat Sep 08, 2007 3:36 am

mm, thanks.

If i have a sprite of a circle, using only black and magenta (for transparent) , its possible to change the black color to another one? (i just need some basic colors)

#139613 - nornagon - Sat Sep 08, 2007 4:08 am

Yes, just change the palette.

#139691 - Takaishi_Takeru - Sat Sep 08, 2007 10:50 pm

nice!, how can i change the palette?

Thanks!