Open programmer2514 opened 5 years ago
I've never had success with LoadData.
LoadData(A,B,C
Essentially, all it does is allocate a pointer to C sprites from B offset of the file named A, iirc.
Try this in the meantime (THIS WON'T WORK IF YOU HAVE MORE THAN 682 SPRITES):
Open(FILE,"r->D
GetDataPtr(D->PTR
GetSize(D->LEN
Close(D
Str1->S
While LEN
PTR->{S
S+3->S
2+*{PTR}*(*{PTR+1->L
PTR+L->PTR
LEN-L->LEN
End
This should provide the sprite pointers for DefineTilemap(
To start ahead of the start of the file, just add the number of bytes to skip to PTR
and subtract them from LEN
before the loop
I am trying to use LoadData( to get data from an AppVar defined in Str1. This works fine in a smaller program, but any time I try to use the command LoadData(Str1,0,3) in a program that is bigger than ~20 KB, my calculator's RAM gets cleared. What happens exactly is: 1) I run the program and load the data 2) It loads fine and I can use it perfectly 3) I exit the program and my RAM clears
I have found no workaround for this and it is hard to do certain things without it. If this can be fixed, that would be great.
Thanks, calclover2514