ColourMapping in Drawfiles
--------------------------

[ This document is intentionally brief; refer to ColourMap-Sprite for
  information pertaining to the changes in the 

DrawFile rendering flags :
  bit 3 : If set, colour mapping function has been supplied
          If clear, no colour mapping should be performed


DrawFile_Render
=> R0 = flags
   R1-> draw file to render
   R2 = size of draw file
   R3-> transform, or 0 for identity
   R4-> clipping box, or 0 for none
   R5 = flatness
   R6 = pointer to colour mapping descriptor

ie flags updated and r6 used if ColourMapping set.


Service_DrawObjectRender
=> R0 = type
   R1 = service number
   R2-> render state
          +12 = flags
          +32 = pointer to colour mapping descriptor

ie two added values to the state and the flags updated.


Colour mapping descriptor and transfer function
-----------------------------------------------
The colour mapping descriptor is a small structure containing the workspace
and transfer function pointer. The structure has the following layout :
  +0 workspace to pass in R12 to transfer function
  +4 pointer to transfer function

The transfer function used by these operations is exactly the same as
that used by the ColourTrans_SelectTable calls (PRM 3-346). The function
will be called in SVC mode with the usual supervisor stack limits.

=> R0 = palette entry (&BBGGRR00)
   R12 = workspace value passed when call made
   R13 = supervisor stack
   R14 = return address
<= R0 = palette entry (&BBGGRR00)
   R12 may be corrupt
   R14 may be corrupt

The transfer function should perform whatever processing is required on the
palette entry passed to it. The routine may not change mode, perform any
operation which might cause SpriteExtend to be threaded out of (eg VDU
output) or cause the machine to block. You should return with MOV pc,lr.
The transfer function will not be called for masked pixels.
