Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: Risen Phoenix on July 20, 2006, 01:38:00 pm
-
In Xlib and some other libraries, some commands have and,or,xor options.( ex: Xlib sprite command) What do they mean and how do you use them?
Thanks in advance :)
-
To be quick and simple:
AND
oldscreen-: 1100
sprite------: 1010
newscreen: 1000
OR
oldscreen-: 1100
sprite------: 1010
newscreen: 1110
XOR
oldscreen-: 1100
sprite------: 1010
newscreen: 0110
0 = pixel off/white
1 = pixel on/black
oldscreen AND/OR/XOR sprite = newscreen
-
hehehe,check out xlib guru! :)
-
As for how you use them well, getting masked sprites is what first comes to my mind. Basically you have to AND the sprite mask to the screen so that it clears the area that the sprite takes up. Then you can XOR/OR the actual sprite into the blank area so the sprite does look messed up/ see-through if you just used one operation.