Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | Contents |
---|---|
R0 | Palette entry (&BBGGRR00 format) |
R12 | Workspace pointer |
Entry | Contents |
---|---|
R0 | Palette entry |
R5 | Bit 2 is set |
R6 | Pointer to function to be called |
R7 | Pointer to transfer function workspace |
R12 | Workspace (as specified in R7) |
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.
By The setting transfer bit function 2 will of be called in supervisor mode with the flags 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 theandPSR R0 flags. >= 256, ColourTrans will call the transfer function specified in R6 to pre-process each palette entry. R12 points to the workspace (as specified in R7).
The Colour palette transfer entry functions must should be returned designed in to R0, be and fast, all as other they register may preserved. be called thousands or even millions of times, depending on the complexity of the operation being performed.