h6. [[ColourTrans]] h6(. » [[ColourTrans SWI Calls|SWI Calls]] h6((. » ColourTrans_GenerateTable h2. ColourTrans_GenerateTable h5. (SWI &40763) |_<^{width:3em}. Entry | | |<^. R0|<^. [[ColourTrans mode identification|Source mode / sprite area]]| |<^. R1|<^. [[ColourTrans mode identification|Source palette pointer / sprite]]| |<^. R2|<^. [[Mode Specifier|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]] | |<^. R6|<^. Pointer to transfer workspace (R12) (if R5 valid and bit 2 of R5 is set)| |<^. R7|<^. Pointer to [[ColourTrans Transfer Function|transfer function]] (if R5 valid and bit 2 of R5 is set)| |_<^{width:3em}. 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 | h4. Use The purpose of this call is to set up a translation table in a buffer that is used by scaled sprite plotting. h4. Notes Unlike [[ColourTrans_SelectTable]], this call always uses the flags passed in R5. R6 and R7 are only used if 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. h4. See also * [[ColourTrans_SelectTable]] * [[Select Table Flags]]