05-22-2003, 03:35 AM
I just did that masking thing and all my colors got a little screwy.
Really screwy.
I'm waiting for the chance to upload it, becuase it's really impossible to describe it.
If you know the problem off hand please tell me. Here is my long abstract code collected from what you guys have given me.
Really screwy.
I'm waiting for the chance to upload it, becuase it's really impossible to describe it.
If you know the problem off hand please tell me. Here is my long abstract code collected from what you guys have given me.
Code:
SCREEN 13
CLS
PAINT (0, 0), 1
DIM sprite(65, 66 + 66) AS INTEGER
OPEN "NARUTO.TIL" FOR BINARY AS #1
length = LOF(1) - 768
FOR sprt% = 0 TO (length / 66) - 1
sprite%(0, sprt%) = 64
sprite%(1, sprt%) = 8
FOR byte% = 2 TO 33
GET #1, (sprt% * 66) + 3 + ((byte% - 2) * 2), temp%
'PRINT temp%
sprite%(byte%, sprt%) = temp%
NEXT
NEXT
'LOAD IN THE PALETTE
length = length + 1
DIM colorval AS LONG
FOR col = 0 TO 255
GET #1, length + (col * 3), R%
GET #1, length + (col * 3) + 1, G%
GET #1, length + (col * 3) + 2, B%
R% = R% AND 63
G% = G% AND 63
B% = B% AND 63
colorval& = R% + (G% * 256) + (B% * 65536)
PALETTE col, colorval&
NEXT
DIM mask(65, 66 + 66) AS INTEGER
OPEN "MASK.TIL" FOR BINARY AS #2
length = LOF(2) - 768
FOR sprt% = 0 TO (length / 66) - 1
mask%(0, sprt%) = 64
mask%(1, sprt%) = 8
FOR byte% = 2 TO 33
GET #2, (sprt% * 66) + 3 + ((byte% - 2) * 2), temp%
'PRINT temp%
mask%(byte%, sprt%) = temp%
NEXT
NEXT
FOR drawx = 0 TO 22
FOR drawy = 0 TO 2
PUT (drawx * 8, drawy * 8), mask(0, masknum), AND
masknum = masknum + 1
NEXT
NEXT
FOR drawx = 0 TO 22
FOR drawy = 0 TO 2
PUT (drawx * 8, drawy * 8), sprite(0, spritenum), XOR
spritenum = spritenum + 1
NEXT
NEXT
DO: LOOP UNTIL INKEY$ <> ""
CLOSE #1, #2
·····································LINEAR INC·····································
Ã-----------------------------------------------------------------------O
From Problem to Solution - We take the shortest distance
Ã-----------------------------------------------------------------------O
From Problem to Solution - We take the shortest distance