#110612 - QuantumDoja - Wed Nov 29, 2006 10:44 pm
Hi, Im not sure if this is right, but can i load in 1 64 by 64 sprite into memory and then draw 50 of these on the screen at one time
sprites[n to 50].OAM = 0;
I can fit eight 64x64 sprites into memory at once, i should be able to create 50 references to them...shouldnt i?
_________________
Chris Davis
#110616 - DekuTree64 - Wed Nov 29, 2006 11:10 pm
Yeah, that should work fine. There is a limit to the number of sprite pixels the hardware can draw on a single scanline though, so you might get some graphical tearing with that many packed onto the screen at once.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#110618 - tepples - Wed Nov 29, 2006 11:14 pm
Given unrotated, unscaled sprites, each 64 pixels wide, you can fit 18 on one scanline (or 14 if the "write enable OAM during hblank" bit in DISPCNT is turned on).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#110631 - gmiller - Thu Nov 30, 2006 12:22 am
tepples wrote: |
Given unrotated, unscaled sprites, each 64 pixels wide, you can fit 18 on one scanline (or 14 if the "write enable OAM during hblank" bit in DISPCNT is turned on). |
Is this a bit for GBA or DS? I don't remember it for GBA.
#110637 - tepples - Thu Nov 30, 2006 12:42 am
gmiller wrote: |
tepples wrote: | you can fit 18 on one scanline (or 14 if the "write enable OAM during hblank" bit in DISPCNT is turned on). |
Is this a bit for GBA or DS? I don't remember it for GBA. |
It's DISPCNT bit 5 on GBA.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#110644 - gmiller - Thu Nov 30, 2006 1:21 am
Yep ... I missed that .... don't know why but I guess I never tried to modify OAM during HBLANK ...
#110688 - QuantumDoja - Thu Nov 30, 2006 2:56 pm
Hi, thanks for your replies, I thought I could....Ive been dealing with a horrible bug regarding sprites for the past three days, just worked out i hadnt set my sprites array big enough.....man 3 days wasted!!!!!!
_________________
Chris Davis