#22922 - Darmstadium - Thu Jul 01, 2004 4:05 am
My goal is to clear out the bits that store the x and y in a OAM entry and put in new ones. I tried it like this:
but that messes stuff up. Am I crazy or does XOR do the following?:
0 and 1 = 1
0 and 0 = 0
1 and 1 = 0
according to CowBite the y takes bits 0-7 of attribute 0 and the x takes bits 0-8 of attribute 1.
Thanks a whole bunch for your help
Code: |
sprites[0].attribute0 ^= 0xFF; sprites[0].attribute0 |= test_y; sprites[0].attribute1 ^= 0x1FF; sprites[0].attribute1 |= test_x; |
but that messes stuff up. Am I crazy or does XOR do the following?:
0 and 1 = 1
0 and 0 = 0
1 and 1 = 0
according to CowBite the y takes bits 0-7 of attribute 0 and the x takes bits 0-8 of attribute 1.
Thanks a whole bunch for your help