title: "SetSpriteLoc" description: TRSE built-in method (from IDE help)
SetSpriteLoc
Systems: C64, PLUS4, C128, MEGA65
Parameters: b,b,n
Usage: SetSpriteLoc( [ sprite=[0:7], [ dataloc ], [bank=[0:3] );
Sets sprite data pointer location. The sprite number (or variable) is limited to 0-7, while the bank number must be a numeric. The actual sprite position must be located at 64*dataloc.
Example: Assume you have loaded a set of 10 sprites at position $2400. The start of the 64-bit sprite
chunks is then $2400 (9216 decimal) / $40 (64 decimal) = $90 (114 decimal). If you want to set sprite number 4 to the sprite data at chunk 0 (bank 0), you would type:
setspriteloc(4, $90, 0);
If you want sprite 3 to display the 5th chunk on bank 1, you type
setspriteloc(3, $95, 1);