h6. [[OS SWI Calls]] h6(. » [[OS_SpriteOp]] h6((. » OS_SpriteOp 15 - Create sprite h2. OS_SpriteOp 15 - Create sprite h5. (SWI &2E) |_<^{width:4em}. Entry | | |<^. R0 |<^. 15 (Reason code) + [[OS_SpriteOp|Area value]]| |<^. R1 |<^. Unused/[[Format Of Sprite Area|Sprite area]] (as defined by area value in R0) | |<^. R2 |<^. Sprite name | |<^. R3 |<^. 1 to create palette, 0 to exclude palette | |<^. R4 |<^. Width in pixels | |<^. R5 |<^. Height in pixels | |<^. R6 |<^. [[Mode Specifier]] | |_<^{width:4em}. Exit | | |\2<^. All registers preserved| h4. Use This call creates a new sprite with the given name. h4. Notes If a sprite with the given name already exists, it will first be deleted before the new sprite is created. All of the sprite pixels will be initialised to zero. If R6 is a valid [[Sprite Mode Word]] (i.e. a mode number, or a RISC OS 3.5 or RISC OS 5 style sprite mode word) then it will be used as-is to initialise the mode word of the new sprite. Otherwise it must be a pointer to a [[Mode Selector Block]]. The block will be converted to a RISC OS 3.5 or RISC OS 5 sprite mode word, favouring the most backwards compatible format. h4. See also * [[Format Of Sprite]] * [[Format Of Sprite Area]] * [[OS_SpriteOp]] * [[Sprite Mode Word]]