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 > sprite flipping

#1594 - np_soft - Mon Jan 20, 2003 4:56 pm

Hi, i'm trying to reduce the amount of mem using to store my sprite data simply by flipping them, IE an overhead view of a guy shooting stuff.. etc
or a sprite walking left and then using the same animation to walk right.
The problem is, when I set the flip horizontal flag, only some are flipped, and none are used in my sprite animation.. any suggestions?

This is what I have for my Hflip register
#define HORIZONTAL_FLIP 0x1000
This is my line of code (and yes, rotation bit is NOT on)
sprites[sp->oamEntry].attribute0 = sprites[sp->oamEntry].attribute0 | HORIZONTAL_FLIP;

Did I define the register wrong?

Any help would be great!
Thanks
Ed.

#1600 - Splam - Mon Jan 20, 2003 5:28 pm

Should be attrib1 ;) presuming you're going 0,1,2,3