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 > Draw a sprite multiple times PAlib

#163153 - sixmind80 - Wed Sep 24, 2008 12:57 am

I'm using PAlib, and i have an instance of sprite. is it possible to draw this sprite multiple times in one frame?

the logic goes like this:

sprite->setPos( 0, 10 );
sprite->draw();

sprite->setPos( 0, 20 );
sprite->draw();

...or the only way to do it would be to create multiple instances of the sprite?

thanks

#163183 - tepples - Wed Sep 24, 2008 8:19 pm

Load one graphic into sprite cel VRAM, and then create multiple sprite instances that all use the same graphic.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#163196 - sixmind80 - Thu Sep 25, 2008 12:50 am

yea okay that's what i was thinking in the beginning too.
alright thanks very much for confirming this.