#19750 - CyberSlag5k - Sat Apr 24, 2004 6:21 pm
Ok, gifs2sprites converts any number of gifs to info for sprites and puts them in a header file. Each frame is given a name (obj0, obj1, 0bj2....). Now, I have a ton of these guys (18) that I am loading into OAM, so I threw them all into one big for loop. The problem is, I cannot incrememnt the 0 in obj0 each time. So I came up with this little dewsie:
Now, as you can see I'm quite exceeding obj0's boundaries (the sprites are 64x64 and so obj as 2048 indices). One would think that all the objects would be stored next to each other, right? Am I like totally cheating? My program is acting kind of funny, so I'm wondering if this is the cause.
Any thoughts?
p.s. I'll supply more code if you guys think it's necessary, but for now I don't think it is.
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...
Code: |
for(int j = 0; j < 15; j++) for(int i = 0; i < 2048; i++) OAMData[i + (j * 2048)] = obj0[i + (j * 2048)]; |
Now, as you can see I'm quite exceeding obj0's boundaries (the sprites are 64x64 and so obj as 2048 indices). One would think that all the objects would be stored next to each other, right? Am I like totally cheating? My program is acting kind of funny, so I'm wondering if this is the cause.
Any thoughts?
p.s. I'll supply more code if you guys think it's necessary, but for now I don't think it is.
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...