06-07-2004, 06:51 PM
i read tut 6 and got it working. What i'd like to do is load images on the screen and get them one by one (that was my previous post). i changed the background to be something that the image can never be, pink, blue, whatever. i've noticed that when the background is something other than black and i still create a mask by setting the background points to 255, it's not transparent. If the background is 0 and then the mask is 255, it works. Is there a way to avoid this or does the transparent part always have to be 0?
So with this code snippet, if i changed the data statements to be color 100 instead of 0, it won't be transparent where as now as 0 it is. Any ideas?
So with this code snippet, if i changed the data statements to be color 100 instead of 0, it won't be transparent where as now as 0 it is. Any ideas?
Code:
SCREEN 13
DIM x(13)
DIM xMask(13)
FOR y = 1 TO 5
FOR x = 1 TO 5
READ pixel
PSET (x, y), pixel
NEXT
NEXT
GET (1, 1)-(5, 5), x
FOR y = 1 TO 5
FOR x = 1 TO 5
READ pixel
PSET (x, y), pixel
NEXT
NEXT
GET (1, 1)-(5, 5), xMask
PAINT (10, 10), 4
PUT (50, 50), xMask, AND
PUT (50, 50), x, OR
DATA 2,0,0,0,2
DATA 0,2,0,2,0
DATA 0,0,2,0,0
DATA 0,2,0,2,0
DATA 2,0,0,0,2
DATA 002,255,255,255,002
DATA 255,002,255,002,255
DATA 255,255,002,255,255
DATA 255,002,255,002,255
DATA 002,255,255,255,002