Page 1 of 1
Using oamInit() to reset the OAM
Posted: Fri May 22, 2009 11:03 pm
by Sylus101
Quick question. From the source, it appears that it would be fine, but I just wanted to check. Should oamInit() suffice as a way to just reset the oam for a particular engine after it's already had several spots in memory allocated, etc? I notice there is an undocumented function oamAllocReset() called so I'm wondering if that pretty much does the trick.
Thanks,
Sylus
Re: Using oamInit() to reset the OAM
Posted: Fri May 22, 2009 11:58 pm
by vuurrobin
well, one of the first things oamInit() does is a call to dmaFillWords(), so my guess would be yes. I suggest you try it out and see if anything weard happens.
but why aren't you using oamClear() to clear/reset the oam?
Re: Using oamInit() to reset the OAM
Posted: Sat May 23, 2009 4:04 am
by Sylus101
Because it's not just hiding all the sprites that I need to do. I'm also wanting to reset the memory allocation system.
Re: Using oamInit() to reset the OAM
Posted: Sun May 24, 2009 3:51 pm
by Tomdev
as for hiding sprites: you can make a function yourself(it's not too complicated) for resetting the gfx i don't know, maybe clear the whole vrambank you're using for the sprites?
Re: Using oamInit() to reset the OAM
Posted: Sun May 24, 2009 4:27 pm
by vuurrobin
or by setting the sprites visibility to false, which is what oamClear() does.
also, oamInit() calls oamAllocReset() in the end, so I think it would be ok.