Showing changes from revision #4 to #5:
Added | Removed | Changed
Entry | Contents |
---|---|
R0 | Palette entry (&BBGGRR00 format) |
R12 | Workspace pointer |
Exit | Contents |
---|---|
R0 | Processed palette entry |
All other registers are preserved |
A colour transfer function is a user-supplied routine that can be passed to some APIs in order to apply a custom transformation to colour values. For example, a transfer function can be supplied to ColourTrans_GenerateTable by setting bit 2 of R5.
The transfer function will be called in supervisor mode with the user-supplied workspace pointer in R12, R13 pointing to the standard supervisor stack, and R14 containing the return address. The routine must update the colour value in R0 and return to the caller, preserving all other registers except R14 and the PSR flags.
Colour transfer functions should be designed to be fast, as they may be called thousands or even millions of times, depending on the complexity of the operation being performed.
See also Colour Mapping Descriptor, an alternate form of specifying a transfer function which is used by some APIs.