06-21-2003, 01:23 PM
XOR? Mmmh..
1.- I use it often to create a cheap texture
Edited: Nr 2 did'nt worked...
3.- The CRC algorithm is based on XOR
(Code ripped from ABC)
4.- The sprite animation technique often suggested to newbies:
Excuse me if it's not exactly like this, you never find those darn snippets when you need them...
edited:
BTW: Have you ever used EQV ? Not me....
1.- I use it often to create a cheap texture
Code:
screen 13
for i=0 to 63
for j=0 to 63
pset(i,j),i xor j
next j,i
Edited: Nr 2 did'nt worked...
3.- The CRC algorithm is based on XOR
(Code ripped from ABC)
Code:
CRC = 0 'Reset for Each Text Block
FOR I = 1 TO LEN(B$) 'Calculate for Length of Block
ByteVal = ASC(MID$(B$, I, 1))
FOR J = 7 TO 0 STEP -1
TestBit = ((CRC AND 32768) = 32768) XOR ((ByteVal AND Power(J)) = Power(J))
CRC = ((CRC AND 32767&) * 2&)
IF TestBit THEN CRC = CRC XOR &H1021& ' <-- This for 16 Bit CRC
NEXT J
NEXT I
CRC16& = CRC
4.- The sprite animation technique often suggested to newbies:
Excuse me if it's not exactly like this, you never find those darn snippets when you need them...
Code:
PUT (x,y), mask(0), XOR
PUT(X,Y),SPRITE(0),PSET
edited:
BTW: Have you ever used EQV ? Not me....
Antoni