AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
=>     R0 =     15, &F (Create sprite)
     R1 =     Sprite area
     R2 =     Sprite name/pointer
     R3 =     0 => Exclude palette
           1 => Include palette
     R4 =     Width in pixels
     R5 =     Height in pixels
     R6 =     Mode number, or sprite type, or mode specifier block

This creates a blank sprite.

For a 256 entry palette on an 8bpp sprite, set bit 31 of R3. Otherwise a 64 entry VIDC1 compatible palette is assumed.

The ability to pass a sprite type or mode specifier block in R6 was introduced in RISC OS 3.50, earlier versions only accept the mode number.

When opting to include a palette, note that the palette used is derived from the first N colours of the current screen mode. Therefore, the result is only sensible when in the same screen mode as the sprite being created for - where different, exclude the palette at the creation step and make a subsequent call to OS_SpriteOp 37 for the palette.

See PRM 1, page 773

[sh-index] Back to list of manuals