#14223 - doudou - Fri Jan 02, 2004 10:49 pm
What makes a sprite to be shown over another ? My first guess (according to the result I currently have) would be that sprites at the begining of the OAM are on top. Am I right ?
#14224 - sajiimori - Fri Jan 02, 2004 11:37 pm
Yup.
#14226 - poslundc - Fri Jan 02, 2004 11:54 pm
You can also specify a priority level as one of the OAM attributes that determines the ordering of sprites relatives to several "layers" that include backgrounds as well. There are 4 different priority levels, with 0 being highest-priority and 3 being lowest-priority.
So if you have two sprites that are OAM entries 50 and 51, and they are both priority 0, then sprite 50 will display above sprite 51. But if sprite 50 is priority 1 and sprite 51 is priority 0, then sprite 51 will display above sprite 50, even though it is a higher OAM entry.
Dan.
#14230 - sajiimori - Sat Jan 03, 2004 12:29 am
Oh ya, that too. And sprite priority levels interact nicely with background priority levels -- sprites are drawn just on top of the background with the same priority.
#14231 - dagamer34 - Sat Jan 03, 2004 1:13 am
I bet you want to know how to set one sprite in front of another now?
Simply swap the attributes. Isn't the GBA easy to program for? (except for multiplayer)
You're welcome.... I didn't really even do anything..
_________________
Little kids and Playstation 2's don't mix. :(
Last edited by dagamer34 on Sat Jan 03, 2004 3:18 am; edited 1 time in total
#14233 - sajiimori - Sat Jan 03, 2004 1:51 am
Wow, you sure are helpful.
#14240 - dagamer34 - Sat Jan 03, 2004 3:18 am
I can't help myself so I'm going to help others. Besides, my artist is on his off day...
_________________
Little kids and Playstation 2's don't mix. :(