05-11-2003, 03:52 AM
got it:
In the standard palette, the colours you used are very dark. So loading the custom palette was the trick. I highly recommend that you pick a standard palette that's more sensible than the one you're using here. You can have PSP convert an image into whatever palette you want, of course... what it did here was just arbitrarily assign the colours to different numbers without any organization at all.
Code:
SCREEN 13
CLS
DIM sprite(65, 38) AS INTEGER
OPEN "NARUTO2.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
FOR drawy = 0 TO 12
FOR drawx = 0 TO 2
PUT (drawx * 8, drawy * 8), sprite(0, drawy * 3 + drawx), PSET
NEXT
NEXT
'Just so we can see the palette
FOR a = 0 TO 255
PSET (a, 0), a
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
DO: LOOP UNTIL INKEY$ <> ""
CLOSE #1
In the standard palette, the colours you used are very dark. So loading the custom palette was the trick. I highly recommend that you pick a standard palette that's more sensible than the one you're using here. You can have PSP convert an image into whatever palette you want, of course... what it did here was just arbitrarily assign the colours to different numbers without any organization at all.