h6. [[OS SWI Calls]] h6(. » [[OS_SpriteOp]] h6((. » OS_SpriteOp 29 - Create mask h2. OS_SpriteOp 29 - Create mask h5. (SWI &2E) |_<^{width:4em}. Entry | | |<^. R0 |<^. 29 (Reason code) + [[OS_SpriteOp|Area value]]| |<^. R1 |<^. Unused/[[Format Of Sprite Area|Sprite area]] (as defined by area value in R0) | |<^. R2 |<^. Sprite name/[[Format Of Sprite|pointer]] (as defined by area value in R0) | |_<^{width:4em}. Exit | | |\2<^. All other registers preserved| h4. Use This call allows a mask to be added to a sprite. If the [[Sprite Mode Word|sprite mode word]] has the top bit set (the wide mask flag) then an 8bpp alpha mask will be created, otherwise a standard binary mask will be created. The new mask will be filled with a default value such that all pixels are 100% opaque (i.e. all mask pixels set to 255 for alpha masks, or 1 for binary masks) h4. Notes If the sprite already has a mask, its contents will be erased, just as if a fresh mask had been created. If you wish to convert between different mask formats, or to transfer data to/from an alpha channel, use [[OS_SpriteOp 38]]. h4. See also * [[Format Of Sprite]] * [[Format Of Sprite Area]] * [[OS_SpriteOp]] * [[OS_SpriteOp 30|OS_SpriteOp 30 - Remove mask]] * [[OS_SpriteOp 38|OS_SpriteOp 38 - Create/remove alpha]]