Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | 16 (Reason code) + Area value |
R1 | Unused/Sprite area (as defined by area value in R0) |
R2 | Sprite name |
R3 | 1 to create palette, 0 to exclude palette |
R4 | X0 coordinate |
R5 | Y0 coordinate |
R6 | X1 coordinate |
R7 | Y1 coordinate |
Exit | |
---|---|
All registers preserved |
This call creates a new sprite with the given name, by copying a rectangle of pixels from the screen.
The Sprite Mode Word will be chosen such that the underlying pixel format of the sprite and the screen are identical. This allows for easy creation of sprites which can be blitted directly to screen memory via the fast OS_SpriteOp 34 call.
If a palette is requested then the palette will be initialised to a copy of the current screen palette. For 256 colour modes with a full 256 entry palette this will result in the sprite having the full 256 entries.
If a sprite with the given name already exists, it will first be deleted before the new sprite is created.
The coordinates must be specified in OS units. There is no defined order for the coordinates (i.e. X0 can either be the left or right edge of the sprite). Coordinates are inclusive.
After the sprite has been created, it will be set as the active sprite, as if OS_SpriteOp 24 had been called.
See also OS_SpriteOp 14, to create a sprite from the area defined by the graphics cursor position