Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | |
---|---|
R0 | 55 (Reason code) + Area value |
R1 | Unused/Sprite area (as defined by area value in R0) |
R2 | Sprite name/pointer (as defined by area value in R0) |
R3 | Flags: |
Bit 0: 1 → R6 is destination coordinate block. 0 → R6 is a matrix. | |
Bit 1: 1 → R4 is source coordinate block in sprite | |
R4 | Source coordinate block in sprite |
R6 | Coordinate block/matrix |
Exit | |
---|---|
All registers preserved |
This call paints a transformed sprite mask to the screen. For sprite pixels where the mask is non-zero, the corresponding screen pixel will be set to the currently selected background colour. If the mask is zero the screen pixel will not be updated.
If R3 bit 0 is clear, R6 is treated as a pointer to a Draw module Transformation Matrix describing the transform to apply to the mask. If bit 0 is set then R6 is treated as a pointer to a block giving the screen coordinates of a parallelogram to transform the mask into:
Word | Value |
---|---|
0 | X0 coordinate, in 1/256th OS units |
1 | Y0 coordinate, in 1/256th OS units |
2 | X1 coordinate, in 1/256th OS units |
3 | Y1 coordinate, in 1/256th OS units |
4 | X2 coordinate, in 1/256th OS units |
5 | Y2 coordinate, in 1/256th OS units |
6 | X3 coordinate, in 1/256th OS units |
7 | Y3 coordinate, in 1/256th OS units |
If R3 bit 1 is set then R4 is treated as a pointer to a coordinate block specifying a subrectangle of the mask to render from, with coordinates given in pixels:
Word | Value |
---|---|
0 | x0 coordinate |
1 | y0 coordinate |
2 | x1 coordinate |
3 | y1 coordinate |
When specifying a destination parallelogram, the source rectangle is mapped onto the destination as follows:
x0,y0 -> X0,Y0 x1,y0 -> X1,Y1 x1,y1 -> X2,Y2 x0,y1 -> X3,Y3
See OS_SpriteOp Scaled/Transformed Plot Flags for details on how the flags affect the plot operation and dictate some of the input parameters.
When used on a sprite without a mask, all pixels within the destination parallelogram will be filled with the background colour.