vram I palette, oamAffineTransformation and shutdownDS

Post Reply
User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

vram I palette, oamAffineTransformation and shutdownDS

Post by vuurrobin » Fri Jul 24, 2009 12:51 am

in \arm9\video.h, there are some defines to acces vram E, F, G and H as external palettes, but there isn't a define for accessing vram I.


in \arm9\sprite.h, oamAffineTransformation() doesn't need to bitshift the parameters by 12. this was a mistake on my part, because I didn't know it was only nessesairy for the sin and cos functions.

also, the sassert in oamRotateScale() speaks of oamAffineTransformation instead of oamRotateScale(). probably a copy paste mistake.


the function shutdownDS() was added in libnds 1.3.4, but when I look at \nds\system.h, it is only in the arm7 part and not in the arm9 part. I think it should also be in the arm9 part. also, systemSleep() was defined in both parts, but sleepEnabled() is only in the arm7 part. is this intentional, and if yes, how does the arm9 exits sleep mode if it entered it.


the function oamClear() clears a range of sprites. but I think that most of the time you only want to clear 1 sprite. could you add this function:

Code: Select all

/**
    @brief clears a single sprite.
    
    @param oam      the oam engine, must be &oamMain or &oamSub
    @param index    the index of the sprite, must be 0-127
*/
inline void oamClearSprite(OamState *oam, uint index)
{
    sassert(index < SPRITE_COUNT, "oamClearSprite() index is out of bounds, must be 0-127");
    oam->oamMemory[index].attribute[0] = ATTR0_DISABLED;
}

greets,

vuurrobin

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests