Entry | |
---|---|
R0 | Source mode / sprite area |
R1 | Source palette pointer / sprite |
R2 | Destination mode, or -1 for current mode |
R3 | Destination palette pointer, or |
-1 for current palette, or | |
0 for default for the mode | |
R4 | Pointer to buffer, or 0 to return length |
R5 | Select Table Flags (only used if R0 & R1 indicate a sprite) |
R6 | Pointer to transfer workspace (R12) (if R5 valid and bit 2 of R5 is set) |
R7 | Pointer to transfer function (if R5 valid and bit 2 of R5 is set) |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Preserved |
R3 | Preserved |
R4 | Required size of buffer (if R4=0 on entry), or preserved |
R5 | Preserved |
R6 | Preserved |
R7 | Preserved |
The purpose of this call is to set up a translation table in a buffer that is used by scaled sprite plotting.
Unlike ColourTrans_GenerateTable this SWI call only uses R5-R7 if R0 & R1 describe a sprite. For mode numbers, mode descriptors, sprite mode words, and the current mode (-1), R5-R7 are ignored and the flags word is treated as 0.
R6 and R7 are only used if R5 is used and bit 2 of R5 is set.
Sometimes ColourTrans may decide that no translation table is necessary (e.g. source and dest have the same pixel format and palette), in which case the “measure table size” form of the call will return with R4=0. Take care to check for this before allocating memory and asking for the table to be filled in.