gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > rotation

#8032 - whodoo - Tue Jul 01, 2003 1:24 am

when using rotating sprites..if I set the values like
sprites[nr].attribute0 = COLOR_256 | SQUARE | ROTATION_FLAG | SIZE_DOUBLE | numItem->y;

and then RotateSprite(0,angel,zoom-a/10,zoom-a/10);
all the sprites with ROTATION_FLAG will rotate and zoom, not only number 0..why?s that?

#8035 - tepples - Tue Jul 01, 2003 2:11 am

For each sprite you want to rotate and zoom separately, you have to make a separate affine matrix. There's room in OAM for 32 such matrices, and each sprite can reference any one of them in attribute 1.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.