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