Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | |
---|---|
R0 | 56 (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 |
R5 | Flags |
R6 | Coordinate block/matrix |
R7 | Pointer to pixel translation table / Colour Mapping Descriptor, or 0 for no translation |
Exit | |
---|---|
All registers preserved |
This call paints a transformed sprite to the screen. When supplied with the right translation table, it is able to paint a sprite created in any source mode to any destination mode. If a translation table is not supplied when one is required, an error will be generated. Therefore when plotting arbitrary sprites it is recommended to always call ColourTrans_SelectTable or ColourTrans_GenerateTable before the plot in order to generate a suitable table.
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 sprite. 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 sprite 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 sprite 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.