h6. [[OS SWI Calls]] h6(. » [[OS_SpriteOp]] h6((. » OS_SpriteOp 56 - Plot Sprite Transformed h2. OS_SpriteOp 56 - Plot Sprite Transformed h5. (SWI &2E) |_<^{width:4em}. Entry | | |<^. R0 |<^. 56 (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) | |/3<^. 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 |<^. [[OS_SpriteOp Scaled/Transformed Plot Flags|Flags]] | |<^. R6 |<^. Coordinate block/[[Transformation Matrix|matrix]] | |<^. R7 |<^. Pointer to pixel translation table / [[Colour Mapping Descriptor]], or 0 for no translation | |_<^{width:4em}. Exit | | |\2<^. All registers preserved| h4. Use 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: |_<^{width:4em}. 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: |_<^{width:4em}. 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: <pre> x0,y0 -> X0,Y0 x1,y0 -> X1,Y1 x1,y1 -> X2,Y2 x0,y1 -> X3,Y3 </pre> h4. Notes See [[OS_SpriteOp Scaled/Transformed Plot Flags]] for details on how the flags affect the plot operation and dictate some of the input parameters. h4. See also * [[Format Of Sprite]] * [[Format Of Sprite Area]] * [[OS_SpriteOp]] * [[OS_SpriteOp Scaled/Transformed Plot Flags]] * [[ColourTrans_SelectTable]] * [[ColourTrans_GenerateTable]] * [[Colour Mapping Descriptor]] * [[Transformation Matrix]]