02-07-2004, 02:03 AM
i'm trying to make a sprite, and a sprite mask. i made the sprite in PP256 and saved it as the first set of data statements below. then i copied those, and made a mask with the second set of data statements. i am trying to read them into an array, but i get the error "out of data" immediately when i run the program below.. what's wrong with it? thanks.
Code:
CLS
DIM octo(31, 19)
DIM octom(31, 19)
FOR y = 1 TO 19
FOR x = 1 TO 31
READ octo(x, y)
NEXT
NEXT
x = 0
y = 0
FOR y = 1 TO 19
FOR x = 1 TO 31
READ octom(x, y)
NEXT
NEXT
'the octopus
DATA 297
DATA 248,19,0,0,0,0,0,0,-15678,-15678,-15678,-15678,0,0,0,0,0,0,0,0
DATA 0,0,-15678,-15678,-15678,-15678,-15678,-15678,-15678,0,0,0,0,0,0,0,0,-15678,-15678,-15678
DATA -15678,-15678,-15678,-15678,-15678,0,0,0,0,0,0,0,-15678,-15678,10178,-15833,-15678,10178,-15833,-15678
DATA -15678,0,0,0,0,0,0,-15678,-15678,-15678,39,-15833,10178,9984,-15678,-15678,-15678,0,0,0
DATA 0,0,-15872,-15678,-15678,-15678,10023,-15678,10023,-15678,-15678,-15678,194,0,0,0,0,0,-15678,-15678
DATA -15678,-15678,-15678,-15678,-15678,-15678,-15678,-15678,0,0,0,0,0,-15872,-15678,-15678,-15678,-15678,-15678,-15678
DATA -15678,-15678,-15678,194,0,0,0,0,0,-15872,-15678,-15678,-15837,-15678,-15678,9154,-15678,-15678,194,0
DATA 0,0,0,0,0,-15872,-15678,-15678,8995,8995,8995,-15678,-15678,194,0,0,0,0,0,0
DATA 0,-15872,-15678,-15678,-15678,-15678,-15678,-15678,194,0,0,0,0,0,0,0,0,-15678,-15872,-15678
DATA -15678,-15678,194,-15872,0,0,0,0,0,0,0,0,-15678,0,-15872,194,0,194,0,-15678
DATA 0,0,0,0,0,0,0,-15872,0,-15872,194,0,-15872,0,0,194,0,0,0,0
DATA 0,0,0,-15678,0,194,0,0,194,0,-15872,0,0,0,0,0,0,0,0,-15678
DATA -15872,194,0,-15678,0,0,194,0,0,0,0,0,0,0,0,194,0,194,-15872,0
DATA -15872,-15678,0,0,0,0,0,0,0,0,-15872,0,-15872,194,-15678,194,194,0,0,0
DATA 0,0,0,0,0,-15872,194,0,194,0,-15872,-15872,0,0,0,0,0
'the mask for the octopus
DATA 297
DATA 248,19,255,255,255,255,255,255,15678,15678,15678,15678,255,255,255,255,255,255,255,255
DATA 255,255,15678,15678,-15678,-15678,-15678,-15678,-15678,255,255,255,255,255,255,255,255,15678,15678,15678
DATA 15678,-15678,-15678,-15678,-15678,255,255,255,255,255,255,255,-15678,-15678,10178,-15833,15678,10178,15833,15678
DATA -15678,255,255,255,255,255,255,-15678,-15678,-15678,39,-15833,10178,9984,-15678,-15678,-15678,255,255,255
DATA 255,255,-15872,-15678,-15678,-15678,10023,-15678,10023,-15678,-15678,-15678,194,255,255,255,255,255,15678,15678
DATA -15678,-15678,-15678,-15678,-15678,-15678,-15678,-15678,255,255,255,255,255,-15872,-15678,-15678,-15678,-15678,-15678,
DATA 15678
DATA -15678,-15678,-15678,194,255,255,255,255,255,-15872,-15678,-15678,-15837,-15678,-15678,9154,-15678,-15678,194,255
DATA 255,255,255,255,255,-15872,-15678,-15678,8995,8995,8995,-15678,-15678,194,255,255,255,255,255,255
DATA 255,-15872,-15678,-15678,-15678,-15678,-15678,-15678,194,255,255,255,255,255,255,255,255,-15678,-15872,-15678
DATA -15678,-15678,194,-15872,255,255,255,255,255,255,255,255,-15678,255,-15872,194,255,194,255,-15678
DATA 255,255,255,255,255,255,255,-15872,255,-15872,194,255,-15872,255,255,194,255,255,255,255
DATA 255,255,255,-15678,255,194,255,255,194,255,-15872,255,255,255,255,255,255,255,255,-15678
DATA -15872,194,255,-15678,255,255,194,255,255,255,255,255,255,255,255,194,255,194,-15872,255
DATA -15872,-15678,255,255,255,255,255,255,255,255,-15872,255,-15872,194,-15678,194,194,255,255,255
DATA 255,255,255,255,255,-15872,194,255,194,255,-15872,-15872,255,255,255,255,255